diff --git a/bluejay-schema-comparator/Cargo.toml b/bluejay-schema-comparator/Cargo.toml index e46cf7fb..c31dac83 100644 --- a/bluejay-schema-comparator/Cargo.toml +++ b/bluejay-schema-comparator/Cargo.toml @@ -16,6 +16,11 @@ bluejay-printer = { workspace = true } [dev-dependencies] bluejay-parser = { workspace = true } +criterion = "0.7" + +[[bench]] +name = "compare" +harness = false [lints] workspace = true diff --git a/bluejay-schema-comparator/benches/compare.rs b/bluejay-schema-comparator/benches/compare.rs new file mode 100644 index 00000000..7a740af1 --- /dev/null +++ b/bluejay-schema-comparator/benches/compare.rs @@ -0,0 +1,54 @@ +use bluejay_parser::ast::{ + definition::{DefinitionDocument, SchemaDefinition}, + Parse, +}; +use bluejay_schema_comparator::compare; +use criterion::{criterion_group, criterion_main, Criterion}; +use std::sync::LazyLock; + +fn data_path(name: &str) -> std::path::PathBuf { + std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../data") + .join(name) +} + +fn load_schema(name: &str) -> SchemaDefinition<'static> { + let src = std::fs::read_to_string(data_path(name)).unwrap(); + let doc: DefinitionDocument = DefinitionDocument::parse(Box::leak(src.into_boxed_str())) + .result + .expect("Schema had parse errors"); + let leaked = Box::leak(Box::new(doc)); + SchemaDefinition::try_from(&*leaked).expect("Schema had errors") +} + +static DOCS_SCHEMA: LazyLock> = + LazyLock::new(|| load_schema("schema.docs.graphql")); + +static ADMIN_OLD: LazyLock> = + LazyLock::new(|| load_schema("admin_schema_2024-07_public.graphql")); + +static ADMIN_NEW: LazyLock> = + LazyLock::new(|| load_schema("admin_schema_2026-01_public.graphql")); + +fn compare_identical(c: &mut Criterion) { + c.bench_function("identical docs schema (50k lines)", |b| { + b.iter(|| compare(&*DOCS_SCHEMA, &*DOCS_SCHEMA)); + }); + + c.bench_function("identical admin schema (106k lines)", |b| { + b.iter(|| compare(&*ADMIN_OLD, &*ADMIN_OLD)); + }); +} + +fn compare_with_changes(c: &mut Criterion) { + c.bench_function("docs schema vs itself (no changes)", |b| { + b.iter(|| compare(&*DOCS_SCHEMA, &*DOCS_SCHEMA)); + }); + + c.bench_function("admin schema across versions", |b| { + b.iter(|| compare(&*ADMIN_OLD, &*ADMIN_NEW)); + }); +} + +criterion_group!(benches, compare_identical, compare_with_changes); +criterion_main!(benches); diff --git a/bluejay-schema-comparator/src/changes.rs b/bluejay-schema-comparator/src/changes.rs index d88f1b12..27a5505a 100644 --- a/bluejay-schema-comparator/src/changes.rs +++ b/bluejay-schema-comparator/src/changes.rs @@ -10,13 +10,43 @@ use bluejay_printer::value::ValuePrinter; use std::borrow::Cow; use strum::AsRefStr; -#[derive(Eq, Ord, PartialEq, PartialOrd)] +#[derive(Eq, PartialEq)] pub enum Criticality { Breaking { reason: Cow<'static, str> }, Dangerous { reason: Cow<'static, str> }, Safe { reason: Cow<'static, str> }, } +/// Numeric ordering: Breaking(2) > Dangerous(1) > Safe(0) +#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] +pub enum CriticalityLevel { + Safe = 0, + Dangerous = 1, + Breaking = 2, +} + +impl Criticality { + pub fn level(&self) -> CriticalityLevel { + match self { + Self::Breaking { .. } => CriticalityLevel::Breaking, + Self::Dangerous { .. } => CriticalityLevel::Dangerous, + Self::Safe { .. } => CriticalityLevel::Safe, + } + } +} + +impl Ord for Criticality { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.level().cmp(&other.level()) + } +} + +impl PartialOrd for Criticality { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + impl Criticality { fn breaking(reason: Option>) -> Self { Self::Breaking { @@ -239,15 +269,144 @@ pub enum Change<'a, S: SchemaDefinition> { impl Change<'_, S> { pub fn breaking(&self) -> bool { - matches!(self.criticality(), Criticality::Breaking { .. }) + matches!(self.criticality_level(), CriticalityLevel::Breaking) } pub fn non_breaking(&self) -> bool { - matches!(self.criticality(), Criticality::Safe { .. }) + matches!(self.criticality_level(), CriticalityLevel::Safe) } pub fn dangerous(&self) -> bool { - matches!(self.criticality(), Criticality::Dangerous { .. }) + matches!(self.criticality_level(), CriticalityLevel::Dangerous) + } + + /// Cheap criticality check without allocating reason strings. + pub fn criticality_level(&self) -> CriticalityLevel { + match self { + Self::TypeRemoved { .. } => CriticalityLevel::Breaking, + Self::TypeAdded { .. } => CriticalityLevel::Safe, + Self::TypeKindChanged { .. } => CriticalityLevel::Breaking, + Self::TypeDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::FieldAdded { .. } => CriticalityLevel::Safe, + Self::FieldRemoved { .. } => CriticalityLevel::Breaking, + Self::FieldDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::FieldTypeChanged { + type_name: _, + old_field_definition: old_field, + new_field_definition: new_field, + } => { + if is_change_safe_for_field::( + old_field.r#type().as_shallow_ref(), + new_field.r#type().as_shallow_ref(), + ) { + CriticalityLevel::Safe + } else { + CriticalityLevel::Breaking + } + } + Self::FieldArgumentAdded { + type_name: _, + field_definition: _, + argument_definition: argument, + } => { + if argument.r#type().is_required() && argument.default_value().is_none() { + CriticalityLevel::Breaking + } else { + CriticalityLevel::Safe + } + } + Self::FieldArgumentRemoved { .. } => CriticalityLevel::Breaking, + Self::FieldArgumentDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::FieldArgumentDefaultValueChanged { .. } => CriticalityLevel::Dangerous, + Self::FieldArgumentTypeChanged { + type_name: _, + field_definition: _, + old_argument_definition: old_argument, + new_argument_definition: new_argument, + } => { + if is_change_safe_for_input_value::( + old_argument.r#type().as_shallow_ref(), + new_argument.r#type().as_shallow_ref(), + ) { + CriticalityLevel::Safe + } else { + CriticalityLevel::Breaking + } + } + Self::ObjectInterfaceAddition { .. } => CriticalityLevel::Dangerous, + Self::ObjectInterfaceRemoval { .. } => CriticalityLevel::Breaking, + Self::EnumValueAdded { .. } => CriticalityLevel::Dangerous, + Self::EnumValueRemoved { .. } => CriticalityLevel::Breaking, + Self::EnumValueDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::UnionMemberAdded { .. } => CriticalityLevel::Dangerous, + Self::UnionMemberRemoved { .. } => CriticalityLevel::Breaking, + Self::InputFieldAdded { + input_object_type_definition: _, + added_field_definition: added_field, + } => { + if added_field.r#type().is_required() && added_field.default_value().is_none() { + CriticalityLevel::Breaking + } else { + CriticalityLevel::Safe + } + } + Self::InputFieldRemoved { .. } => CriticalityLevel::Breaking, + Self::InputFieldDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::InputFieldTypeChanged { + input_object_type_definition: _, + old_field_definition: old_field, + new_field_definition: new_field, + } => { + if is_change_safe_for_input_value::( + old_field.r#type().as_shallow_ref(), + new_field.r#type().as_shallow_ref(), + ) { + CriticalityLevel::Safe + } else { + CriticalityLevel::Breaking + } + } + Self::InputFieldDefaultValueChanged { .. } => CriticalityLevel::Dangerous, + Self::DirectiveDefinitionAdded { .. } => CriticalityLevel::Safe, + Self::DirectiveDefinitionRemoved { .. } => CriticalityLevel::Breaking, + Self::DirectiveDefinitionLocationAdded { .. } => CriticalityLevel::Safe, + Self::DirectiveDefinitionLocationRemoved { .. } => CriticalityLevel::Breaking, + Self::DirectiveDefinitionDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::DirectiveDefinitionArgumentAdded { + directive_definition: _, + argument_definition, + } => { + if argument_definition.is_required() { + CriticalityLevel::Breaking + } else { + CriticalityLevel::Safe + } + } + Self::DirectiveDefinitionArgumentRemoved { .. } => CriticalityLevel::Breaking, + Self::DirectiveDefinitionArgumentDescriptionChanged { .. } => CriticalityLevel::Safe, + Self::DirectiveDefinitionArgumentTypeChanged { + directive_definition: _, + old_argument_definition, + new_argument_definition, + } => { + if is_change_safe_for_input_value::( + old_argument_definition.r#type().as_shallow_ref(), + new_argument_definition.r#type().as_shallow_ref(), + ) { + CriticalityLevel::Safe + } else { + CriticalityLevel::Breaking + } + } + Self::DirectiveDefinitionArgumentDefaultValueChanged { .. } => { + CriticalityLevel::Dangerous + } + Self::DirectiveAdded { .. } => CriticalityLevel::Safe, + Self::DirectiveRemoved { .. } => CriticalityLevel::Breaking, + Self::DirectiveArgumentAdded { .. } => CriticalityLevel::Safe, + Self::DirectiveArgumentRemoved { .. } => CriticalityLevel::Safe, + Self::DirectiveArgumentValueChanged { .. } => CriticalityLevel::Safe, + } } pub fn criticality(&self) -> Criticality { diff --git a/bluejay-schema-comparator/src/diff/argument.rs b/bluejay-schema-comparator/src/diff/argument.rs index 3d965a1d..7e9eb6c5 100644 --- a/bluejay-schema-comparator/src/diff/argument.rs +++ b/bluejay-schema-comparator/src/diff/argument.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use bluejay_core::definition::{ DirectiveLocation, InputType, InputValueDefinition, SchemaDefinition, }; @@ -27,9 +27,8 @@ impl<'a, S: SchemaDefinition + 'a> ArgumentDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_argument_definition.description() != self.new_argument_definition.description() { changes.push(Change::FieldArgumentDescriptionChanged { @@ -76,29 +75,12 @@ impl<'a, S: SchemaDefinition + 'a> ArgumentDiff<'a, S> { (None, None) => {} } - changes.extend( - directive_additions::(self.old_argument_definition, self.new_argument_definition) - .map(|directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::ArgumentDefinition, - member_name: self.old_argument_definition.name(), - }), - ); - - changes.extend( - directive_removals::(self.old_argument_definition, self.new_argument_definition) - .map(|directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::ArgumentDefinition, - member_name: self.old_argument_definition.name(), - }), - ); - - changes.extend(common_directive_changes( + diff_directives_into::( self.old_argument_definition, self.new_argument_definition, - )); - - changes + DirectiveLocation::ArgumentDefinition, + self.old_argument_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/directive.rs b/bluejay-schema-comparator/src/diff/directive.rs index b1175376..189c969e 100644 --- a/bluejay-schema-comparator/src/diff/directive.rs +++ b/bluejay-schema-comparator/src/diff/directive.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use bluejay_core::definition::{HasDirectives, SchemaDefinition}; +use bluejay_core::definition::{DirectiveLocation, HasDirectives, SchemaDefinition}; use bluejay_core::{Argument, Arguments, AsIter, Directive, Value}; pub type ArgumentForDirective = @@ -23,9 +23,9 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { + // Argument additions changes.extend( self.argument_additions() .map(|arg| Change::DirectiveArgumentAdded { @@ -34,15 +34,7 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDiff<'a, S> { }), ); - changes.extend( - self.argument_removals() - .map(|arg| Change::DirectiveArgumentRemoved { - directive: self.old_directive, - argument: arg, - }), - ); - - // diff common arguments + // Argument removals + common argument diffs in a single pass self.old_directive .arguments() .map(|ii| ii.iter()) @@ -65,10 +57,13 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDiff<'a, S> { new_argument: new_arg, }); } + } else { + changes.push(Change::DirectiveArgumentRemoved { + directive: self.old_directive, + argument: old_arg, + }); } }); - - changes } fn argument_additions(&self) -> impl Iterator> { @@ -83,19 +78,6 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDiff<'a, S> { .is_none_or(|args| !args.iter().any(|old_arg| old_arg.name() == new_arg.name())) }) } - - fn argument_removals(&self) -> impl Iterator> { - self.old_directive - .arguments() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .filter(|old_arg| { - self.new_directive.arguments().is_some_and(|args| { - !args.iter().any(|new_arg| old_arg.name() == new_arg.name()) - }) - }) - } } pub fn directive_additions< @@ -120,49 +102,67 @@ pub fn directive_additions< }) } -pub fn directive_removals< +/// Handles directive removals and common directive diffs in a single pass. +/// Also emits DirectiveAdded for additions. +#[inline] +pub fn diff_directives_into< 'a, S: SchemaDefinition + 'a, T: HasDirectives::Directives>, >( old_member: &'a T, new_member: &'a T, -) -> impl Iterator::Directive> { - old_member - .directives() + location: DirectiveLocation, + member_name: &'a str, + changes: &mut Vec>, +) { + let old_directives = old_member.directives(); + let new_directives = new_member.directives(); + + // Fast path: if neither side has directives, nothing to do + if old_directives.is_none() && new_directives.is_none() { + return; + } + + // Additions: new directives not in old + new_directives .map(|ii| ii.iter()) .into_iter() .flatten() - .filter(|old_directive| { - new_member.directives().is_none_or(|directives| { - !directives - .iter() - .any(|new_directive| old_directive.name() == new_directive.name()) - }) - }) -} + .for_each(|new_directive| { + let found_in_old = old_directives + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .any(|old_directive| old_directive.name() == new_directive.name()); + if !found_in_old { + changes.push(Change::DirectiveAdded { + directive: new_directive, + location, + member_name, + }); + } + }); -pub fn common_directive_changes< - 'a, - S: SchemaDefinition + 'a, - T: HasDirectives::Directives>, ->( - old_member: &'a T, - new_member: &'a T, -) -> impl Iterator> { - old_member - .directives() + // Removals + common diffs in a single pass over old directives + old_directives .map(|ii| ii.iter()) .into_iter() .flatten() - .filter_map(move |old_directive| { - new_member - .directives() + .for_each(|old_directive| { + if let Some(new_directive) = new_directives .map(|ii| ii.iter()) .into_iter() .flatten() .find(|new_directive| old_directive.name() == new_directive.name()) - .map(|new_directive| DirectiveDiff::new(old_directive, new_directive).diff()) - }) - .flat_map(|changes| changes.into_iter()) + { + DirectiveDiff::new(old_directive, new_directive).diff_into(changes); + } else { + changes.push(Change::DirectiveRemoved { + directive: old_directive, + location, + member_name, + }); + } + }); } diff --git a/bluejay-schema-comparator/src/diff/directive_definition.rs b/bluejay-schema-comparator/src/diff/directive_definition.rs index 28c45d56..ee185d89 100644 --- a/bluejay-schema-comparator/src/diff/directive_definition.rs +++ b/bluejay-schema-comparator/src/diff/directive_definition.rs @@ -21,9 +21,8 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes: Vec> = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_directive_definition.description() != self.new_directive_definition.description() { @@ -47,6 +46,7 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionDiff<'a, S> { } })); + // Argument additions changes.extend(self.argument_additions().map(|argument_definition| { Change::DirectiveDefinitionArgumentAdded { directive_definition: self.new_directive_definition, @@ -54,14 +54,7 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionDiff<'a, S> { } })); - changes.extend(self.argument_removals().map(|argument_definition| { - Change::DirectiveDefinitionArgumentRemoved { - directive_definition: self.new_directive_definition, - argument_definition, - } - })); - - // diff common directives + // Argument removals + common argument diffs in a single pass self.old_directive_definition .arguments_definition() .map(|ii| ii.iter()) @@ -78,19 +71,20 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionDiff<'a, S> { .find(|new_argument| old_argument.name() == new_argument.name()); if let Some(new_argument) = new_argument { - changes.extend( - DirectiveDefinitionArgumentDiff::new( - self.new_directive_definition, - old_argument, - new_argument, - ) - .diff(), - ); + DirectiveDefinitionArgumentDiff::new( + self.new_directive_definition, + old_argument, + new_argument, + ) + .diff_into(changes); + } else { + changes.push(Change::DirectiveDefinitionArgumentRemoved { + directive_definition: self.new_directive_definition, + argument_definition: old_argument, + }); } }, ); - - changes } fn location_removals(&self) -> impl Iterator { @@ -117,23 +111,6 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionDiff<'a, S> { }) } - fn argument_removals(&self) -> impl Iterator { - self.old_directive_definition - .arguments_definition() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .filter(|old_argument| { - self.new_directive_definition - .arguments_definition() - .is_some_and(|args| { - !args - .iter() - .any(|new_argument| old_argument.name() == new_argument.name()) - }) - }) - } - fn argument_additions(&self) -> impl Iterator { self.new_directive_definition .arguments_definition() diff --git a/bluejay-schema-comparator/src/diff/directive_definition_argument.rs b/bluejay-schema-comparator/src/diff/directive_definition_argument.rs index d60e75c9..35786213 100644 --- a/bluejay-schema-comparator/src/diff/directive_definition_argument.rs +++ b/bluejay-schema-comparator/src/diff/directive_definition_argument.rs @@ -1,5 +1,8 @@ use crate::changes::Change; -use bluejay_core::definition::{InputType, InputValueDefinition, SchemaDefinition}; +use crate::diff::directive::diff_directives_into; +use bluejay_core::definition::{ + DirectiveLocation, InputType, InputValueDefinition, SchemaDefinition, +}; use bluejay_core::Value; pub struct DirectiveDefinitionArgumentDiff<'a, S: SchemaDefinition> { @@ -21,9 +24,8 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionArgumentDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_argument_definition.description() != self.new_argument_definition.description() { changes.push(Change::DirectiveDefinitionArgumentDescriptionChanged { @@ -66,6 +68,12 @@ impl<'a, S: SchemaDefinition + 'a> DirectiveDefinitionArgumentDiff<'a, S> { _ => {} } - changes + diff_directives_into::( + self.old_argument_definition, + self.new_argument_definition, + DirectiveLocation::ArgumentDefinition, + self.old_argument_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/enum_type.rs b/bluejay-schema-comparator/src/diff/enum_type.rs index b6ab4b6f..74544c21 100644 --- a/bluejay-schema-comparator/src/diff/enum_type.rs +++ b/bluejay-schema-comparator/src/diff/enum_type.rs @@ -1,10 +1,13 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use crate::diff::enum_value::EnumValueDiff; use bluejay_core::definition::{ DirectiveLocation, EnumTypeDefinition, EnumValueDefinition, SchemaDefinition, }; use bluejay_core::AsIter; +use std::collections::HashMap; + +const HASHMAP_THRESHOLD: usize = 64; pub struct EnumTypeDiff<'a, S: SchemaDefinition> { old_type_definition: &'a S::EnumTypeDefinition, @@ -22,44 +25,94 @@ impl<'a, S: SchemaDefinition + 'a> EnumTypeDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { + let old_hint = self + .old_type_definition + .enum_value_definitions() + .iter() + .size_hint() + .0; + let new_hint = self + .new_type_definition + .enum_value_definitions() + .iter() + .size_hint() + .0; + + if old_hint >= HASHMAP_THRESHOLD || new_hint >= HASHMAP_THRESHOLD { + self.diff_values_hashmap(changes); + } else { + self.diff_values_linear(changes); + } - changes.extend(self.value_additions().map(|enum_value_definition| { - Change::EnumValueAdded { - enum_type_definition: self.new_type_definition, - enum_value_definition, - } - })); + diff_directives_into::( + self.old_type_definition, + self.new_type_definition, + DirectiveLocation::Enum, + self.old_type_definition.name(), + changes, + ); + } + + #[cold] + #[inline(never)] + fn diff_values_hashmap(&self, changes: &mut Vec>) { + let old_values: HashMap<&str, &'a S::EnumValueDefinition> = self + .old_type_definition + .enum_value_definitions() + .iter() + .map(|v| (v.name(), v)) + .collect(); + let new_values: HashMap<&str, &'a S::EnumValueDefinition> = self + .new_type_definition + .enum_value_definitions() + .iter() + .map(|v| (v.name(), v)) + .collect(); - changes.extend(self.value_removals().map(|enum_value_definition| { - Change::EnumValueRemoved { - enum_type_definition: self.old_type_definition, - enum_value_definition, + for (&name, &value) in &new_values { + if !old_values.contains_key(name) { + changes.push(Change::EnumValueAdded { + enum_type_definition: self.new_type_definition, + enum_value_definition: value, + }); } - })); + } - changes.extend( - directive_additions::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::Enum, - member_name: self.old_type_definition.name(), - }, - ), - ); + for (&name, &old_value) in &old_values { + if let Some(&new_value) = new_values.get(name) { + EnumValueDiff::new(self.old_type_definition, old_value, new_value) + .diff_into(changes); + } else { + changes.push(Change::EnumValueRemoved { + enum_type_definition: self.old_type_definition, + enum_value_definition: old_value, + }); + } + } + } + #[inline] + fn diff_values_linear(&self, changes: &mut Vec>) { + // Additions changes.extend( - directive_removals::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::Enum, - member_name: self.old_type_definition.name(), - }, - ), + self.new_type_definition + .enum_value_definitions() + .iter() + .filter(|new_enum_value| { + self.old_type_definition + .enum_value_definitions() + .iter() + .all(|old_enum_value| old_enum_value.name() != new_enum_value.name()) + }) + .map(|enum_value_definition| Change::EnumValueAdded { + enum_type_definition: self.new_type_definition, + enum_value_definition, + }), ); - // diff common enum values + // Removals + common value diffs in a single pass self.old_type_definition .enum_value_definitions() .iter() @@ -71,46 +124,14 @@ impl<'a, S: SchemaDefinition + 'a> EnumTypeDiff<'a, S> { .find(|new_enum_value| old_enum_value.name() == new_enum_value.name()); if let Some(new_enum_value) = new_enum_value { - changes.extend( - EnumValueDiff::new( - self.old_type_definition, - old_enum_value, - new_enum_value, - ) - .diff(), - ); + EnumValueDiff::new(self.old_type_definition, old_enum_value, new_enum_value) + .diff_into(changes); + } else { + changes.push(Change::EnumValueRemoved { + enum_type_definition: self.old_type_definition, + enum_value_definition: old_enum_value, + }); } }); - - changes.extend(common_directive_changes( - self.old_type_definition, - self.new_type_definition, - )); - - changes - } - - fn value_additions(&self) -> impl Iterator { - self.new_type_definition - .enum_value_definitions() - .iter() - .filter(|new_enum_value| { - self.old_type_definition - .enum_value_definitions() - .iter() - .all(|old_enum_value| old_enum_value.name() != new_enum_value.name()) - }) - } - - fn value_removals(&self) -> impl Iterator { - self.old_type_definition - .enum_value_definitions() - .iter() - .filter(|old_enum_value| { - self.new_type_definition - .enum_value_definitions() - .iter() - .all(|new_enum_value| old_enum_value.name() != new_enum_value.name()) - }) } } diff --git a/bluejay-schema-comparator/src/diff/enum_value.rs b/bluejay-schema-comparator/src/diff/enum_value.rs index 4a054753..f9975863 100644 --- a/bluejay-schema-comparator/src/diff/enum_value.rs +++ b/bluejay-schema-comparator/src/diff/enum_value.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use bluejay_core::definition::{DirectiveLocation, EnumValueDefinition, SchemaDefinition}; pub struct EnumValueDiff<'a, S: SchemaDefinition> { @@ -21,9 +21,8 @@ impl<'a, S: SchemaDefinition + 'a> EnumValueDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_value_definition.description() != self.new_value_definition.description() { changes.push(Change::EnumValueDescriptionChanged { enum_type_definition: self.enum_type_definition, @@ -32,31 +31,12 @@ impl<'a, S: SchemaDefinition + 'a> EnumValueDiff<'a, S> { }); } - changes.extend( - directive_additions::(self.old_value_definition, self.new_value_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::EnumValue, - member_name: self.old_value_definition.name(), - }, - ), - ); - - changes.extend( - directive_removals::(self.old_value_definition, self.new_value_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::EnumValue, - member_name: self.old_value_definition.name(), - }, - ), - ); - - changes.extend(common_directive_changes( + diff_directives_into::( self.old_value_definition, self.new_value_definition, - )); - - changes + DirectiveLocation::EnumValue, + self.old_value_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/field.rs b/bluejay-schema-comparator/src/diff/field.rs index 2b9ed164..8dbbae48 100644 --- a/bluejay-schema-comparator/src/diff/field.rs +++ b/bluejay-schema-comparator/src/diff/field.rs @@ -1,6 +1,6 @@ use crate::changes::Change; use crate::diff::argument::ArgumentDiff; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use bluejay_core::definition::{ DirectiveLocation, FieldDefinition, InputValueDefinition, OutputType, SchemaDefinition, }; @@ -25,9 +25,8 @@ impl<'a, S: SchemaDefinition + 'a> FieldDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_field_definition.description() != self.new_field_definition.description() { changes.push(Change::FieldDescriptionChanged { type_name: self.type_name, @@ -46,101 +45,67 @@ impl<'a, S: SchemaDefinition + 'a> FieldDiff<'a, S> { }); } - changes.extend(self.argument_additions().map(|argument_definition| { - Change::FieldArgumentAdded { - type_name: self.type_name, - field_definition: self.new_field_definition, - argument_definition, - } - })); + let old_args = self.old_field_definition.arguments_definition(); + let new_args = self.new_field_definition.arguments_definition(); - changes.extend(self.argument_removals().map(|argument_definition| { - Change::FieldArgumentRemoved { - type_name: self.type_name, - field_definition: self.old_field_definition, - argument_definition, - } - })); + // Fast path: skip argument diffing when neither field has arguments + if old_args.is_some() || new_args.is_some() { + // Argument additions + new_args + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .for_each(|new_arg| { + let found_in_old = old_args + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .any(|old_arg| old_arg.name() == new_arg.name()); + if !found_in_old { + changes.push(Change::FieldArgumentAdded { + type_name: self.type_name, + field_definition: self.new_field_definition, + argument_definition: new_arg, + }); + } + }); - // diff common arguments - self.old_field_definition - .arguments_definition() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .for_each(|old_argument| { - let new_argument = self - .new_field_definition - .arguments_definition() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .find(|new_argument| old_argument.name() == new_argument.name()); + // Argument removals + common argument diffs in a single pass + old_args + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .for_each(|old_argument| { + let new_argument = new_args + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .find(|new_argument| old_argument.name() == new_argument.name()); - if let Some(new_argument) = new_argument { - changes.extend( + if let Some(new_argument) = new_argument { ArgumentDiff::new( self.type_name, self.old_field_definition, old_argument, new_argument, ) - .diff(), - ); - } - }); - - changes.extend( - directive_additions::(self.old_field_definition, self.new_field_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::FieldDefinition, - member_name: self.old_field_definition.name(), - }, - ), - ); - - changes.extend( - directive_removals::(self.old_field_definition, self.new_field_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::FieldDefinition, - member_name: self.old_field_definition.name(), - }, - ), - ); + .diff_into(changes); + } else { + changes.push(Change::FieldArgumentRemoved { + type_name: self.type_name, + field_definition: self.old_field_definition, + argument_definition: old_argument, + }); + } + }); + } - changes.extend(common_directive_changes( + diff_directives_into::( self.old_field_definition, self.new_field_definition, - )); - - changes - } - - fn argument_additions(&self) -> impl Iterator { - self.new_field_definition - .arguments_definition() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .filter(|new_arg| { - self.old_field_definition - .arguments_definition() - .is_none_or(|args| !args.iter().any(|old_arg| old_arg.name() == new_arg.name())) - }) - } - - fn argument_removals(&self) -> impl Iterator { - self.old_field_definition - .arguments_definition() - .map(|ii| ii.iter()) - .into_iter() - .flatten() - .filter(|new_arg| { - self.new_field_definition - .arguments_definition() - .is_none_or(|args| !args.iter().any(|old_arg| old_arg.name() == new_arg.name())) - }) + DirectiveLocation::FieldDefinition, + self.old_field_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/input_field.rs b/bluejay-schema-comparator/src/diff/input_field.rs index 2e2606af..3c727a26 100644 --- a/bluejay-schema-comparator/src/diff/input_field.rs +++ b/bluejay-schema-comparator/src/diff/input_field.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use bluejay_core::definition::{ DirectiveLocation, InputType, InputValueDefinition, SchemaDefinition, }; @@ -7,7 +7,6 @@ use bluejay_core::Value; pub struct InputFieldDiff<'a, S: SchemaDefinition> { old_type_definition: &'a S::InputObjectTypeDefinition, - new_type_definition: &'a S::InputObjectTypeDefinition, old_field_definition: &'a S::InputValueDefinition, new_field_definition: &'a S::InputValueDefinition, } @@ -15,21 +14,19 @@ pub struct InputFieldDiff<'a, S: SchemaDefinition> { impl<'a, S: SchemaDefinition + 'a> InputFieldDiff<'a, S> { pub fn new( old_type_definition: &'a S::InputObjectTypeDefinition, - new_type_definition: &'a S::InputObjectTypeDefinition, + _new_type_definition: &'a S::InputObjectTypeDefinition, old_field_definition: &'a S::InputValueDefinition, new_field_definition: &'a S::InputValueDefinition, ) -> Self { Self { old_type_definition, - new_type_definition, old_field_definition, new_field_definition, } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { if self.old_field_definition.description() != self.new_field_definition.description() { changes.push(Change::InputFieldDescriptionChanged { input_object_type_definition: self.old_type_definition, @@ -61,14 +58,7 @@ impl<'a, S: SchemaDefinition + 'a> InputFieldDiff<'a, S> { }); } } - (Some(_), None) => { - changes.push(Change::InputFieldDefaultValueChanged { - input_object_type_definition: self.old_type_definition, - old_field_definition: self.old_field_definition, - new_field_definition: self.new_field_definition, - }); - } - (None, Some(_)) => { + (Some(_), None) | (None, Some(_)) => { changes.push(Change::InputFieldDefaultValueChanged { input_object_type_definition: self.old_type_definition, old_field_definition: self.old_field_definition, @@ -78,31 +68,12 @@ impl<'a, S: SchemaDefinition + 'a> InputFieldDiff<'a, S> { (None, None) => {} } - changes.extend( - directive_additions::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::InputFieldDefinition, - member_name: self.old_field_definition.name(), - }, - ), - ); - - changes.extend( - directive_removals::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::InputFieldDefinition, - member_name: self.old_field_definition.name(), - }, - ), - ); - - changes.extend(common_directive_changes( + diff_directives_into::( self.old_field_definition, self.new_field_definition, - )); - - changes + DirectiveLocation::InputFieldDefinition, + self.old_field_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/input_object_type.rs b/bluejay-schema-comparator/src/diff/input_object_type.rs index 79e5c468..c94c7b00 100644 --- a/bluejay-schema-comparator/src/diff/input_object_type.rs +++ b/bluejay-schema-comparator/src/diff/input_object_type.rs @@ -1,11 +1,14 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use crate::diff::input_field::InputFieldDiff; use bluejay_core::definition::{ DirectiveLocation, InputFieldsDefinition, InputObjectTypeDefinition, InputValueDefinition, SchemaDefinition, }; use bluejay_core::AsIter; +use std::collections::HashMap; + +const HASHMAP_THRESHOLD: usize = 64; pub struct InputObjectTypeDiff<'a, S: SchemaDefinition> { old_type_definition: &'a S::InputObjectTypeDefinition, @@ -23,96 +26,123 @@ impl<'a, S: SchemaDefinition + 'a> InputObjectTypeDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { + let old_hint = self + .old_type_definition + .input_field_definitions() + .iter() + .size_hint() + .0; + let new_hint = self + .new_type_definition + .input_field_definitions() + .iter() + .size_hint() + .0; - changes.extend(self.input_field_additions().map(|input_value_definition| { - Change::InputFieldAdded { - added_field_definition: input_value_definition, - input_object_type_definition: self.new_type_definition, - } - })); - changes.extend(self.input_field_removals().map(|input_value_definition| { - Change::InputFieldRemoved { - removed_field_definition: input_value_definition, - input_object_type_definition: self.old_type_definition, - } - })); + if old_hint >= HASHMAP_THRESHOLD || new_hint >= HASHMAP_THRESHOLD { + self.diff_fields_hashmap(changes); + } else { + self.diff_fields_linear(changes); + } - changes.extend( - directive_additions::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::InputObject, - member_name: self.old_type_definition.name(), - }, - ), + diff_directives_into::( + self.old_type_definition, + self.new_type_definition, + DirectiveLocation::InputObject, + self.old_type_definition.name(), + changes, ); + } + + #[cold] + #[inline(never)] + fn diff_fields_hashmap(&self, changes: &mut Vec>) { + let old_fields: HashMap<&str, &'a S::InputValueDefinition> = self + .old_type_definition + .input_field_definitions() + .iter() + .map(|f| (f.name(), f)) + .collect(); + let new_fields: HashMap<&str, &'a S::InputValueDefinition> = self + .new_type_definition + .input_field_definitions() + .iter() + .map(|f| (f.name(), f)) + .collect(); + + for (&name, &field) in &new_fields { + if !old_fields.contains_key(name) { + changes.push(Change::InputFieldAdded { + added_field_definition: field, + input_object_type_definition: self.new_type_definition, + }); + } + } + for (&name, &old_field) in &old_fields { + if let Some(&new_field) = new_fields.get(name) { + InputFieldDiff::new( + self.old_type_definition, + self.new_type_definition, + old_field, + new_field, + ) + .diff_into(changes); + } else { + changes.push(Change::InputFieldRemoved { + removed_field_definition: old_field, + input_object_type_definition: self.old_type_definition, + }); + } + } + } + + #[inline] + fn diff_fields_linear(&self, changes: &mut Vec>) { + // Additions changes.extend( - directive_removals::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::InputObject, - member_name: self.old_type_definition.name(), - }, - ), + self.new_type_definition + .input_field_definitions() + .iter() + .filter(|new_field| { + self.old_type_definition + .input_field_definitions() + .get(new_field.name()) + .is_none() + }) + .map(|input_value_definition| Change::InputFieldAdded { + added_field_definition: input_value_definition, + input_object_type_definition: self.new_type_definition, + }), ); - // diff common input fields + // Removals + common field diffs in a single pass self.old_type_definition .input_field_definitions() .iter() .for_each( |old_field: &'a ::InputValueDefinition| { - let new_field: Option<&'a ::InputValueDefinition> = self + if let Some(new_field) = self .new_type_definition .input_field_definitions() - .get(old_field.name()); - - if let Some(new_field) = new_field { - changes.extend( - InputFieldDiff::new( - self.old_type_definition, - self.new_type_definition, - old_field, - new_field, - ) - .diff(), - ); + .get(old_field.name()) + { + InputFieldDiff::new( + self.old_type_definition, + self.new_type_definition, + old_field, + new_field, + ) + .diff_into(changes); + } else { + changes.push(Change::InputFieldRemoved { + removed_field_definition: old_field, + input_object_type_definition: self.old_type_definition, + }); } }, ); - - changes.extend(common_directive_changes( - self.old_type_definition, - self.new_type_definition, - )); - - changes - } - - fn input_field_additions(&self) -> impl Iterator { - self.new_type_definition - .input_field_definitions() - .iter() - .filter(|new_input_field| { - self.old_type_definition - .input_field_definitions() - .get(new_input_field.name()) - .is_none() - }) - } - - fn input_field_removals(&self) -> impl Iterator { - self.old_type_definition - .input_field_definitions() - .iter() - .filter(|old_input_field| { - self.new_type_definition - .input_field_definitions() - .get(old_input_field.name()) - .is_none() - }) } } diff --git a/bluejay-schema-comparator/src/diff/interface_type.rs b/bluejay-schema-comparator/src/diff/interface_type.rs index 63d5a283..012c1432 100644 --- a/bluejay-schema-comparator/src/diff/interface_type.rs +++ b/bluejay-schema-comparator/src/diff/interface_type.rs @@ -1,7 +1,5 @@ -use std::ops::Not; - use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use crate::diff::field::FieldDiff; use bluejay_core::definition::{ DirectiveLocation, FieldDefinition, FieldsDefinition, InterfaceTypeDefinition, SchemaDefinition, @@ -24,95 +22,51 @@ impl<'a, S: SchemaDefinition + 'a> InterfaceTypeDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes: Vec> = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { + // Field additions changes.extend( - self.field_additions() + self.new_interface_definition + .fields_definition() + .iter() + .filter(|field| { + !self + .old_interface_definition + .fields_definition() + .contains_field(field.name()) + }) .map(|field_definition| Change::FieldAdded { added_field_definition: field_definition, type_name: self.old_interface_definition.name(), }), ); - changes.extend( - self.field_removals() - .map(|field_definition| Change::FieldRemoved { - removed_field_definition: field_definition, - type_name: self.new_interface_definition.name(), - }), - ); - changes.extend( - directive_additions::( - self.old_interface_definition, - self.new_interface_definition, - ) - .map(|directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::Interface, - member_name: self.old_interface_definition.name(), - }), - ); - - changes.extend( - directive_removals::( - self.old_interface_definition, - self.new_interface_definition, - ) - .map(|directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::Interface, - member_name: self.old_interface_definition.name(), - }), - ); - - // diff common fields + // Field removals + common field diffs in a single pass self.old_interface_definition .fields_definition() .iter() .for_each(|old_field: &'a ::FieldDefinition| { - let new_field: Option<&'a ::FieldDefinition> = self + if let Some(new_field) = self .new_interface_definition .fields_definition() - .get(old_field.name()); - - if let Some(new_field) = new_field { - changes.extend( - FieldDiff::new(self.new_interface_definition.name(), old_field, new_field) - .diff(), - ); + .get(old_field.name()) + { + FieldDiff::new(self.new_interface_definition.name(), old_field, new_field) + .diff_into(changes); + } else { + changes.push(Change::FieldRemoved { + removed_field_definition: old_field, + type_name: self.new_interface_definition.name(), + }); } }); - changes.extend(common_directive_changes( + diff_directives_into::( self.old_interface_definition, self.new_interface_definition, - )); - - changes - } - - fn field_additions(&self) -> impl Iterator { - self.new_interface_definition - .fields_definition() - .iter() - .filter(|field| { - self.old_interface_definition - .fields_definition() - .contains_field(field.name()) - .not() - }) - } - - fn field_removals(&self) -> impl Iterator { - self.old_interface_definition - .fields_definition() - .iter() - .filter(|field| { - self.new_interface_definition - .fields_definition() - .contains_field(field.name()) - .not() - }) + DirectiveLocation::Interface, + self.old_interface_definition.name(), + changes, + ); } } diff --git a/bluejay-schema-comparator/src/diff/object_type.rs b/bluejay-schema-comparator/src/diff/object_type.rs index 22105bbf..19619ba1 100644 --- a/bluejay-schema-comparator/src/diff/object_type.rs +++ b/bluejay-schema-comparator/src/diff/object_type.rs @@ -1,13 +1,16 @@ -use std::ops::Not; - use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use crate::diff::field::FieldDiff; use bluejay_core::definition::{ DirectiveLocation, FieldDefinition, FieldsDefinition, InterfaceImplementation, ObjectTypeDefinition, SchemaDefinition, }; use bluejay_core::AsIter; +use std::collections::HashMap; + +/// Use HashMap for types above this field count threshold. +/// size_hint().0 is O(1) for slice-backed iterators. +const HASHMAP_THRESHOLD: usize = 64; pub struct ObjectTypeDiff<'a, S: SchemaDefinition> { old_type_definition: &'a S::ObjectTypeDefinition, @@ -25,9 +28,8 @@ impl<'a, S: SchemaDefinition + 'a> ObjectTypeDiff<'a, S> { } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { changes.extend(self.interface_additions().map(|interface_implementation| { Change::ObjectInterfaceAddition { object_type_definition: self.old_type_definition, @@ -41,42 +43,92 @@ impl<'a, S: SchemaDefinition + 'a> ObjectTypeDiff<'a, S> { } })); - changes.extend( - self.field_additions() - .map(|field_definition| Change::FieldAdded { - added_field_definition: field_definition, - type_name: self.new_type_definition.name(), - }), + let old_hint = self + .old_type_definition + .fields_definition() + .iter() + .size_hint() + .0; + let new_hint = self + .new_type_definition + .fields_definition() + .iter() + .size_hint() + .0; + + if old_hint >= HASHMAP_THRESHOLD || new_hint >= HASHMAP_THRESHOLD { + self.diff_fields_hashmap(changes); + } else { + self.diff_fields_linear(changes); + } + + diff_directives_into::( + self.old_type_definition, + self.new_type_definition, + DirectiveLocation::Object, + self.old_type_definition.name(), + changes, ); - changes.extend( - self.field_removals() - .map(|field_definition| Change::FieldRemoved { - removed_field_definition: field_definition, + } + + #[cold] + #[inline(never)] + fn diff_fields_hashmap(&self, changes: &mut Vec>) { + let old_fields: HashMap<&str, &'a S::FieldDefinition> = self + .old_type_definition + .fields_definition() + .iter() + .map(|f| (f.name(), f)) + .collect(); + let new_fields: HashMap<&str, &'a S::FieldDefinition> = self + .new_type_definition + .fields_definition() + .iter() + .map(|f| (f.name(), f)) + .collect(); + + for (&name, &field) in &new_fields { + if !old_fields.contains_key(name) { + changes.push(Change::FieldAdded { + added_field_definition: field, type_name: self.new_type_definition.name(), - }), - ); + }); + } + } - changes.extend( - directive_additions::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveAdded { - directive, - location: DirectiveLocation::Object, - member_name: self.old_type_definition.name(), - }, - ), - ); + for (&name, &old_field) in &old_fields { + if let Some(&new_field) = new_fields.get(name) { + FieldDiff::new(self.new_type_definition.name(), old_field, new_field) + .diff_into(changes); + } else { + changes.push(Change::FieldRemoved { + removed_field_definition: old_field, + type_name: self.new_type_definition.name(), + }); + } + } + } + #[inline] + fn diff_fields_linear(&self, changes: &mut Vec>) { + // Additions changes.extend( - directive_removals::(self.old_type_definition, self.new_type_definition).map( - |directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::Object, - member_name: self.old_type_definition.name(), - }, - ), + self.new_type_definition + .fields_definition() + .iter() + .filter(|new_field| { + !self + .old_type_definition + .fields_definition() + .contains_field(new_field.name()) + }) + .map(|field_definition| Change::FieldAdded { + added_field_definition: field_definition, + type_name: self.new_type_definition.name(), + }), ); - // diff common fields + // Removals + common field diffs in a single pass self.old_type_definition .fields_definition() .iter() @@ -86,43 +138,15 @@ impl<'a, S: SchemaDefinition + 'a> ObjectTypeDiff<'a, S> { .fields_definition() .get(old_field.name()) { - changes.extend( - FieldDiff::new(self.new_type_definition.name(), old_field, new_field) - .diff(), - ); + FieldDiff::new(self.new_type_definition.name(), old_field, new_field) + .diff_into(changes); + } else { + changes.push(Change::FieldRemoved { + removed_field_definition: old_field, + type_name: self.new_type_definition.name(), + }); } }); - - changes.extend(common_directive_changes( - self.old_type_definition, - self.new_type_definition, - )); - - changes - } - - fn field_additions(&self) -> impl Iterator { - self.new_type_definition - .fields_definition() - .iter() - .filter(|new_field| { - self.old_type_definition - .fields_definition() - .contains_field(new_field.name()) - .not() - }) - } - - fn field_removals(&self) -> impl Iterator { - self.old_type_definition - .fields_definition() - .iter() - .filter(|old_field| { - self.new_type_definition - .fields_definition() - .contains_field(old_field.name()) - .not() - }) } fn interface_additions(&self) -> impl Iterator { diff --git a/bluejay-schema-comparator/src/diff/schema.rs b/bluejay-schema-comparator/src/diff/schema.rs index df2e2728..f189eb87 100644 --- a/bluejay-schema-comparator/src/diff/schema.rs +++ b/bluejay-schema-comparator/src/diff/schema.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use crate::diff::directive::{directive_additions, directive_removals}; +use crate::diff::directive::directive_additions; use crate::diff::directive_definition::DirectiveDefinitionDiff; use crate::diff::enum_type::EnumTypeDiff; use crate::diff::input_object_type::InputObjectTypeDiff; @@ -9,6 +9,7 @@ use crate::diff::union_type::UnionTypeDiff; use bluejay_core::definition::{ DirectiveDefinition as _, DirectiveLocation, SchemaDefinition, TypeDefinitionReference, }; +use bluejay_core::{AsIter, Directive}; pub struct SchemaDiff<'a, S: SchemaDefinition> { old_schema_definition: &'a S, @@ -24,14 +25,14 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { } pub fn diff(&self) -> Vec> { - let mut changes: Vec> = Vec::new(); + // Fast path: if both schemas are the same object, there are no changes + if std::ptr::eq(self.old_schema_definition, self.new_schema_definition) { + return Vec::new(); + } - changes.extend( - self.removed_types() - .map(|removed_type_definition| Change::TypeRemoved { - removed_type_definition, - }), - ); + let mut changes: Vec> = Vec::with_capacity(256); + + // Type additions changes.extend( self.added_types() .map(|added_type_definition| Change::TypeAdded { @@ -39,24 +40,23 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { }), ); + // Type removals + common type diffs in a single pass over old types self.old_schema_definition .type_definitions() .for_each(|old_type| { - let new_type = self + if let Some(new_type) = self .new_schema_definition - .get_type_definition(old_type.name()); - - if let Some(new_type) = new_type { - changes.extend(self.changes_in_type(old_type, new_type)); + .get_type_definition(old_type.name()) + { + self.changes_in_type(old_type, new_type, &mut changes); + } else { + changes.push(Change::TypeRemoved { + removed_type_definition: old_type, + }); } }); - changes.extend( - self.removed_directive_definitions() - .map(|directive_definition| Change::DirectiveDefinitionRemoved { - directive_definition, - }), - ); + // Directive definition additions changes.extend( self.added_directive_definitions() .map(|directive_definition| Change::DirectiveDefinitionAdded { @@ -64,6 +64,24 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { }), ); + // Directive definition removals + common diffs in a single pass + self.old_schema_definition + .directive_definitions() + .for_each(|old_directive| { + if let Some(new_directive) = self + .new_schema_definition + .get_directive_definition(old_directive.name()) + { + DirectiveDefinitionDiff::new(old_directive, new_directive) + .diff_into(&mut changes); + } else { + changes.push(Change::DirectiveDefinitionRemoved { + directive_definition: old_directive, + }); + } + }); + + // Schema-level directive additions changes.extend( directive_additions::<'a, S, _>(self.old_schema_definition, self.new_schema_definition) .map(|directive| Change::DirectiveAdded { @@ -73,25 +91,26 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { }), ); - changes.extend( - directive_removals::<'a, S, _>(self.old_schema_definition, self.new_schema_definition) - .map(|directive| Change::DirectiveRemoved { - directive, - location: DirectiveLocation::Schema, - member_name: "", - }), - ); - + // Schema-level directive removals self.old_schema_definition - .directive_definitions() + .directives() + .map(|ii| ii.iter()) + .into_iter() + .flatten() .for_each(|old_directive| { - let new_directive = self + let found = self .new_schema_definition - .get_directive_definition(old_directive.name()); - - if let Some(new_directive) = new_directive { - changes - .extend(DirectiveDefinitionDiff::new(old_directive, new_directive).diff()); + .directives() + .map(|ii| ii.iter()) + .into_iter() + .flatten() + .any(|new_directive| old_directive.name() == new_directive.name()); + if !found { + changes.push(Change::DirectiveRemoved { + directive: old_directive, + location: DirectiveLocation::Schema, + member_name: "", + }); } }); @@ -102,36 +121,35 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { &self, old_type: TypeDefinitionReference<'a, S::TypeDefinition>, new_type: TypeDefinitionReference<'a, S::TypeDefinition>, - ) -> Vec> { - let mut changes: Vec> = Vec::new(); - + changes: &mut Vec>, + ) { match (old_type, new_type) { ( TypeDefinitionReference::Object(old_type), TypeDefinitionReference::Object(new_type), ) => { - changes.extend(ObjectTypeDiff::new(old_type, new_type).diff()); + ObjectTypeDiff::new(old_type, new_type).diff_into(changes); } (TypeDefinitionReference::Enum(old_type), TypeDefinitionReference::Enum(new_type)) => { - changes.extend(EnumTypeDiff::new(old_type, new_type).diff()); + EnumTypeDiff::new(old_type, new_type).diff_into(changes); } ( TypeDefinitionReference::Union(old_type), TypeDefinitionReference::Union(new_type), ) => { - changes.extend(UnionTypeDiff::new(old_type, new_type).diff()); + UnionTypeDiff::new(old_type, new_type).diff_into(changes); } ( TypeDefinitionReference::Interface(old_type), TypeDefinitionReference::Interface(new_type), ) => { - changes.extend(InterfaceTypeDiff::new(old_type, new_type).diff()); + InterfaceTypeDiff::new(old_type, new_type).diff_into(changes); } ( TypeDefinitionReference::InputObject(old_type), TypeDefinitionReference::InputObject(new_type), ) => { - changes.extend(InputObjectTypeDiff::new(old_type, new_type).diff()); + InputObjectTypeDiff::new(old_type, new_type).diff_into(changes); } ( TypeDefinitionReference::BuiltinScalar(_), @@ -155,20 +173,6 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { new_type_definition: new_type, }); } - - changes - } - - fn removed_types( - &self, - ) -> impl Iterator> { - self.old_schema_definition - .type_definitions() - .filter(|old_type| { - self.new_schema_definition - .get_type_definition(old_type.name()) - .is_none() - }) } fn added_types(&self) -> impl Iterator> { @@ -181,16 +185,6 @@ impl<'a, S: SchemaDefinition> SchemaDiff<'a, S> { }) } - fn removed_directive_definitions(&self) -> impl Iterator { - self.old_schema_definition - .directive_definitions() - .filter(|old_directive| { - self.new_schema_definition - .get_directive_definition(old_directive.name()) - .is_none() - }) - } - fn added_directive_definitions(&self) -> impl Iterator { self.new_schema_definition .directive_definitions() diff --git a/bluejay-schema-comparator/src/diff/union_type.rs b/bluejay-schema-comparator/src/diff/union_type.rs index ab355d6b..ad667a7e 100644 --- a/bluejay-schema-comparator/src/diff/union_type.rs +++ b/bluejay-schema-comparator/src/diff/union_type.rs @@ -1,5 +1,5 @@ use crate::changes::Change; -use crate::diff::directive::{common_directive_changes, directive_additions, directive_removals}; +use crate::diff::directive::diff_directives_into; use bluejay_core::definition::{ DirectiveLocation, SchemaDefinition, UnionMemberType, UnionMemberTypes, UnionTypeDefinition, }; @@ -15,9 +15,8 @@ impl<'a, S: SchemaDefinition + 'a> UnionTypeDiff<'a, S> { Self { old_type, new_type } } - pub fn diff(&self) -> Vec> { - let mut changes = Vec::new(); - + #[inline] + pub fn diff_into(&self, changes: &mut Vec>) { changes.extend( self.member_additions() .map(|union_member_type| Change::UnionMemberAdded { @@ -33,29 +32,13 @@ impl<'a, S: SchemaDefinition + 'a> UnionTypeDiff<'a, S> { } })); - changes.extend( - directive_additions::(self.old_type, self.new_type).map(|directive| { - Change::DirectiveAdded { - directive, - location: DirectiveLocation::Union, - member_name: self.old_type.name(), - } - }), + diff_directives_into::( + self.old_type, + self.new_type, + DirectiveLocation::Union, + self.old_type.name(), + changes, ); - - changes.extend( - directive_removals::(self.old_type, self.new_type).map(|directive| { - Change::DirectiveRemoved { - directive, - location: DirectiveLocation::Union, - member_name: self.old_type.name(), - } - }), - ); - - changes.extend(common_directive_changes(self.old_type, self.new_type)); - - changes } fn member_removals(&self) -> impl Iterator { diff --git a/bluejay-schema-comparator/src/lib.rs b/bluejay-schema-comparator/src/lib.rs index 38f44c07..c4c542b1 100644 --- a/bluejay-schema-comparator/src/lib.rs +++ b/bluejay-schema-comparator/src/lib.rs @@ -3,7 +3,7 @@ mod diff; mod result; use bluejay_core::definition::SchemaDefinition; -pub use changes::{Change, Criticality}; +pub use changes::{Change, Criticality, CriticalityLevel}; pub use result::ComparisonResult; pub fn compare<'a, S: SchemaDefinition>( diff --git a/bluejay-schema-comparator/src/result.rs b/bluejay-schema-comparator/src/result.rs index 6c8e8b9b..cd2c3cff 100644 --- a/bluejay-schema-comparator/src/result.rs +++ b/bluejay-schema-comparator/src/result.rs @@ -7,7 +7,7 @@ pub struct ComparisonResult<'a, S: SchemaDefinition> { impl<'a, S: SchemaDefinition> ComparisonResult<'a, S> { pub fn new(mut changes: Vec>) -> Self { - changes.sort_by_key(|b| std::cmp::Reverse(b.criticality())); + changes.sort_unstable_by_key(|b| std::cmp::Reverse(b.criticality_level())); Self { changes } } diff --git a/data/admin_schema_2024-07_public.graphql b/data/admin_schema_2024-07_public.graphql new file mode 100644 index 00000000..5cd708be --- /dev/null +++ b/data/admin_schema_2024-07_public.graphql @@ -0,0 +1,105789 @@ +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 + +""" +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 + +""" +A checkout that was abandoned by the customer. +""" +type AbandonedCheckout implements Navigable & Node { + """ + The URL for the buyer to recover their checkout. + """ + abandonedCheckoutUrl: URL! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: 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.") + + """ + The sum of all items in the checkout, including discounts, shipping, taxes, and tips. + """ + totalPriceSet: MoneyBag! +} + +""" +A single line item in an abandoned checkout. +""" +type AbandonedCheckoutLineItem implements Node { + """ + A list of extra information that has been added to the line item. + """ + customAttributes: [Attribute!]! + + """ + 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! + + """ + 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 +} + +""" +An auto-generated type for paginating through multiple AbandonedCheckoutLineItems. +""" +type AbandonedCheckoutLineItemConnection { + """ + 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 { + """ + The position 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! +} + +""" +A browse, cart, or checkout that was abandoned by a customer. +""" +type Abandonment implements Node { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Unable to find an Abandonment for the provided ID. + """ + ABANDONMENT_NOT_FOUND +} + +""" +Return type for `abandonmentUpdateActivitiesDeliveryStatuses` mutation. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesPayload { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +The permission required to access a Shopify Admin API or Storefront API resource +for a shop. Merchants grant access scopes that are requested by applications. +""" +type AccessScope { + """ + 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! +} + +""" +Represents an operation publishing all products to a publication. +""" +type AddAllProductsOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +The additional fees that have been applied to the order. +""" +type AdditionalFee implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the additional fee. + """ + name: String! + + """ + The price of the additional fee. + """ + price: MoneyBag! + + """ + A list of taxes charged on the additional fee. + """ + taxLines: [TaxLine!]! +} + +""" +A sale associated with an additional fee charge. +""" +type AdditionalFeeSale implements Sale { + """ + 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! +} + +""" +A sale associated with an order price adjustment. +""" +type AdjustmentSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + 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 { + """ + 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 `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 { + """ + Whether all items are eligible for the discount. This value always returns `true`. + """ + allItems: Boolean! +} + +""" +The Android mobile platform application. +""" +type AndroidApplication { + """ + 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 { + """ + 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. +""" +type App implements Node { + """ + 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! + + """ + 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 is not 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") + + """ + 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! + + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 + [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 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 which holds one App and a cursor during pagination. +""" +type AppEdge { + """ + The position 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 { + """ + The application associated to the feedback. + """ + app: App! + + """ + A link to where merchants can resolve errors. + """ + link: Link + + """ + The feedback message presented to the merchant. + """ + messages: [UserError!]! +} + +""" +Represents an installed application on a shop. +""" +type AppInstallation implements HasMetafields & Node { + """ + 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 `publication` 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + 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! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The publication associated with the installed application. + """ + publication: Publication + + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + PRIVATE + PUBLIC +} + +""" +The set of valid sort keys for the AppInstallation query. +""" +enum AppInstallationSortKeys { + """ + Sort by the `app_title` value. + """ + APP_TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `installed_at` value. + """ + INSTALLED_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 +} + +""" +The pricing model for the app subscription. +The pricing model input can be either `appRecurringPricingDetails` or `appUsagePricingDetails`. +""" +input AppPlanInput { + """ + 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 { + """ + 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 = AppRecurringPricing | AppUsagePricing + +""" +The frequency at which the shop is billed for an app subscription. +""" +enum AppPricingInterval { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 +} + +""" +Represents the billing types of revenue attribution. +""" +enum AppRevenueAttributionType { + """ + 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 +} + +""" +Provides users access to services and/or features for a duration of time. +""" +type AppSubscription implements Node { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The percentage value of a discount. + """ + percentage: Float! +} + +""" +The value of the discount. +""" +union AppSubscriptionDiscountValue = AppSubscriptionDiscountAmount | AppSubscriptionDiscountPercentage + +""" +The input fields to specify the value discounted every billing interval. +""" +input AppSubscriptionDiscountValueInput { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + The pricing model for the app subscription. + """ + plan: AppPlanInput! +} + +""" +Return type for `appSubscriptionLineItemUpdate` mutation. +""" +type AppSubscriptionLineItemUpdatePayload { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +The status of the app subscription. +""" +enum AppSubscriptionStatus { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 +} + +""" +The Apple mobile platform application. +""" +type AppleApplication { + """ + 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! +} + +""" +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 { + """ + 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 { + """ + Key or name of the attribute. + """ + key: String! + + """ + Value of the attribute. + """ + value: String! +} + +""" +Automatic discount applications capture the intentions of a discount that was automatically applied. +""" +type AutomaticDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The 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 { + """ + 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 +} + +""" +Represents an object containing all information for channels available to a shop. +""" +type AvailableChannelDefinitionsByChannel { + """ + The channel definitions for channels installed on a shop. + """ + channelDefinitions: [ChannelDefinition!]! + + """ + The name of the channel. + """ + channelName: String! +} + +""" +The possible types for a badge. +""" +enum BadgeType { + """ + 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 +} + +""" +The set of valid sort keys for the BalanceTransaction query. +""" +enum BalanceTransactionSortKeys { + """ + 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 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 `transaction_type` value. + """ + TRANSACTION_TYPE +} + +""" +Generic payment details that are related to a transaction. +""" +interface BasePaymentDetails { + """ + 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 { + """ + 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! +} + +""" +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 { + """ + 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 { + """ + 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. + """ + 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 + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED +} + +""" +Possible error codes that can be returned by `BulkMutationUserError`. +""" +enum BulkMutationErrorCode { + """ + 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 { + """ + The error code. + """ + code: BulkMutationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An asynchronous long-running operation to fetch data in bulk or to bulk import data. + +Bulk operations are created using the `bulkOperationRunQuery` or `bulkOperationRunMutation` mutation. After +they are created, clients should poll the `status` field for updates. When `COMPLETED`, the `url` field contains +a link to the data in [JSONL](http://jsonlines.org/) format. + +Refer to the [bulk operations guide](https://shopify.dev/api/usage/bulk-operations/imports) for more details. +""" +type BulkOperation implements Node { + """ + When the bulk operation was successfully completed. + """ + completedAt: DateTime + + """ + When the bulk operation was created. + """ + createdAt: DateTime! + + """ + Error code for failed operations. + """ + errorCode: BulkOperationErrorCode + + """ + File size in bytes of the file in the `url` field. + """ + fileSize: UnsignedInt64 + + """ + A globally-unique ID. + """ + id: ID! + + """ + A running count of all the objects processed. + For example, when fetching all the products and their variants, this field counts both products and variants. + This field can be used to track operation progress. + """ + objectCount: UnsignedInt64! + + """ + The URL that points to the partial or incomplete response data (in + [JSONL](http://jsonlines.org/) format) that was returned by a failed operation. + The URL expires 7 days after the operation fails. Returns `null` when there's no data available. + """ + partialDataUrl: URL + + """ + GraphQL query document specified in `bulkOperationRunQuery`. + """ + query: String! + + """ + A running count of all the objects that are processed at the root of the query. + For example, when fetching all the products and their variants, this field only counts products. + This field can be used to track operation progress. + """ + rootObjectCount: UnsignedInt64! + + """ + Status of the bulk operation. + """ + status: BulkOperationStatus! + + """ + The bulk operation's type. + """ + type: BulkOperationType! + + """ + The URL that points to the response data in [JSONL](http://jsonlines.org/) format. + The URL expires 7 days after the operation completes. + """ + url: URL +} + +""" +Return type for `bulkOperationCancel` mutation. +""" +type BulkOperationCancelPayload { + """ + The bulk operation to be canceled. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Error codes for failed bulk operations. +""" +enum BulkOperationErrorCode { + """ + The provided operation `query` returned access denied due to missing + [access scopes](https://shopify.dev/api/usage/access-scopes). + Review the requested object permissions and execute the query as a normal non-bulk GraphQL request to see more details. + """ + ACCESS_DENIED + + """ + The operation resulted in partial or incomplete data due to internal server errors during execution. + These errors might be intermittent, so you can try performing the same query again. + """ + INTERNAL_SERVER_ERROR + + """ + The operation resulted in partial or incomplete data due to query timeouts during execution. + In some cases, timeouts can be avoided by modifying your `query` to select fewer fields. + """ + TIMEOUT +} + +""" +Return type for `bulkOperationRunMutation` mutation. +""" +type BulkOperationRunMutationPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkMutationUserError!]! +} + +""" +Return type for `bulkOperationRunQuery` mutation. +""" +type BulkOperationRunQueryPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The valid values for the status of a bulk operation. +""" +enum BulkOperationStatus { + """ + The bulk operation has been canceled. + """ + CANCELED + + """ + Cancelation has been initiated on the bulk operation. There may be a short delay from when a cancelation + starts until the operation is actually canceled. + """ + CANCELING + + """ + The bulk operation has successfully completed. + """ + COMPLETED + + """ + The bulk operation has been created. + """ + CREATED + + """ + The bulk operation URL has expired. + """ + EXPIRED + + """ + The bulk operation has failed. For information on why the operation failed, use + [BulkOperation.errorCode](https://shopify.dev/api/admin-graphql/latest/enums/bulkoperationerrorcode). + """ + FAILED + + """ + The bulk operation is runnning. + """ + RUNNING +} + +""" +The valid values for the bulk operation's type. +""" +enum BulkOperationType { + """ + The bulk operation is a mutation. + """ + MUTATION + + """ + The bulk operation is a query. + """ + QUERY +} + +""" +Return type for `bulkProductResourceFeedbackCreate` mutation. +""" +type BulkProductResourceFeedbackCreatePayload { + """ + The feedback that's created. + """ + feedback: [ProductResourceFeedback!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkProductResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `BulkProductResourceFeedbackCreate`. +""" +type BulkProductResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: BulkProductResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BulkProductResourceFeedbackCreateUserError`. +""" +enum BulkProductResourceFeedbackCreateUserErrorCode { + """ + The 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 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 { + """ + 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 +} + +""" +Represents the Bundles feature configuration for the shop. +""" +type BundlesFeature { + """ + Whether a shop is configured properly to sell bundles. + """ + eligibleForBundles: Boolean! + + """ + The reason why a shop is not eligible for bundles. + """ + ineligibilityReason: String + + """ + Whether a shop has any fixed bundle products or has a cartTransform function installed. + """ + sellsBundles: Boolean! +} + +""" +Possible error codes that can be returned by `BusinessCustomerUserError`. +""" +enum BusinessCustomerErrorCode { + """ + 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 { + """ + The error code. + """ + code: BusinessCustomerErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Settings describing the behavior of checkout for a B2B buyer. +""" +type BuyerExperienceConfiguration { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean! + + """ + Whether to allow customers to use editable shipping addresses. + """ + editableShippingAddress: Boolean! + + """ + Whether a buyer must pay at checkout or they can also choose to pay + later using net terms. + """ + payNowOnly: Boolean! @deprecated(reason: "Please use `checkoutToDraft`(must be false) and `paymentTermsTemplate`(must be nil) to derive this instead.") + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplate: PaymentTermsTemplate +} + +""" +The input fields specifying the behavior of checkout for a B2B buyer. +""" +input BuyerExperienceConfigurationInput { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean + + """ + Whether to allow customers to edit their shipping address at checkout. + """ + editableShippingAddress: Boolean + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplateId: ID +} + +""" +The input fields for exchange line items on a calculated return. +""" +input CalculateExchangeLineItemInput { + """ + 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! +} + +""" +The input fields to calculate return amounts associated with an order. +""" +input CalculateReturnInput { + """ + The exchange line items to add to the order. + """ + exchangeLineItems: [CalculateExchangeLineItemInput!] = [] + + """ + The ID of the order that will be returned. + """ + orderId: ID! + + """ + The line items from the order to include in the return. + """ + returnLineItems: [CalculateReturnLineItemInput!] = [] + + """ + The return shipping fee associated with the return. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for return line items on a calculated return. +""" +input CalculateReturnLineItemInput { + """ + The ID of the fulfillment line item to be returned. + """ + fulfillmentLineItemId: ID! + + """ + The 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 { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An amount discounting the line that has been allocated by an associated discount application. +""" +type CalculatedDiscountAllocation { + """ + The money amount that's allocated by the discount application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount that the allocated amount originated from. + """ + discountApplication: CalculatedDiscountApplication! +} + +""" +A [discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/discountapplication) involved in order editing that might be newly added or have new changes applied. +""" +interface CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An auto-generated type for paginating through multiple CalculatedDiscountApplications. +""" +type CalculatedDiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedDiscountApplicationEdge!]! + + """ + A list of nodes that are contained in CalculatedDiscountApplicationEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [CalculatedDiscountApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedDiscountApplication and a cursor during pagination. +""" +type CalculatedDiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedDiscountApplicationEdge. + """ + node: CalculatedDiscountApplication! +} + +""" +A discount code that is applied to an order that is being edited. +""" +type CalculatedDiscountCodeApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The calculated fields for a draft order. +""" +type CalculatedDraftOrder { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + The list of alerts raised while calculating. + """ + alerts: [ResourceAlert!]! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The available shipping rates. + Requires a customer with a valid shipping address and at least one line item. + """ + availableShippingRates: [ShippingRate!]! + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The list of the line items in the calculated draft order. + """ + lineItems: [CalculatedDraftOrderLineItem!]! + + """ + A subtotal of the line items and corresponding discounts, + excluding shipping charges, shipping discounts, taxes, or order discounts. + """ + lineItemsSubtotalPrice: MoneyBag! + + """ + The name of the selected market. + """ + marketName: String! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The selected country code that determines the pricing. + """ + marketRegionCountryCode: CountryCode! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The subtotal, in shop currency, of the line items and their discounts, + excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The calculated line item for a draft order. +""" +type CalculatedDraftOrderLineItem { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The bundle components of the draft order line item. + """ + bundleComponents: [CalculatedDraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """ + The total price with discounts applied. + """ + discountedTotal: MoneyV2! + + """ + The total price with discounts applied. + """ + discountedTotalSet: MoneyBag! + + """ + The unit price with discounts applied. + """ + discountedUnitPrice: MoneyV2! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + The unit price with discounts applied. + """ + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The image associated with the draft order line item. + """ + image: Image + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The name of the product. + """ + name: String! + + """ + The total price, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: MoneyV2! + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """ + The line item price without any discounts applied. + """ + originalUnitPrice: MoneyV2! + + """ + The price without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The original custom line item input price. + """ + originalUnitPriceWithCurrency: MoneyV2 + + """ + The product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total value of the discount. + """ + totalDiscount: MoneyV2! + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +A calculated exchange line item. +""" +type CalculatedExchangeLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + The unit price of the exchange line item after discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID + + """ + The original unit price of the exchange line item before discounts. + """ + originalUnitPriceSet: MoneyBag! + + """ + The quantity being exchanged. + """ + quantity: Int! + + """ + The calculated subtotal set of the exchange line item, including discounts. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the exchange line item. + """ + totalTaxSet: MoneyBag! + + """ + The variant being exchanged. + """ + variant: ProductVariant! +} + +""" +A line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! @deprecated(reason: "Use `calculatedDiscountAllocations` instead.") + + """ + The price of a single quantity of the line item with line item discounts + applied, in shop and presentment currencies. Discounts applied to the entire + order aren't included in this price. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The total number of items that can be edited. + """ + editableQuantity: Int! + + """ + The editable quantity prior to any changes made in the current edit. + """ + editableQuantityBeforeChanges: Int! + + """ + The total price of editable lines in shop and presentment currencies. + """ + editableSubtotalSet: MoneyBag! + + """ + Whether the calculated line item has a staged discount. + """ + hasStagedLineItemDiscount: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image object associated to the line item's variant. + """ + image: Image + + """ + The variant unit price in shop and presentment currencies, without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The total number of items. + """ + quantity: Int! + + """ + Whether the line item can be restocked or not. + """ + restockable: Boolean! + + """ + Whether the changes on the line item will result in a restock. + """ + restocking: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + A list of changes that affect this line item. + """ + stagedChanges: [OrderStagedChange!]! + + """ + The title of the product. + """ + title: String! + + """ + The total price of uneditable lines in shop and presentment currencies. + """ + uneditableSubtotalSet: MoneyBag! + + """ + The product variant associated with this line item. The value is null for custom line items and items where + the variant has been deleted. + """ + variant: ProductVariant + + """ + The title of the variant. + """ + variantTitle: String +} + +""" +An auto-generated type for paginating through multiple CalculatedLineItems. +""" +type CalculatedLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedLineItemEdge!]! + + """ + A list of nodes that are contained in CalculatedLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CalculatedLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedLineItem and a cursor during pagination. +""" +type CalculatedLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedLineItemEdge. + """ + node: CalculatedLineItem! +} + +""" +Represents a discount that was manually created for an order that is being edited. +""" +type CalculatedManualDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An order with edits applied but not saved. +""" +type CalculatedOrder implements Node { + """ + 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!]! + + """ + Total price of the order less the total amount received from the customer in shop and presentment currencies. + """ + totalOutstandingSet: MoneyBag! + + """ + Total amount of the order (includes taxes and discounts) in shop and presentment currencies. + """ + totalPriceSet: MoneyBag! +} + +""" +The calculated costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type CalculatedRestockingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +A calculated return. +""" +type CalculatedReturn { + """ + A list of calculated exchange line items. + """ + exchangeLineItems: [CalculatedExchangeLineItem!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of calculated return line items. + """ + returnLineItems: [CalculatedReturnLineItem!]! + + """ + The calculated return shipping fee. + """ + returnShippingFee: CalculatedReturnShippingFee +} + +""" +A calculated return fee. +""" +interface CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A calculated return line item. +""" +type CalculatedReturnLineItem { + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The restocking fee of the return line item. + """ + restockingFee: CalculatedRestockingFee + + """ + The subtotal of the return line item before order discounts. + """ + subtotalBeforeOrderDiscountsSet: MoneyBag! + + """ + The subtotal of the return line item. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the return line item. + """ + totalTaxSet: MoneyBag! +} + +""" +The calculated cost of the return shipping. +""" +type CalculatedReturnShippingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A discount created by a Shopify script for an order that is being edited. +""" +type CalculatedScriptDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A shipping line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedShippingLine { + """ + A globally-unique ID. + """ + id: ID + + """ + The price of the shipping line when sold and before applying discounts. This + field includes taxes if `Order.taxesIncluded` is true. Otherwise, this field + doesn't include taxes for the shipping line. + """ + price: MoneyBag! + + """ + The staged status of the shipping line. + """ + stagedStatus: CalculatedShippingLineStagedStatus! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Represents the staged status of a CalculatedShippingLine on a CalculatedOrder. +""" +enum CalculatedShippingLineStagedStatus { + """ + The shipping line 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 +} + +""" +Card payment details related to a transaction. +""" +type CardPaymentDetails implements BasePaymentDetails { + """ + The response code from the address verification system (AVS). The code is always a single letter. + """ + avsResultCode: String + + """ + The issuer identification number (IIN), formerly known as bank identification + number (BIN) of the customer's credit card. This is made up of the first few + digits of the credit card number. + """ + bin: String + + """ + The name of the company that issued the customer's credit card. + """ + company: String + + """ + The response code from the credit card company indicating whether the customer + entered the card security code, or card verification value, correctly. The + code is a single letter or empty string. + """ + cvvResultCode: String + + """ + The month in which the used credit card expires. + """ + expirationMonth: Int + + """ + The year in which the used credit card expires. + """ + expirationYear: Int + + """ + The holder of the credit card. + """ + name: String + + """ + The customer's credit card number, with most of the leading digits redacted. + """ + number: String + + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String + + """ + Digital wallet used for the payment. + """ + wallet: DigitalWallet +} + +""" +Return type for `carrierServiceCreate` mutation. +""" +type CarrierServiceCreatePayload { + """ + The created carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceCreateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceCreate`. +""" +type CarrierServiceCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceCreateUserError`. +""" +enum CarrierServiceCreateUserErrorCode { + """ + Carrier service creation failed. + """ + CARRIER_SERVICE_CREATE_FAILED +} + +""" +Return type for `carrierServiceDelete` mutation. +""" +type CarrierServiceDeletePayload { + """ + The ID of the deleted carrier service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceDelete`. +""" +type CarrierServiceDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceDeleteUserError`. +""" +enum CarrierServiceDeleteUserErrorCode { + """ + Carrier service deletion failed. + """ + CARRIER_SERVICE_DELETE_FAILED +} + +""" +The set of valid sort keys for the CarrierService query. +""" +enum CarrierServiceSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by 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 +} + +""" +Return type for `carrierServiceUpdate` mutation. +""" +type CarrierServiceUpdatePayload { + """ + The updated carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceUpdate`. +""" +type CarrierServiceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceUpdateUserError`. +""" +enum CarrierServiceUpdateUserErrorCode { + """ + Carrier service update failed. + """ + CARRIER_SERVICE_UPDATE_FAILED +} + +""" +A deployed cart transformation function that actively modifies how products +appear and behave in customer carts. Cart transforms enable sophisticated +merchandising strategies by programmatically merging, expanding, or updating +cart line items based on custom business logic. + +Use the `CartTransform` object to: +- Monitor active bundling and cart modification logic +- Track transform function deployment status and configuration +- Manage error handling behavior for cart processing failures +- Coordinate multiple transforms when running complex merchandising strategies +- Analyze transform performance and customer interaction patterns + +Each cart transform links to a specific [Shopify +Function](https://shopify.dev/docs/apps/build/functions) that contains the +actual cart modification logic. The `blockOnFailure` setting determines whether +cart processing should halt when the transform encounters errors, or whether it +should allow customers to proceed with unmodified carts. This flexibility +ensures merchants can balance feature richness with checkout reliability. + +Transform functions operate during cart updates, product additions, and checkout +initiation, providing multiple touchpoints to enhance the shopping experience. +They integrate seamlessly with existing cart APIs while extending functionality +beyond standard product catalog capabilities. + +The function ID connects to your deployed function code, while the configuration +settings control how the transform behaves in different scenarios. Multiple +transforms can work together, processing cart modifications in sequence to +support complex merchandising workflows. + +Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle), +and about the [Cart Transform Function +API](https://shopify.dev/docs/api/functions/latest/cart-transform). +""" +type CartTransform implements HasMetafields & Node { + """ + Whether a run failure will block cart and checkout operations. + """ + blockOnFailure: Boolean! + + """ + The ID for the Cart Transform function. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +An auto-generated type for paginating through multiple CartTransforms. +""" +type CartTransformConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CartTransformEdge!]! + + """ + A list of nodes that are contained in CartTransformEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CartTransform!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `cartTransformCreate` mutation. +""" +type CartTransformCreatePayload { + """ + The newly created cart transform function. + """ + cartTransform: CartTransform + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformCreateUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformCreate`. +""" +type CartTransformCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformCreateUserError`. +""" +enum CartTransformCreateUserErrorCode { + """ + 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 +} + +""" +Return type for `cartTransformDelete` mutation. +""" +type CartTransformDeletePayload { + """ + The globally-unique ID for the deleted cart transform. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformDelete`. +""" +type CartTransformDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformDeleteUserError`. +""" +enum CartTransformDeleteUserErrorCode { + """ + Could not find cart transform for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +An auto-generated type which holds one CartTransform and a cursor during pagination. +""" +type CartTransformEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CartTransformEdge. + """ + node: CartTransform! +} + +""" +Controls which cart transformation operations apps can perform in your store. +This lets you define exactly what types of cart modifications are allowed based +on your checkout setup and business needs. + +The eligible operations determine what cart transform functions can accomplish, +providing a clear boundary for app capabilities within the store's ecosystem. + +Learn more about [cart transform operations](https://shopify.dev/docs/api/functions/latest/cart-transform#multiple-operations). +""" +type CartTransformEligibleOperations { + """ + The shop is eligible for expand operations. + """ + expandOperation: Boolean! + + """ + The shop is eligible for merge operations. + """ + mergeOperation: Boolean! + + """ + The shop is eligible for update operations. + """ + updateOperation: Boolean! +} + +""" +Provides access to the cart transform feature configuration for the merchant's +store. This wrapper object indicates whether cart transformation capabilities +are enabled and what operations are available. + +For example, when checking if your app can deploy customized bundle features, +you would query this object to confirm cart transforms are supported and review +the eligible operations. + +The feature configuration helps apps determine compatibility before attempting to create transform functions. + +Learn more about [cart transformation](https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransform). +""" +type CartTransformFeature { + """ + The cart transform operations eligible for the shop. + """ + eligibleOperations: CartTransformEligibleOperations! +} + +""" +Tracks an adjustment to the cash in a cash tracking session for a point of sale device over the course of a shift. +""" +type CashTrackingAdjustment implements Node { + """ + The amount of cash being added or removed. + """ + cash: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The note entered when the adjustment was made. + """ + note: String + + """ + The staff member who made the adjustment. + """ + staffMember: StaffMember! + + """ + The time when the adjustment was made. + """ + time: DateTime! +} + +""" +An auto-generated type for paginating through multiple CashTrackingAdjustments. +""" +type CashTrackingAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingAdjustmentEdge!]! + + """ + A list of nodes that are contained in CashTrackingAdjustmentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CashTrackingAdjustment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingAdjustment and a cursor during pagination. +""" +type CashTrackingAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingAdjustmentEdge. + """ + node: CashTrackingAdjustment! +} + +""" +Tracks the balance in a cash drawer for a point of sale device over the course of a shift. +""" +type CashTrackingSession implements Node { + """ + The adjustments made to the cash drawer during this session. + """ + adjustments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingSessionEdge!]! + + """ + A list of nodes that are contained in CashTrackingSessionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CashTrackingSession!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingSession and a cursor during pagination. +""" +type CashTrackingSessionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingSessionEdge. + """ + node: CashTrackingSession! +} + +""" +The set of valid sort keys for the CashTrackingSessionTransactions query. +""" +enum CashTrackingSessionTransactionsSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `processed_at` value. + """ + PROCESSED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The set of valid sort keys for the CashTrackingSessions query. +""" +enum CashTrackingSessionsSortKeys { + """ + Sort by the `closing_time_asc` value. + """ + CLOSING_TIME_ASC + + """ + Sort by the `closing_time_desc` value. + """ + CLOSING_TIME_DESC + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `opening_time_asc` value. + """ + OPENING_TIME_ASC + + """ + Sort by the `opening_time_desc` value. + """ + OPENING_TIME_DESC + + """ + Sort by 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_discrepancy_asc` value. + """ + TOTAL_DISCREPANCY_ASC + + """ + Sort by the `total_discrepancy_desc` value. + """ + TOTAL_DISCREPANCY_DESC +} + +""" +A list of products with publishing and pricing information. +A catalog can be associated with a specific context, such as a +[`Market`](https://shopify.dev/api/admin-graphql/current/objects/market), [`CompanyLocation`](https://shopify.dev/api/admin-graphql/current/objects/companylocation), +or [`App`](https://shopify.dev/api/admin-graphql/current/objects/app). +""" +interface Catalog implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Catalogs. +""" +type CatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CatalogEdge!]! + + """ + A list of nodes that are contained in CatalogEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Catalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for the context in which the catalog's publishing and pricing rules apply. +""" +input CatalogContextInput { + """ + The IDs of the company locations to associate to the catalog. + """ + companyLocationIds: [ID!] +} + +""" +Return type for `catalogContextUpdate` mutation. +""" +type CatalogContextUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +The input fields required to create a catalog. +""" +input CatalogCreateInput { + """ + The context associated with the catalog. + """ + context: CatalogContextInput! + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. + """ + publicationId: ID + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +Return type for `catalogCreate` mutation. +""" +type CatalogCreatePayload { + """ + The newly created catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +A catalog csv operation represents a CSV file import. +""" +type CatalogCsvOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Return type for `catalogDelete` mutation. +""" +type CatalogDeletePayload { + """ + The ID of the deleted catalog. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +An auto-generated type which holds one Catalog and a cursor during pagination. +""" +type CatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CatalogEdge. + """ + node: Catalog! +} + +""" +The set of valid sort keys for the Catalog query. +""" +enum CatalogSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +The state of a catalog. +""" +enum CatalogStatus { + """ + The catalog is active. + """ + ACTIVE + + """ + The catalog is archived. + """ + ARCHIVED + + """ + The catalog is in draft. + """ + DRAFT +} + +""" +The associated catalog's type. +""" +enum CatalogType { + """ + 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 { + """ + The context associated with the catalog. + """ + context: CatalogContextInput + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. + """ + publicationId: ID + + """ + The status of the catalog. + """ + status: CatalogStatus + + """ + The name of the catalog. + """ + title: String +} + +""" +Return type for `catalogUpdate` mutation. +""" +type CatalogUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +Defines errors encountered while managing a catalog. +""" +type CatalogUserError implements DisplayableError { + """ + The error code. + """ + code: CatalogUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CatalogUserError`. +""" +enum CatalogUserErrorCode { + """ + An app catalog cannot be assigned to a price list. + """ + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + 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 + + """ + 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 + + """ + 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 channel represents an app where you sell a group of products and collections. +A channel can be a platform or marketplace such as Facebook or Pinterest, an online store, or POS. +""" +type Channel implements Node { + """ + The underlying app used by the channel. + """ + app: App! + + """ + The list of collection publications. Each record represents information about the publication of a collection. + """ + collectionPublicationsV3( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + The unique identifier for the channel. + """ + handle: String! + + """ + Whether the collection is available to the channel. + """ + hasCollection( + """ + The collection ID to check. + """ + id: ID! + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the channel. + """ + name: String! + + """ + The menu items for the channel, which also appear as submenu items in the left navigation sidebar in the Shopify admin. + """ + navigationItems: [NavigationItem!]! @deprecated(reason: "Use [AppInstallation.navigationItems](\n https:\/\/shopify.dev\/api\/admin-graphql\/current\/objects\/AppInstallation#field-appinstallation-navigationitems) instead.") + + """ + Home page for the channel. + """ + overviewPath: URL @deprecated(reason: "Use [AppInstallation.launchUrl](\n https:\/\/shopify.dev\/api\/admin-graphql\/current\/objects\/AppInstallation#field-appinstallation-launchurl) instead.") + + """ + The product publications for the products published to the channel. + """ + productPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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( + """ + 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` | + | 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | 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 by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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` | + | 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'` | + | 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 + + """ + Whether the channel supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Channels. +""" +type ChannelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ChannelEdge!]! + + """ + A list of nodes that are contained in ChannelEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Channel!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A channel definition represents channels surfaces on the platform. +A channel definition can be a platform or a subsegment of it such as Facebook +Home, Instagram Live, Instagram Shops, or WhatsApp chat. +""" +type ChannelDefinition implements Node { + """ + Name of the channel that this sub channel belongs to. + """ + channelName: String! + + """ + Unique string used as a public identifier for the channel definition. + """ + handle: String! + + """ + The unique ID for the channel definition. + """ + id: ID! + + """ + Whether this channel definition represents a marketplace. + """ + isMarketplace: Boolean! + + """ + Name of the sub channel (e.g. Online Store, Instagram Shopping, TikTok Live). + """ + subChannelName: String! + + """ + Icon displayed when showing the channel in admin. + """ + svgIcon: String @deprecated(reason: "Use App.icon instead") +} + +""" +An auto-generated type which holds one Channel and a cursor during pagination. +""" +type ChannelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ChannelEdge. + """ + node: Channel! +} + +""" +Contains the information for a given sales channel. +""" +type ChannelInformation implements Node { + """ + The app associated with the channel. + """ + app: App! + + """ + The channel definition associated with the channel. + """ + channelDefinition: ChannelDefinition + + """ + The unique ID for the channel. + """ + channelId: ID! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Creates a unified visual identity for your checkout that keeps customers engaged +and reinforces your brand throughout the purchase process. This comprehensive +branding system lets you control every visual aspect of checkout, from colors +and fonts to layouts and imagery, so your checkout feels like a natural +extension of your store. + +For example, a luxury fashion retailer can configure their checkout with custom +color palettes, premium typography, rounded corners for a softer feel, and +branded imagery that matches their main website aesthetic. + +Use the `Branding` object to: +- Configure comprehensive checkout visual identity +- Coordinate color schemes across all checkout elements +- Apply consistent typography and spacing standards +- Manage background imagery and layout customizations +- Control visibility of various checkout components + +The branding configuration includes design system foundations like color roles, +typography scales, and spacing units, plus specific customizations for sections, +dividers, and interactive elements. This allows merchants to create cohesive +checkout experiences that reinforce their brand identity while maintaining +usability standards. + +Different color schemes can be defined for various contexts, ensuring optimal +contrast and accessibility across different checkout states and customer preferences. +""" +type CheckoutBranding { + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizations + + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystem +} + +""" +The container background style. +""" +enum CheckoutBrandingBackground { + """ + The Base background style. + """ + BASE + + """ + The Subdued background style. + """ + SUBDUED + + """ + The Transparent background style. + """ + TRANSPARENT +} + +""" +Possible values for the background style. +""" +enum CheckoutBrandingBackgroundStyle { + """ + The None background style. + """ + NONE + + """ + The Solid background style. + """ + SOLID +} + +""" +Possible values for the border. +""" +enum CheckoutBrandingBorder { + """ + The Block End border. + """ + BLOCK_END + + """ + The Full border. + """ + FULL + + """ + The None border. + """ + NONE +} + +""" +The container border style. +""" +enum CheckoutBrandingBorderStyle { + """ + The Base border style. + """ + BASE + + """ + The Dashed border style. + """ + DASHED + + """ + The Dotted border style. + """ + DOTTED +} + +""" +The container border width. +""" +enum CheckoutBrandingBorderWidth { + """ + The Base border width. + """ + BASE + + """ + The Large border width. + """ + LARGE + + """ + The Large 100 border width. + """ + LARGE_100 + + """ + The Large 200 border width. + """ + LARGE_200 +} + +""" +The buttons customizations. +""" +type CheckoutBrandingButton { + """ + The background style used for buttons. + """ + background: CheckoutBrandingBackgroundStyle + + """ + The block padding used for buttons. + """ + blockPadding: CheckoutBrandingSpacing + + """ + The border used for buttons. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The inline padding used for buttons. + """ + inlinePadding: CheckoutBrandingSpacing + + """ + The typography used for buttons. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +Defines the color palette specifically for button elements within checkout +branding, including hover states. These color roles ensure buttons maintain +proper contrast and visual hierarchy throughout the checkout experience. + +For example, a sports brand might configure bright accent colors for primary +action buttons, with darker hover states and contrasting text colors that +maintain accessibility standards. + +Use the `ButtonColorRoles` object to: +- Define button color schemes for different states +- Ensure proper contrast for accessibility compliance +- Coordinate button colors with overall brand palette + +Button color roles include background, border, text, icon, accent (for focused +states), and decorative elements, plus specific hover state colors that provide +clear interactive feedback to customers. +""" +type CheckoutBrandingButtonColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The colors of the button on hover. + """ + hover: CheckoutBrandingColorRoles + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields to set colors for buttons. +""" +input CheckoutBrandingButtonColorRolesInput { + """ + The color of 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 { + """ + 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 { + """ + An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. +""" +input CheckoutBrandingBuyerJourneyInput { + """ + The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Controls the visibility of cart links displayed during checkout. These links +allow customers to return to their cart or continue shopping. + +For example, an electronics store might hide cart links during final checkout +steps to reduce distractions, or show them prominently to encourage customers to +add accessories before completing their purchase. + +The `CartLink` object provides visibility settings to control when and how these +navigation elements appear based on the merchant's checkout flow strategy. +""" +type CheckoutBrandingCartLink { + """ + Whether the cart link is visible at checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Possible values for the cart link content type for the header. +""" +enum CheckoutBrandingCartLinkContentType { + """ + The checkout header content type icon value. + """ + ICON + + """ + The checkout header content type image value. + """ + IMAGE + + """ + The checkout header content type text value. + """ + TEXT +} + +""" +The input fields for updating the cart link customizations at checkout. +""" +input CheckoutBrandingCartLinkInput { + """ + The input to update the visibility of cart links in checkout. This hides the + cart icon on one-page and the cart link in the breadcrumbs/buyer journey on + three-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Defines the visual styling for checkbox elements throughout the checkout +interface, focusing on corner radius customization. This allows merchants to +align checkbox appearance with their overall design aesthetic. + +For example, a modern minimalist brand might prefer sharp, square checkboxes +while a friendly consumer brand could opt for rounded corners to create a +softer, more approachable feel. + +The corner radius setting ensures checkboxes integrate seamlessly with the +overall checkout design language and brand identity. +""" +type CheckoutBrandingCheckbox { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields used to update the checkboxes customizations. +""" +input CheckoutBrandingCheckboxInput { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +Controls spacing customization for the grouped variant of choice list components in checkout forms. + +The `ChoiceList` object contains settings specifically for the 'group' variant +styling through the [`ChoiceListGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceListGroup) +field, which determines the spacing between choice options. +""" +type CheckoutBrandingChoiceList { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroup +} + +""" +Controls the spacing between options in the 'group' variant of [`ChoiceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceList) components. + +This setting adjusts the vertical spacing between choice options to improve +readability and visual organization. The spacing value helps create clear +separation between options, making it easier for customers to scan and select +from available choices. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingChoiceListGroup { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to update the settings that apply to the 'group' variant of ChoiceList. +""" +input CheckoutBrandingChoiceListGroupInput { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to use to update the choice list customizations. +""" +input CheckoutBrandingChoiceListInput { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroupInput +} + +""" +Defines the global color roles for checkout branding. These semantic colors +maintain consistency across all checkout elements and provide the foundation for +the checkout's visual design system. + +Use global colors to: +- Set brand colors for primary actions and buttons +- Define accent colors for links and interactive elements +- Configure semantic colors for success, warning, and error states +- Apply decorative colors for visual highlights + +For example, a merchant might set their brand blue for primary buttons, green +for success messages, amber for warnings, and red for critical errors, creating +a consistent color language throughout checkout. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingColorGlobal { + """ + A color used for interaction, like links and focus states. + """ + accent: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, for example **Pay now**, and secondary buttons, for example **Buy again**. + """ + brand: String + + """ + A semantic color used for components that communicate critical content. For + example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String + + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires + attention. For example, something that might be wrong, but not blocking. + """ + warning: String +} + +""" +The input fields to customize the overall look and feel of the checkout. +""" +input CheckoutBrandingColorGlobalInput { + """ + A 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 group of colors used together on a surface. +""" +type CheckoutBrandingColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields for a group of colors used together on a surface. +""" +input CheckoutBrandingColorRolesInput { + """ + The color of 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 { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRoles + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRoles + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRoles + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRoles +} + +""" +The input fields for a base set of color customizations that's applied to an area of Checkout, from which +every component pulls its colors. +""" +input CheckoutBrandingColorSchemeInput { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRolesInput + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRolesInput + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRolesInput + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRolesInput +} + +""" +The possible color schemes. +""" +enum CheckoutBrandingColorSchemeSelection { + """ + The 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 TRANSPARENT color scheme selection. + """ + TRANSPARENT +} + +""" +The color schemes. +""" +type CheckoutBrandingColorSchemes { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorScheme + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorScheme +} + +""" +The input fields for the color schemes. +""" +input CheckoutBrandingColorSchemesInput { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorSchemeInput + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorSchemeInput +} + +""" +The possible colors. +""" +enum CheckoutBrandingColorSelection { + """ + Transparent color selection. + """ + TRANSPARENT +} + +""" +The color settings for global colors and color schemes. +""" +type CheckoutBrandingColors { + """ + A group of global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobal + + """ + A set of color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemes +} + +""" +The input fields used to update the color settings for global colors and color schemes. +""" +input CheckoutBrandingColorsInput { + """ + The input to update global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobalInput + + """ + The input to define color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemesInput +} + +""" +The container's divider customizations. +""" +type CheckoutBrandingContainerDivider { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update a container's divider customizations. +""" +input CheckoutBrandingContainerDividerInput { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The content container customizations. +""" +type CheckoutBrandingContent { + """ + The content container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider +} + +""" +The input fields used to update the content container customizations. +""" +input CheckoutBrandingContentInput { + """ + Divider style and visibility on the content container. + """ + divider: CheckoutBrandingContainerDividerInput +} + +""" +The form controls customizations. +""" +type CheckoutBrandingControl { + """ + The border used for form controls. + """ + border: CheckoutBrandingSimpleBorder + + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls + inherit colors from their scheme settings (for example, the main section + inherits from `design_system.colors.schemes.scheme1.control` by default). Note + that usage of the `customizations.control.color` setting to customize the form + control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """ + The corner radius used for form controls. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The label position used for form controls. + """ + labelPosition: CheckoutBrandingLabelPosition +} + +""" +Colors for form controls. +""" +type CheckoutBrandingControlColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The colors of selected controls. + """ + selected: CheckoutBrandingColorRoles + + """ + The color of text. + """ + text: String +} + +""" +The input fields to define colors for form controls. +""" +input CheckoutBrandingControlColorRolesInput { + """ + The color of 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 { + """ + 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 { + """ + 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 { + """ + The value in pixels for base corner radii. Example: 5. + """ + base: Int + + """ + The value in pixels for large corner radii. Example: 10. + """ + large: Int + + """ + The value in pixels for small corner radii. Example: 3. + """ + small: Int +} + +""" +The input fields used to update the corner radius variables. +""" +input CheckoutBrandingCornerRadiusVariablesInput { + """ + The value in pixels for 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 { + """ + Globally unique ID reference to the custom font file. + """ + genericFileId: ID + + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields required to update a custom font group. +""" +input CheckoutBrandingCustomFontGroupInput { + """ + The base font. + """ + base: CheckoutBrandingCustomFontInput! + + """ + The bold font. + """ + bold: CheckoutBrandingCustomFontInput! + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +""" +The input fields required to update a font. +""" +input CheckoutBrandingCustomFontInput { + """ + A globally-unique ID for a font file uploaded via the Files api. + Allowed font types are .woff and .woff2. + """ + genericFileId: ID! + + """ + 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 { + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourney + + """ + The checkout cart link customizations. For example, by setting the visibility + field to `HIDDEN`, you can hide the cart icon in the header for one-page + checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLink + + """ + The checkboxes customizations. + """ + checkbox: CheckoutBrandingCheckbox + + """ + The choice list customizations. + """ + choiceList: CheckoutBrandingChoiceList + + """ + The content container customizations. + """ + content: CheckoutBrandingContent + + """ + The form controls customizations. + """ + control: CheckoutBrandingControl + + """ + The customizations for the page, content, main, and order summary dividers. + For example, by setting the borderStyle to `DOTTED`, you can make these + dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyle + + """ + The express checkout customizations. + """ + expressCheckout: CheckoutBrandingExpressCheckout + + """ + The favicon image. + """ + favicon: CheckoutBrandingImage + + """ + The footer customizations. + """ + footer: CheckoutBrandingFooter + + """ + The global customizations. + """ + global: CheckoutBrandingGlobal + + """ + The header customizations. + """ + header: CheckoutBrandingHeader + + """ + The Heading Level 1 customizations. + """ + headingLevel1: CheckoutBrandingHeadingLevel + + """ + The Heading Level 2 customizations. + """ + headingLevel2: CheckoutBrandingHeadingLevel + + """ + The Heading Level 3 customizations. + """ + headingLevel3: CheckoutBrandingHeadingLevel + + """ + The main area customizations. + """ + main: CheckoutBrandingMain + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnail + + """ + The order summary customizations. + """ + orderSummary: CheckoutBrandingOrderSummary + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutBrandingButton + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutBrandingButton + + """ + The selects customizations. + """ + select: CheckoutBrandingSelect + + """ + The text fields customizations. + """ + textField: CheckoutBrandingTextField +} + +""" +The input fields used to update the components customizations. +""" +input CheckoutBrandingCustomizationsInput { + """ + The 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 { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColors + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariables + + """ + The typography. + """ + typography: CheckoutBrandingTypography +} + +""" +The input fields used to update the design system. +""" +input CheckoutBrandingDesignSystemInput { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColorsInput + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariablesInput + + """ + The typography. + """ + typography: CheckoutBrandingTypographyInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutBrandingDividerStyle { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The input fields used to update the page, content, main and order summary dividers customizations. +""" +input CheckoutBrandingDividerStyleInput { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The Express Checkout customizations. +""" +type CheckoutBrandingExpressCheckout { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButton +} + +""" +The Express Checkout button customizations. +""" +type CheckoutBrandingExpressCheckoutButton { + """ + The corner radius used for the Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the express checkout customizations. +""" +input CheckoutBrandingExpressCheckoutButtonInput { + """ + The corner radius used for Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the Express Checkout customizations. +""" +input CheckoutBrandingExpressCheckoutInput { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButtonInput +} + +""" +A font. +""" +interface CheckoutBrandingFont { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +A font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +type CheckoutBrandingFontGroup { + """ + The base font. + """ + base: CheckoutBrandingFont + + """ + The bold font. + """ + bold: CheckoutBrandingFont + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy + + """ + The font group name. + """ + name: String +} + +""" +The input fields used to update a font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +input CheckoutBrandingFontGroupInput { + """ + A 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 { + """ + 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 { + """ + The base font size. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. + """ + ratio: Float +} + +""" +The input fields used to update the font size. +""" +input CheckoutBrandingFontSizeInput { + """ + The base font size. Its value should be between 12.0 and 18.0. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. Its value should be between 1.0 and 1.4. + """ + ratio: Float +} + +""" +A container for the footer section customizations. +""" +type CheckoutBrandingFooter { + """ + The footer alignment. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The selected color scheme of the footer container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The footer content settings. + """ + content: CheckoutBrandingFooterContent + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The footer position. + """ + position: CheckoutBrandingFooterPosition +} + +""" +Possible values for the footer alignment. +""" +enum CheckoutBrandingFooterAlignment { + """ + The checkout footer alignment Center value. + """ + CENTER + + """ + The checkout footer alignment End value. + """ + END + + """ + The checkout footer alignment Start value. + """ + START +} + +""" +The footer content customizations. +""" +type CheckoutBrandingFooterContent { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for footer content customizations. +""" +input CheckoutBrandingFooterContentInput { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields when mutating the checkout footer settings. +""" +input CheckoutBrandingFooterInput { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + 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 { + """ + The End footer position. + """ + END + + """ + The Inline footer position. + """ + INLINE +} + +""" +The global customizations. +""" +type CheckoutBrandingGlobal { + """ + The global corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobal +} + +""" +Possible choices to override corner radius customizations on all applicable objects. Note that this selection +can only be used to set the override to `NONE` (0px). + +For more customizations options, set the [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) +selection on specific objects while leaving the global corner radius unset. +""" +enum CheckoutBrandingGlobalCornerRadius { + """ + Set the global corner radius override to 0px (square corners). + """ + NONE +} + +""" +The input fields used to update the global customizations. +""" +input CheckoutBrandingGlobalInput { + """ + Select a global corner radius setting that overrides all other [corner radii](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobalInput +} + +""" +The header customizations. +""" +type CheckoutBrandingHeader { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The background image of the header. + """ + banner: CheckoutBrandingImage + + """ + The cart link customizations for 1-page checkout. This field allows to + customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLink + + """ + The selected color scheme of the header container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutBrandingLogo + + """ + The padding of the header container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutBrandingHeaderPosition +} + +""" +The possible header alignments. +""" +enum CheckoutBrandingHeaderAlignment { + """ + Center alignment. + """ + CENTER + + """ + End alignment. + """ + END + + """ + Start alignment. + """ + START +} + +""" +The header cart link customizations. +""" +type CheckoutBrandingHeaderCartLink { + """ + The content type for the header back to cart link in 1-page checkout. Setting + this to image will render the custom image provided using the image field on + the header cart_link object. If no image is provided, the default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The image that's used for the header back to cart link in 1-page checkout when the content type is set to image. + """ + image: Image +} + +""" +The input fields for header cart link customizations. +""" +input CheckoutBrandingHeaderCartLinkInput { + """ + The input for the content type for the header back to cart link in 1-page + checkout. Setting this to image will render the custom image provided using + the image field on the header cart_link object. If no image is provided, the + default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The input for the image that's used for the header back to cart link in 1-page + checkout when the content type is set to image. + """ + image: CheckoutBrandingImageInput +} + +""" +The input fields used to update the header customizations. +""" +input CheckoutBrandingHeaderInput { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The 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 { + """ + Inline position. + """ + INLINE + + """ + Secondary inline position. + """ + INLINE_SECONDARY + + """ + Start position. + """ + START +} + +""" +The heading level customizations. +""" +type CheckoutBrandingHeadingLevel { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields for heading level customizations. +""" +input CheckoutBrandingHeadingLevelInput { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +A checkout branding image. +""" +type CheckoutBrandingImage { + """ + The image details. + """ + image: Image +} + +""" +The input fields used to update a checkout branding image uploaded via the Files API. +""" +input CheckoutBrandingImageInput { + """ + A globally-unique ID. + """ + mediaImageId: ID +} + +""" +The input fields used to upsert the checkout branding settings. +""" +input CheckoutBrandingInput { + """ + The 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 { + """ + The Inside label position. + """ + INSIDE + + """ + The Outside label position. + """ + OUTSIDE +} + +""" +The store logo customizations. +""" +type CheckoutBrandingLogo { + """ + The logo image. + """ + image: Image + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update the logo customizations. +""" +input CheckoutBrandingLogoInput { + """ + The logo image (must not be of SVG format). + """ + image: CheckoutBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The main container customizations. +""" +type CheckoutBrandingMain { + """ + The background image of the main container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the main container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The main container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the main sections. + """ + section: CheckoutBrandingMainSection +} + +""" +The input fields used to update the main container customizations. +""" +input CheckoutBrandingMainInput { + """ + The 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 { + """ + The background style of the main sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the main sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the main sections customizations. +""" +input CheckoutBrandingMainSectionInput { + """ + The 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 { + """ + The border used for merchandise thumbnails. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for merchandise thumbnails. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields used to update the merchandise thumbnails customizations. +""" +input CheckoutBrandingMerchandiseThumbnailInput { + """ + The border used for merchandise thumbnails. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for merchandise thumbnails. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The order summary customizations. +""" +type CheckoutBrandingOrderSummary { + """ + The background image of the order summary container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the order summary container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The order summary container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the order summary sections. + """ + section: CheckoutBrandingOrderSummarySection +} + +""" +The input fields used to update the order summary container customizations. +""" +input CheckoutBrandingOrderSummaryInput { + """ + The 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 { + """ + The background style of the order summary sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the order summary sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the order summary sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the order summary sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the order summary sections customizations. +""" +input CheckoutBrandingOrderSummarySectionInput { + """ + The 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 { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the selects customizations. +""" +input CheckoutBrandingSelectInput { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The container shadow. +""" +enum CheckoutBrandingShadow { + """ + The 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 { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields used to update a Shopify font group. +""" +input CheckoutBrandingShopifyFontGroupInput { + """ + 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 { + """ + The Full simple border. + """ + FULL + + """ + The None simple border. + """ + NONE +} + +""" +Possible values for the spacing. +""" +enum CheckoutBrandingSpacing { + """ + 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 { + """ + 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 { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the text fields customizations. +""" +input CheckoutBrandingTextFieldInput { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The typography settings used for checkout-related text. Use these settings to customize the +font family and size for primary and secondary text elements. + +Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for further information on typography customization. +""" +type CheckoutBrandingTypography { + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroup + + """ + A font group used for heading components by default. + """ + secondary: CheckoutBrandingFontGroup + + """ + The font size design system (base size in pixels and scaling between different sizes). + """ + size: CheckoutBrandingFontSize +} + +""" +The font selection. +""" +enum CheckoutBrandingTypographyFont { + """ + The primary font. + """ + PRIMARY + + """ + The secondary font. + """ + SECONDARY +} + +""" +The input fields used to update the typography. Refer to the [typography +tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information on how to set these fields. +""" +input CheckoutBrandingTypographyInput { + """ + 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 { + """ + 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 { + """ + All letters are is lower case. + """ + LOWER + + """ + No letter casing applied. + """ + NONE + + """ + Capitalize the first letter of each word. + """ + TITLE + + """ + All letters are uppercase. + """ + UPPER +} + +""" +Possible choices for the font size. + +Note that the value in pixels of these settings can be customized with the +[typography size](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingFontSizeInput) +object. Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information. +""" +enum CheckoutBrandingTypographySize { + """ + The 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 { + """ + The font. + """ + font: CheckoutBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutBrandingTypographyWeight +} + +""" +The global typography customizations. +""" +type CheckoutBrandingTypographyStyleGlobal { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the global typography customizations. +""" +input CheckoutBrandingTypographyStyleGlobalInput { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the typography customizations. +""" +input CheckoutBrandingTypographyStyleInput { + """ + 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 { + """ + The base weight. + """ + BASE + + """ + The bold weight. + """ + BOLD +} + +""" +Return type for `checkoutBrandingUpsert` mutation. +""" +type CheckoutBrandingUpsertPayload { + """ + Returns the new checkout branding settings. + """ + checkoutBranding: CheckoutBranding + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CheckoutBrandingUpsertUserError!]! +} + +""" +An error that occurs during the execution of `CheckoutBrandingUpsert`. +""" +type CheckoutBrandingUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: CheckoutBrandingUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CheckoutBrandingUpsertUserError`. +""" +enum CheckoutBrandingUpsertUserErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +Possible visibility states. +""" +enum CheckoutBrandingVisibility { + """ + The Hidden visibility setting. + """ + HIDDEN + + """ + The Visible visibility setting. + """ + VISIBLE +} + +""" +A checkout profile defines the branding settings and the UI extensions for a +store's checkout. A checkout profile could be published or draft. A store might +have at most one published checkout profile, which is used to render their live +checkout. The store could also have multiple draft profiles that were created, +previewed, and published using the admin checkout editor. +""" +type CheckoutProfile implements Node { + """ + The date and time when the checkout profile was created. + """ + createdAt: DateTime! + + """ + The date and time when the checkout profile was last edited. + """ + editedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the checkout profile is published or not. + """ + isPublished: Boolean! + + """ + The profile name. + """ + name: String! + + """ + Whether the checkout profile Thank You Page and Order Status Page are actively using extensibility or not. + """ + typOspPagesActive: Boolean! + + """ + The date and time when the checkout profile was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CheckoutProfiles. +""" +type CheckoutProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CheckoutProfileEdge!]! + + """ + A list of nodes that are contained in CheckoutProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CheckoutProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CheckoutProfile and a cursor during pagination. +""" +type CheckoutProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CheckoutProfileEdge. + """ + node: CheckoutProfile! +} + +""" +The set of valid sort keys for the CheckoutProfile query. +""" +enum CheckoutProfileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `edited_at` value. + """ + EDITED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `is_published` value. + """ + IS_PUBLISHED + + """ + Sort by 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 input fields for adding products to the Combined Listing. +""" +input ChildProductRelationInput { + """ + The ID of the child product. + """ + childProductId: ID! + + """ + The parent option values. + """ + selectedParentOptionValues: [SelectedVariantOptionInput!]! +} + +""" +The set of valid sort keys for the CodeDiscount query. +""" +enum CodeDiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The `Collection` object represents a group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that merchants can organize to make their stores easier to browse and help customers find related products. +Collections serve as the primary way to categorize and display products across +[online stores](https://shopify.dev/docs/apps/build/online-store), +[sales channels](https://shopify.dev/docs/apps/build/sales-channels), and marketing campaigns. + +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 HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + 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! + + """ + Information about the collection that's provided through resource feedback. + """ + feedback: ResourceFeedback + + """ + A unique string that identifies the collection. If a handle isn't specified + when a collection is created, it's automatically generated from the + collection's original title, and typically includes words from the title + separated by hyphens. For example, a collection that was created with the + title `Summer Catalog 2022` might have the handle `summer-catalog-2022`. + + If the title is changed, the handle doesn't automatically change. + + The handle can be used in themes by the Liquid templating language to refer to + the collection, but using the ID is preferred because it never changes. + """ + handle: String! + + """ + Whether the collection includes the specified product. + """ + hasProduct( + """ + The ID of the product to check. + """ + id: ID! + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the collection. + """ + image( + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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 number of products in the collection. + """ + productsCount: Count + + """ + 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + The channels where the collection is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + 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 + ): [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.") + + """ + 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! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the collection was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `collectionAddProducts` mutation. +""" +type CollectionAddProductsPayload { + """ + The updated collection. Returns `null` if an error is raised. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionAddProductsV2` mutation. +""" +type CollectionAddProductsV2Payload { + """ + The asynchronous job adding the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionAddProductsV2UserError!]! +} + +""" +An error that occurs during the execution of `CollectionAddProductsV2`. +""" +type CollectionAddProductsV2UserError implements DisplayableError { + """ + The error code. + """ + code: CollectionAddProductsV2UserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionAddProductsV2UserError`. +""" +enum CollectionAddProductsV2UserErrorCode { + """ + Can't manually add products to a smart collection. + """ + CANT_ADD_TO_SMART_COLLECTION + + """ + Collection doesn't exist. + """ + COLLECTION_DOES_NOT_EXIST +} + +""" +An auto-generated type for paginating through multiple Collections. +""" +type CollectionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionEdge!]! + + """ + A list of nodes that are contained in CollectionEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Collection!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `collectionCreate` mutation. +""" +type CollectionCreatePayload { + """ + The collection that has been created. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the collection to delete. +""" +input CollectionDeleteInput { + """ + The ID of the collection to be deleted. + """ + id: ID! +} + +""" +Return type for `collectionDelete` mutation. +""" +type CollectionDeletePayload { + """ + The ID of the collection that was deleted. Returns `null` if the collection doesn't exist. + """ + deletedCollectionId: ID + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Collection and a cursor during pagination. +""" +type CollectionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionEdge. + """ + node: Collection! +} + +""" +The input fields required to create a collection. +""" +input CollectionInput { + """ + The description of the collection, in HTML format. + """ + descriptionHtml: String + + """ + A unique human-friendly string for the collection. Automatically generated from the collection's title. + """ + handle: String + + """ + Specifies the collection to update or create a new collection if absent. Required for updating a collection. + """ + id: ID + + """ + The image associated with the collection. + """ + image: ImageInput + + """ + The metafields to associate with the collection. + """ + metafields: [MetafieldInput!] + + """ + The private metafields to associate with the collection. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Initial list of collection products. Only valid with `collectionCreate` and without rules. + """ + products: [ID!] + + """ + 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 the publication status and settings for a collection across different +sales channels. This tracks where collections are published, when they were +published, and any channel-specific configuration. + +For example, a "Holiday Gifts" collection might be published to the online store +and Facebook Shop but not to the POS channel, with different publication dates +for each channel based on marketing strategy. + +Use `CollectionPublication` to: +- Track collection visibility across multiple sales channels +- Manage channel-specific collection settings and availability +- Monitor publication history and timing for collections +- Control where collections appear in customer-facing channels +- Implement channel-specific collection management workflows + +Each publication record includes the channel information, publication status, +and timing details. This enables merchants to control collection visibility +strategically across their sales channels. + +Collections can have different publication settings per channel, allowing for +targeted marketing and inventory management. For instance, wholesale collections +might only be published to B2B channels while retail collections appear in +consumer-facing channels. + +The publication system integrates with Shopify's broader channel management, +ensuring collections appear consistently across the merchant's sales ecosystem +while respecting channel-specific rules and permissions. + +Learn more about [sales channel management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). +""" +type CollectionPublication { + """ + The channel where the collection will be published. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + The collection to be published on the publication. + """ + collection: Collection! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The publication where the collection will be published. + """ + publication: Publication! + + """ + The date that the publication was or is going to be published. + """ + publishDate: DateTime! +} + +""" +An auto-generated type for paginating through multiple CollectionPublications. +""" +type CollectionPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionPublicationEdge!]! + + """ + A list of nodes that are contained in CollectionPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CollectionPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CollectionPublication and a cursor during pagination. +""" +type CollectionPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionPublicationEdge. + """ + node: CollectionPublication! +} + +""" +The input fields for publications to which a collection will be published. +""" +input CollectionPublicationInput { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + The ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + The ID of the publication. + """ + publicationId: ID +} + +""" +The input fields for specifying a collection to publish and the sales channels to publish it to. +""" +input CollectionPublishInput { + """ + The channels where the collection will be published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! +} + +""" +Return type for `collectionPublish` mutation. +""" +type CollectionPublishPayload { + """ + The published collection. + """ + collection: Collection + + """ + The channels where the collection has been published. + """ + collectionPublications: [CollectionPublication!] + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionRemoveProducts` mutation. +""" +type CollectionRemoveProductsPayload { + """ + The asynchronous job removing the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionReorderProducts` mutation. +""" +type CollectionReorderProductsPayload { + """ + The asynchronous job reordering the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents at rule that's used to assign products to a collection. +""" +type CollectionRule { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The value that the operator is applied to. For example, `Hats`. + """ + condition: String! + + """ + The value that the operator is applied to. + """ + conditionObject: CollectionRuleConditionObject + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! +} + +""" +Specifies the attribute of a product being used to populate the smart collection. +""" +enum CollectionRuleColumn { + """ + 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 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 = 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 { + """ + Allowed relations of the rule. + """ + allowedRelations: [CollectionRuleRelation!]! + + """ + Most commonly used relation for this rule. + """ + defaultRelation: CollectionRuleRelation! + + """ + Additional attributes defining the rule. + """ + ruleObject: CollectionRuleConditionsRuleObject + + """ + Type of the rule. + """ + ruleType: CollectionRuleColumn! +} + +""" +Specifies object with additional rule attributes. +""" +union CollectionRuleConditionsRuleObject = CollectionRuleMetafieldCondition + +""" +The input fields for a rule to associate with a collection. +""" +input CollectionRuleInput { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The 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 { + """ + The metafield definition associated with the condition. + """ + metafieldDefinition: MetafieldDefinition! +} + +""" +Specifies the condition for a Product Category field. +""" +type CollectionRuleProductCategoryCondition { + """ + The value of the condition. + """ + value: ProductTaxonomyNode! +} + +""" +Specifies the relationship between the `column` and the `condition`. +""" +enum CollectionRuleRelation { + """ + The attribute contains the condition. + """ + CONTAINS + + """ + The attribute ends with the condition. + """ + ENDS_WITH + + """ + The attribute is equal to the condition. + """ + EQUALS + + """ + The attribute is greater than the condition. + """ + GREATER_THAN + + """ + The attribute is not set (equal to `null`). + """ + IS_NOT_SET + + """ + The attribute is set (not equal to `null`). + """ + IS_SET + + """ + The attribute is less than the condition. + """ + LESS_THAN + + """ + The attribute does not contain the condition. + """ + NOT_CONTAINS + + """ + The attribute does not equal the condition. + """ + NOT_EQUALS + + """ + The attribute starts with the condition. + """ + STARTS_WITH +} + +""" +The set of rules that are used to determine which products are included in the collection. +""" +type CollectionRuleSet { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRule!]! +} + +""" +The input fields for a rule set of the collection. +""" +input CollectionRuleSetInput { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRuleInput!] +} + +""" +Specifies the condition for a text field. +""" +type CollectionRuleTextCondition { + """ + The value of the condition. + """ + value: String! +} + +""" +The set of valid sort keys for the Collection query. +""" +enum CollectionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Specifies the sort order for the products in the collection. +""" +enum CollectionSortOrder { + """ + Alphabetically, in ascending order (A - Z). + """ + ALPHA_ASC + + """ + Alphabetically, in descending order (Z - A). + """ + ALPHA_DESC + + """ + By best-selling products. + """ + BEST_SELLING + + """ + By date created, in ascending order (oldest - newest). + """ + CREATED + + """ + By date created, in descending order (newest - oldest). + """ + CREATED_DESC + + """ + In the order set manually by the merchant. + """ + MANUAL + + """ + By price, in ascending order (lowest - highest). + """ + PRICE_ASC + + """ + By price, in descending order (highest - lowest). + """ + PRICE_DESC +} + +""" +The input fields for specifying the collection to unpublish and the sales channels to remove it from. +""" +input CollectionUnpublishInput { + """ + The channels where the collection is published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! +} + +""" +Return type for `collectionUnpublish` mutation. +""" +type CollectionUnpublishPayload { + """ + The collection that has been unpublished. + """ + collection: Collection + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionUpdate` mutation. +""" +type CollectionUpdatePayload { + """ + The updated collection. + """ + collection: Collection + + """ + The asynchronous job updating the products based on the new rule set. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a hexadecimal representation of a color. + +For example, "#6A8D48". +""" +scalar Color + +""" +A combined listing of products. +""" +type CombinedListing { + """ + 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 { + """ + The parent variant. + """ + parentVariant: ProductVariant! + + """ + The child product. + """ + product: Product! +} + +""" +An auto-generated type for paginating through multiple CombinedListingChildren. +""" +type CombinedListingChildConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CombinedListingChildEdge!]! + + """ + A list of nodes that are contained in CombinedListingChildEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CombinedListingChild!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CombinedListingChild and a cursor during pagination. +""" +type CombinedListingChildEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CombinedListingChildEdge. + """ + node: CombinedListingChild! +} + +""" +Return type for `combinedListingUpdate` mutation. +""" +type CombinedListingUpdatePayload { + """ + The parent product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CombinedListingUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CombinedListingUpdate`. +""" +type CombinedListingUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CombinedListingUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CombinedListingUpdateUserError`. +""" +enum CombinedListingUpdateUserErrorCode { + """ + Unable to add duplicated products. + """ + CANNOT_HAVE_DUPLICATED_PRODUCTS + + """ + Unable to add a product that is a parent. + """ + CANNOT_HAVE_PARENT_AS_CHILD + + """ + 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 { + """ + The product is the child of a combined listing. + """ + CHILD + + """ + The product is the parent of a combined listing. + """ + PARENT +} + +""" +Comment events are generated by staff members of a shop. +They are created when a staff member adds a comment to the timeline of an order, draft order, customer, or transfer. +""" +type CommentEvent implements Event & Node { + """ + The name of the app that created the event. + """ + appTitle: String + + """ + The attachments associated with the comment event. + """ + attachments: [CommentEventAttachment!]! + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The name of the user that authored the comment event. + """ + author: StaffMember! + + """ + Whether the comment event can be deleted. If true, then the comment event can be deleted. + """ + canDelete: Boolean! + + """ + Whether the comment event can be edited. If true, then the comment event can be edited. + """ + canEdit: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + Whether the comment event has been edited. If true, then the comment event has been edited. + """ + edited: Boolean! + + """ + The object reference associated with the comment event. For example, a product or discount). + """ + embed: CommentEventEmbed + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! + + """ + The raw body of the comment event. + """ + rawMessage: String! + + """ + The parent subject to which the comment event belongs. + """ + subject: CommentEventSubject! +} + +""" +A file attachment associated to a comment event. +""" +type CommentEventAttachment { + """ + The file extension of the comment event attachment, indicating the file format. + """ + fileExtension: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image attached to the comment event. + """ + image( + """ + 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 = Customer | DraftOrder | Order | Product | ProductVariant + +""" +The subject line of a comment event. +""" +interface CommentEventSubject { + """ + Whether the timeline subject has a timeline comment. If true, then a timeline comment exists. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Return type for `companiesDelete` mutation. +""" +type CompaniesDeletePayload { + """ + A list of IDs of the deleted companies. + """ + deletedCompanyIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Represents information about a company which is also a customer of the shop. +""" +type Company implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Navigable & Node { + """ + The number of contacts that belong to the company. + """ + contactCount: Int! @deprecated(reason: "Use `contactsCount` instead.") + + """ + The list of roles for the company contacts. + """ + contactRoles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The name of the company. + """ + name: String! + + """ + A note about the company. + """ + note: String + + """ + The list of the company's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 this company, across all its locations. + """ + ordersCount: Count + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The total amount spent by this company, across all its locations. + """ + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + """ + updatedAt: DateTime! +} + +""" +Represents a billing or shipping address for a company location. +""" +type CompanyAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String! + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company. + """ + companyName: String! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company address was created. + """ + createdAt: DateTime! + + """ + The first name of the recipient. + """ + firstName: String + + """ + The formatted version of the address. + """ + formattedAddress( + """ + Whether to include the company name in the formatted address. + """ + withCompanyName: Boolean = true + + """ + Whether to include the recipient's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the recipient. + """ + lastName: String + + """ + A unique phone number for the customer. + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The identity of the recipient e.g. 'Receiving Department'. + """ + recipient: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company address was last updated. + """ + updatedAt: DateTime! + + """ + The zip or postal code of the address. + """ + zip: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + zoneCode: String +} + +""" +Return type for `companyAddressDelete` mutation. +""" +type CompanyAddressDeletePayload { + """ + The ID of the deleted address. + """ + deletedAddressId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields to create or update the address of a company location. +""" +input CompanyAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The 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 { + """ + The address is a billing address. + """ + BILLING + + """ + The address is a shipping address. + """ + SHIPPING +} + +""" +Return type for `companyAssignCustomerAsContact` mutation. +""" +type CompanyAssignCustomerAsContactPayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyAssignMainContact` mutation. +""" +type CompanyAssignMainContactPayload { + """ + The company for which the main contact is assigned. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple Companies. +""" +type CompanyConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyEdge!]! + + """ + A list of nodes that are contained in CompanyEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Company!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A person that acts on behalf of company associated to [a +customer](https://shopify.dev/api/admin-graphql/latest/objects/customer). +""" +type CompanyContact implements Node { + """ + The company to which the contact belongs. + """ + company: Company! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company contact was created at Shopify. + """ + createdAt: DateTime! + + """ + The customer associated to this contact. + """ + customer: Customer! + + """ + The list of draft orders for the company contact. + """ + draftOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The company contact role assignment. + """ + companyContactRoleAssignment: CompanyContactRoleAssignment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactAssignRoles` mutation. +""" +type CompanyContactAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple CompanyContacts. +""" +type CompanyContactConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactEdge!]! + + """ + A list of nodes that are contained in CompanyContactEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContact!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyContactCreate` mutation. +""" +type CompanyContactCreatePayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactDelete` mutation. +""" +type CompanyContactDeletePayload { + """ + The ID of the deleted company contact. + """ + deletedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyContact and a cursor during pagination. +""" +type CompanyContactEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactEdge. + """ + node: CompanyContact! +} + +""" +The input fields for company contact attributes when creating or updating a company contact. +""" +input CompanyContactInput { + """ + The 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 { + """ + The ID of the removed company contact. + """ + removedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRole` mutation. +""" +type CompanyContactRevokeRolePayload { + """ + The role assignment that was revoked. + """ + revokedCompanyContactRoleAssignmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRoles` mutation. +""" +type CompanyContactRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company contact. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The role for a [company contact](https://shopify.dev/api/admin-graphql/latest/objects/companycontact). +""" +type CompanyContactRole implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of a role. + For example, `admin` or `buyer`. + """ + name: String! + + """ + A note for the role. + """ + note: String +} + +""" +The input fields for the role and location to assign to a company contact. +""" +input CompanyContactRoleAssign { + """ + The role ID. + """ + companyContactRoleId: ID! + + """ + The location. + """ + companyLocationId: ID! +} + +""" +The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. +""" +type CompanyContactRoleAssignment implements Node { + """ + The company this role assignment belongs to. + """ + company: Company! + + """ + The company contact for whom this role is assigned. + """ + companyContact: CompanyContact! + + """ + The company location to which the role is assigned. + """ + companyLocation: CompanyLocation! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The role that's assigned to the company contact. + """ + role: CompanyContactRole! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoleAssignments. +""" +type CompanyContactRoleAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleAssignmentEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [CompanyContactRoleAssignment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination. +""" +type CompanyContactRoleAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleAssignmentEdge. + """ + node: CompanyContactRoleAssignment! +} + +""" +The set of valid sort keys for the CompanyContactRoleAssignment query. +""" +enum CompanyContactRoleAssignmentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location_name` value. + """ + LOCATION_NAME + + """ + Sort by 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 +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoles. +""" +type CompanyContactRoleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContactRole!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRole and a cursor during pagination. +""" +type CompanyContactRoleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleEdge. + """ + node: CompanyContactRole! +} + +""" +The set of valid sort keys for the CompanyContactRole query. +""" +enum CompanyContactRoleSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by 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 +} + +""" +Return type for `companyContactSendWelcomeEmail` mutation. +""" +type CompanyContactSendWelcomeEmailPayload { + """ + The company contact to whom a welcome email was sent. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the CompanyContact query. +""" +enum CompanyContactSortKeys { + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `name_email` value. + """ + NAME_EMAIL + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyContactUpdate` mutation. +""" +type CompanyContactUpdatePayload { + """ + The updated company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactsDelete` mutation. +""" +type CompanyContactsDeletePayload { + """ + The list of IDs of the deleted company contacts. + """ + deletedCompanyContactIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields and values for creating a company and its associated resources. +""" +input CompanyCreateInput { + """ + The attributes for the company. + """ + company: CompanyInput! + + """ + The attributes for the company contact. + """ + companyContact: CompanyContactInput + + """ + The attributes for the company location. + """ + companyLocation: CompanyLocationInput +} + +""" +Return type for `companyCreate` mutation. +""" +type CompanyCreatePayload { + """ + The created company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyDelete` mutation. +""" +type CompanyDeletePayload { + """ + The ID of the deleted company. + """ + deletedCompanyId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one Company and a cursor during pagination. +""" +type CompanyEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyEdge. + """ + node: Company! +} + +""" +The input fields for company attributes when creating or updating a company. +""" +input CompanyInput { + """ + The 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 that's a +customer](https://shopify.dev/api/admin-graphql/latest/objects/company) of the +shop. Configuration of B2B relationship, for example prices lists and checkout +settings, may be done for a location. +""" +type CompanyLocation implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Navigable & Node { + """ + The address used as billing address for the location. + """ + billingAddress: CompanyAddress + + """ + The configuration for the buyer's B2B checkout. + """ + buyerExperienceConfiguration: BuyerExperienceConfiguration + + """ + The list of catalogs associated with the company location. + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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: 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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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 merchant added a timeline comment to the company location. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the company location is assigned a specific catalog. + """ + inCatalog( + """ + The ID of the catalog. + """ + catalogId: ID! + ): Boolean! + + """ + The preferred locale of the company location. + """ + locale: String + + """ + The market that includes the location's shipping address. If the shipping + address is empty, then the value is the shop's primary market. + """ + market: Market! + + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The name of the company location. + """ + name: String! + + """ + A note about the company location. + """ + note: String + + """ + The total number of orders placed for the location. + """ + orderCount: Int! @deprecated(reason: "Use `ordersCount` instead.") + + """ + The list of orders for the company location. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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 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 total amount spent by the location. + """ + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company location was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `companyLocationAssignAddress` mutation. +""" +type CompanyLocationAssignAddressPayload { + """ + The list of updated addresses on the company location. + """ + addresses: [CompanyAddress!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignRoles` mutation. +""" +type CompanyLocationAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignTaxExemptions` mutation. +""" +type CompanyLocationAssignTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A list of products with publishing and pricing information associated with company locations. +""" +type CompanyLocationCatalog implements Catalog & Node { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationEdge!]! + + """ + A list of nodes that are contained in CompanyLocationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyLocation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyLocationCreate` mutation. +""" +type CompanyLocationCreatePayload { + """ + The created company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationCreateTaxRegistration` mutation. +""" +type CompanyLocationCreateTaxRegistrationPayload { + """ + The company location with the created tax registration. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationDelete` mutation. +""" +type CompanyLocationDeletePayload { + """ + The ID of the deleted company location. + """ + deletedCompanyLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyLocation and a cursor during pagination. +""" +type CompanyLocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyLocationEdge. + """ + node: CompanyLocation! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationInput { + """ + The 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 + + """ + 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 `companyLocationRevokeRoles` mutation. +""" +type CompanyLocationRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company location. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxExemptions` mutation. +""" +type CompanyLocationRevokeTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxRegistration` mutation. +""" +type CompanyLocationRevokeTaxRegistrationPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for the role and contact to assign on a location. +""" +input CompanyLocationRoleAssign { + """ + The company contact ID.. + """ + companyContactId: ID! + + """ + The role ID. + """ + companyContactRoleId: ID! +} + +""" +The set of valid sort keys for the CompanyLocation query. +""" +enum CompanyLocationSortKeys { + """ + Sort by the `company_and_location_name` value. + """ + COMPANY_AND_LOCATION_NAME + + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationUpdateInput { + """ + 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 { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationsDelete` mutation. +""" +type CompanyLocationsDeletePayload { + """ + A list of IDs of the deleted company locations. + """ + deletedCompanyLocationIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyRevokeMainContact` mutation. +""" +type CompanyRevokeMainContactPayload { + """ + The company from which the main contact is revoked. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the Company query. +""" +enum CompanySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `order_count` value. + """ + ORDER_COUNT + + """ + Sort by 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 `since_date` value. + """ + SINCE_DATE + + """ + Sort by the `total_spent` value. + """ + TOTAL_SPENT + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyUpdate` mutation. +""" +type CompanyUpdatePayload { + """ + The updated company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for the context data that determines the pricing of a variant. Refer to [Product](https://shopify.dev/docs/api/admin-graphql/latest/queries/product?example=Get+the+price+range+for+a+product+for+buyers+from+Canada)for +more information on how to use this input object. +""" +input ContextualPricingContext { + """ + The CompanyLocation ID used to fetch company location specific prices. + """ + companyLocationId: ID + + """ + The country code used to fetch country-specific prices. + """ + country: CountryCode +} + +""" +The context data that determines the publication status of a product. +""" +input ContextualPublicationContext { + """ + The company location ID used to fetch company-specific publication. + """ + companyLocationId: ID + + """ + The country code used to fetch country-specific publication. + """ + country: CountryCode +} + +""" +Details for count of elements. +""" +type Count { + """ + The count of elements. + """ + count: Int! + + """ + The count's precision, or the exactness of the value. + """ + precision: CountPrecision! +} + +""" +The precision of the value returned by a count field. +""" +enum CountPrecision { + """ + The count is at least the value. A limit was imposed and reached. + """ + AT_LEAST + + """ + The count is exactly the value. + """ + EXACT +} + +""" +The list of all the countries from the combined shipping zones for the shop. +""" +type CountriesInShippingZones { + """ + The list of all the countries from all the combined shipping zones. + """ + countryCodes: [CountryCode!]! + + """ + Whether 'Rest of World' has been defined in any of the shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. +If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision +of another country. For example, the territories associated with Spain are represented by the country code `ES`, +and the territories associated with the United States of America are represented by the country code `US`. +""" +enum CountryCode { + """ + 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 { + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. + """ + countryCode: CountryCode! + + """ + The country-specific harmonized system code. These are usually longer than 6 digits. + """ + harmonizedSystemCode: String! +} + +""" +An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes. +""" +type CountryHarmonizedSystemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CountryHarmonizedSystemCodeEdge!]! + + """ + A list of nodes that are contained in CountryHarmonizedSystemCodeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CountryHarmonizedSystemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination. +""" +type CountryHarmonizedSystemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CountryHarmonizedSystemCodeEdge. + """ + node: CountryHarmonizedSystemCode! +} + +""" +The input fields required to specify a harmonized system code. +""" +input CountryHarmonizedSystemCodeInput { + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. + """ + countryCode: CountryCode! + + """ + Country specific harmonized system code. + """ + harmonizedSystemCode: String! +} + +""" +The input fields required to create a media object. +""" +input CreateMediaInput { + """ + 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 { + """ + Keep the bottom of the image. + """ + BOTTOM + + """ + Keep the center of the image. + """ + CENTER + + """ + Keep the left of the image. + """ + LEFT + + """ + Keep the right of the image. + """ + RIGHT + + """ + Keep the top of the image. + """ + TOP +} + +""" +The currency codes that represent the world currencies throughout the Admin API. Currency codes include +[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes, +digital currency codes. +""" +enum CurrencyCode { + """ + United 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 +} + +""" +Currency formats configured for the merchant. These formats are available to use within Liquid. +""" +type CurrencyFormats { + """ + Money without currency in HTML. + """ + moneyFormat: FormattedString! + + """ + Money without currency in emails. + """ + moneyInEmailsFormat: String! + + """ + Money with currency in HTML. + """ + moneyWithCurrencyFormat: FormattedString! + + """ + Money with currency in emails. + """ + moneyWithCurrencyInEmailsFormat: String! +} + +""" +A setting for a presentment currency. +""" +type CurrencySetting { + """ + The currency's ISO code. + """ + currencyCode: CurrencyCode! + + """ + The full name of the currency. + """ + currencyName: String! + + """ + Whether the currency is enabled or not. An enabled currency setting is visible + to buyers and allows orders to be generated with that currency as presentment. + """ + enabled: Boolean! + + """ + The date and time when the active exchange rate for the currency was last + modified. It can be the automatic rate's creation date, or the manual rate's + last updated at date if active. + """ + rateUpdatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple CurrencySettings. +""" +type CurrencySettingConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CurrencySettingEdge!]! + + """ + A list of nodes that are contained in CurrencySettingEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CurrencySetting!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CurrencySetting and a cursor during pagination. +""" +type CurrencySettingEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CurrencySettingEdge. + """ + node: CurrencySetting! +} + +""" +The input fields for a custom shipping package used to pack shipment. +""" +input CustomShippingPackageInput { + """ + 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 +} + +""" +Represents information about a customer of the shop, such as the customer's contact details, their order +history, and whether they've agreed to receive marketing material by email. + +**Caution:** Only use this data if it's required for your app's functionality. +Shopify will restrict [access to +scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a +legitimate use for the associated data. +""" +type Customer implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & HasStoreCreditAccounts & LegacyInteroperability & Node { + """ + A list of addresses associated with the customer. + """ + addresses( + """ + Truncate the array result to this size. + """ + first: Int + ): [MailingAddress!]! + + """ + 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 full name of the customer, based on the values for first_name and last_name. If the first_name and + last_name are not available, then this falls back to the customer's email + address, and if that is not available, the customer's phone number. + """ + displayName: String! + + """ + The customer's email address. + """ + email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") + + """ + The current email marketing state for the customer. + If the customer doesn't have an email address, then this property is `null`. + """ + emailMarketingConsent: CustomerEmailMarketingConsentState @deprecated(reason: "Use `defaultEmailAddress.marketingState`, `defaultEmailAddress.marketingOptInLevel`, `defaultEmailAddress.marketingUpdatedAt`, and `defaultEmailAddress.sourceLocation` instead.") + + """ + A list of events associated with the customer. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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 + + """ + Whether the merchant has added timeline comments about the customer on the customer's page. + """ + hasTimelineComment: Boolean! @deprecated(reason: "To query for comments on the timeline, use the `events` connection and a 'query' argument containing `verb:comment`, or look for a 'CommentEvent' in the `__typename` of `events`.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the customer. + """ + image( + """ + Image width and height (1 - 2048 pixels). + """ + size: Int @deprecated(reason: "Use `maxWidth` or `maxHeight` on `Image.transformedSrc` instead.") + ): Image! + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's last order. + """ + lastOrder: Order + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The amount of time since the customer was first added to the store. + + Example: 'about 12 years'. + """ + lifetimeDuration: String! + + """ + The customer's locale. + """ + locale: String! + + """ + The market that includes the customer’s default address. + """ + market: Market + + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + A unique identifier for the customer that's used with Multipass login. + """ + multipassIdentifier: String + + """ + A note about the customer. + """ + note: String + + """ + The number of orders that the customer has made at the store in their lifetime. + """ + numberOfOrders: UnsignedInt64! + + """ + A list of the customer's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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` | + | 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` | + | 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` | + | 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 + ): CustomerPaymentMethodConnection! + + """ + The customer's phone number. + """ + phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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 URL to unsubscribe the customer from the mailing list. + """ + unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") + + """ + The date and time when the customer was last updated. + """ + updatedAt: DateTime! + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly and + belongs to an existing domain. This doesn't guarantee that + the email address actually exists. + """ + validEmailAddress: Boolean! @deprecated(reason: "Use `defaultEmailAddress.validFormat` instead.") + + """ + Whether the customer has verified their email address. Defaults to `true` if + the customer is created through the Shopify admin or API. + """ + verifiedEmail: Boolean! +} + +""" +Information about the shop's customer accounts. +""" +type CustomerAccountsV2 { + """ + Indicates which version of customer accounts the merchant is using in online store and checkout. + """ + customerAccountsVersion: CustomerAccountsVersion! + + """ + Login links are shown in online store and checkout. + """ + loginLinksVisibleOnStorefrontAndCheckout: Boolean! + + """ + Customers are required to log in to their account before checkout. + """ + loginRequiredAtCheckout: Boolean! + + """ + The root url for the customer accounts pages. + """ + url: URL +} + +""" +The login redirection target for customer accounts. +""" +enum CustomerAccountsVersion { + """ + The customer is redirected to the classic customer accounts login page. + """ + CLASSIC + + """ + The customer is redirected to the new customer accounts login page. + """ + NEW_CUSTOMER_ACCOUNTS +} + +""" +Return type for `customerAddTaxExemptions` mutation. +""" +type CustomerAddTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerCancelDataErasureUserError`. +""" +enum CustomerCancelDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to cancel customer data erasure. + """ + FAILED_TO_CANCEL + + """ + Customer's data is not scheduled for erasure. + """ + NOT_BEING_ERASED + + """ + Only the original requester can cancel this data erasure. + """ + UNAUTHORIZED_CANCELLATION +} + +""" +Return type for `customerCancelDataErasure` mutation. +""" +type CustomerCancelDataErasurePayload { + """ + The ID of the customer whose pending data erasure has been cancelled. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerCancelDataErasureUserError!]! +} + +""" +An error that occurs when cancelling a customer data erasure request. +""" +type CustomerCancelDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerCancelDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An auto-generated type for paginating through multiple Customers. +""" +type CustomerConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerEdge!]! + + """ + A list of nodes that are contained in CustomerEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Customer!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The source that collected the customer's consent to receive marketing materials. +""" +enum CustomerConsentCollectedFrom { + """ + The customer consent was collected outside of Shopify. + """ + OTHER + + """ + The customer consent was collected by Shopify. + """ + SHOPIFY +} + +""" +Return type for `customerCreate` mutation. +""" +type CustomerCreatePayload { + """ + The created customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a card instrument for customer payment method. +""" +type CustomerCreditCard { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + The brand of the card. + """ + brand: String! + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + The card's BIN number. + """ + firstDigits: String + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! + + """ + The source of the card if coming from a wallet such as Apple Pay. + """ + source: String + + """ + The last 4 digits of the Device Account Number. + """ + virtualLastDigits: String +} + +""" +The billing address of a credit card payment instrument. +""" +type CustomerCreditCardBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The first name in the billing address. + """ + firstName: String + + """ + The last name in the billing address. + """ + lastName: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields to delete a customer. +""" +input CustomerDeleteInput { + """ + The ID of the customer to delete. + """ + id: ID! +} + +""" +Return type for `customerDelete` mutation. +""" +type CustomerDeletePayload { + """ + The ID of the deleted customer. + """ + deletedCustomerId: ID + + """ + The shop of the deleted customer. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Customer and a cursor during pagination. +""" +type CustomerEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerEdge. + """ + node: Customer! +} + +""" +Represents an email address. +""" +type CustomerEmailAddress { + """ + The customer's default email address. + """ + emailAddress: String! + + """ + Whether the customer has subscribed to email marketing. + """ + marketingState: CustomerEmailAddressMarketingState! + + """ + The URL to unsubscribe a member from all mailing lists. + """ + marketingUnsubscribeUrl: URL! + + """ + 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! +} + +""" +Possible marketing states for the customer’s email address. +""" +enum CustomerEmailAddressMarketingState { + """ + The customer’s email address marketing state is invalid. + """ + INVALID + + """ + The customer is not subscribed to email marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to email marketing. + """ + PENDING + + """ + The customer is subscribed to email marketing. + """ + SUBSCRIBED + + """ + The customer is not subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +The different levels related to whether a customer has opted in to having their opened emails tracked. +""" +enum CustomerEmailAddressOpenTrackingLevel { + """ + The customer has 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 { + """ + 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 current marketing state associated with the customer's email. + If the customer doesn't have an email, then this field is `null`. + """ + marketingState: CustomerEmailMarketingState! +} + +""" +The record of when a customer consented to receive marketing material by email. +""" +type CustomerEmailMarketingConsentState { + """ + The date and time at which the customer consented to receive marketing material by email. + The customer's consent state reflects the consent record with the most recent `consent_updated_at` date. + If no date is provided, then the date and time at which the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + that the customer gave when they consented to receive marketing material by email. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The current email marketing state for the customer. + """ + marketingState: CustomerEmailMarketingState! +} + +""" +The input fields for the email consent information to update for a given customer ID. +""" +input CustomerEmailMarketingConsentUpdateInput { + """ + The ID of the customer for which to update the email marketing consent + information. The customer must have a unique email address associated to the + record. If not, add the email address using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by email. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput! +} + +""" +Return type for `customerEmailMarketingConsentUpdate` mutation. +""" +type CustomerEmailMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerEmailMarketingConsentUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CustomerEmailMarketingConsentUpdate`. +""" +type CustomerEmailMarketingConsentUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerEmailMarketingConsentUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerEmailMarketingConsentUpdateUserError`. +""" +enum CustomerEmailMarketingConsentUpdateUserErrorCode { + """ + The input value 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 { + """ + The customer’s email address marketing state is invalid. + """ + INVALID + + """ + The customer isn't subscribed to email marketing. + """ + 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 { + """ + The generated account activation URL. + """ + accountActivationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerInput { + """ + The addresses for a customer. + """ + addresses: [MailingAddressInput!] @deprecated(reason: "Use the dedicated address mutations (`customerAddressCreate`, `customerAddressUpdate`, `customerAddressDelete`) instead.\n") + + """ + The unique email address of the customer. + """ + email: String + + """ + 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 + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's locale. + """ + locale: String + + """ + Additional metafields to associate to the customer. + """ + metafields: [MetafieldInput!] + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number for the customer. + """ + phone: String + + """ + The private metafields to associate with the customer. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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!] +} + +""" +Represents a customer's visiting activities on a shop's online store. +""" +type CustomerJourney { + """ + The position of the current order within the customer's order history. + """ + customerOrderIndex: Int! + + """ + The amount of days between first session and order creation date. First + session represents first session since the last order, or first session within + the 30 day attribution window, if more than 30 days has passed since the last order. + """ + daysToConversion: Int! + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit! + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + Events preceding a customer order, such as shop sessions. + """ + moments: [CustomerMoment!]! +} + +""" +Represents a customer's visiting activities on a shop's online store. +""" +type CustomerJourneySummary { + """ + The position of the current order within the customer's order history. Test orders aren't included. + """ + customerOrderIndex: Int + + """ + The number of days between the first session and the order creation date. The + first session represents the first session since the last order, or the first + session within the 30 day attribution window, if more than 30 days have passed + since the last order. + """ + daysToConversion: Int + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + The events preceding a customer's order, such as shop sessions. + """ + moments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + The total number of customer moments associated with this order. Returns null + if the order is still in the process of being attributed. + """ + momentsCount: Count + + """ + Whether the attributed sessions for the order have been created yet. + """ + ready: Boolean! +} + +""" +The possible values for the marketing subscription opt-in level enabled at the +time the customer consented to receive marketing information. + +The levels are defined by [the M3AAWG best practices guideline + document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf). +""" +enum CustomerMarketingOptInLevel { + """ + After providing their information, the customer receives 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the customer whose default address will be kept. + """ + customerIdOfDefaultAddressToKeep: ID + + """ + The ID of the customer whose email will be kept. + """ + customerIdOfEmailToKeep: ID + + """ + The ID of the customer whose first name will be kept. + """ + customerIdOfFirstNameToKeep: ID + + """ + The ID of the customer whose last name will be kept. + """ + customerIdOfLastNameToKeep: ID + + """ + The ID of the customer whose phone number will be kept. + """ + customerIdOfPhoneNumberToKeep: ID + + """ + The note to keep. + """ + note: String + + """ + The tags to keep. + """ + tags: [String!] +} + +""" +Return type for `customerMerge` mutation. +""" +type CustomerMergePayload { + """ + The asynchronous job for merging the customers. + """ + job: Job + + """ + The ID of the customer 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 { + """ + 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 { + """ + The default address of a customer. + """ + defaultAddress: MailingAddress + + """ + The email state of a customer. + """ + email: CustomerEmailAddress + + """ + The first name of a customer. + """ + firstName: String + + """ + The last name of a customer. + """ + lastName: String + + """ + The phone number state of a customer. + """ + phoneNumber: CustomerPhoneNumber +} + +""" +The blocking fields of a customer merge preview. These fields will block customer merge unless edited. +""" +type CustomerMergePreviewBlockingFields { + """ + The merged note resulting from a customer merge. The merged note is over the + 5000 character limit and will block customer merge. + """ + note: String + + """ + The merged tags resulting from a customer merge. The merged tags are over the 250 limit and will block customer merge. + """ + tags: [String!]! +} + +""" +The fields that will be kept as part of a customer merge preview. +""" +type CustomerMergePreviewDefaultFields { + """ + The merged addresses resulting from a customer merge. + """ + addresses( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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 + + """ + The first name resulting from a customer merge. + """ + firstName: String + + """ + The total number of merged gift cards. + """ + giftCardCount: UnsignedInt64! + + """ + The merged gift cards resulting from a customer merge. + """ + giftCards( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The error code. + """ + code: CustomerMergeErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An object that represents whether a customer can be merged with another customer. +""" +type CustomerMergeable { + """ + The list of fields preventing the customer from being merged. + """ + errorFields: [CustomerMergeErrorFieldType!]! + + """ + Whether the customer can be merged with another customer. + """ + isMergeable: Boolean! + + """ + The merge request if one is currently in progress. + """ + mergeInProgress: CustomerMergeRequest + + """ + The reason why the customer can't be merged with another customer. + """ + reason: String +} + +""" +Represents a session preceding an order, often used for building a timeline of events leading to an order. +""" +interface CustomerMoment { + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CustomerMoments. +""" +type CustomerMomentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerMomentEdge!]! + + """ + A list of nodes that are contained in CustomerMomentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerMoment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerMoment and a cursor during pagination. +""" +type CustomerMomentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerMomentEdge. + """ + node: CustomerMoment! +} + +""" +All possible instruments for CustomerPaymentMethods. +""" +union CustomerPaymentInstrument = CustomerCreditCard | CustomerPaypalBillingAgreement | CustomerShopPayAgreement + +""" +The billing address of a payment instrument. +""" +type CustomerPaymentInstrumentBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The name of the buyer of the address. + """ + name: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +A customer's payment method. +""" +type CustomerPaymentMethod implements Node { + """ + The customer to whom the payment method belongs. + """ + customer: Customer + + """ + The ID of this payment method. + """ + id: ID! + + """ + The instrument for this payment method. + """ + instrument: CustomerPaymentInstrument + + """ + The 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerPaymentMethodEdge!]! + + """ + A list of nodes that are contained in CustomerPaymentMethodEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerPaymentMethod!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `customerPaymentMethodCreateFromDuplicationData` mutation. +""" +type CustomerPaymentMethodCreateFromDuplicationDataPayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodCreateFromDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodCreateFromDuplicationData`. +""" +type CustomerPaymentMethodCreateFromDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodCreateFromDuplicationDataUserError`. +""" +enum CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode { + """ + 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 { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodCreditCardUpdate` mutation. +""" +type CustomerPaymentMethodCreditCardUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination. +""" +type CustomerPaymentMethodEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerPaymentMethodEdge. + """ + node: CustomerPaymentMethod! +} + +""" +Return type for `customerPaymentMethodGetDuplicationData` mutation. +""" +type CustomerPaymentMethodGetDuplicationDataPayload { + """ + The encrypted data from the payment method to be duplicated. + """ + encryptedDuplicationData: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetDuplicationData`. +""" +type CustomerPaymentMethodGetDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetDuplicationDataUserError`. +""" +enum CustomerPaymentMethodGetDuplicationDataUserErrorCode { + """ + 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 { + """ + The URL to redirect the customer to update the payment method. + """ + updatePaymentMethodUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetUpdateUrlUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetUpdateUrl`. +""" +type CustomerPaymentMethodGetUpdateUrlUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetUpdateUrlUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetUpdateUrlUserError`. +""" +enum CustomerPaymentMethodGetUpdateUrlUserErrorCode { + """ + 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 { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementUpdate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodRemoteCreate` mutation. +""" +type CustomerPaymentMethodRemoteCreatePayload { + """ + The customer payment method. Note that the returned payment method may + initially be in an incomplete state. Developers should poll this payment + method using the customerPaymentMethod query until all required payment + details have been processed. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodRemoteUserError!]! +} + +""" +Return type for `customerPaymentMethodRemoteCreditCardCreate` mutation. +""" +type CustomerPaymentMethodRemoteCreditCardCreatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +The input fields for a remote gateway payment method, only one remote reference permitted. +""" +input CustomerPaymentMethodRemoteInput { + """ + The input fields for a remote authorize net customer profile. + """ + authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput + + """ + The input fields for a remote Braintree customer profile. + """ + braintreePaymentMethod: RemoteBraintreePaymentMethodInput + + """ + Input containing the fields for a remote stripe credit card. + """ + stripePaymentMethod: RemoteStripePaymentMethodInput +} + +""" +Represents an error in the input of a mutation. +""" +type CustomerPaymentMethodRemoteUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodRemoteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodRemoteUserError`. +""" +enum CustomerPaymentMethodRemoteUserErrorCode { + """ + Authorize.net is not enabled for subscriptions. + """ + AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + 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 { + """ + 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 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 + + """ + 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 +} + +""" +Return type for `customerPaymentMethodRevoke` mutation. +""" +type CustomerPaymentMethodRevokePayload { + """ + The ID of the revoked customer payment method. + """ + revokedCustomerPaymentMethodId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodSendUpdateEmail` mutation. +""" +type CustomerPaymentMethodSendUpdateEmailPayload { + """ + The customer to whom an update payment method email was sent. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents an error in the input of a mutation. +""" +type CustomerPaymentMethodUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodUserError`. +""" +enum CustomerPaymentMethodUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Represents a PayPal instrument for customer payment method. +""" +type CustomerPaypalBillingAgreement { + """ + The billing address of this payment method. + """ + billingAddress: CustomerPaymentInstrumentBillingAddress + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean! + + """ + Whether the payment method can be revoked.The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The customers's PayPal account email address. + """ + paypalAccountEmail: String +} + +""" +A phone number. +""" +type CustomerPhoneNumber { + """ + Whether the customer has subscribed to SMS marketing material. + """ + marketingState: CustomerSmsMarketingState! + + """ + A customer's phone number. + """ + phoneNumber: String! +} + +""" +The valid tiers for the predicted spend of a customer with a shop. +""" +enum CustomerPredictedSpendTier { + """ + The customer's spending is predicted to be in the top spending range for the shop in the following year. + """ + HIGH + + """ + The customer's spending is predicted to be 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 { + """ + The customer has at least one active subscription contract. + """ + ACTIVE + + """ + The customer's last subscription contract was cancelled and there are no other active or paused + subscription contracts. + """ + CANCELLED + + """ + The customer's last subscription contract expired and there are no other active or paused + subscription contracts. + """ + EXPIRED + + """ + The customer's last subscription contract failed and there are no other active or paused + subscription contracts. + """ + FAILED + + """ + The customer has never had a subscription contract. + """ + NEVER_SUBSCRIBED + + """ + The customer has at least one paused subscription contract and there are no other active + subscription contracts. + """ + PAUSED +} + +""" +Return type for `customerRemoveTaxExemptions` mutation. +""" +type CustomerRemoveTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerReplaceTaxExemptions` mutation. +""" +type CustomerReplaceTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerRequestDataErasureUserError`. +""" +enum CustomerRequestDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to request customer data erasure. + """ + FAILED_TO_REQUEST +} + +""" +Return type for `customerRequestDataErasure` mutation. +""" +type CustomerRequestDataErasurePayload { + """ + The ID of the customer that will be erased. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerRequestDataErasureUserError!]! +} + +""" +An error that occurs when requesting a customer data erasure. +""" +type CustomerRequestDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerRequestDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The set of valid sort keys for the CustomerSavedSearch query. +""" +enum CustomerSavedSearchSortKeys { + """ + 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 +} + +""" +The member of a segment. +""" +type CustomerSegmentMember implements HasMetafields { + """ + The total amount of money that the member has spent on orders. + """ + amountSpent: MoneyV2 + + """ + The member's default address. + """ + defaultAddress: MailingAddress + + """ + The member's default email address. + """ + defaultEmailAddress: CustomerEmailAddress + + """ + The member's default phone number. + """ + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the member, which is based on the values of the `first_name` + and `last_name` fields. If the member's first name and last name aren't + available, then the customer's email address is used. If the customer's email + address isn't available, then the customer's phone number is used. + """ + displayName: String! + + """ + The member's first name. + """ + firstName: String + + """ + The member’s ID. + """ + id: ID! + + """ + The member's last name. + """ + lastName: String + + """ + The ID of the member's most recent order. + """ + lastOrderId: ID + + """ + Whether the customer can be merged with another customer. + """ + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + A note about the member. + """ + note: String + + """ + The total number of orders that the member has made. + """ + numberOfOrders: UnsignedInt64 + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +The connection type for the `CustomerSegmentMembers` object. +""" +type CustomerSegmentMemberConnection { + """ + A list of edges. + """ + edges: [CustomerSegmentMemberEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + The statistics for a given segment. + """ + statistics: SegmentStatistics! + + """ + The total number of members in a given segment. + """ + totalCount: Int! +} + +""" +An auto-generated type which holds one CustomerSegmentMember and a cursor during pagination. +""" +type CustomerSegmentMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerSegmentMemberEdge. + """ + node: CustomerSegmentMember! +} + +""" +A job to determine a list of members, such as customers, that are associated with an individual segment. +""" +type CustomerSegmentMembersQuery implements JobResult & Node { + """ + The current total number of members in a given segment. + """ + currentCount: Int! + + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Return type for `customerSegmentMembersQueryCreate` mutation. +""" +type CustomerSegmentMembersQueryCreatePayload { + """ + The newly created customer segment members query. + """ + customerSegmentMembersQuery: CustomerSegmentMembersQuery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSegmentMembersQueryUserError!]! +} + +""" +The input fields and values for creating a customer segment members query. +""" +input CustomerSegmentMembersQueryInput { + """ + The 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 + + """ + Sort the list by a given key. + """ + sortKey: String +} + +""" +Represents a customer segment members query custom error. +""" +type CustomerSegmentMembersQueryUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSegmentMembersQueryUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSegmentMembersQueryUserError`. +""" +enum CustomerSegmentMembersQueryUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Represents a Shop Pay card instrument for customer payment method. +""" +type CustomerShopPayAgreement { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + Whether the Shop Pay billing agreement is inactive. + """ + inactive: Boolean! + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! +} + +""" +An error that occurs during execution of an SMS marketing consent mutation. +""" +type CustomerSmsMarketingConsentError implements DisplayableError { + """ + The error code. + """ + code: CustomerSmsMarketingConsentErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSmsMarketingConsentError`. +""" +enum CustomerSmsMarketingConsentErrorCode { + """ + The input value 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 { + """ + 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 record of when a customer consented to receive marketing material by SMS. + +The customer's consent state reflects the record with the most recent date when consent was updated. +""" +type CustomerSmsMarketingConsentState { + """ + The source from which the SMS marketing information for the customer was collected. + """ + consentCollectedFrom: CustomerConsentCollectedFrom + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel! + + """ + The current SMS marketing state for the customer. + """ + marketingState: CustomerSmsMarketingState! +} + +""" +The input fields for updating SMS marketing consent information for a given customer ID. +""" +input CustomerSmsMarketingConsentUpdateInput { + """ + The ID of the customer to update the SMS marketing consent information for. + The customer must have a unique phone number associated to the record. If not, + add the phone number using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by SMS. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput! +} + +""" +Return type for `customerSmsMarketingConsentUpdate` mutation. +""" +type CustomerSmsMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSmsMarketingConsentError!]! +} + +""" +The valid SMS marketing states for a customer’s phone number. +""" +enum CustomerSmsMarketingState { + """ + The customer hasn't subscribed to SMS marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to SMS marketing. + """ + PENDING + + """ + The customer'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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location` value. + """ + LOCATION + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid values for the state of a customer's account with a shop. +""" +enum CustomerState { + """ + The customer declined the email invite to create an account. + """ + DECLINED + + """ + The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. + """ + DISABLED + + """ + The customer has created an account. + """ + ENABLED + + """ + The customer has received an email invite to create an account. + """ + INVITED +} + +""" +A customer's computed statistics. +""" +type CustomerStatistics { + """ + The predicted spend tier of a customer with a shop. + """ + predictedSpendTier: CustomerPredictedSpendTier +} + +""" +Return type for `customerUpdateDefaultAddress` mutation. +""" +type CustomerUpdateDefaultAddressPayload { + """ + The customer whose address was updated. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerUpdate` mutation. +""" +type CustomerUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a customer's session visiting a shop's online store, including +information about the marketing activity attributed to starting the session. +""" +type CustomerVisit implements CustomerMoment & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + URL of the first page the customer landed on for the session. + """ + landingPage: URL + + """ + Landing page information with URL linked in HTML. For example, the first page + the customer visited was store.myshopify.com/products/1. + """ + landingPageHtml: HTML + + """ + Represent actions taken by an app, on behalf of a merchant, + to market Shopify resources such as products, collections, and discounts. + """ + marketingEvent: MarketingEvent + + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! + + """ + Marketing referral code from the link that the customer clicked to visit the store. + Supports the following URL attributes: _ref_, _source_, or _r_. + For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2. + """ + referralCode: String + + """ + Referral information with URLs linked in HTML. + """ + referralInfoHtml: FormattedString! + + """ + Webpage where the customer clicked a link that sent them to the online store. + For example, _https://randomblog.com/page1_ or _android-app://com.google.android.gm_. + """ + referrerUrl: URL + + """ + Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, + a website domain, QR code, or unknown. + """ + source: String! + + """ + Describes the source explicitly for first or last session. + """ + sourceDescription: String + + """ + Type of marketing tactic. + """ + sourceType: MarketingTactic + + """ + A set of UTM parameters gathered from the URL parameters of the referrer. + """ + utmParameters: UTMParameters +} + +""" +This type returns the information about the product and product variant from a customer visit. +""" +type CustomerVisitProductInfo { + """ + The product information. If `null`, then the product was deleted from the store. + """ + product: Product + + """ + The quantity of the product that the customer requested. + """ + quantity: Int! + + """ + The product variant information, if the product variant exists. + """ + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple CustomerVisitProductInfos. +""" +type CustomerVisitProductInfoConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerVisitProductInfoEdge!]! + + """ + A list of nodes that are contained in CustomerVisitProductInfoEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CustomerVisitProductInfo!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerVisitProductInfo and a cursor during pagination. +""" +type CustomerVisitProductInfoEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerVisitProductInfoEdge. + """ + node: CustomerVisitProductInfo! +} + +""" +Return type for `dataSaleOptOut` mutation. +""" +type DataSaleOptOutPayload { + """ + The ID of the customer whose email address has been opted out of data sale. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DataSaleOptOutUserError!]! +} + +""" +An error that occurs during the execution of `DataSaleOptOut`. +""" +type DataSaleOptOutUserError implements DisplayableError { + """ + The error code. + """ + code: DataSaleOptOutUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DataSaleOptOutUserError`. +""" +enum DataSaleOptOutUserErrorCode { + """ + Data sale opt out failed. + """ + FAILED +} + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string. +For example, September 7, 2019 is represented as `"2019-07-16"`. +""" +scalar Date + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. +For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is +represented as `"2019-09-07T15:50:00Z`". +""" +scalar DateTime + +""" +Days of the week from Monday to Sunday. +""" +enum DayOfTheWeek { + """ + 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 { + """ + The list of permissions associated with the token. + """ + accessScopes: [String!]! + + """ + The issued delegate access token. + """ + accessToken: String! + + """ + The date and time when the delegate access token was created. + """ + createdAt: DateTime! +} + +""" +Return type for `delegateAccessTokenCreate` mutation. +""" +type DelegateAccessTokenCreatePayload { + """ + The delegate access token. + """ + delegateAccessToken: DelegateAccessToken + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenCreateUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenCreate`. +""" +type DelegateAccessTokenCreateUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenCreateUserError`. +""" +enum DelegateAccessTokenCreateUserErrorCode { + """ + The 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 { + """ + The user's shop. + """ + shop: Shop! + + """ + The status of the delegate access token destroy operation. Returns true if successful. + """ + status: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenDestroyUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenDestroy`. +""" +type DelegateAccessTokenDestroyUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenDestroyUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenDestroyUserError`. +""" +enum DelegateAccessTokenDestroyUserErrorCode { + """ + 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 { + """ + The list of scopes that will be delegated to the new access token. + """ + delegateAccessScope: [String!]! + + """ + The amount of time, in seconds, after which the delegate access token is no longer valid. + """ + expiresIn: Int +} + +""" +Deletion events chronicle the destruction of resources (e.g. products and collections). +Once deleted, the deletion event is the only trace of the original's existence, +as the resource itself has been removed and can no longer be accessed. +""" +type DeletionEvent { + """ + The date and time when the deletion event for the related resource was generated. + """ + occurredAt: DateTime! + + """ + The ID of the resource that was deleted. + """ + subjectId: ID! + + """ + The type of resource that was deleted. + """ + subjectType: DeletionEventSubjectType! +} + +""" +An auto-generated type for paginating through multiple DeletionEvents. +""" +type DeletionEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeletionEventEdge!]! + + """ + A list of nodes that are contained in DeletionEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeletionEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeletionEvent and a cursor during pagination. +""" +type DeletionEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeletionEventEdge. + """ + node: DeletionEvent! +} + +""" +The set of valid sort keys for the DeletionEvent query. +""" +enum DeletionEventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + 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 supported subject types of deletion events. +""" +enum DeletionEventSubjectType { + COLLECTION + PRODUCT +} + +""" +A shipping service and a list of countries that the service is available for. +""" +type DeliveryAvailableService { + """ + The countries the service provider ships to. + """ + countries: DeliveryCountryCodesOrRestOfWorld! + + """ + The name of the service. + """ + name: String! +} + +""" +Represents a branded promise presented to buyers. +""" +type DeliveryBrandedPromise { + """ + The handle of the branded promise. For example: `shop_promise`. + """ + handle: String! + + """ + The name of the branded promise. For example: `Shop Promise`. + """ + name: String! +} + +""" +A carrier service (also known as a carrier calculated service or shipping +service) provides real-time shipping rates to Shopify. Some common carrier +services include Canada Post, FedEx, UPS, and USPS. The term **carrier** is +often used interchangeably with the terms **shipping company** and **rate provider**. + +Using the CarrierService resource, you can add a carrier service to a shop and +then provide a list of applicable shipping rates at checkout. You can even use +the cart data to adjust shipping rates and offer shipping discounts based on +what is in the customer's cart. + +## Requirements for accessing the CarrierService resource +To access the CarrierService resource, add the `write_shipping` permission to +your app's requested scopes. For more information, see [API access +scopes](https://shopify.dev/docs/admin-api/access-scopes). + +Your app's request to create a carrier service will fail unless the store +installing your carrier service meets one of the following requirements: +* It's on the Advanced Shopify plan or higher. +* It's on the Shopify plan with yearly billing, or the carrier service feature +has been added to the store for a monthly fee. For more information, contact +[Shopify Support](https://help.shopify.com/questions). +* It's a development store. + +> Note: +> If a store changes its Shopify plan, then the store's association with a +carrier service is deactivated if the store no long meets one of the +requirements above. + +## Providing shipping rates to Shopify +When adding a carrier service to a store, you need to provide a POST endpoint +rooted in the `callbackUrl` property where Shopify can retrieve applicable +shipping rates. The callback URL should be a public endpoint that expects these +requests from Shopify. + +### Example shipping rate request sent to a carrier service + +```json +{ + "rate": { + "origin": { + "country": "CA", + "postal_code": "K2P1L4", + "province": "ON", + "city": "Ottawa", + "name": null, + "address1": "150 Elgin St.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": "Jamie D's Emporium" + }, + "destination": { + "country": "CA", + "postal_code": "K1M1M4", + "province": "ON", + "city": "Ottawa", + "name": "Bob Norman", + "address1": "24 Sussex Dr.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": null + }, + "items": [{ + "name": "Short Sleeve T-Shirt", + "sku": "", + "quantity": 1, + "grams": 1000, + "price": 1999, + "vendor": "Jamie D's Emporium", + "requires_shipping": true, + "taxable": true, + "fulfillment_service": "manual", + "properties": null, + "product_id": 48447225880, + "variant_id": 258644705304 + }], + "currency": "USD", + "locale": "en", + "order_totals": { + "subtotal_price": "1999", + "total_price": "2199", + "discount_amount": "150" + }, + "customer": { + "id": 207119551, + "tags": ["VIP", "wholesale"] + } + } +} +``` + +### Example response +```json +{ + "rates": [ + { + "service_name": "canadapost-overnight", + "service_code": "ON", + "total_price": "1295", + "description": "This is the fastest option by far", + "currency": "CAD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-2dayground", + "service_code": "2D", + "total_price": "2934", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-priorityovernight", + "service_code": "1D", + "total_price": "3587", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + } + ] +} +``` + +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. +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. + | + +### 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. + +## Response Timeouts + +The read timeout for rate requests are dynamic, based on the number of requests +per minute (RPM). These limits are applied to each shop-app pair. The timeout +values are as follows. + +| RPM Range | Timeout | +| ------------- | ---------- | +| Under 1500 | 10s | +| 1500 to 3000 | 5s | +| Over 3000 | 3s | + +> Note: +> These values are upper limits and should not be interpretted as a goal to +develop towards. Shopify is constantly evaluating the performance of the +platform and working towards improving resilience as well as app capabilities. +As such, these numbers may be adjusted outside of our normal versioning timelines. + +## Server-side caching of requests +Shopify provides server-side caching to reduce the number of requests it makes. +Any shipping rate request that identically matches the following fields will be +retrieved from Shopify's cache of the initial response: +* variant IDs +* default shipping box weight and dimensions +* variant quantities +* carrier service ID +* origin address +* destination address +* item weights and signatures + +If any of these fields differ, or if the cache has expired since the original +request, then new shipping rates are requested. The cache expires 15 minutes +after rates are successfully returned. If an error occurs, then the cache +expires after 30 seconds. +""" +type DeliveryCarrierService implements Node { + """ + Whether the carrier service is active. + """ + active: Boolean! + + """ + The list of services offered for given destinations. + """ + availableServicesForCountries( + """ + The country codes of the destinations. + """ + countryCodes: [CountryCode!] + + """ + The locations of the possible origins. + """ + origins: [ID!] + + """ + Whether to use 'Rest of World' as the destination. + """ + restOfWorld: Boolean! + ): [DeliveryAvailableService!]! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. + """ + callbackUrl: URL + + """ + The properly formatted name of the shipping service provider, ready to display. + """ + formattedName: String + + """ + The logo of the service provider. + """ + icon: Image! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the shipping service provider. + """ + name: String + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! +} + +""" +A carrier service and the associated list of shop locations. +""" +type DeliveryCarrierServiceAndLocations { + """ + The carrier service. + """ + carrierService: DeliveryCarrierService! + + """ + The list of locations that support this carrier service. + """ + locations: [Location!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCarrierServices. +""" +type DeliveryCarrierServiceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCarrierServiceEdge!]! + + """ + A list of nodes that are contained in DeliveryCarrierServiceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryCarrierService!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a carrier service. +""" +input DeliveryCarrierServiceCreateInput { + """ + 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 { + """ + The position 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 { + """ + 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! + + """ + 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 { + """ + The value (weight or price) that the condition field is compared to. + """ + conditionCriteria: DeliveryConditionCriteria! + + """ + The field to compare the criterion value against, using the operator. + """ + field: DeliveryConditionField! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The operator to compare the field and criterion value. + """ + operator: DeliveryConditionOperator! +} + +""" +The value (weight or price) that the condition field is compared to. +""" +union DeliveryConditionCriteria = MoneyV2 | Weight + +""" +The field type that the condition will be applied to. +""" +enum DeliveryConditionField { + """ + The condition will check against the total 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 { + """ + The condition will check whether the field is greater than or equal to the criterion. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The condition will check if the field is less than or equal to the criterion. + """ + LESS_THAN_OR_EQUAL_TO +} + +""" +A country that is used to define a shipping zone. +""" +type DeliveryCountry implements Node { + """ + A two-letter country code in ISO 3166-1 alpha-2 standard. + It also includes a flag indicating whether the country should be + a part of the 'Rest Of World' shipping zone. + """ + code: DeliveryCountryCodeOrRestOfWorld! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the country. + """ + name: String! + + """ + The list of regions associated with this country. + """ + provinces: [DeliveryProvince!]! + + """ + The translated name of the country. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The country details and the associated shipping zone. +""" +type DeliveryCountryAndZone { + """ + The country details. + """ + country: DeliveryCountry! + + """ + The name of the shipping zone. + """ + zone: String! +} + +""" +The country code and whether the country is a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodeOrRestOfWorld { + """ + The country code in the ISO 3166-1 alpha-2 format. + """ + countryCode: CountryCode + + """ + Whether the country is a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The list of country codes and information whether the countries +are a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodesOrRestOfWorld { + """ + List of applicable country codes in the ISO 3166-1 alpha-2 format. + """ + countryCodes: [CountryCode!]! + + """ + Whether the countries are a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The input fields to specify a country. +""" +input DeliveryCountryInput { + """ + The country code of the country in the ISO 3166-1 alpha-2 format. + """ + code: CountryCode + + """ + 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 { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The Shopify Function implementing the delivery customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the delivery customization. + """ + title: String! +} + +""" +Return type for `deliveryCustomizationActivation` mutation. +""" +type DeliveryCustomizationActivationPayload { + """ + The IDs of the updated delivery customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCustomizations. +""" +type DeliveryCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCustomizationEdge!]! + + """ + A list of nodes that are contained in DeliveryCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryCustomizationCreate` mutation. +""" +type DeliveryCustomizationCreatePayload { + """ + Returns the created delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Return type for `deliveryCustomizationDelete` mutation. +""" +type DeliveryCustomizationDeletePayload { + """ + Returns the deleted delivery customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type which holds one DeliveryCustomization and a cursor during pagination. +""" +type DeliveryCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryCustomizationEdge. + """ + node: DeliveryCustomization! +} + +""" +An error that occurs during the execution of a delivery customization mutation. +""" +type DeliveryCustomizationError implements DisplayableError { + """ + The error code. + """ + code: DeliveryCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryCustomizationError`. +""" +enum DeliveryCustomizationErrorCode { + """ + 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 + + """ + 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 { + """ + The enabled status of the delivery customization. + """ + enabled: Boolean + + """ + The ID of the function providing the delivery customization. + """ + functionId: String + + """ + 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 { + """ + Returns the updated delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Whether the shop is blocked from converting to full multi-location delivery +profiles mode. If the shop is blocked, then the blocking reasons are also returned. +""" +type DeliveryLegacyModeBlocked { + """ + Whether the shop can convert to full multi-location delivery profiles mode. + """ + blocked: Boolean! + + """ + The reasons why the shop is blocked from converting to full multi-location delivery profiles mode. + """ + reasons: [DeliveryLegacyModeBlockedReason!] +} + +""" +Reasons the shop is blocked from converting to full multi-location delivery profiles mode. +""" +enum DeliveryLegacyModeBlockedReason { + """ + Multi-Location mode is disabled. The shop can't convert to full multi-location delivery profiles mode. + """ + MULTI_LOCATION_DISABLED @deprecated(reason: "All shops are now using multi-location mode.") + + """ + There are no locations for this store that can fulfill online orders. + """ + NO_LOCATIONS_FULFILLING_ONLINE_ORDERS +} + +""" +Local pickup settings associated with a location. +""" +type DeliveryLocalPickupSettings { + """ + Additional instructions or information related to the local pickup. + """ + instructions: String! + + """ + The estimated pickup time to show customers at checkout. + """ + pickupTime: DeliveryLocalPickupTime! +} + +""" +Possible pickup time values that a location enabled for local pickup can have. +""" +enum DeliveryLocalPickupTime { + """ + 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 { + """ + 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 | + | 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: Count +} + +""" +Links a location group with a zone and the associated method definitions. +""" +type DeliveryLocationGroupZone { + """ + The number of method definitions for the zone. + """ + methodDefinitionCounts: DeliveryMethodDefinitionCounts! + + """ + The method definitions associated to a zone and location group. + """ + methodDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryLocationGroupZoneEdge!]! + + """ + A list of nodes that are contained in DeliveryLocationGroupZoneEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryLocationGroupZone!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination. +""" +type DeliveryLocationGroupZoneEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryLocationGroupZoneEdge. + """ + node: DeliveryLocationGroupZone! +} + +""" +The input fields for a delivery zone associated to a location group and profile. +""" +input DeliveryLocationGroupZoneInput { + """ + A list of countries to associate with the zone. + """ + countries: [DeliveryCountryInput!] + + """ + A globally-unique ID of the zone. + """ + id: ID + + """ + 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 { + """ + The instructions for the local pickup. + """ + instructions: String + + """ + The ID of the location associated with the location setting. + """ + locationId: ID! + + """ + 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 { + """ + The error code. + """ + code: DeliveryLocationLocalPickupSettingsErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryLocationLocalPickupSettingsError`. +""" +enum DeliveryLocationLocalPickupSettingsErrorCode { + """ + Provided locationId is not for an active location belonging to this store. + """ + ACTIVE_LOCATION_NOT_FOUND + + """ + Custom pickup time is not allowed for local pickup settings. + """ + CUSTOM_PICKUP_TIME_NOT_ALLOWED + + """ + An error occurred while changing the local pickup settings. + """ + GENERIC_ERROR +} + +""" +The delivery method used by a fulfillment order. +""" +type DeliveryMethod implements Node { + """ + The Additional information to consider when performing the delivery. + """ + additionalInformation: DeliveryMethodAdditionalInformation + + """ + The branded promise that was presented to the buyer during checkout. For example: Shop Promise. + """ + brandedPromise: DeliveryBrandedPromise + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + maxDeliveryDateTime: DateTime + + """ + The type of the delivery method. + """ + methodType: DeliveryMethodType! + + """ + The earliest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + minDeliveryDateTime: DateTime + + """ + A reference to the shipping method. + """ + serviceCode: String + + """ + Source reference is promise provider specific data associated with delivery promise. + """ + sourceReference: String +} + +""" +Additional information included on a delivery method that will help during the delivery process. +""" +type DeliveryMethodAdditionalInformation { + """ + The delivery instructions to follow when performing the delivery. + """ + instructions: String + + """ + The phone number to contact when performing the delivery. + """ + phone: String +} + +""" +A method definition contains the delivery rate and the conditions that must be met for the method to be +applied. +""" +type DeliveryMethodDefinition implements Node { + """ + Whether this method definition is active. + """ + active: Boolean! + + """ + The description of the method definition. Only available on shipping rates that are custom. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The method conditions that must pass for this method definition to be applied to an order. + """ + methodConditions: [DeliveryCondition!]! + + """ + The name of the method definition. + """ + name: String! + + """ + The provided rate for this method definition, from a rate definition or participant. + """ + rateProvider: DeliveryRateProvider! +} + +""" +An auto-generated type for paginating through multiple DeliveryMethodDefinitions. +""" +type DeliveryMethodDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryMethodDefinitionEdge!]! + + """ + A list of nodes that are contained in DeliveryMethodDefinitionEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryMethodDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The number of method definitions for a zone, separated into merchant-owned and participant definitions. +""" +type DeliveryMethodDefinitionCounts { + """ + The number of participant method definitions for the specified zone. + """ + participantDefinitionsCount: Int! + + """ + The number of merchant-defined method definitions for the specified zone. + """ + rateDefinitionsCount: Int! +} + +""" +An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination. +""" +type DeliveryMethodDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryMethodDefinitionEdge. + """ + node: DeliveryMethodDefinition! +} + +""" +The input fields for a method definition. +""" +input DeliveryMethodDefinitionInput { + """ + Whether to use this method definition during rate calculation. + """ + active: Boolean + + """ + A list of conditions to update on the method definition. + """ + conditionsToUpdate: [DeliveryUpdateConditionInput!] + + """ + The description of the method definition. + """ + description: String + + """ + A globally-unique ID of the method definition. Use only when updating a method definition. + """ + id: ID + + """ + The name of the method definition. + """ + name: String + + """ + 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 weight conditions on the method definition. + """ + weightConditionsToCreate: [DeliveryWeightConditionInput!] +} + +""" +The different types of method definitions to filter by. +""" +enum DeliveryMethodDefinitionType { + """ + A static merchant-defined rate. + """ + MERCHANT + + """ + A dynamic participant rate. + """ + PARTICIPANT +} + +""" +Possible method types that a delivery method can have. +""" +enum DeliveryMethodType { + """ + The order is 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 +} + +""" +A participant defines carrier-calculated rates for shipping services +with a possible merchant-defined fixed fee or a percentage-of-rate fee. +""" +type DeliveryParticipant implements Node { + """ + Whether to display new shipping services automatically to the customer when the service becomes available. + """ + adaptToNewServicesFlag: Boolean! + + """ + The carrier used for this participant. + """ + carrierService: DeliveryCarrierService! + + """ + The merchant-defined fixed fee for this participant. + """ + fixedFee: MoneyV2 + + """ + A globally-unique ID. + """ + id: ID! + + """ + The carrier-specific services offered by the participant, and whether each service is active. + """ + participantServices: [DeliveryParticipantService!]! + + """ + The merchant-defined percentage-of-rate fee for this participant. + """ + percentageOfRateFee: Float! +} + +""" +The input fields for a participant. +""" +input DeliveryParticipantInput { + """ + 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 + + """ + The fixed feed that's defined by the merchant for this participant. + """ + fixedFee: MoneyInput + + """ + The ID of the participant. + """ + id: ID + + """ + 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 { + """ + 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 { + """ + Whether the service is active. + """ + active: Boolean! + + """ + The name of the service. + """ + name: String! +} + +""" +The input fields for a price-based condition of a delivery method definition. +""" +input DeliveryPriceConditionInput { + """ + The monetary value to compare the price of an order to. + """ + criteria: MoneyInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +How many product variants are in a profile. This count is capped at 500. +""" +type DeliveryProductVariantsCount { + """ + Whether the count has reached the cap of 500. + """ + capped: Boolean! + + """ + The product variant count. + """ + count: Int! +} + +""" +A shipping profile. In Shopify, a shipping profile is a set of shipping rates +scoped to a set of products or variants that can be shipped from selected +locations to zones. Learn more about [building with delivery profiles](https://shopify.dev/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). +""" +type DeliveryProfile implements Node { + """ + The number of active shipping rates for the profile. + """ + activeMethodDefinitionsCount: Int! + + """ + Whether this is the default profile. + """ + default: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether this shop has enabled legacy compatibility mode for delivery profiles. + """ + legacyMode: Boolean! @deprecated(reason: "Legacy mode profiles are no longer supported.") + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProfileItemSortKeys = ID @deprecated(reason: "Profile item sorting is no longer supported.") + ): DeliveryProfileItemConnection! + + """ + The location groups and associated zones using this profile. + """ + profileLocationGroups( + """ + Filter the location groups of the profile by location group ID. + """ + locationGroupId: ID + ): [DeliveryProfileLocationGroup!]! + + """ + Selling plan groups associated with the specified delivery profile. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 number of countries with active rates to deliver to. + """ + zoneCountryCount: Int! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfiles. +""" +type DeliveryProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryProfileCreate` mutation. +""" +type DeliveryProfileCreatePayload { + """ + The delivery profile that was created. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DeliveryProfile and a cursor during pagination. +""" +type DeliveryProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileEdge. + """ + node: DeliveryProfile! +} + +""" +The input fields for a delivery profile. +""" +input DeliveryProfileInput { + """ + The list of condition IDs to delete. + """ + conditionsToDelete: [ID!] + + """ + 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!] + + """ + 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!] + + """ + 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!] + + """ + The list of selling plan groups to be dissociated with the delivery profile. + """ + sellingPlanGroupsToDissociate: [ID!] + + """ + The list of product variant IDs to be associated with the delivery profile. + """ + variantsToAssociate: [ID!] + + """ + The list of product variant IDs to be dissociated from the delivery profile. + The dissociated product variants are moved back to the default delivery profile. + """ + variantsToDissociate: [ID!] + + """ + The list of zone IDs to delete. + """ + zonesToDelete: [ID!] +} + +""" +A product and the subset of associated variants that are part of this delivery profile. +""" +type DeliveryProfileItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + A product associated with this profile. + """ + product: Product! + + """ + The product variants associated with this delivery profile. + """ + variants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 = ID @deprecated(reason: "Profile item variant sorting is no longer supported.") + ): ProductVariantConnection! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfileItems. +""" +type DeliveryProfileItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileItemEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfileItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination. +""" +type DeliveryProfileItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileItemEdge. + """ + node: DeliveryProfileItem! +} + +""" +Links a location group with zones. Both are associated to a delivery profile. +""" +type DeliveryProfileLocationGroup { + """ + The countries already selected in any zone for the specified location group. + """ + countriesInAnyZone: [DeliveryCountryAndZone!]! + + """ + The collection of locations that make up the specified location group. + """ + locationGroup: DeliveryLocationGroup! + + """ + The applicable zones associated to the specified location group. + """ + locationGroupZones( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The globally-unique ID of the delivery profile location group. + """ + id: ID + + """ + The list of location IDs to be moved to this location group. + """ + locations: [ID!] + + """ + The list of location IDs to be added to this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToAdd: [ID!] + + """ + The list of location IDs to be removed from this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToRemove: [ID!] + + """ + The list of location group zones to create. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToCreate: [DeliveryLocationGroupZoneInput!] + + """ + The list of location group zones to update. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToUpdate: [DeliveryLocationGroupZoneInput!] +} + +""" +Return type for `deliveryProfileRemove` mutation. +""" +type DeliveryProfileRemovePayload { + """ + The delivery profile deletion job triggered by the mutation. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryProfileUpdate` mutation. +""" +type DeliveryProfileUpdatePayload { + """ + The delivery profile that was updated. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A delivery promise provider. Currently restricted to select approved delivery promise partners. +""" +type DeliveryPromiseProvider implements Node { + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean! + + """ + The number of seconds to add to the current time as a buffer when looking up + delivery promises. Represents how long the shop requires before releasing an + order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location associated with this delivery promise provider. + """ + location: Location! + + """ + The time zone to be used for interpreting day of week and cutoff times in + delivery schedules when looking up delivery promises. + """ + timeZone: String! +} + +""" +Return type for `deliveryPromiseProviderUpsert` mutation. +""" +type DeliveryPromiseProviderUpsertPayload { + """ + The created or updated delivery promise provider. + """ + deliveryPromiseProvider: DeliveryPromiseProvider + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryPromiseProviderUpsertUserError!]! +} + +""" +An error that occurs during the execution of `DeliveryPromiseProviderUpsert`. +""" +type DeliveryPromiseProviderUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: DeliveryPromiseProviderUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryPromiseProviderUpsertUserError`. +""" +enum DeliveryPromiseProviderUpsertUserErrorCode { + """ + The 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 +} + +""" +A region that is used to define a shipping zone. +""" +type DeliveryProvince implements Node { + """ + The code of the region. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the region. + """ + name: String! + + """ + The translated name of the region. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The input fields to specify a region. +""" +input DeliveryProvinceInput { + """ + The code of the region. + """ + code: String! +} + +""" +The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). +""" +type DeliveryRateDefinition implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The price of this rate. + """ + price: MoneyV2! +} + +""" +The input fields for a rate definition. +""" +input DeliveryRateDefinitionInput { + """ + A globally-unique ID of the rate definition. + """ + id: ID + + """ + The price of the rate definition. + """ + price: MoneyInput! +} + +""" +A rate provided by a merchant-defined rate or a participant. +""" +union DeliveryRateProvider = DeliveryParticipant | DeliveryRateDefinition + +""" +The `DeliverySetting` object enables you to manage shop-wide shipping settings. +You can enable legacy compatibility mode for the multi-location delivery profiles feature +if the legacy mode isn't blocked. +""" +type DeliverySetting { + """ + Whether the shop is blocked from converting to full multi-location delivery + profiles mode. If the shop is blocked, then the blocking reasons are also + returned. Note: this field is effectively deprecated and will be removed in a + future version of the API. + """ + legacyModeBlocked: DeliveryLegacyModeBlocked! + + """ + Enables legacy compatability mode for the multi-location delivery profiles + feature. Note: this field is effectively deprecated and will be removed in a + future version of the API. + """ + legacyModeProfiles: Boolean! +} + +""" +The input fields for shop-level delivery settings. +""" +input DeliverySettingInput { + """ + Whether legacy compatability mode is enabled for the multi-location delivery + profiles feature. Note: this field is effectively deprecated and will be + removed in a future version of the API. + """ + legacyModeProfiles: Boolean +} + +""" +Return type for `deliverySettingUpdate` mutation. +""" +type DeliverySettingUpdatePayload { + """ + The updated delivery shop level settings. + """ + setting: DeliverySetting + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryShippingOriginAssign` mutation. +""" +type DeliveryShippingOriginAssignPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for updating the condition of a delivery method definition. +""" +input DeliveryUpdateConditionInput { + """ + 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! + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +The input fields for a weight-based condition of a delivery method definition. +""" +input DeliveryWeightConditionInput { + """ + The weight value to compare the weight of an order to. + """ + criteria: WeightInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +A zone is a group of countries that have the same shipping rates. Customers can +order products from a store only if they choose a shipping destination that's +included in one of the store's zones. +""" +type DeliveryZone implements Node { + """ + The list of countries within the zone. + """ + countries: [DeliveryCountry!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the zone. + """ + name: String! +} + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet { + """ + 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 = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping | DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +An amount that's allocated to a line based on an associated discount application. +""" +type DiscountAllocation { + """ + The money amount that's allocated to a line based on the associated discount application. + """ + allocatedAmount: MoneyV2! @deprecated(reason: "Use `allocatedAmountSet` instead.") + + """ + The money amount that's allocated to a line based on the associated discount + application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: DiscountApplication! +} + +""" +The fixed amount value of a discount, and whether the amount is applied to each +entitled item or spread evenly across the entitled items. +""" +type DiscountAmount { + """ + The value of the discount. + """ + amount: MoneyV2! + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean! +} + +""" +The input fields for the value of the discount and how it is applied. +""" +input DiscountAmountInput { + """ + The value of the discount. + """ + amount: Decimal + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +interface DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The method by which the discount's value is allocated onto its entitled lines. +""" +enum DiscountApplicationAllocationMethod { + """ + The value is spread across all entitled lines. + """ + ACROSS + + """ + The value is applied onto every entitled line. + """ + EACH + + """ + The value is specifically applied onto a particular line. + """ + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. +""" +type DiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountApplicationEdge!]! + + """ + A list of nodes that are contained in DiscountApplicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. +""" +type DiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountApplicationEdge. + """ + node: DiscountApplication! +} + +""" +The level at which the discount's value is applied. +""" +enum DiscountApplicationLevel { + """ + The discount is applied at the 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 { + """ + The discount is allocated onto all the lines. + """ + ALL + + """ + The discount is allocated onto only the lines that it's entitled for. + """ + ENTITLED + + """ + The discount is allocated onto explicitly chosen lines. + """ + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +""" +enum DiscountApplicationTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The type of discount associated to the automatic discount. For example, the +automatic discount might offer a basic discount using a fixed percentage, or a +fixed amount, on specific products from the order. The automatic discount may +also be a BXGY discount, which offers customer discounts on select products if +they add a specific product to their order. +""" +union DiscountAutomatic = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping + +""" +Return type for `discountAutomaticActivate` mutation. +""" +type DiscountAutomaticActivatePayload { + """ + The activated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticApp` object stores information about automatic discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountAutomaticApp`when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountCodeApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeApp) +object has similar functionality to the `DiscountAutomaticApp` object, with the exception that `DiscountCodeApp` +stores information about discount codes that are managed by an app using Shopify Functions. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + 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 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! + + """ + 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 date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticAppCreate` mutation. +""" +type DiscountAutomaticAppCreatePayload { + """ + The automatic discount that the app manages. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an automatic discount +that's managed by an app. + +Use these input fields when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountAutomaticAppInput { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 + [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 + + """ + 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 date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticAppUpdate` mutation. +""" +type DiscountAutomaticAppUpdatePayload { + """ + The updated automatic discount that the app provides. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are automatically applied on a cart and at checkout. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountAutomaticBasic` object stores information about automatic amount off discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic) +object has similar functionality to the `DiscountAutomaticBasic` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBasic { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The 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 date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement! + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") +} + +""" +Return type for `discountAutomaticBasicCreate` mutation. +""" +type DiscountAutomaticBasicCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an +[amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's automatically applied on a cart and at checkout. +""" +input DiscountAutomaticBasicInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticBasicUpdate` mutation. +""" +type DiscountAutomaticBasicUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticBulkDelete` mutation. +""" +type DiscountAutomaticBulkDeletePayload { + """ + The asynchronous job removing the automatic discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are automatically applied on a cart and at checkout. BXGY discounts incentivize customers by offering +them additional items at a discounted price or for free when they purchase a specified quantity of items. + +The `DiscountAutomaticBxgy` object stores information about automatic BXGY discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy) +object has similar functionality to the `DiscountAutomaticBxgy` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBxgy implements HasEvents & Node { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The 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 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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountAutomaticBxgyCreate` mutation. +""" +type DiscountAutomaticBxgyCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's automatically applied on a cart and at checkout. +""" +input DiscountAutomaticBxgyInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + 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 { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomatics. +""" +type DiscountAutomaticConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomatic!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `discountAutomaticDeactivate` mutation. +""" +type DiscountAutomaticDeactivatePayload { + """ + The deactivated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticDelete` mutation. +""" +type DiscountAutomaticDeletePayload { + """ + The ID of the automatic discount that was deleted. + """ + deletedAutomaticDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type which holds one DiscountAutomatic and a cursor during pagination. +""" +type DiscountAutomaticEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticEdge. + """ + node: DiscountAutomatic! +} + +""" +The `DiscountAutomaticFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are automatically applied on a cart and at checkout. Free shipping discounts are promotional deals that +merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountAutomaticFreeShipping` object stores information about automatic free shipping discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping) +object has similar functionality to the `DiscountAutomaticFreeShipping` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The 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 date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement! + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticFreeShippingCreate` mutation. +""" +type DiscountAutomaticFreeShippingCreatePayload { + """ + The automatic free shipping discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's automatically applied on a cart and at checkout. +""" +input DiscountAutomaticFreeShippingInput { + """ + Whether the discount applies on regular one-time-purchase items. + """ + 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 = false + + """ + 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 + + """ + 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticFreeShippingUpdate` mutation. +""" +type DiscountAutomaticFreeShippingUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticNode` object enables you to manage [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts) +that are applied when an order meets specific criteria. You can create amount +off, free shipping, or buy X get Y automatic discounts. For example, you can +offer customers a free shipping discount that applies when conditions are met. +Or you can offer customers a buy X get Y discount that's automatically applied +when customers spend a specified amount of money, or a specified quantity of products. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountAutomaticNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied automatically when an order meets specific criteria. + Learn more about [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscount: DiscountAutomatic! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +An auto-generated type for paginating through multiple DiscountAutomaticNodes. +""" +type DiscountAutomaticNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticNodeEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticNodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomaticNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAutomaticNode and a cursor during pagination. +""" +type DiscountAutomaticNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticNodeEdge. + """ + node: DiscountAutomaticNode! +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum DiscountClass { + """ + The discount is combined with 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 = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +Return type for `discountCodeActivate` mutation. +""" +type DiscountCodeActivatePayload { + """ + The activated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeApp` object stores information about code discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountCodeApp` when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) +object has similar functionality to the `DiscountCodeApp` object, with the exception that `DiscountAutomaticApp` +stores information about automatic discounts that are managed by an app using Shopify Functions. +""" +type DiscountCodeApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + Whether 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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! + + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + for the discount. + """ + discountId: ID! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The [error history](https://shopify.dev/docs/apps/build/functions/monitoring-and-errors) + for the latest version of the discount type that the app provides. + """ + errorHistory: FunctionsErrorHistory + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeAppCreate` mutation. +""" +type DiscountCodeAppCreatePayload { + """ + The discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a code discount, where the discount +type is provided by an app extension that uses [Shopify +Functions](https://shopify.dev/docs/apps/build/functions). + + +Use these input fields when you need advanced or custom discount capabilities +that aren't supported by [Shopify's native discount +types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountCodeAppInput { + """ + 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). + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries) associated with the app extension that's providing the [discount + type](https://help.shopify.com/manual/discounts/discount-types). + """ + functionId: String + + """ + Additional metafields to associate to the discount. + [Metafields](https://shopify.dev/docs/apps/build/custom-data) provide dynamic + function configuration with different parameters, such as `percentage` for a + percentage discount. Merchants can set metafield values in the Shopify admin, + which makes the discount function more flexible and customizable. + """ + metafields: [MetafieldInput!] = [] + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeAppUpdate` mutation. +""" +type DiscountCodeAppUpdatePayload { + """ + The updated discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Discount code applications capture the intentions of a discount code at +the time that it is applied onto an order. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type DiscountCodeApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The `DiscountCodeBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountCodeBasic` object stores information about amount off code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) +object has similar functionality to the `DiscountCodeBasic` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBasic { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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 date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeBasicCreate` mutation. +""" +type DiscountCodeBasicCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's applied on a cart and at checkout when a customer enters a code. Amount +off discounts can be a percentage off or a fixed amount off. +""" +input DiscountCodeBasicInput { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeBasicUpdate` mutation. +""" +type DiscountCodeBasicUpdatePayload { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkActivate` mutation. +""" +type DiscountCodeBulkActivatePayload { + """ + The asynchronous job that activates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDeactivate` mutation. +""" +type DiscountCodeBulkDeactivatePayload { + """ + The asynchronous job that deactivates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDelete` mutation. +""" +type DiscountCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers +by offering them additional items at a discounted price or for free when they purchase a specified quantity +of items. + +The `DiscountCodeBxgy` object stores information about BXGY code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) +object has similar functionality to the `DiscountCodeBxgy` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBxgy { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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 date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountCodeBxgyCreate` mutation. +""" +type DiscountCodeBxgyCreatePayload { + """ + The code discount that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's applied on a cart and at checkout when a customer enters a code. +""" +input DiscountCodeBxgyInput { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with 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 { + """ + The code discount that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDeactivate` mutation. +""" +type DiscountCodeDeactivatePayload { + """ + The deactivated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDelete` mutation. +""" +type DiscountCodeDeletePayload { + """ + The ID of the code discount that was deleted. + """ + deletedCodeDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are +promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountCodeFreeShipping` object stores information about free shipping code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The +[`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) +object has similar functionality to the `DiscountCodeFreeShipping` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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 date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + A list of URLs that the app can use to share the discount. + """ + shareableUrls: [DiscountShareableUrl!]! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeFreeShippingCreate` mutation. +""" +type DiscountCodeFreeShippingCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's applied on a cart and at checkout when a customer enters a code. +""" +input DiscountCodeFreeShippingInput { + """ + 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 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeFreeShippingUpdate` mutation. +""" +type DiscountCodeFreeShippingUpdatePayload { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeNode` object enables you to manage [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) +that are applied when customers enter a code at checkout. For example, you can +offer discounts where customers have to enter a code to redeem an amount off +discount on products, variants, or collections in a store. Or, you can offer +discounts where customers have to enter a code to get free shipping. Merchants +can create and share discount codes individually with customers. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountCodeNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + The underlying code discount object. + """ + codeDiscount: DiscountCode! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +An auto-generated type for paginating through multiple DiscountCodeNodes. +""" +type DiscountCodeNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountCodeNodeEdge!]! + + """ + A list of nodes that are contained in DiscountCodeNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountCodeNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountCodeNode and a cursor during pagination. +""" +type DiscountCodeNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountCodeNodeEdge. + """ + node: DiscountCodeNode! +} + +""" +Return type for `discountCodeRedeemCodeBulkDelete` mutation. +""" +type DiscountCodeRedeemCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discount codes. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The set of valid sort keys for the DiscountCode query. +""" +enum DiscountCodeSortKeys { + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A list of collections that the discount can have as a prerequisite or a list of +collections to which the discount can be applied. +""" +type DiscountCollections { + """ + The list of collections that the discount can have as a prerequisite or the + list of collections to which the discount can be applied. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + Specifies list of collection ids to add. + """ + add: [ID!] + + """ + Specifies list of collection ids to remove. + """ + remove: [ID!] +} + +""" +The [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that you can use in combination with +[Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +type DiscountCombinesWith { + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean! + + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean! + + """ + Whether the discount combines with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean! +} + +""" +The input fields to determine which discount classes the discount can combine with. +""" +input DiscountCombinesWithInput { + """ + Whether the discount combines with the + [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 + + """ + Whether the discount combines + with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean = false +} + +""" +Defines the geographic scope where a shipping discount can be applied based on +customer shipping destinations. This configuration determines which countries +are eligible for the promotional offer. + +For example, a "Free Shipping to EU" promotion would specify European Union +countries, while a domestic-only sale might target just the store's home country. + +The object includes both specific country selections and an option to include +all remaining countries not explicitly listed, providing flexible geographic +targeting for international merchants. +""" +type DiscountCountries { + """ + The codes for the countries where the discount can be applied. + """ + countries: [CountryCode!]! + + """ + Whether the discount is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The input fields for a list of countries to add or remove from the free shipping discount. +""" +input DiscountCountriesInput { + """ + The country codes to add to the list of countries where the discount applies. + """ + add: [CountryCode!] + + """ + 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 { + """ + Whether the discount can be applied to all countries as shipping destination. This value is always `true`. + """ + allCountries: Boolean! +} + +""" +Creates the broadest possible discount reach by targeting all customers, +regardless of their purchase history or segment membership. This gives merchants +maximum flexibility to run store-wide promotions without worrying about customer +eligibility restrictions. + +For example, a flash sale or grand opening promotion would target all customers +to maximize participation and store visibility. + +Learn more about [customer targeting](https://help.shopify.com/manual/discounts/). +""" +type DiscountCustomerAll { + """ + Whether the discount can be applied by all customers. This value is always `true`. + """ + allCustomers: Boolean! +} + +""" +The prerequisite items and prerequisite value that a customer must have on the order for the discount to be applicable. +""" +type DiscountCustomerBuys { + """ + The items required for the discount to be applicable. + """ + items: DiscountItems! + + """ + The prerequisite value. + """ + value: DiscountCustomerBuysValue! +} + +""" +The input fields for prerequisite items and quantity for the discount. +""" +input DiscountCustomerBuysInput { + """ + The 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 = DiscountPurchaseAmount | DiscountQuantity + +""" +The input fields for prerequisite quantity or minimum purchase amount required for the discount. +""" +input DiscountCustomerBuysValueInput { + """ + 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 { + """ + 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 { + """ + 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 = DiscountAmount | DiscountOnQuantity | DiscountPercentage + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountCustomerGetsValueInput { + """ + 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 { + """ + The list of customer segments who are eligible for the discount. + """ + segments: [Segment!]! +} + +""" +The input fields for which customer segments to add to or remove from the discount. +""" +input DiscountCustomerSegmentsInput { + """ + A list of customer segments to add to the current list of customer segments. + """ + add: [ID!] + + """ + A list of customer segments to remove from the current list of customer segments. + """ + remove: [ID!] +} + +""" +The type used for targeting a set of customers who are eligible for the +discount. For example, the discount might be available to all customers or it +might only be available to a specific set of customers. You can define the set +of customers by targeting a list of customer segments, or by targeting a list of +specific customers. +""" +union DiscountCustomerSelection = DiscountCustomerAll | DiscountCustomerSegments | DiscountCustomers + +""" +The input fields for the customers who can use this discount. +""" +input DiscountCustomerSelectionInput { + """ + Whether all customers can use this discount. + """ + all: Boolean + + """ + The list of customer 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 +} + +""" +Defines customer targeting for discounts through specific individual customers. +This object allows merchants to create exclusive discounts that are only +available to explicitly selected customers. + +For example, a VIP customer appreciation discount might target specific +high-value customers by individually selecting them, or a beta program discount +could be offered to selected early adopters. + +Use `DiscountCustomers` to: +- Target specific individual customers for exclusive promotions +- Create personalized discount experiences for selected customers +- Offer special discounts to VIP or loyal customers +- Provide exclusive access to promotions for specific individuals + +This targeting method requires you to add each customer who should be eligible +for the discount. For broader targeting based on customer attributes or segments, use [`DiscountCustomerSegments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomerSegments) instead. + +Learn more about creating customer-specific discounts using [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) and [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate). +""" +type DiscountCustomers { + """ + The list of individual customers eligible for the discount. + """ + customers: [Customer!]! +} + +""" +The input fields for which customers to add to or remove from the discount. +""" +input DiscountCustomersInput { + """ + A list of customers to add to the current list of customers who can use the discount. + """ + add: [ID!] + + """ + A list of customers to remove from the current list of customers who can use the discount. + """ + remove: [ID!] +} + +""" +The type of discount that will be applied. Currently, only a percentage discount is supported. +""" +union DiscountEffect = DiscountAmount | DiscountPercentage + +""" +The input fields for how the discount will be applied. Currently, only percentage off is supported. +""" +input DiscountEffectInput { + """ + The 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 { + """ + 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 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 + + """ + 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 + + """ + 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 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 = 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 { + """ + 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 +} + +""" +Specifies the minimum item quantity required for discount eligibility, helping +merchants create volume-based promotions that encourage larger purchases. This +threshold applies to qualifying items in the customer's cart. + +For example, a "Buy 3, Get 10% Off" promotion would set the minimum quantity to 3 items. + +Learn more about [discount requirements](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountMinimumQuantity { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64! +} + +""" +The input fields for the minimum quantity required for the discount. +""" +input DiscountMinimumQuantityInput { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64 +} + +""" +The type of minimum requirement that must be met for the discount to be applied. +For example, a customer must spend a minimum subtotal to be eligible for the +discount. Alternatively, a customer must purchase a minimum quantity of items to +be eligible for the discount. +""" +union DiscountMinimumRequirement = DiscountMinimumQuantity | DiscountMinimumSubtotal + +""" +The input fields for the minimum quantity or subtotal required for a discount. +""" +input DiscountMinimumRequirementInput { + """ + The minimum required quantity. + """ + quantity: DiscountMinimumQuantityInput + + """ + The minimum required subtotal. + """ + subtotal: DiscountMinimumSubtotalInput +} + +""" +The minimum subtotal required for the discount to apply. +""" +type DiscountMinimumSubtotal { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: MoneyV2! +} + +""" +The input fields for the minimum subtotal required for a discount. +""" +input DiscountMinimumSubtotalInput { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: Decimal +} + +""" +The `DiscountNode` object enables you to manage +[discounts](https://help.shopify.com/manual/discounts), which are applied at +checkout or on a cart. + + +Discounts are a way for merchants to promote sales and special offers, or as +customer loyalty rewards. Discounts can apply to [orders, products, or +shipping](https://shopify.dev/docs/apps/build/discounts#discount-classes), and +can be either automatic or code-based. For example, you can offer customers a +buy X get Y discount that's automatically applied when purchases meet specific +criteria. Or, you can offer discounts where customers have to enter a code to +redeem an amount off discount on products, variants, or collections in a store. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related mutations, limitations, and considerations. +""" +type DiscountNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied at checkout or on cart. + + + Discounts can be [automatic or code-based](https://shopify.dev/docs/apps/build/discounts#discount-methods). + """ + discount: Discount! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +An auto-generated type for paginating through multiple DiscountNodes. +""" +type DiscountNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountNodeEdge!]! + + """ + A list of nodes that are contained in DiscountNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountNode and a cursor during pagination. +""" +type DiscountNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountNodeEdge. + """ + node: DiscountNode! +} + +""" +Defines quantity-based discount rules that specify how many items are eligible +for a discount effect. This object enables bulk purchase incentives and tiered +pricing strategies. + +For example, a "Buy 4 candles, get 2 candles 50% off (mix and match)" promotion +would specify a quantity threshold of 2 items that will receive a percentage +discount effect, encouraging customers to purchase more items to unlock savings. + +The configuration combines quantity requirements with discount effects, allowing +merchants to create sophisticated pricing rules that reward larger purchases and +increase average order values. +""" +type DiscountOnQuantity { + """ + The discount's effect on qualifying items. + """ + effect: DiscountEffect! + + """ + The number of items being discounted. The customer must have at least this + many items of specified products or product variants in their order to be + eligible for the discount. + """ + quantity: DiscountQuantity! +} + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountOnQuantityInput { + """ + The 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 { + """ + The percentage value of the discount. + """ + percentage: Float! +} + +""" +A list of products and product variants that the discount can have as a +prerequisite or a list of products and product variants to which the discount +can be applied. +""" +type DiscountProducts { + """ + The list of product variants that the discount can have as a prerequisite or + the list of product variants to which the discount can be applied. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The IDs of the product variants to add as prerequisites or as eligible items for a discount. + """ + productVariantsToAdd: [ID!] + + """ + The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + """ + productVariantsToRemove: [ID!] + + """ + The IDs of the products to add as prerequisites or as eligible items for a discount. + """ + productsToAdd: [ID!] + + """ + The IDs of the products to remove as prerequisites or as eligible items for a discount. + """ + productsToRemove: [ID!] +} + +""" +A purchase amount in the context of a discount. This object can be used to +define the minimum purchase amount required for a discount to be applicable. +""" +type DiscountPurchaseAmount { + """ + The purchase amount in decimal format. + """ + amount: Decimal! +} + +""" +Defines a quantity threshold for discount eligibility or application. This +simple object specifies the number of items required to trigger or calculate +discount benefits. + +For example, a "Buy 3, Get 1 Free" promotion would use DiscountQuantity to +define the minimum purchase quantity of 3 items, or a bulk discount might +specify quantity tiers like 10+ items for wholesale pricing. + +The quantity value determines how discounts interact with cart contents, whether +setting minimum purchase requirements or defining quantity-based discount calculations. +""" +type DiscountQuantity { + """ + The quantity of items. + """ + quantity: UnsignedInt64! +} + +""" +A code that a customer can use at checkout to receive a discount. For example, a +customer can use the redeem code 'SUMMER20' at checkout to receive a 20% +discount on their entire order. +""" +type DiscountRedeemCode { + """ + The number of times that the discount redeem code has been used. This value is + updated asynchronously and can be different than the actual usage count. + """ + asyncUsageCount: Int! + + """ + The code that a customer can use at checkout to receive a discount. + """ + code: String! + + """ + The application that created the discount redeem code. + """ + createdBy: App + + """ + A globally-unique ID of the discount redeem code. + """ + id: ID! +} + +""" +Return type for `discountRedeemCodeBulkAdd` mutation. +""" +type DiscountRedeemCodeBulkAddPayload { + """ + The ID of bulk operation that creates multiple unique discount codes. + You can use the + [`discountRedeemCodeBulkCreation` query](https://shopify.dev/api/admin-graphql/latest/queries/discountRedeemCodeBulkCreation) + to track the status of the bulk operation. + """ + bulkCreation: DiscountRedeemCodeBulkCreation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The properties and status of a bulk discount redeem code creation operation. +""" +type DiscountRedeemCodeBulkCreation implements Node { + """ + The result of each code creation operation associated with the bulk creation + operation including any errors that might have occurred during the operation. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The code to use in the discount redeem code creation operation. + """ + code: String! + + """ + The successfully created discount redeem code. + + If the discount redeem code couldn't be created, then this field is `null``. + """ + discountRedeemCode: DiscountRedeemCode + + """ + A list of errors that occurred during the creation operation of the discount redeem code. + """ + errors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodeBulkCreationCodes. +""" +type DiscountRedeemCodeBulkCreationCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeBulkCreationCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeBulkCreationCodeEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [DiscountRedeemCodeBulkCreationCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCodeBulkCreationCode and a cursor during pagination. +""" +type DiscountRedeemCodeBulkCreationCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeBulkCreationCodeEdge. + """ + node: DiscountRedeemCodeBulkCreationCode! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodes. +""" +type DiscountRedeemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountRedeemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCode and a cursor during pagination. +""" +type DiscountRedeemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeEdge. + """ + node: DiscountRedeemCode! +} + +""" +The input fields for the redeem code to attach to a discount. +""" +input DiscountRedeemCodeInput { + """ + The code that a customer can use at checkout to receive the associated discount. + """ + code: String! +} + +""" +A shareable URL for a discount code. +""" +type DiscountShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: DiscountShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable discount URL lands. +""" +enum DiscountShareableUrlTargetType { + """ + The URL lands on a 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 = DiscountCountries | DiscountCountryAll + +""" +The input fields for the destinations where the free shipping discount will be applied. +""" +input DiscountShippingDestinationSelectionInput { + """ + Whether the discount code applies to all countries. + """ + all: Boolean = false + + """ + A list of countries where the discount code will apply. + """ + countries: DiscountCountriesInput +} + +""" +The set of valid sort keys for the Discount query. +""" +enum DiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The status of the discount that describes its availability, +expiration, or pending activation. +""" +enum DiscountStatus { + """ + The discount is currently available for use. + """ + ACTIVE + + """ + The discount has reached its end date and is no longer valid. + """ + EXPIRED + + """ + The discount is set to become active at a future date. + """ + SCHEDULED +} + +""" +The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. +""" +enum DiscountTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The type of the subscription discount. +""" +enum DiscountType { + """ + 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 { + """ + The error code. + """ + code: DiscountErrorCode + + """ + Extra information about this error. + """ + extraInfo: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents an error in the input of a mutation. +""" +interface DisplayableError { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `disputeEvidenceUpdate` mutation. +""" +type DisputeEvidenceUpdatePayload { + """ + The updated dispute evidence. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DisputeEvidenceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `DisputeEvidenceUpdate`. +""" +type DisputeEvidenceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: DisputeEvidenceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DisputeEvidenceUpdateUserError`. +""" +enum DisputeEvidenceUpdateUserErrorCode { + """ + Dispute evidence could not be found. + """ + DISPUTE_EVIDENCE_NOT_FOUND + + """ + Evidence already accepted. + """ + EVIDENCE_ALREADY_ACCEPTED + + """ + Evidence past due date. + """ + EVIDENCE_PAST_DUE_DATE + + """ + Combined files size is too large. + """ + FILES_SIZE_EXCEEDED_LIMIT + + """ + File upload failed. Please try again. + """ + FILE_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + Individual file size is too large. + """ + TOO_LARGE +} + +""" +The possible statuses of a dispute. +""" +enum DisputeStatus { + 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 + UNDER_REVIEW + WON +} + +""" +The possible types for a dispute. +""" +enum DisputeType { + """ + The dispute has turned into a chargeback. + """ + CHARGEBACK + + """ + The dispute is in the inquiry phase. + """ + INQUIRY +} + +""" +A unique string that represents the address of a Shopify store on the Internet. +""" +type Domain implements Node { + """ + The host name of the domain. For example, `example.com`. + """ + host: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The localization of the domain, if the domain doesn't redirect. + """ + localization: DomainLocalization + + """ + The web presence of the domain. + """ + marketWebPresence: MarketWebPresence + + """ + Whether SSL is enabled. + """ + sslEnabled: Boolean! + + """ + The URL of the domain (for example, `https://example.com`). + """ + url: URL! +} + +""" +The country and language settings assigned to a domain. +""" +type DomainLocalization { + """ + The ISO codes for the domain’s alternate locales. For example, `["en"]`. + """ + alternateLocales: [String!]! + + """ + The ISO code for the country assigned to the domain. For example, `"CA"` or "*" for a domain set to "Rest of world". + """ + country: String + + """ + The ISO code for the domain’s default locale. For example, `"en"`. + """ + defaultLocale: String! +} + +""" +An order that a merchant creates on behalf of a customer. Draft orders are +useful for merchants that need to do the following tasks: + +- Create new orders for sales made by phone, in person, by chat, or elsewhere. +When a merchant accepts payment for a draft order, an order is created. +- Send invoices to customers to pay with a secure checkout link. +- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory. +- Re-create orders manually from active sales channels. +- Sell products at discount or wholesale rates. +- Take pre-orders. + +For draft orders in multiple currencies `presentment_money` is the source of +truth for what a customer is going to be charged and `shop_money` is an estimate +of what the merchant might receive in their shop currency. + +**Caution:** Only use this data if it's required for your app's functionality. +Shopify will restrict [access to +scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a +legitimate use for the associated data. + +Draft orders created on or after April 1, 2025 will be automatically purged after one year of inactivity. +""" +type DraftOrder implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasMetafields & LegacyInteroperability & Navigable & Node { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The billing address of the customer. + """ + billingAddress: MailingAddress + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The date and time when the draft order was converted to a new order, + and had it's status changed to **Completed**. + """ + completedAt: DateTime + + """ + The date and time when the draft order was created in Shopify. + """ + createdAt: DateTime! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The custom information added to the draft order on behalf of the customer. + """ + customAttributes: [Attribute!]! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The email address of the customer, which is used to send notifications. + """ + email: String + + """ + The list of events associated with the draft order. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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.") + + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The identifier for the draft order, which is unique within the store. For example, _#D1223_. + """ + name: String! + + """ + The text from an optional note attached to the draft order. + """ + note2: String + + """ + The order that was created from the draft order. + """ + order: Order + + """ + The associated payment terms for this draft order. + """ + paymentTerms: PaymentTerms + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The purchase order number. + """ + poNumber: String + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + Whether the draft order is ready and can be completed. + Draft orders might have asynchronous operations that can take time to finish. + """ + ready: Boolean! + + """ + The time after which inventory will automatically be restocked. + """ + reserveInventoryUntil: DateTime + + """ + The shipping address of the customer. + """ + shippingAddress: MailingAddress + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The status of the draft order. + """ + status: DraftOrderStatus! + + """ + The subtotal, in shop currency, of the line items and their discounts, + excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The comma separated list of tags associated with the draft order. + Updating `tags` overwrites any existing tags that were previously added to the draft order. + To add new tags without overwriting existing tags, use the + [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation. + """ + tags: [String!]! + + """ + Whether the draft order is tax exempt. + """ + taxExempt: Boolean! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + The total weight in grams of the draft order. + """ + totalWeight: UnsignedInt64! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The date and time when the draft order was last changed. + The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01. + """ + updatedAt: DateTime! + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean! + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The order-level discount applied to a draft order. +""" +type DraftOrderAppliedDiscount { + """ + Amount of the order-level discount that's applied to the draft order in shop currency. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + amountSet: MoneyBag! + + """ + Amount of money discounted. + """ + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """ + Description of the order-level discount. + """ + description: String! + + """ + Name of the order-level discount. + """ + title: String + + """ + The order level discount amount. If `valueType` is `"percentage"`, + then `value` is the percentage discount. + """ + value: Float! + + """ + Type of the order-level discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The input fields for applying an order-level discount to a draft order. +""" +input DraftOrderAppliedDiscountInput { + """ + The applied amount of the discount in your shop currency. + """ + amount: Money @deprecated(reason: "Please use `amountWithCurrency` instead.") + + """ + The applied amount of the discount in the specified currency. + """ + amountWithCurrency: MoneyInput + + """ + Reason for the discount. + """ + description: String + + """ + Title of the discount. + """ + title: String + + """ + The value of the discount. + If the type of the discount is fixed amount, then this is a fixed amount in your shop currency. + If the type is percentage, then this is the percentage. + """ + value: Float! + + """ + The type of discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The valid discount types that can be applied to a draft order. +""" +enum DraftOrderAppliedDiscountType { + """ + A fixed amount in the store's currency. + """ + FIXED_AMOUNT + + """ + A percentage of the order subtotal. + """ + PERCENTAGE +} + +""" +Return type for `draftOrderBulkAddTags` mutation. +""" +type DraftOrderBulkAddTagsPayload { + """ + The asynchronous job for adding tags to the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkDelete` mutation. +""" +type DraftOrderBulkDeletePayload { + """ + The asynchronous job for deleting the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkRemoveTags` mutation. +""" +type DraftOrderBulkRemoveTagsPayload { + """ + The asynchronous job for removing tags from the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a bundle was added to a draft order. +""" +type DraftOrderBundleAddedWarning implements DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +Return type for `draftOrderCalculate` mutation. +""" +type DraftOrderCalculatePayload { + """ + The calculated properties for a draft order. + """ + calculatedDraftOrder: CalculatedDraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderComplete` mutation. +""" +type DraftOrderCompletePayload { + """ + The completed draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple DraftOrders. +""" +type DraftOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderEdge!]! + + """ + A list of nodes that are contained in DraftOrderEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `draftOrderCreateFromOrder` mutation. +""" +type DraftOrderCreateFromOrderPayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreateMerchantCheckout` mutation. +""" +type DraftOrderCreateMerchantCheckoutPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreate` mutation. +""" +type DraftOrderCreatePayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to specify the draft order to delete by its ID. +""" +input DraftOrderDeleteInput { + """ + The ID of the draft order to delete. + """ + id: ID! +} + +""" +Return type for `draftOrderDelete` mutation. +""" +type DraftOrderDeletePayload { + """ + The ID of the deleted draft order. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a discount cannot be applied to a draft order. +""" +type DraftOrderDiscountNotAppliedWarning implements DraftOrderWarning { + """ + The code of the discount that can't be applied. + """ + discountCode: String + + """ + The title of the discount that can't be applied. + """ + discountTitle: String + + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! + + """ + The price rule that can't be applied. + """ + priceRule: PriceRule +} + +""" +Return type for `draftOrderDuplicate` mutation. +""" +type DraftOrderDuplicatePayload { + """ + The newly duplicated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DraftOrder and a cursor during pagination. +""" +type DraftOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderEdge. + """ + node: DraftOrder! +} + +""" +The input fields used to create or update a draft order. +""" +input DraftOrderInput { + """ + 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.") + + """ + 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. + + 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 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 private metafields attached to the draft order. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "The list of metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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 + + """ + 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 +} + +""" +Return type for `draftOrderInvoicePreview` mutation. +""" +type DraftOrderInvoicePreviewPayload { + """ + The draft order invoice email rendered as HTML to allow previewing. + """ + previewHtml: HTML + + """ + The subject preview for the draft order invoice email. + """ + previewSubject: HTML + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderInvoiceSend` mutation. +""" +type DraftOrderInvoiceSendPayload { + """ + The draft order an invoice email is sent for. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The line item for a draft order. +""" +type DraftOrderLineItem implements Node { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The list of bundle components if applicable. + """ + bundleComponents: [DraftOrderLineItem!]! + + """ + 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 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 product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + A list of tax lines. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total discount applied in shop currency. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple DraftOrderLineItems. +""" +type DraftOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderLineItemEdge!]! + + """ + A list of nodes that are contained in DraftOrderLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DraftOrderLineItem and a cursor during pagination. +""" +type DraftOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderLineItemEdge. + """ + node: DraftOrderLineItem! +} + +""" +The input fields for a line item included in a draft order. +""" +input DraftOrderLineItemInput { + """ + The custom discount to be applied. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + The bundle components when the line item is a bundle. + """ + bundleComponents: [BundlesDraftOrderBundleLineItemComponentInput!] + + """ + A generic custom attribute using a key value pair. + """ + customAttributes: [AttributeInput!] + + """ + The weight in grams for custom line items. This field is ignored when `variantId` is provided. + """ + grams: Int @deprecated(reason: "`weight` should be used instead, allowing different units to be used.") + + """ + The custom line item price without any discounts applied in shop currency. + This field is ignored when `variantId` is provided. + """ + originalUnitPrice: Money @deprecated(reason: "`originalUnitPriceWithCurrency` should be used instead, where currency can be specified.") + + """ + The price in presentment currency, without any discounts applied, for a custom line item. + If this value is provided, `original_unit_price` will be ignored. This field is ignored when `variantId` is provided. + Note: All presentment currencies for a single draft should be the same and match the + presentment currency of the draft order. + """ + originalUnitPriceWithCurrency: MoneyInput + + """ + The line item quantity. + """ + quantity: Int! + + """ + Whether physical shipping is required for a custom line item. This field is ignored when `variantId` is provided. + """ + requiresShipping: Boolean + + """ + The SKU number for custom line items only. This field is ignored when `variantId` is provided. + """ + sku: String + + """ + Whether the custom line item is taxable. This field is ignored when `variantId` is provided. + """ + taxable: Boolean + + """ + Title of the line item. This field is ignored when `variantId` is provided. + """ + title: String + + """ + The 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 + + """ + The weight unit and value inputs for custom line items only. + This field is ignored when `variantId` is provided. + """ + weight: WeightInput +} + +""" +The platform discounts applied to the draft order. +""" +type DraftOrderPlatformDiscount { + """ + Price reduction allocations across the draft order's lines. + """ + allocations: [DraftOrderPlatformDiscountAllocation!]! + + """ + Whether the discount is an automatic discount. + """ + automaticDiscount: Boolean! + + """ + Whether the discount is a buy x get y discount. + """ + bxgyDiscount: Boolean! + + """ + If a code-based discount, the code used to add the discount. + """ + code: String + + """ + The discount class. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The discount node for the platform discount. + """ + discountNode: DiscountNode + + """ + The ID of the discount. + """ + id: ID + + """ + Whether the discount is line, order or shipping level. + """ + presentationLevel: String! + + """ + The short summary of the discount. + """ + shortSummary: String! + + """ + The summary of the discount. + """ + summary: String! + + """ + The name of the discount. + """ + title: String! + + """ + The discount total amount in shop currency. + """ + totalAmount: MoneyV2! + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + totalAmountPriceSet: MoneyBag! +} + +""" +Price reduction allocations across the draft order's lines. +""" +type DraftOrderPlatformDiscountAllocation { + """ + The ID of the allocation. + """ + id: ID + + """ + The quantity of the target being discounted. + """ + quantity: Int + + """ + Amount of the discount allocated to the target. + """ + reductionAmount: MoneyV2! + + """ + Amount of the discount allocated to the target in both shop currency and presentment currency. + """ + reductionAmountSet: MoneyBag! + + """ + The element of the draft being discounted. + """ + target: DraftOrderPlatformDiscountAllocationTarget +} + +""" +The element of the draft being discounted. +""" +union DraftOrderPlatformDiscountAllocationTarget = CalculatedDraftOrderLineItem | DraftOrderLineItem | ShippingLine + +""" +The set of valid sort keys for the DraftOrder query. +""" +enum DraftOrderSortKeys { + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `number` value. + """ + NUMBER + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `total_price` value. + """ + TOTAL_PRICE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid statuses for a draft order. +""" +enum DraftOrderStatus { + """ + The draft order has been paid. + """ + COMPLETED + + """ + An invoice for the draft order has been sent to the customer. + """ + INVOICE_SENT + + """ + The draft order is open. It has not been paid, and an invoice hasn't been sent. + """ + OPEN +} + +""" +Represents a draft order tag. +""" +type DraftOrderTag implements Node { + """ + Handle of draft order tag. + """ + handle: String! + + """ + ID of draft order tag. + """ + id: ID! + + """ + Title of draft order tag. + """ + title: String! +} + +""" +Return type for `draftOrderUpdate` mutation. +""" +type DraftOrderUpdatePayload { + """ + The updated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning that is displayed to the merchant when a change is made to a draft order. +""" +interface DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The duty details for a line item. +""" +type Duty implements Node { + """ + The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty. + """ + countryCodeOfOrigin: CountryCode + + """ + The harmonized system code of the item used in calculating the duty. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The amount of the duty. + """ + price: MoneyBag! + + """ + A list of taxes charged on the duty. + """ + taxLines: [TaxLine!]! +} + +""" +A sale associated with a duty charge. +""" +type DutySale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The duty for the associated sale. + """ + duty: Duty! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The attribute editable information. +""" +type EditableProperty { + """ + Whether the attribute is locked for editing. + """ + locked: Boolean! + + """ + The reason the attribute is locked for editing. + """ + reason: FormattedString +} + +""" +The input fields for an email. +""" +input EmailInput { + """ + Specifies 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 +} + +""" +An error that occurs during the execution of a server pixel mutation. +""" +type ErrorsServerPixelUserError implements DisplayableError { + """ + The error code. + """ + code: ErrorsServerPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsServerPixelUserError`. +""" +enum ErrorsServerPixelUserErrorCode { + """ + A server pixel 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 { + """ + The error code. + """ + code: ErrorsWebPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsWebPixelUserError`. +""" +enum ErrorsWebPixelUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The 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 { + """ + The name of the app that created the event. + """ + appTitle: String + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! +} + +""" +Return type for `eventBridgeServerPixelUpdate` mutation. +""" +type EventBridgeServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `eventBridgeWebhookSubscriptionCreate` mutation. +""" +type EventBridgeWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +The input fields for an EventBridge webhook subscription. +""" +input EventBridgeWebhookSubscriptionInput { + """ + The 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!] +} + +""" +Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. +""" +type EventBridgeWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An auto-generated type for paginating through multiple Events. +""" +type EventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [EventEdge!]! + + """ + A list of nodes that are contained in EventEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Event!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Event and a cursor during pagination. +""" +type EventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of EventEdge. + """ + node: Event! +} + +""" +The set of valid sort keys for the Event query. +""" +enum EventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +An item for exchange. +""" +type ExchangeLineItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The order line item for the exchange. If the exchange line has been processed + multiple times, this will be the first associated line item and won't reflect + all processed values. + """ + lineItem: LineItem @deprecated(reason: "Use `lineItems` instead.") +} + +""" +The input fields for an applied discount on a calculated exchange line item. +""" +input ExchangeLineItemAppliedDiscountInput { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount or a percentage. + """ + value: ExchangeLineItemAppliedDiscountValueInput! +} + +""" +The input value for an applied discount on a calculated exchange line item. +Can either specify the value as a fixed amount or a percentage. +""" +input ExchangeLineItemAppliedDiscountValueInput @oneOf { + """ + The value of the discount as a fixed amount. + """ + amount: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple ExchangeLineItems. +""" +type ExchangeLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeLineItemEdge!]! + + """ + A list of nodes that are contained in ExchangeLineItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeLineItem and a cursor during pagination. +""" +type ExchangeLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeLineItemEdge. + """ + node: ExchangeLineItem! +} + +""" +The input fields for new line items to be added to the order as part of an exchange. +""" +input ExchangeLineItemInput { + """ + The 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 +} + +""" +An exchange where existing items on an order are returned and new items are added to the order. +""" +type ExchangeV2 implements Node { + """ + The details of the new items in the exchange. + """ + additions: ExchangeV2Additions! + + """ + The date and time when the exchange was completed. + """ + completedAt: DateTime + + """ + The date and time when the exchange was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the exchange happened. + """ + location: Location + + """ + The text of an optional note that a shop owner can attach to the exchange. + """ + note: String + + """ + The refunds processed during the exchange. + """ + refunds: [Refund!]! + + """ + The details of the returned items in the exchange. + """ + returns: ExchangeV2Returns! + + """ + The staff member associated with the exchange. + """ + staffMember: StaffMember + + """ + The amount of money that was paid or refunded as part of the exchange. + """ + totalAmountProcessedSet: MoneyBag! + + """ + The difference in values of the items that were exchanged. + """ + totalPriceSet: MoneyBag! + + """ + The order transactions related to the exchange. + """ + transactions: [OrderTransaction!]! +} + +""" +New items associated to the exchange. +""" +type ExchangeV2Additions { + """ + The list of new items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The subtotal of the items being added, including discounts. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being added. + """ + taxLines: [TaxLine!]! + + """ + The total price of the items being added, including discounts and taxes. + """ + totalPriceSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple ExchangeV2s. +""" +type ExchangeV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeV2Edge!]! + + """ + A list of nodes that are contained in ExchangeV2Edge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeV2 and a cursor during pagination. +""" +type ExchangeV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeV2Edge. + """ + node: ExchangeV2! +} + +""" +Contains information about an item in the exchange. +""" +type ExchangeV2LineItem { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The total line price, in shop and presentment currencies, after discounts are applied. + """ + discountedTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit after line item discounts are applied. + """ + discountedUnitPriceSet: MoneyBag! + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + Indiciates if this line item is a gift card. + """ + giftCard: Boolean! + + """ + The gift cards associated with the line item. + """ + giftCards: [GiftCard!]! + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The line item associated with this object. + """ + lineItem: LineItem + + """ + The name of the product. + """ + name: String! + + """ + The total price, in shop and presentment currencies, before discounts are applied. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit before line item discounts are applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The number of products that were purchased. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + The TaxLine object connected to this line item. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The product variant of the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String +} + +""" +Return items associated to the exchange. +""" +type ExchangeV2Returns { + """ + The list of return items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The amount of the order-level discount for the items and shipping being + returned, which doesn't contain any line item discounts. + """ + orderDiscountAmountSet: MoneyBag! + + """ + The amount of money to be refunded for shipping. + """ + shippingRefundAmountSet: MoneyBag! + + """ + The subtotal of the items being returned. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being returned. + """ + taxLines: [TaxLine!]! + + """ + The amount of money to be refunded for tip. + """ + tipRefundAmountSet: MoneyBag! + + """ + The total value of the items being returned. + """ + totalPriceSet: MoneyBag! +} + +""" +Represents a video hosted outside of Shopify. +""" +type ExternalVideo implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + The embed URL of the video for the respective host. + """ + embedUrl: URL! + + """ + The URL. + """ + embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The host of the external video. + """ + host: MediaHost! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The origin URL of the video on the respective host. + """ + originUrl: URL! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Requirements that must be met before an app can be installed. +""" +type FailedRequirement { + """ + Action to be taken to resolve a failed requirement, including URL link. + """ + action: NavigationItem + + """ + A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app + encounters when trying to make use of their Shop and its resources. + """ + message: String! +} + +""" +A additional cost, charged by the merchant, on an order. Examples include return shipping fees and restocking fees. +""" +interface Fee { + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +A sale associated with a fee. +""" +type FeeSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The fee associated with the sale. + """ + fee: Fee! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +A file interface. +""" +interface File { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fileAcknowledgeUpdateFailed` mutation. +""" +type FileAcknowledgeUpdateFailedPayload { + """ + The updated file(s). + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type for paginating through multiple Files. +""" +type FileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FileEdge!]! + + """ + A list of nodes that are contained in FileEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [File!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a file object. +""" +enum FileContentType { + """ + 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 { + """ + 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 { + """ + Append a UUID if filename is already in use. + """ + APPEND_UUID + + """ + Raise an error if filename is already in use. + """ + RAISE_ERROR + + """ + Replace the existing file if filename is already in use. + """ + REPLACE +} + +""" +Return type for `fileCreate` mutation. +""" +type FileCreatePayload { + """ + The newly created files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Return type for `fileDelete` mutation. +""" +type FileDeletePayload { + """ + The IDs of the deleted files. + """ + deletedFileIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type which holds one File and a cursor during pagination. +""" +type FileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FileEdge. + """ + node: File! +} + +""" +A file error. This typically occurs when there is an issue with the file itself causing it to fail validation. +Check the file before attempting to upload again. +""" +type FileError { + """ + Code representing the type of error. + """ + code: FileErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +The error types for a file. +""" +enum FileErrorCode { + """ + File 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 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 set of valid sort keys for the File query. +""" +enum FileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `filename` value. + """ + FILENAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `original_upload_size` value. + """ + ORIGINAL_UPLOAD_SIZE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The possible statuses for a file object. +""" +enum FileStatus { + """ + File 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 { + """ + 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! + + """ + 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!] + + """ + The IDs of the references to remove from the file. Currently only accepts product IDs. + """ + referencesToRemove: [ID!] +} + +""" +Return type for `fileUpdate` mutation. +""" +type FileUpdatePayload { + """ + The list of updated files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Possible error codes that can be returned by `FilesUserError`. +""" +enum FilesErrorCode { + """ + The 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 + + """ + 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 { + """ + The error code. + """ + code: FilesErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A filter option is one possible value in a search filter. +""" +type FilterOption { + """ + The filter option's label for display purposes. + """ + label: String! + + """ + The filter option's value. + """ + value: String! +} + +""" +An amount that's allocated to a line item based on an associated discount application. +""" +type FinancialSummaryDiscountAllocation { + """ + The money amount that's allocated per unit on the associated line based on the + discount application in shop and presentment currencies. If the allocated + amount for the line cannot be evenly divided by the quantity, then this amount + will be an approximate amount, avoiding fractional pennies. For example, if + the associated line had a quantity of 3 with a discount of 4 cents, then the + discount distribution would be [0.01, 0.01, 0.02]. This field returns the + highest number of the distribution. In this example, this would be 0.02. + """ + approximateAllocatedAmountPerItem: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: FinancialSummaryDiscountApplication! +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. +""" +type FinancialSummaryDiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! +} + +""" +Return type for `flowGenerateSignature` mutation. +""" +type FlowGenerateSignaturePayload { + """ + The payload used to generate the signature. + """ + payload: String + + """ + The generated signature. + """ + signature: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `flowTriggerReceive` mutation. +""" +type FlowTriggerReceivePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a strict subset of HTML code. Non-allowed tags will be stripped out. +Allowed tags: +* `a` (allowed attributes: `href`, `target`) +* `b` +* `br` +* `em` +* `i` +* `strong` +* `u` +Use [HTML](https://shopify.dev/api/admin-graphql/latest/scalars/HTML) instead if you need to +include other HTML tags. + +Example value: `"Your current domain is example.myshopify.com."` +""" +scalar FormattedString + +""" +Represents a fulfillment. +In Shopify, a fulfillment represents a shipment of one or more items in an order. +When an order has been completely fulfilled, it means that all the items that are included +in the order have been sent to the customer. +There can be more than one fulfillment for an order. +""" +type Fulfillment implements LegacyInteroperability & Node { + """ + The date and time when the fulfillment was created. + """ + createdAt: DateTime! + + """ + The date that this fulfillment was delivered. + """ + deliveredAt: DateTime + + """ + Human readable display status for this fulfillment. + """ + displayStatus: FulfillmentDisplayStatus + + """ + The estimated date that this fulfillment will arrive. + """ + estimatedDeliveryAt: DateTime + + """ + The history of events associated with this fulfillment. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The canceled fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Fulfillments. +""" +type FulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEdge!]! + + """ + A list of nodes that are contained in FulfillmentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Fulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A fulfillment constraint rule. +""" +type FulfillmentConstraintRule implements HasMetafields & Node { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +Return type for `fulfillmentConstraintRuleCreate` mutation. +""" +type FulfillmentConstraintRuleCreatePayload { + """ + The newly created fulfillment constraint rule. + """ + fulfillmentConstraintRule: FulfillmentConstraintRule + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleCreateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleCreate`. +""" +type FulfillmentConstraintRuleCreateUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleCreateUserError`. +""" +enum FulfillmentConstraintRuleCreateUserErrorCode { + """ + 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 +} + +""" +Return type for `fulfillmentConstraintRuleDelete` mutation. +""" +type FulfillmentConstraintRuleDeletePayload { + """ + Whether or not the fulfillment constraint rule was successfully deleted. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleDeleteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleDelete`. +""" +type FulfillmentConstraintRuleDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleDeleteUserError`. +""" +enum FulfillmentConstraintRuleDeleteUserErrorCode { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentCreateV2` mutation. +""" +type FulfillmentCreateV2Payload { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The display status of a fulfillment. +""" +enum FulfillmentDisplayStatus { + """ + Displayed as **Attempted delivery**. + """ + ATTEMPTED_DELIVERY + + """ + Displayed as **Canceled**. + """ + CANCELED + + """ + Displayed as **Confirmed**. + """ + CONFIRMED + + """ + Displayed as **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 **Submitted**. + """ + SUBMITTED +} + +""" +An auto-generated type which holds one Fulfillment and a cursor during pagination. +""" +type FulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEdge. + """ + node: Fulfillment! +} + +""" +The fulfillment event that describes the fulfilllment status at a particular time. +""" +type FulfillmentEvent implements Node { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The date and time when the fulfillment event was created. + """ + createdAt: DateTime! + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The time at which this fulfillment event happened. + """ + happenedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latitude where this fulfillment event occurred. + """ + latitude: Float + + """ + The longitude where this fulfillment event occurred. + """ + longitude: Float + + """ + A message associated with this fulfillment event. + """ + message: String + + """ + The province where this fulfillment event occurred. + """ + province: String + + """ + The status of this fulfillment event. + """ + status: FulfillmentEventStatus! + + """ + The zip code of the location where this fulfillment event occurred. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple FulfillmentEvents. +""" +type FulfillmentEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEventEdge!]! + + """ + A list of nodes that are contained in FulfillmentEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `fulfillmentEventCreate` mutation. +""" +type FulfillmentEventCreatePayload { + """ + The created fulfillment event. + """ + fulfillmentEvent: FulfillmentEvent + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one FulfillmentEvent and a cursor during pagination. +""" +type FulfillmentEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEventEdge. + """ + node: FulfillmentEvent! +} + +""" +The input fields used to create a fulfillment event. +""" +input FulfillmentEventInput { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The ID for the fulfillment that's associated with this fulfillment event. + """ + fulfillmentId: ID! + + """ + 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 { + """ + Sort by the `happened_at` value. + """ + HAPPENED_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 +} + +""" +The status that describes a fulfillment or delivery event. +""" +enum FulfillmentEventStatus { + """ + A delivery was attempted. + """ + ATTEMPTED_DELIVERY + + """ + The fulfillment is confirmed. This is the default value when no other information is available. + """ + CONFIRMED + + """ + 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 is ready to be picked up. + """ + READY_FOR_PICKUP +} + +""" +A fulfillment hold currently applied on a fulfillment order. +""" +type FulfillmentHold { + """ + The name of the app or service that applied the fulfillment hold. + """ + heldBy: String @deprecated(reason: "Use `heldByApp.title` instead.\nFor more information, see the following [changelog post](https:\/\/shopify.dev\/changelog\/update-to-fulfillmenthold-heldbyapp-field-from-fulfillmenthold-heldby-field).\nThis will be removed in 2025-01.\n") + + """ + The reason for the fulfillment hold. + """ + reason: FulfillmentHoldReason! + + """ + Additional information about the fulfillment hold reason. + """ + reasonNotes: String +} + +""" +The reason for a fulfillment hold. +""" +enum FulfillmentHoldReason { + """ + The fulfillment hold is applied because payment is pending. + """ + AWAITING_PAYMENT + + """ + The fulfillment hold is applied because of 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 +} + +""" +Represents a line item from an order that's included in a fulfillment. +""" +type FulfillmentLineItem implements Node { + """ + The total price after discounts are applied. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total price after discounts are applied in shop and presentment + currencies. This value doesn't include order-level discounts. + """ + discountedTotalSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The associated order's line item. + """ + lineItem: LineItem! + + """ + The total price before discounts are applied. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price before discounts are applied in shop and presentment currencies. + """ + originalTotalSet: MoneyBag! + + """ + Number of line items in the fulfillment. + """ + quantity: Int +} + +""" +An auto-generated type for paginating through multiple FulfillmentLineItems. +""" +type FulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. +""" +type FulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentLineItemEdge. + """ + node: FulfillmentLineItem! +} + +""" +The FulfillmentOrder object represents either an item or a group of items in an +[Order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +that are expected to be fulfilled from the same location. +There can be more than one fulfillment order for an +[order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +at a given location. + +{{ '/api/reference/fulfillment_order_relationships.png' | image }} + +Fulfillment orders represent the work which is intended to be done in relation to an order. +When fulfillment has started for one or more line items, a +[Fulfillment](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment) +is created by a merchant or third party to represent the ongoing or completed work of fulfillment. + +[See below for more details on creating fulfillments](#the-lifecycle-of-a-fulfillment-order-at-a-location-which-is-managed-by-a-fulfillment-service). + +> Note: +> Shopify creates fulfillment orders automatically when an order is created. +> It is not possible to manually create fulfillment orders. +> +> [See below for more details on the lifecycle of a fulfillment order](#the-lifecycle-of-a-fulfillment-order). + +## Retrieving fulfillment orders + +### Fulfillment orders from an order + +All fulfillment orders related to a given order can be retrieved with the +[Order.fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/objects/Order#connection-order-fulfillmentorders) +connection. + +[API access scopes](#api-access-scopes) +govern which fulfillments orders are returned to clients. +An API client will only receive a subset of the fulfillment orders which belong to an order +if they don't have the necessary access scopes to view all of the fulfillment orders. + +### Fulfillment orders assigned to the app for fulfillment + +Fulfillment service apps can retrieve the fulfillment orders which have been assigned to their locations with the +[assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) +connection. +Use the `assignmentStatus` argument to control whether all assigned fulfillment orders +should be returned or only those where a merchant has sent a +[fulfillment request](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderMerchantRequest) +and it has yet to be responded to. + +The API client must be granted the `read_assigned_fulfillment_orders` access scope to access +the assigned fulfillment orders. + +### All fulfillment orders + +Apps can retrieve all fulfillment orders with the +[fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/queries/fulfillmentOrders) +query. This query returns all assigned, merchant-managed, and third-party fulfillment orders on the shop, +which are accessible to the app according to the +[fulfillment order access scopes](#api-access-scopes) it was granted with. + +## The lifecycle of a fulfillment order + +### Fulfillment Order Creation + +After an order is created, a background worker performs the order routing process which determines +which locations will be responsible for fulfilling the purchased items. +Once the order routing process is complete, one or more fulfillment orders will be created +and assigned to these locations. It is not possible to manually create fulfillment orders. + +Once a fulfillment order has been created, it will have one of two different lifecycles depending on +the type of location which the fulfillment order is assigned to. + +### The lifecycle of a fulfillment order at a merchant managed location + +Fulfillment orders are completed by creating +[fulfillments](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment). +Fulfillments represents the work done. + +For digital products a merchant or an order management app would create a fulfilment once the digital asset +has been provisioned. +For example, in the case of a digital gift card, a merchant would to do this once +the gift card has been activated - before the email has been shipped. + +On the other hand, for a traditional shipped order, +a merchant or an order management app would create a fulfillment after picking and packing the items relating +to a fulfillment order, but before the courier has collected the goods. + +[Learn about managing fulfillment orders as an order management app](https://shopify.dev/apps/fulfillment/order-management-apps/manage-fulfillments). + +### The lifecycle of a fulfillment order at a location which is managed by a fulfillment service + +For fulfillment orders which are assigned to a location that is managed by a fulfillment service, +a merchant or an Order Management App can +[send a fulfillment request](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitFulfillmentRequest) +to the fulfillment service which operates the location to request that they fulfill the associated items. +A fulfillment service has the option to +[accept](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderAcceptFulfillmentRequest) +or [reject](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderRejectFulfillmentRequest) +this fulfillment request. + +Once the fulfillment service has accepted the request, the request can no longer be cancelled by the merchant +or order management app and instead a +[cancellation request must be submitted](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitCancellationRequest) +to the fulfillment service. + +Once a fulfillment service accepts a fulfillment request, +then after they are ready to pack items and send them for delivery, they create fulfillments with the +[fulfillmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentCreate) +mutation. +They can provide tracking information right away or create fulfillments without it and then +update the tracking information for fulfillments with the +[fulfillmentTrackingInfoUpdate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentTrackingInfoUpdate) +mutation. + +[Learn about managing fulfillment orders as a fulfillment service](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments). + +## API access scopes + +Fulfillment orders are governed by the following API access scopes: + +* The `read_merchant_managed_fulfillment_orders` and + `write_merchant_managed_fulfillment_orders` access scopes + grant access to fulfillment orders assigned to merchant-managed locations. +* The `read_assigned_fulfillment_orders` and `write_assigned_fulfillment_orders` + access scopes are intended for fulfillment services. + These scopes grant access to fulfillment orders assigned to locations that are being managed + by fulfillment services. +* The `read_third_party_fulfillment_orders` and `write_third_party_fulfillment_orders` + access scopes grant access to fulfillment orders + assigned to locations managed by other fulfillment services. + +### Fulfillment service app access scopes + +Usually, **fulfillment services** have the `write_assigned_fulfillment_orders` access scope +and don't have the `*_third_party_fulfillment_orders` +or `*_merchant_managed_fulfillment_orders` access scopes. +The app will only have access to the fulfillment orders assigned to their location +(or multiple locations if the app registers multiple fulfillment services on the shop). +The app will not have access to fulfillment orders assigned to merchant-managed locations +or locations owned by other fulfillment service apps. + +### Order management app access scopes + +**Order management apps** will usually request `write_merchant_managed_fulfillment_orders` and +`write_third_party_fulfillment_orders` access scopes. This will allow them to manage all fulfillment orders +on behalf of a merchant. + +If an app combines the functions of an order management app and a fulfillment service, +then the app should request all +access scopes to manage all assigned and all unassigned fulfillment orders. + +## Notifications about fulfillment orders + +Fulfillment services are required to +[register](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) +a self-hosted callback URL which has a number of uses. One of these uses is that this callback URL will be notified +whenever a merchant submits a fulfillment or cancellation request. + +Both merchants and apps can +[subscribe](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#webhooks) +to the +[fulfillment order webhooks](https://shopify.dev/api/admin-graphql/latest/enums/WebhookSubscriptionTopic#value-fulfillmentorderscancellationrequestaccepted) +to be notified whenever fulfillment order related domain events occur. + +[Learn about fulfillment workflows](https://shopify.dev/apps/fulfillment). +""" +type FulfillmentOrder implements Node { + """ + The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen. + + The fulfillment order's assigned location might change in the following cases: + + - The fulfillment order has been entirely moved to a new location. For example, the [fulfillmentOrderMove]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove + ) mutation has been called, and you see the original fulfillment order in the [movedFulfillmentOrder]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove#field-fulfillmentordermovepayload-movedfulfillmentorder + ) field within the mutation's response. + - Work on the fulfillment order hasn't yet begun, which means that the fulfillment order has the + [OPEN](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-open), + [SCHEDULED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-scheduled), or + [ON_HOLD](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-onhold) + status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin). + """ + assignedLocation: FulfillmentOrderAssignedLocation! + + """ + ID of the channel that created the order. + """ + channelId: ID + + """ + Date and time when the fulfillment order was created. + """ + createdAt: DateTime! + + """ + Delivery method of this fulfillment order. + """ + deliveryMethod: DeliveryMethod + + """ + The destination where the items should be sent. + """ + destination: FulfillmentOrderDestination + + """ + The date and time at which the fulfillment order will be fulfillable. When + this date and time is reached, the scheduled fulfillment order is + automatically transitioned to open. For example, the `fulfill_at` date for a + subscription order might be the 1st of each month, a pre-order `fulfill_at` + date would be `nil`, and a standard order `fulfill_at` date would be the order creation date. + """ + fulfillAt: DateTime + + """ + The latest date and time by which all items in the fulfillment order need to be fulfilled. + """ + fulfillBy: DateTime + + """ + The fulfillment holds applied on the fulfillment order. + """ + fulfillmentHolds: [FulfillmentHold!]! + + """ + Fulfillment orders eligible for merging with the given fulfillment order. + """ + fulfillmentOrdersForMerge( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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!] = [] + + """ + Specific Location ids to check for the movability for a fulfillment order. + """ + locationIds: [ID!] + + """ + 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 | + | 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 request status of the fulfillment order. + """ + requestStatus: FulfillmentOrderRequestStatus! + + """ + The status of the fulfillment order. + """ + status: FulfillmentOrderStatus! + + """ + The actions that can be performed on this fulfillment order. + """ + supportedActions: [FulfillmentOrderSupportedAction!]! + + """ + The date and time when the fulfillment order was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fulfillmentOrderAcceptCancellationRequest` mutation. +""" +type FulfillmentOrderAcceptCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderAcceptFulfillmentRequest` mutation. +""" +type FulfillmentOrderAcceptFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The actions that can be taken on a fulfillment order. +""" +enum FulfillmentOrderAction { + """ + 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 + + """ + 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 { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The two-letter country code of the location. + """ + countryCode: CountryCode! + + """ + The location where the fulfillment is expected to happen. This value might be different from + `FulfillmentOrderAssignedLocation` if the location's attributes were updated + after the fulfillment order was taken into work of canceled. + """ + location: Location + + """ + The name of the location. + """ + name: String! + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +The assigment status to be used to filter fulfillment orders. +""" +enum FulfillmentOrderAssignmentStatus { + """ + Fulfillment orders for which the merchant has requested cancellation of + the previously accepted fulfillment request. + """ + CANCELLATION_REQUESTED + + """ + Fulfillment orders for which the merchant'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 +} + +""" +Return type for `fulfillmentOrderCancel` mutation. +""" +type FulfillmentOrderCancelPayload { + """ + The fulfillment order that was marked as canceled. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was created to replace the canceled fulfillment order. + """ + replacementFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderClose` mutation. +""" +type FulfillmentOrderClosePayload { + """ + The fulfillment order that was marked as incomplete. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrders. +""" +type FulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the destination where the items should be sent upon fulfillment. +""" +type FulfillmentOrderDestination implements Node { + """ + The first line of the address of the destination. + """ + address1: String + + """ + The second line of the address of the destination. + """ + address2: String + + """ + The city of the destination. + """ + city: String + + """ + The company of the destination. + """ + company: String + + """ + The two-letter country code of the destination. + """ + countryCode: CountryCode + + """ + The email of the customer at the destination. + """ + email: String + + """ + The first name of the customer at the destination. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer at the destination. + """ + lastName: String + + """ + The phone number of the customer at the destination. + """ + phone: String + + """ + The province of the destination. + """ + province: String + + """ + The ZIP code of the destination. + """ + zip: String +} + +""" +An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. +""" +type FulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderEdge. + """ + node: FulfillmentOrder! +} + +""" +The input fields for the fulfillment hold applied on the fulfillment order. +""" +input FulfillmentOrderHoldInput { + """ + 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. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] = [] + + """ + 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 { + """ + The fulfillment order on which a fulfillment hold was applied. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The remaining fulfillment order containing the line items to which the hold wasn't applied, + if specific line items were specified to be placed on hold. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderHold`. +""" +type FulfillmentOrderHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderHoldUserError`. +""" +enum FulfillmentOrderHoldUserErrorCode { + """ + The fulfillment order 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 { + """ + The method of duties payment. Example values: `DDP`, `DAP`. + """ + incoterm: String! +} + +""" +Associates an order line item with quantities requiring fulfillment from the respective fulfillment order. +""" +type FulfillmentOrderLineItem implements Node { + """ + The financial summary for the Fulfillment Order's Line Items. + """ + financialSummaries: [FulfillmentOrderLineItemFinancialSummary!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image: Image + + """ + The ID of the inventory item. + """ + inventoryItemId: ID + + """ + The associated order line item. + """ + lineItem: LineItem! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! @deprecated(reason: "Use `financialSummaries` instead.") + + """ + The title of the product. + """ + productTitle: String! + + """ + The number of units remaining to be fulfilled. + """ + remainingQuantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + The total number of units to be fulfilled. + """ + totalQuantity: Int! + + """ + The product variant associated to the fulfillment order line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String + + """ + Warning messages for a fulfillment order line item. + """ + warnings: [FulfillmentOrderLineItemWarning!]! + + """ + The weight of a line item unit. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderLineItems. +""" +type FulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [FulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLineItem and a cursor during pagination. +""" +type FulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLineItemEdge. + """ + node: FulfillmentOrderLineItem! +} + +""" +The financial details of a fulfillment order line item. +""" +type FulfillmentOrderLineItemFinancialSummary { + """ + The approximate split price of a line item unit, in shop and presentment + currencies. This value doesn't include discounts applied to the entire + order.For the full picture of applied discounts, see discountAllocations. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The discounts that have been allocated onto the line item by discount applications, not including order edits and refunds. + """ + discountAllocations: [FinancialSummaryDiscountAllocation!]! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! + + """ + Number of line items that this financial summary applies to. + """ + quantity: Int! +} + +""" +The input fields used to include the quantity of the fulfillment order line item that should be fulfilled. +""" +input FulfillmentOrderLineItemInput { + """ + The ID of the fulfillment order line item. + """ + id: ID! + + """ + The quantity of the fulfillment order line item. + """ + quantity: Int! +} + +""" +A fulfillment order line item warning. For example, a warning about why a fulfillment request was rejected. +""" +type FulfillmentOrderLineItemWarning { + """ + The description of warning. + """ + description: String + + """ + The title of warning. + """ + title: String +} + +""" +The input fields used to include the line items of a specified fulfillment order that should be fulfilled. +""" +input FulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be fulfilled. + If left blank, all line items of the fulfillment order will be fulfilled. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +The input fields for marking fulfillment order line items as ready for pickup. +""" +input FulfillmentOrderLineItemsPreparedForPickupInput { + """ + The fulfillment orders associated with the line items which are ready to be picked up by a customer. + """ + lineItemsByFulfillmentOrder: [PreparedFulfillmentOrderLineItemsInput!]! +} + +""" +Return type for `fulfillmentOrderLineItemsPreparedForPickup` mutation. +""" +type FulfillmentOrderLineItemsPreparedForPickupPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderLineItemsPreparedForPickupUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderLineItemsPreparedForPickup`. +""" +type FulfillmentOrderLineItemsPreparedForPickupUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderLineItemsPreparedForPickupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderLineItemsPreparedForPickupUserError`. +""" +enum FulfillmentOrderLineItemsPreparedForPickupUserErrorCode { + """ + 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 { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLocationForMoveEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLocationForMoveEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderLocationForMove!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination. +""" +type FulfillmentOrderLocationForMoveEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLocationForMoveEdge. + """ + node: FulfillmentOrderLocationForMove! +} + +""" +A request made by the merchant or an order management app to a fulfillment service +for a fulfillment order. +""" +type FulfillmentOrderMerchantRequest implements Node { + """ + The fulfillment order associated with the merchant request. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The kind of request made. + """ + kind: FulfillmentOrderMerchantRequestKind! + + """ + The optional message that the merchant included in the request. + """ + message: String + + """ + Additional options requested by the merchant. These depend on the `kind` of the request. + For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the + merchant intends to notify the customer upon fulfillment. The fulfillment service can then set + `notifyCustomer` when making calls to `FulfillmentCreate`. + """ + requestOptions: JSON + + """ + The response from the fulfillment service. + """ + responseData: JSON + + """ + The timestamp when the request was made. + """ + sentAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests. +""" +type FulfillmentOrderMerchantRequestConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderMerchantRequestEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderMerchantRequestEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderMerchantRequest!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination. +""" +type FulfillmentOrderMerchantRequestEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderMerchantRequestEdge. + """ + node: FulfillmentOrderMerchantRequest! +} + +""" +The kinds of request merchants can make to a fulfillment service. +""" +enum FulfillmentOrderMerchantRequestKind { + """ + The merchant requests 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 { + """ + The details of the fulfillment orders to be merged. + """ + mergeIntents: [FulfillmentOrderMergeInputMergeIntent!]! +} + +""" +The input fields for merging fulfillment orders into a single merged fulfillment order. +""" +input FulfillmentOrderMergeInputMergeIntent { + """ + The ID of the fulfillment order to be merged. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be merged. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +Return type for `fulfillmentOrderMerge` mutation. +""" +type FulfillmentOrderMergePayload { + """ + The result of the fulfillment order merges. + """ + fulfillmentOrderMerges: [FulfillmentOrderMergeResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderMergeUserError!]! +} + +""" +The result of merging a set of fulfillment orders. +""" +type FulfillmentOrderMergeResult { + """ + The new fulfillment order as a result of the merge. + """ + fulfillmentOrder: FulfillmentOrder! +} + +""" +An error that occurs during the execution of `FulfillmentOrderMerge`. +""" +type FulfillmentOrderMergeUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderMergeUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderMergeUserError`. +""" +enum FulfillmentOrderMergeUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY +} + +""" +Return type for `fulfillmentOrderMove` mutation. +""" +type FulfillmentOrderMovePayload { + """ + The fulfillment order which now contains the moved line items and is assigned to the destination location. + + If the original fulfillment order doesn't have any line items which are fully + or partially fulfilled, the original fulfillment order will be moved to the new location. + However if this isn't the case, the moved fulfillment order will differ from the original one. + """ + movedFulfillmentOrder: FulfillmentOrder + + """ + The final state of the original fulfillment order. + + As a result of the move operation, the original fulfillment order might be moved to the new location + or remain in the original location. The original fulfillment order might have the same status or be closed. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + This field is deprecated. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderOpen` mutation. +""" +type FulfillmentOrderOpenPayload { + """ + The fulfillment order that was transitioned to open and is fulfillable. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectCancellationRequest` mutation. +""" +type FulfillmentOrderRejectCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectFulfillmentRequest` mutation. +""" +type FulfillmentOrderRejectFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The reason for a fulfillment order rejection. +""" +enum FulfillmentOrderRejectionReason { + """ + The fulfillment order was rejected because of an incorrect address. + """ + INCORRECT_ADDRESS + + """ + The fulfillment order was rejected because of an ineligible product. + """ + INELIGIBLE_PRODUCT + + """ + The fulfillment order was rejected because inventory is out of stock. + """ + INVENTORY_OUT_OF_STOCK + + """ + The fulfillment order was rejected for another reason. + """ + OTHER + + """ + The fulfillment order was rejected because of an undeliverable destination. + """ + UNDELIVERABLE_DESTINATION +} + +""" +Return type for `fulfillmentOrderReleaseHold` mutation. +""" +type FulfillmentOrderReleaseHoldPayload { + """ + The fulfillment order on which the hold was released. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderReleaseHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReleaseHold`. +""" +type FulfillmentOrderReleaseHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderReleaseHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderReleaseHoldUserError`. +""" +enum FulfillmentOrderReleaseHoldUserErrorCode { + """ + The fulfillment order wasn't found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The 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 request status of a fulfillment order. +""" +enum FulfillmentOrderRequestStatus { + """ + 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 { + """ + A fulfillment order with the rescheduled line items. + + Fulfillment orders may be merged if they have the same `fulfillAt` datetime. + + If the fulfillment order is merged then the resulting fulfillment order will be returned. + Otherwise the original fulfillment order will be returned with an updated `fulfillAt` datetime. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderRescheduleUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReschedule`. +""" +type FulfillmentOrderRescheduleUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderRescheduleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderRescheduleUserError`. +""" +enum FulfillmentOrderRescheduleUserErrorCode { + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND +} + +""" +The set of valid sort keys for the FulfillmentOrder query. +""" +enum FulfillmentOrderSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by 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 input fields for the split applied to the fulfillment order. +""" +input FulfillmentOrderSplitInput { + """ + The ID of the fulfillment order to be split. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be split out. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! +} + +""" +Return type for `fulfillmentOrderSplit` mutation. +""" +type FulfillmentOrderSplitPayload { + """ + The result of the fulfillment order splits. + """ + fulfillmentOrderSplits: [FulfillmentOrderSplitResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderSplitUserError!]! +} + +""" +The result of splitting a fulfillment order. +""" +type FulfillmentOrderSplitResult { + """ + The original fulfillment order as a result of the split. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + The remaining fulfillment order as a result of the split. + """ + remainingFulfillmentOrder: FulfillmentOrder! + + """ + The replacement fulfillment order if the original fulfillment order wasn't in a state to be split. + """ + replacementFulfillmentOrder: FulfillmentOrder +} + +""" +An error that occurs during the execution of `FulfillmentOrderSplit`. +""" +type FulfillmentOrderSplitUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderSplitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderSplitUserError`. +""" +enum FulfillmentOrderSplitUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY + + """ + The fulfillment order must have at least one line item input to split. + """ + NO_LINE_ITEMS_PROVIDED_TO_SPLIT +} + +""" +The status of a fulfillment order. +""" +enum FulfillmentOrderStatus { + """ + The fulfillment order 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 { + """ + The fulfillment order specified in the cancelation request. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderSubmitFulfillmentRequest` mutation. +""" +type FulfillmentOrderSubmitFulfillmentRequestPayload { + """ + The original fulfillment order intended to request fulfillment for. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was submitted to the fulfillment service. This will be the same as + the original fulfillment order field. The exception to this is partial fulfillment requests or + fulfillment request for cancelled or incomplete fulfillment orders. + """ + submittedFulfillmentOrder: FulfillmentOrder + + """ + This field will only be present for partial fulfillment requests. This will represent the new + fulfillment order with the remaining line items not submitted to the fulfillment service. + """ + unsubmittedFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +One of the actions that the fulfillment order supports in its current state. +""" +type FulfillmentOrderSupportedAction { + """ + The action value. + """ + action: FulfillmentOrderAction! + + """ + The external URL to be used to initiate the fulfillment process outside Shopify. + Applicable only when the `action` value is `EXTERNAL`. + """ + externalUrl: URL +} + +""" +Return type for `fulfillmentOrdersReleaseHolds` mutation. +""" +type FulfillmentOrdersReleaseHoldsPayload { + """ + The asynchronous job that will release the fulfillment holds. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersReleaseHoldsUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersReleaseHolds`. +""" +type FulfillmentOrdersReleaseHoldsUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersReleaseHoldsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersReleaseHoldsUserError`. +""" +enum FulfillmentOrdersReleaseHoldsUserErrorCode { + """ + Failed to create release fulfillment order holds job. + """ + FAILED_TO_CREATE_JOB +} + +""" +Return type for `fulfillmentOrdersSetFulfillmentDeadline` mutation. +""" +type FulfillmentOrdersSetFulfillmentDeadlinePayload { + """ + Whether the fulfillment deadline was successfully set. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersSetFulfillmentDeadlineUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersSetFulfillmentDeadline`. +""" +type FulfillmentOrdersSetFulfillmentDeadlineUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersSetFulfillmentDeadlineUserError`. +""" +enum FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode { + """ + The fulfillment orders could not be found. + """ + FULFILLMENT_ORDERS_NOT_FOUND +} + +""" +The address at which the fulfillment occurred. This object is intended for tax +purposes, as a full address is required for tax providers to accurately +calculate taxes. Typically this is the address of the warehouse or fulfillment +center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +type FulfillmentOriginAddress { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The country code of the fulfillment location. + """ + countryCode: String! + + """ + The province code of the fulfillment location. + """ + provinceCode: String + + """ + The zip code of the fulfillment location. + """ + zip: String +} + +""" +The input fields used to include the address at which the fulfillment occurred. +This input object is intended for tax purposes, as a full address is required +for tax providers to accurately calculate taxes. Typically this is the address +of the warehouse or fulfillment center. To retrieve a fulfillment location's +address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +input FulfillmentOriginAddressInput { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The 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 { + """ + The callback URL that the fulfillment service has registered for requests. The following considerations apply: + + - Shopify queries the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the `/fetch_stock` endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the `/fulfillment_order_notification` endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support). + """ + callbackUrl: URL + + """ + Whether the fulfillment service uses the [fulfillment order based workflow](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments) + for managing fulfillments. + + As the migration is now finished, the `fulfillmentOrdersOptIn` property is [deprecated]( + https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field) + and is always set to `true` on correctly functioning fulfillment services. + """ + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: "Migration period ended. All correctly functioning fulfillment services have `fulfillmentOrdersOptIn` set to `true`.") + + """ + Human-readable unique identifier for this fulfillment service. + """ + handle: String! + + """ + The ID of the fulfillment service. + """ + id: ID! + + """ + Whether the fulfillment service tracks product inventory and provides updates to Shopify. + """ + inventoryManagement: Boolean! + + """ + Location associated with the fulfillment service. + """ + location: Location + + """ + Whether the fulfillment service can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean! @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https:\/\/shopify.dev\/changelog\/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\n") + + """ + The name of the fulfillment service as seen by merchants. + """ + serviceName: String! + + """ + Shipping methods associated with the fulfillment service provider. Applies only to Fulfill By Amazon fulfillment service. + """ + shippingMethods: [ShippingMethod!]! @deprecated(reason: "The Fulfillment by Amazon feature will no longer be supported from March 30, 2023. To continue using Amazon fulfillment, merchants need to set up a Multi-Channel Fulfillment solution recommended by Amazon: https:\/\/help.shopify.com\/manual\/shipping\/fulfillment-services\/amazon#activate-fulfillment-by-amazon. This will be removed in 2024-10.") + + """ + Whether the fulfillment service implemented the /fetch_tracking_numbers endpoint. + """ + trackingSupport: Boolean! + + """ + Type associated with the fulfillment service. + """ + type: FulfillmentServiceType! +} + +""" +Return type for `fulfillmentServiceCreate` mutation. +""" +type FulfillmentServiceCreatePayload { + """ + The created fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentServiceDelete` mutation. +""" +type FulfillmentServiceDeletePayload { + """ + The ID of the deleted fulfillment service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The type of a fulfillment service. +""" +enum FulfillmentServiceType { + """ + Fulfillment by gift card. + """ + GIFT_CARD + + """ + Manual fulfillment by the merchant. + """ + MANUAL + + """ + Fullfillment by a third-party fulfillment service. + """ + THIRD_PARTY +} + +""" +Return type for `fulfillmentServiceUpdate` mutation. +""" +type FulfillmentServiceUpdatePayload { + """ + The updated fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The status of a fulfillment. +""" +enum FulfillmentStatus { + """ + 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 { + """ + 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 `fulfillmentTrackingInfoUpdateV2` mutation. +""" +type FulfillmentTrackingInfoUpdateV2Payload { + """ + The updated fulfillment with tracking information. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields that specify all possible fields for tracking information. + +> Note: +> If you provide the `url` field, you should not provide the `urls` field. +> +> If you provide the `number` field, you should not provide the `numbers` field. +> +> If you provide the `url` field, you should provide the `number` field. +> +> If you provide the `urls` field, you should provide the `numbers` field. +""" +input FulfillmentTrackingInput { + """ + The 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 { + """ + 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 +} + +""" +The App Bridge information for a Shopify Function. +""" +type FunctionsAppBridge { + """ + The relative path for creating a customization. + """ + createPath: String! + + """ + The relative path for viewing a customization. + """ + detailsPath: String! +} + +""" +The error history from running a Shopify Function. +""" +type FunctionsErrorHistory { + """ + The date and time that the first error occurred. + """ + errorsFirstOccurredAt: DateTime! + + """ + The date and time that the first error occurred. + """ + firstOccurredAt: DateTime! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasBeenSharedSinceLastError: Boolean! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasSharedRecentErrors: Boolean! +} + +""" +Represents any file other than HTML. +""" +type GenericFile implements File & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The generic file's MIME type. + """ + mimeType: String + + """ + The generic file's size in bytes. + """ + originalFileSize: Int + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! + + """ + The generic file's URL. + """ + url: URL +} + +""" +Represents an issued gift card. +""" +type GiftCard implements Node { + """ + The gift card's remaining balance. + """ + balance: MoneyV2! + + """ + The date and time at which the gift card was created. + """ + createdAt: DateTime! + + """ + The customer who will receive the gift card. + """ + customer: Customer + + """ + The date and time at which the gift card was disabled. + """ + disabledAt: DateTime @deprecated(reason: "Use `deactivatedAt` instead. This will be removed in 2024-10.") + + """ + Whether the gift card is enabled. + """ + enabled: Boolean! + + """ + The date at which the gift card will expire. + """ + expiresOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The initial value of the gift card. + """ + initialValue: MoneyV2! + + """ + The final four characters of the gift card code. + """ + lastCharacters: String! + + """ + The gift card code. Everything but the final four characters is masked. + """ + maskedCode: String! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The order associated with the gift card. This value is `null` if the gift card was issued manually. + """ + order: Order +} + +""" +An auto-generated type for paginating through multiple GiftCards. +""" +type GiftCardConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardEdge!]! + + """ + A list of nodes that are contained in GiftCardEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [GiftCard!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to issue a gift card. +""" +input GiftCardCreateInput { + """ + The gift card's code. It must be 8-20 characters long and contain only letters(a-z) and numbers(0-9). + It isn't case sensitive. If not provided, then a random code will be generated. + """ + code: String + + """ + The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. + """ + customerId: ID + + """ + The date at which the gift card will expire. If not provided, then the gift card will never expire. + """ + expiresOn: Date + + """ + The initial value of the gift card. + """ + initialValue: Decimal! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + If not provided, then the default `gift_card.liquid` template is used. + """ + templateSuffix: String +} + +""" +Return type for `giftCardCreate` mutation. +""" +type GiftCardCreatePayload { + """ + The created gift card. + """ + giftCard: GiftCard + + """ + The created gift card's code. + """ + giftCardCode: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardUserError!]! +} + +""" +Return type for `giftCardDisable` mutation. +""" +type GiftCardDisablePayload { + """ + The disabled gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one GiftCard and a cursor during pagination. +""" +type GiftCardEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of GiftCardEdge. + """ + node: GiftCard! +} + +""" +Possible error codes that can be returned by `GiftCardUserError`. +""" +enum GiftCardErrorCode { + """ + The 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 + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT +} + +""" +A sale associated with a gift card. +""" +type GiftCardSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line item for the associated sale. + """ + lineItem: LineItem! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The set of valid sort keys for the GiftCard query. +""" +enum GiftCardSortKeys { + """ + Sort by the `amount_spent` value. + """ + AMOUNT_SPENT + + """ + Sort by the `balance` value. + """ + BALANCE + + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `disabled_at` value. + """ + DISABLED_AT + + """ + Sort by the `expires_on` value. + """ + EXPIRES_ON + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `initial_value` value. + """ + INITIAL_VALUE + + """ + Sort by 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 input fields to update a gift card. +""" +input GiftCardUpdateInput { + """ + The ID of the customer who will receive the gift card. The ID can't be changed + if the gift card already has an assigned customer ID. + """ + customerId: ID + + """ + The 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 + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + """ + templateSuffix: String +} + +""" +Return type for `giftCardUpdate` mutation. +""" +type GiftCardUpdatePayload { + """ + The updated gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents an error that happens during the execution of a gift card mutation. +""" +type GiftCardUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a +complete list of HTML elements. + +Example value: `"

Grey cotton knit sweater.

"` +""" +scalar HTML + +""" +Represents a summary of the current version of data in a resource. + +The `compare_digest` field can be used as input for mutations that implement a compare-and-swap mechanism. +""" +interface HasCompareDigest { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! +} + +""" +Represents an object that has a list of events. +""" +interface HasEvents { + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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 { + """ + 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.") +} + +""" +Resources that metafield definitions can be applied to. +""" +interface HasMetafieldDefinitions { + """ + 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 { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +Published translations associated with the resource. +""" +interface HasPublishedTranslations { + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Represents information about the store credit accounts associated to the specified owner. +""" +interface HasStoreCreditAccounts { + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! +} + +""" +Represents a unique identifier, often used to refetch an object. +The ID type appears in a JSON response as a String, but it is not intended to be human-readable. + +Example value: `"gid://shopify/Product/10079785100"` +""" +scalar ID + +""" +Represents an image resource. +""" +type Image implements HasMetafields { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The location of the original image as a URL. + + If there are any existing transformations in the original source URL, they will remain and not be stripped. + """ + originalSrc: URL! @deprecated(reason: "Use `url` instead.") + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The location of the image as a URL. + """ + src: URL! @deprecated(reason: "Use `url` instead.") + + """ + 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 location of the image as a URL. + + If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + + All transformation options are considered "best-effort". Any transformation + that the original image type doesn't support will be ignored. + + If you need multiple variations of the same image, then you can use [GraphQL + aliases](https://graphql.org/learn/queries/#aliases). + """ + url( + """ + A set of options to transform the original image. + """ + transform: ImageTransformInput + ): URL! + + """ + The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + width: Int +} + +""" +An auto-generated type for paginating through multiple Images. +""" +type ImageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ImageEdge!]! + + """ + A list of nodes that are contained in ImageEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Image!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +List of supported image content types. +""" +enum ImageContentType { + """ + A 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ImageEdge. + """ + node: Image! +} + +""" +The input fields for an image. +""" +input ImageInput { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + A globally-unique ID. + """ + id: ID + + """ + The URL of the image. May be a staged upload URL. + """ + src: String +} + +""" +The available options for transforming an image. + +All transformation options are considered best effort. Any transformation that +the original image type doesn't support will be ignored. +""" +input ImageTransformInput { + """ + The region of the image to remain after cropping. + Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, + where the `maxWidth` and `maxHeight` aren't equal. + The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while + a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ + maxWidth: 5, maxHeight: 10, crop: LEFT }` will result + in an image with a width of 5 and height of 10, where the right side of the image is removed. + """ + crop: CropRegion + + """ + Image 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 { + """ + The parameter name. + """ + name: String! + + """ + The parameter value. + """ + value: String! +} + +""" +The input fields for the incoming line item. +""" +input IncomingRequestLineItemInput { + """ + The ID of the rejected line item. + """ + fulfillmentOrderLineItemId: ID! + + """ + The rejection message of the line item. + """ + message: String +} + +""" +Return type for `inventoryActivate` mutation. +""" +type InventoryActivatePayload { + """ + The inventory level that was activated. + """ + inventoryLevel: InventoryLevel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields required to adjust inventory quantities. +""" +input InventoryAdjustQuantitiesInput { + """ + The 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryAdjustQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryAdjustQuantities`. +""" +type InventoryAdjustQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryAdjustQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryAdjustQuantitiesUserError`. +""" +enum InventoryAdjustQuantitiesUserErrorCode { + """ + The quantities couldn't be adjusted. Try again. + """ + ADJUST_QUANTITIES_FAILED + + """ + 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 +} + +""" +Represents a group of adjustments made as part of the same operation. +""" +type InventoryAdjustmentGroup implements Node { + """ + The app that triggered the inventory event, if one exists. + """ + app: App + + """ + The set of inventory quantity changes that occurred in the inventory event. + """ + changes( + """ + The IDs of the inventory items to filter changes by. + """ + inventoryItemIds: [ID!] + + """ + The IDs of the locations to filter changes by. + """ + locationIds: [ID!] + + """ + The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + 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 +} + +""" +The input fields to specify whether the inventory item should be activated or not at the specified location. +""" +input InventoryBulkToggleActivationInput { + """ + 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! +} + +""" +Return type for `inventoryBulkToggleActivation` mutation. +""" +type InventoryBulkToggleActivationPayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The activated inventory levels. + """ + inventoryLevels: [InventoryLevel!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryBulkToggleActivationUserError!]! +} + +""" +An error that occurred while setting the activation status of an inventory item. +""" +type InventoryBulkToggleActivationUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryBulkToggleActivationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryBulkToggleActivationUserError`. +""" +enum InventoryBulkToggleActivationUserErrorCode { + """ + 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 +} + +""" +Represents a change in an inventory quantity of an inventory item at a location. +""" +type InventoryChange { + """ + The amount by which the inventory quantity was changed. + """ + delta: Int! + + """ + The inventory item associated with this inventory change. + """ + item: InventoryItem + + """ + A URI that represents what the inventory quantity change was applied to. + """ + ledgerDocumentUri: String + + """ + The location associated with this inventory change. + """ + location: Location + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + of the inventory quantity that was changed. + """ + name: String! + + """ + The quantity of named inventory after the change. + """ + quantityAfterChange: Int +} + +""" +The input fields for the change to be made to an inventory item at a location. +""" +input InventoryChangeInput { + """ + The amount by which the inventory quantity will be changed. + """ + delta: Int! + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Required for all + quantity names except `available`. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: String + + """ + Specifies the location at which the change will be applied. + """ + locationId: ID! +} + +""" +Return type for `inventoryDeactivate` mutation. +""" +type InventoryDeactivatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents the goods available to be shipped to a customer. +It holds essential information about the goods, including SKU and whether it is tracked. +Learn [more about the relationships between inventory objects](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryItem implements LegacyInteroperability & Node { + """ + The ISO 3166-1 alpha-2 country code of where the item originated from. + """ + countryCodeOfOrigin: CountryCode + + """ + A list of country specific harmonized system codes. + """ + countryHarmonizedSystemCodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + The harmonized system code of the item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL that points to the inventory history for the item. + """ + inventoryHistoryUrl: URL + + """ + The inventory item's quantities at the specified location. + """ + inventoryLevel( + """ + ID of the location for which the inventory level is requested. + """ + locationId: ID! + ): InventoryLevel + + """ + A list of the inventory item's quantities for each location that the inventory item can be stocked at. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The number of locations where this inventory item is stocked. + """ + locationsCount: Count + + """ + The packaging dimensions of the inventory item. + """ + measurement: InventoryItemMeasurement! + + """ + The ISO 3166-2 alpha-2 province code of where the item originated from. + """ + provinceCodeOfOrigin: String + + """ + Whether the inventory item requires shipping. + """ + requiresShipping: Boolean! + + """ + Inventory item SKU. Case-sensitive string. + """ + sku: String + + """ + Whether inventory levels are tracked for the item. + """ + tracked: Boolean! + + """ + Whether the value of the `tracked` field for the inventory item can be changed. + """ + trackedEditable: EditableProperty! + + """ + Unit cost associated with the inventory item. Note: the user must have "View + product costs" permission granted in order to access this field once product + granular permissions are enabled. + """ + unitCost: MoneyV2 + + """ + The date and time when the inventory item was updated. + """ + updatedAt: DateTime! + + """ + The variant that owns this inventory item. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple InventoryItems. +""" +type InventoryItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryItemEdge!]! + + """ + A list of nodes that are contained in InventoryItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryItem and a cursor during pagination. +""" +type InventoryItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryItemEdge. + """ + node: InventoryItem! +} + +""" +The input fields for an inventory item. +""" +input InventoryItemInput { + """ + 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 +} + +""" +Represents the packaged dimension for an inventory item. +""" +type InventoryItemMeasurement implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The weight of the inventory item. + """ + weight: Weight +} + +""" +The input fields for an inventory item measurement. +""" +input InventoryItemMeasurementInput { + """ + The weight of the inventory item. + """ + weight: WeightInput +} + +""" +Return type for `inventoryItemUpdate` mutation. +""" +type InventoryItemUpdatePayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The quantities of an inventory item that are related to a specific location. +Learn [more about the relationships between inventory objects](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryLevel implements Node { + """ + Whether the inventory items associated with the inventory level can be deactivated. + """ + canDeactivate: Boolean! + + """ + The date and time when the inventory level was created. + """ + createdAt: DateTime! + + """ + Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated. + """ + deactivationAlert: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + Inventory item associated with the inventory level. + """ + item: InventoryItem! + + """ + The location associated with the inventory level. + """ + location: Location! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantities( + """ + The + [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! + + """ + The date and time when the inventory level was updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple InventoryLevels. +""" +type InventoryLevelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryLevelEdge!]! + + """ + A list of nodes that are contained in InventoryLevelEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryLevel!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryLevel and a cursor during pagination. +""" +type InventoryLevelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryLevelEdge. + """ + node: InventoryLevel! +} + +""" +The input fields for an inventory level. +""" +input InventoryLevelInput { + """ + The available quantity of an inventory item at a location. + """ + availableQuantity: Int! + + """ + The ID of a location associated with the inventory level. + """ + locationId: ID! +} + +""" +The input fields required to move inventory quantities. +""" +input InventoryMoveQuantitiesInput { + """ + The 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryMoveQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryMoveQuantities`. +""" +type InventoryMoveQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryMoveQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryMoveQuantitiesUserError`. +""" +enum InventoryMoveQuantitiesUserErrorCode { + """ + The quantities can't be moved between different locations. + """ + DIFFERENT_LOCATIONS + + """ + 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 +} + +""" +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 { + """ + Details about where the move will be made from. + """ + from: InventoryMoveQuantityTerminalInput! + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! + + """ + The amount by which the inventory quantity will be changed. + """ + quantity: Int! + + """ + Details about where the move will be made to. + """ + to: InventoryMoveQuantityTerminalInput! +} + +""" +The input fields representing the change to be made to an inventory item at a location. +""" +input InventoryMoveQuantityTerminalInput { + """ + 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! + + """ + 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 { + """ + All the quantity names. + """ + quantityNames: [InventoryQuantityName!]! +} + +""" +The `InventoryQuantity` object lets you manage and track inventory quantities for specific [states](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). +Inventory quantities represent different states of items such as available for +purchase, committed to orders, reserved for drafts, incoming from suppliers, or +set aside for quality control or safety stock. + +You can use [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel) +to manage where inventory items are stocked. You can also [make inventory adjustments](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) +to apply changes to inventory quantities. + +Inventory quantities can be managed by a merchant or by [fulfillment services](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentservice) +that handle inventory tracking. +Learn more about working with [Shopify's inventory management +system](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps). +""" +type InventoryQuantity implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory state [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + that identifies the inventory quantity. + """ + name: String! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantity: Int! + + """ + When the inventory quantity was last updated. + """ + updatedAt: DateTime +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventoryQuantityInput { + """ + The current quantity to be compared against the persisted quantity. + """ + compareQuantity: Int + + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +Details about an individual quantity name. +""" +type InventoryQuantityName { + """ + List of quantity names that this quantity name belongs to. + """ + belongsTo: [String!]! + + """ + List of quantity names that comprise this quantity name. + """ + comprises: [String!]! + + """ + The display name for quantity names translated into applicable language. + """ + displayName: String + + """ + Whether the quantity name has been used by the merchant. + """ + isInUse: Boolean! + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) of + the inventory quantity. Used by + [inventory queries and mutations](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#graphql-queries-and-mutations). + """ + name: String! +} + +""" +Returns the scheduled changes to inventory states related to the ledger document. +""" +type InventoryScheduledChange { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantities of an inventory item that are related to a specific location. + """ + inventoryLevel: InventoryLevel! + + """ + A freeform URI that represents what changed the inventory quantities. + """ + ledgerDocumentUri: URL! + + """ + The quantity of the scheduled change associated with the ledger document in the `fromName` state. + """ + quantity: Int! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +An auto-generated type for paginating through multiple InventoryScheduledChanges. +""" +type InventoryScheduledChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryScheduledChangeEdge!]! + + """ + A list of nodes that are contained in InventoryScheduledChangeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryScheduledChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryScheduledChange and a cursor during pagination. +""" +type InventoryScheduledChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryScheduledChangeEdge. + """ + node: InventoryScheduledChange! +} + +""" +The input fields for a scheduled change of an inventory item. +""" +input InventoryScheduledChangeInput { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +The input fields for the inventory item associated with the scheduled changes that need to be applied. +""" +input InventoryScheduledChangeItemInput { + """ + The ID of the inventory item. + """ + inventoryItemId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: URL! + + """ + The ID of the location. + """ + locationId: ID! + + """ + An array of all the scheduled changes for the item. + """ + scheduledChanges: [InventoryScheduledChangeInput!]! +} + +""" +The input fields required to set inventory on hand quantities. +""" +input InventorySetOnHandQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """ + The value to which the on hand quantity will be set. + """ + setQuantities: [InventorySetQuantityInput!]! +} + +""" +Return type for `inventorySetOnHandQuantities` mutation. +""" +type InventorySetOnHandQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetOnHandQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetOnHandQuantities`. +""" +type InventorySetOnHandQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetOnHandQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetOnHandQuantitiesUserError`. +""" +enum InventorySetOnHandQuantitiesUserErrorCode { + """ + The compareQuantity value does not match persisted value. + """ + COMPARE_QUANTITY_STALE + + """ + 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 on-hand quantities couldn't be set. Try again. + """ + SET_ON_HAND_QUANTITIES_FAILED +} + +""" +The input fields required to set inventory quantities. +""" +input InventorySetQuantitiesInput { + """ + Skip the compare quantity check in the quantities field. + """ + ignoreCompareQuantity: Boolean = false + + """ + 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetQuantities`. +""" +type InventorySetQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetQuantitiesUserError`. +""" +enum InventorySetQuantitiesUserErrorCode { + """ + The compareQuantity argument must be given to each quantity or ignored using ignoreCompareQuantity. + """ + COMPARE_QUANTITY_REQUIRED + + """ + The compareQuantity value does not match persisted value. + """ + COMPARE_QUANTITY_STALE + + """ + The 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 { + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +The input fields for setting up scheduled changes of inventory items. +""" +input InventorySetScheduledChangesInput { + """ + The list of all the items on which the scheduled changes need to be applied. + """ + items: [InventoryScheduledChangeItemInput!]! + + """ + The reason for setting up the scheduled changes. + """ + 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: URL! +} + +""" +Return type for `inventorySetScheduledChanges` mutation. +""" +type InventorySetScheduledChangesPayload { + """ + The scheduled changes that were created. + """ + scheduledChanges: [InventoryScheduledChange!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetScheduledChangesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetScheduledChanges`. +""" +type InventorySetScheduledChangesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetScheduledChangesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetScheduledChangesUserError`. +""" +enum InventorySetScheduledChangesUserErrorCode { + """ + The item can only have one scheduled change for quantity name as the fromName. + """ + DUPLICATE_FROM_NAME + + """ + The item can only have one scheduled change for quantity name as the toName. + """ + DUPLICATE_TO_NAME + + """ + There was an error updating the scheduled changes. + """ + ERROR_UPDATING_SCHEDULED + + """ + The specified field is invalid. + """ + INCLUSION + + """ + The specified fromName is invalid. + """ + INVALID_FROM_NAME + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified toName is invalid. + """ + INVALID_TO_NAME + + """ + The inventory item was not found. + """ + INVENTORY_ITEM_NOT_FOUND + + """ + The inventory item was not found at the location specified. + """ + INVENTORY_STATE_NOT_FOUND + + """ + At least 1 item must be provided. + """ + ITEMS_EMPTY + + """ + The ledger document URI is invalid. + """ + LEDGER_DOCUMENT_INVALID + + """ + The location couldn't be found. + """ + LOCATION_NOT_FOUND + + """ + The from_name and to_name can't be the same. + """ + SAME_FROM_TO_NAMES +} + +""" +A [JSON](https://www.json.org/json-en.html) object. + +Example value: +`{ + "product": { + "id": "gid://shopify/Product/1346443542550", + "title": "White T-shirt", + "options": [{ + "name": "Size", + "values": ["M", "L"] + }] + } +}` +""" +scalar JSON + +""" +A job corresponds to some long running task that the client should poll for status. +""" +type Job { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! + + """ + This field will only resolve once the job is done. Can be used to ask for object(s) that have been changed by the job. + """ + query: QueryRoot +} + +""" +A job corresponds to some long running task that the client should poll for status. +""" +interface JobResult { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Language codes supported by Shopify. +""" +enum LanguageCode { + """ + Afrikaans. + """ + AF + + """ + Akan. + """ + AK + + """ + Amharic. + """ + AM + + """ + Arabic. + """ + AR + + """ + Assamese. + """ + AS + + """ + Azerbaijani. + """ + AZ + + """ + Belarusian. + """ + BE + + """ + Bulgarian. + """ + BG + + """ + Bambara. + """ + BM + + """ + Bangla. + """ + BN + + """ + Tibetan. + """ + BO + + """ + Breton. + """ + BR + + """ + Bosnian. + """ + BS + + """ + Catalan. + """ + CA + + """ + Chechen. + """ + CE + + """ + Central Kurdish. + """ + CKB + + """ + Czech. + """ + CS + + """ + 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 +} + +""" +Interoperability metadata for types that directly correspond to a REST Admin API resource. +For example, on the Product type, LegacyInteroperability returns metadata for +the corresponding [Product +object](https://shopify.dev/api/admin-graphql/latest/objects/product) in the +REST Admin API. +""" +interface LegacyInteroperability { + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! +} + +""" +Units of measurement for length. +""" +enum LengthUnit { + """ + 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 { + """ + This is set when the number of pending orders has reached the maximum. + """ + atMax: Boolean! + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + count: Int! +} + +""" +The `LineItem` object represents a single product or service that a customer purchased in an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). +Each line item is associated with a +[product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +and can have multiple [discount allocations](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAllocation). +Line items contain details about what was purchased, including the product variant, quantity, pricing, +and fulfillment status. + +Use the `LineItem` object to manage the following processes: + +- [Track the quantity of items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions) +ordered, fulfilled, and unfulfilled. +- [Calculate prices](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders), including discounts and taxes. +- Manage fulfillment through [fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps). +- Manage [returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) and [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges). +- Handle [subscriptions](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) and recurring orders. + +Line items can also include custom attributes and properties, allowing merchants to add specific details +about each item in an order. Learn more about +[managing orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type LineItem implements Node { + """ + Whether the line item can be restocked. + """ + canRestock: Boolean! @deprecated(reason: "Use `restockable` instead.") + + """ + The subscription contract associated with this line item. + """ + contract: SubscriptionContract + + """ + The number of units ordered, excluding refunded and removed units. + """ + currentQuantity: Int! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated to the line item by discount + applications, including discounts allocated to refunded and removed quantities. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total discounted price of the line item in shop currency, including + refunded and removed quantities. This value doesn't include order-level discounts. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total discounted price of the line item in shop and presentment + currencies, including refunded and removed quantities. This value doesn't + include order-level discounts. Code-based discounts aren't included by default. + """ + discountedTotalSet( + """ + Whether to include code-based discounts in the total. + """ + withCodeDiscounts: Boolean = false + ): MoneyBag! + + """ + The approximate unit price of the line item in shop currency. This value + includes line-level discounts and discounts applied to refunded and removed + quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `discountedUnitPriceSet` instead.") + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes discounts applied to refunded and removed quantities. + """ + discountedUnitPriceAfterAllDiscountsSet: MoneyBag! + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes line-level discounts and discounts applied to + refunded and removed quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The duties associated with the line item. + """ + duties: [Duty!]! + + """ + The total number of units to fulfill. + """ + fulfillableQuantity: Int! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/objects\/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead.") + + """ + The fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) + is a third-party fulfillment service. Third-party fulfillment services don't + have a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was awaiting + fulfillment by a third-party fulfillment service. Third-party fulfillment + services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: FulfillmentService @deprecated(reason: "\nThe [relationship between a product variant and a fulfillment service was changed](\/changelog\/fulfillment-service-sku-sharing). A [ProductVariant](\/api\/admin-graphql\/latest\/objects\/ProductVariant) can be stocked by multiple fulfillment services. As a result, we recommend that you use the [inventoryItem field](\/api\/admin-graphql\/latest\/objects\/ProductVariant#field-productvariant-inventoryitem) if you need to determine where a product variant is stocked.\n\nIf you need to determine whether a product is a gift card, then you should continue to use this field until an alternative is available.\n\nAltering the locations which stock a product variant won't change the value of this field for existing orders.\n\nLearn about [managing inventory quantities and states](\/apps\/fulfillment\/inventory-management-apps\/quantities-states).\n") + + """ + The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, + 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. + """ + fulfillmentStatus: String! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/objects\/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image( + """ + 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 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 + + """ + The taxes charged for the line item, including taxes charged for refunded and removed quantities. + """ + taxLines( + """ + Truncate the array result to this size. + """ + first: Int + ): [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product at time of order creation. + """ + title: String! + + """ + The total discount allocated to the line item in shop currency, including the + total allocated to refunded and removed quantities. This value doesn't include + order-level discounts. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total discount allocated to the line item in shop and presentment + currencies, including the total allocated to refunded and removed quantities. + This value doesn't include order-level discounts. + """ + totalDiscountSet: MoneyBag! + + """ + In shop currency, the total discounted price of the unfulfilled quantity for the line item. + """ + unfulfilledDiscountedTotal: Money! @deprecated(reason: "Use `unfulfilledDiscountedTotalSet` instead.") + + """ + In shop and presentment currencies, the total discounted price of the unfulfilled quantity for the line item. + """ + unfulfilledDiscountedTotalSet: MoneyBag! + + """ + In shop currency, the total price of the unfulfilled quantity for the line item. This value doesn't include discounts. + """ + unfulfilledOriginalTotal: Money! @deprecated(reason: "Use `unfulfilledOriginalTotalSet` instead.") + + """ + In shop and presentment currencies, the total price of the unfulfilled + quantity for the line item. This value doesn't include discounts. + """ + unfulfilledOriginalTotalSet: MoneyBag! + + """ + The number of units not yet fulfilled. + """ + unfulfilledQuantity: Int! + + """ + The Variant object associated with this line item. + """ + variant: ProductVariant + + """ + The title of the variant at time of order creation. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String +} + +""" +An auto-generated type for paginating through multiple LineItems. +""" +type LineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LineItemEdge!]! + + """ + A list of nodes that are contained in LineItemEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LineItem and a cursor during pagination. +""" +type LineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LineItemEdge. + """ + node: LineItem! +} + +""" +A line item group (bundle) to which a line item belongs to. +""" +type LineItemGroup implements Node { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + A globally-unique ID. + """ + id: 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 a single line item on an order. +""" +type LineItemMutable implements Node { + """ + Whether the line item can be restocked. + """ + canRestock: Boolean! @deprecated(reason: "Use `restockable` instead.") + + """ + 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!]! + + """ + The total line price after discounts are applied, in shop currency. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total line price after discounts are applied, in shop and presentment currencies. + """ + discountedTotalSet: MoneyBag! + + """ + The approximate split price of a line item unit, in shop currency. This value + doesn't include discounts applied to the entire order. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `discountedUnitPriceSet` instead.") + + """ + 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. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The total number of units to fulfill. + """ + fulfillableQuantity: Int! + + """ + The service provider that fulfills the line item. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, + 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. + """ + fulfillmentStatus: String! + + """ + 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! + + """ + Whether the line item can be edited or not. + """ + merchantEditable: Boolean! + + """ + The name of the product. + """ + name: String! + + """ + The total number of units that can't be fulfilled. For example, if items have + been refunded, or the item isn't something that can be fulfilled, like a tip. + """ + nonFulfillableQuantity: Int! + + """ + The total price without any discounts applied, in shop currency. ""This value + is based on the unit price of the variant x quantity. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price in shop and presentment currencies, without discounts applied. + This value is based on the unit price of the variant x quantity. + """ + originalTotalSet: MoneyBag! + + """ + The variant unit price without discounts applied, in shop currency. + """ + originalUnitPrice: Money! @deprecated(reason: "Use `originalUnitPriceSet` instead.") + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! + + """ + The Product object associated with this line item's variant. + """ + product: Product + + """ + The number of variant units ordered. + """ + quantity: Int! + + """ + The line item's quantity, minus the refunded quantity. + """ + refundableQuantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + Whether the line item can be restocked. + """ + restockable: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + Staff attributed to the line item. + """ + staffMember: StaffMember + + """ + The TaxLine object connected to this line item. + """ + taxLines( + """ + Truncate the array result to this size. + """ + first: Int + ): [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product. + """ + title: String! + + """ + The total amount of the discount allocated to the line item in the shop + currency. This field must be explicitly set using draft orders, Shopify + scripts, or the API. Instead of using this field, Shopify recommends using + `discountAllocations`, which provides the same information. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total amount of the discount allocated to the line item in the presentment + currency. This field must be explicitly set using draft orders, Shopify + scripts, or the API. Instead of using this field, Shopify recommends using + `discountAllocations`, which provides the same information. + """ + totalDiscountSet: MoneyBag! + + """ + The total discounted value of unfulfilled units, in shop currency. + """ + unfulfilledDiscountedTotal: Money! @deprecated(reason: "Use `unfulfilledDiscountedTotalSet` instead.") + + """ + The total discounted value of unfulfilled units, in shop and presentment currencies. + """ + unfulfilledDiscountedTotalSet: MoneyBag! + + """ + The total price without any discounts applied. This value is based on the unit + price of the variant x quantity of all unfulfilled units, in shop currency. + """ + unfulfilledOriginalTotal: Money! @deprecated(reason: "Use `unfulfilledOriginalTotalSet` instead.") + + """ + The total price without any discounts applied. This value is based on the unit + price of the variant x quantity of all unfulfilled units, in shop and + presentment currencies. + """ + unfulfilledOriginalTotalSet: MoneyBag! + + """ + The number of units not yet fulfilled. + """ + unfulfilledQuantity: Int! + + """ + The Variant object associated with this line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String +} + +""" +An auto-generated type for paginating through multiple LineItemMutables. +""" +type LineItemMutableConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LineItemMutableEdge!]! + + """ + A list of nodes that are contained in LineItemMutableEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LineItemMutable!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LineItemMutable and a cursor during pagination. +""" +type LineItemMutableEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LineItemMutableEdge. + """ + node: LineItemMutable! +} + +""" +Represents the selling plan for a line item. +""" +type LineItemSellingPlan { + """ + The name of the selling plan for display purposes. + """ + name: String! + + """ + The ID of the selling plan associated with the line item. + """ + sellingPlanId: ID +} + +""" +A link to direct users to. +""" +type Link implements HasPublishedTranslations { + """ + A context-sensitive label for the link. + """ + label: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The URL that the link visits. + """ + url: URL! +} + +""" +The identifier for the metafield linked to this option. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) +for more details. +""" +type LinkedMetafield { + """ + Key of the metafield the option is linked to. + """ + key: String + + """ + Namespace of the metafield the option is linked to. + """ + namespace: String +} + +""" +The input fields required to link a product option to a metafield. +""" +input LinkedMetafieldCreateInput { + """ + The 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 { + """ + 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 { + """ + The key of the metafield this option is linked to. + """ + key: String! + + """ + The namespace of the metafield this option is linked to. + """ + namespace: String! +} + +""" +A locale. +""" +type Locale { + """ + Locale ISO code. + """ + isoCode: String! + + """ + Human-readable locale name. + """ + name: String! +} + +""" +Specifies the type of the underlying localizable content. This can be used to +conditionally render different UI elements such as input fields. +""" +enum LocalizableContentType { + """ + A 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 { + """ + Country ISO 3166-1 alpha-2 code. + """ + countryCode: CountryCode! + + """ + The localized extension keys that are allowed. + """ + key: LocalizationExtensionKey! + + """ + The purpose of this localization extension. + """ + purpose: LocalizationExtensionPurpose! + + """ + The localized extension title. + """ + title: String! + + """ + The value of the field. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizationExtensions. +""" +type LocalizationExtensionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizationExtensionEdge!]! + + """ + A list of nodes that are contained in LocalizationExtensionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LocalizationExtension!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizationExtension and a cursor during pagination. +""" +type LocalizationExtensionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocalizationExtensionEdge. + """ + node: LocalizationExtension! +} + +""" +The input fields for a LocalizationExtensionInput. +""" +input LocalizationExtensionInput { + """ + The key for the localization extension. + """ + key: LocalizationExtensionKey! + + """ + The localization extension value. + """ + value: String! +} + +""" +The key of a localization extension. +""" +enum LocalizationExtensionKey { + """ + Extension key '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_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 { + """ + 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 location where the physical good resides. You can stock inventory at active locations. Active +locations that have `fulfills_online_orders: true` and are configured with a shipping rate, pickup enabled or +local delivery will be able to sell from their storefront. +""" +type Location implements HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + Whether the location can be reactivated. If `false`, then trying to activate the location with the + [`LocationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation will return an error that describes why the location can't be activated. + """ + activatable: Boolean! + + """ + The address of this location. + """ + address: LocationAddress! + + """ + Whether the location address has been verified. + """ + addressVerified: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. + """ + createdAt: DateTime! + + """ + Whether this location can be deactivated. If `true`, then the location can be deactivated by calling the + [`LocationDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationDeactivate) + mutation. If `false`, then calling the mutation to deactivate it will return an error that describes why the + location can't be deactivated. + """ + deactivatable: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + that the location was deactivated at. For example, 3:30 pm on September 7, + 2019 in the time zone of UTC (Universal Time Coordinated) is represented as + `"2019-09-07T15:50:00Z`". + """ + deactivatedAt: String + + """ + Whether this location can be deleted. + """ + deletable: Boolean! + + """ + Name of the service provider that fulfills from this location. + """ + fulfillmentService: FulfillmentService + + """ + Whether this location can fulfill online orders. + """ + fulfillsOnlineOrders: Boolean! + + """ + Whether this location has active inventory. + """ + hasActiveInventory: Boolean! + + """ + Whether this location has orders that need to be fulfilled. + """ + hasUnfulfilledOrders: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantities of an inventory item at this location. + """ + inventoryLevel( + """ + The ID of the inventory item to obtain the inventory level for. + """ + inventoryItemId: ID! + ): InventoryLevel + + """ + A list of the quantities of the inventory items that can be stocked at this location. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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! + + """ + Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has + `activatable` set to `true` by calling the + [`locationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation. + """ + isActive: Boolean! + + """ + Whether this location is a fulfillment service. + """ + isFulfillmentService: Boolean! + + """ + Whether the location is your primary location for shipping inventory. + """ + isPrimary: Boolean! @deprecated(reason: "The concept of a primary location is deprecated, shipsInventory can be used to get a fallback location") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + Local pickup settings for the location. + """ + localPickupSettingsV2: DeliveryLocalPickupSettings + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The name of the location. + """ + name: String! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Whether this location is used for calculating shipping rates. In multi-origin shipping mode, this flag is ignored. + """ + shipsInventory: Boolean! + + """ + List of suggested addresses for this location (empty if none). + """ + suggestedAddresses: [LocationSuggestedAddress!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `locationActivate` mutation. +""" +type LocationActivatePayload { + """ + The location that was activated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationActivateUserErrors: [LocationActivateUserError!]! +} + +""" +An error that occurs while activating a location. +""" +type LocationActivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationActivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationActivateUserError`. +""" +enum LocationActivateUserErrorCode { + """ + An error occurred while activating the location. + """ + GENERIC_ERROR + + """ + 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The location that was added. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationAddUserError!]! +} + +""" +An error that occurs while adding a location. +""" +type LocationAddUserError implements DisplayableError { + """ + The error code. + """ + code: LocationAddUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationAddUserError`. +""" +enum LocationAddUserErrorCode { + """ + 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 { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The country of the location. + """ + country: String + + """ + The country code of the location. + """ + countryCode: String + + """ + A formatted version of the address for the location. + """ + formatted: [String!]! + + """ + The approximate latitude coordinates of the location. + """ + latitude: Float + + """ + The approximate longitude coordinates of the location. + """ + longitude: Float + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The code for the province, state, or district of the address of the location. + """ + provinceCode: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple Locations. +""" +type LocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocationEdge!]! + + """ + A list of nodes that are contained in LocationEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Location!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `locationDeactivate` mutation. +""" +type LocationDeactivatePayload { + """ + The location that was deactivated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeactivateUserErrors: [LocationDeactivateUserError!]! +} + +""" +The possible errors that can be returned when executing the `locationDeactivate` mutation. +""" +type LocationDeactivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeactivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeactivateUserError`. +""" +enum LocationDeactivateUserErrorCode { + """ + 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 + + """ + Failed to relocate open transfers to the destination location. + """ + FAILED_TO_RELOCATE_OPEN_TRANSFERS + + """ + 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 open Shopify Fulfillment Network transfers. + """ + HAS_INCOMING_MOVEMENTS_ERROR + + """ + Location could not be deactivated because it has open purchase orders. + """ + HAS_OPEN_PURCHASE_ORDERS_ERROR + + """ + Location could not be deactivated because it has open transfers. + """ + HAS_OPEN_TRANSFERS_ERROR + + """ + 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 { + """ + The ID of the location that was deleted. + """ + deletedLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeleteUserErrors: [LocationDeleteUserError!]! +} + +""" +An error that occurs while deleting a location. +""" +type LocationDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeleteUserError`. +""" +enum LocationDeleteUserErrorCode { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocationEdge. + """ + node: Location! +} + +""" +The input fields to use to edit the address of a location. +""" +input LocationEditAddressInput { + """ + The first line of the address. + """ + address1: String + + """ + The second line of the address. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The 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 { + """ + 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 { + """ + The location that was edited. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationEditUserError!]! +} + +""" +An error that occurs while editing a location. +""" +type LocationEditUserError implements DisplayableError { + """ + The error code. + """ + code: LocationEditUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationEditUserError`. +""" +enum LocationEditUserErrorCode { + """ + 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 +} + +""" +Return type for `locationLocalPickupDisable` mutation. +""" +type LocationLocalPickupDisablePayload { + """ + The ID of the location for which local pickup was disabled. + """ + locationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +Return type for `locationLocalPickupEnable` mutation. +""" +type LocationLocalPickupEnablePayload { + """ + The local pickup settings that were enabled. + """ + localPickupSettings: DeliveryLocalPickupSettings + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +The set of valid sort keys for the Location query. +""" +enum LocationSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Represents a suggested address for a location. +""" +type LocationSuggestedAddress { + """ + The first line of the suggested address. + """ + address1: String + + """ + The second line of the suggested address. + """ + address2: String + + """ + The city of the suggested address. + """ + city: String + + """ + The country of the suggested address. + """ + country: String + + """ + The country code of the suggested address. + """ + countryCode: CountryCode + + """ + A formatted version of the suggested address. + """ + formatted: [String!]! + + """ + The province of the suggested address. + """ + province: String + + """ + The code for the province, state, or district of the suggested address. + """ + provinceCode: String + + """ + The ZIP code of the suggested address. + """ + zip: String +} + +""" +Represents a customer mailing address. + +For example, a customer's default address and an order's billing address are both mailling addresses. +""" +type MailingAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + Whether the address corresponds to recognized latitude and longitude values. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """ + Whether to include the customer's company in the formatted address. + """ + withCompany: Boolean = true + + """ + Whether to include the customer's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer. + """ + lastName: String + + """ + The latitude coordinate of the customer address. + """ + latitude: Float + + """ + The longitude coordinate of the customer address. + """ + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The time zone of the address. + """ + timeZone: String + + """ + The validation status that 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 +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. +""" +type MailingAddressConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MailingAddressEdge!]! + + """ + A list of nodes that are contained in MailingAddressEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MailingAddress!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MailingAddress and a cursor during pagination. +""" +type MailingAddressEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MailingAddressEdge. + """ + node: MailingAddress! +} + +""" +The input fields to create or update a mailing address. +""" +input MailingAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String @deprecated(reason: "Use `countryCode` instead.") + + """ + The two-letter code for the country of the address. + """ + countryCode: CountryCode + + """ + The first name of the customer. + """ + firstName: String + id: ID @deprecated(reason: "Not needed for 90% of mutations, and provided separately where it is needed.") + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String @deprecated(reason: "Use `provinceCode` instead.") + + """ + The code for the region of the address, such as the province, state, or district. + For example QC for Quebec, Canada. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Highest level of validation concerns identified for the address. +""" +enum MailingAddressValidationResult { + """ + Indicates that the address has been validated and 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 +} + +""" +Manual discount applications capture the intentions of a discount that was manually created for an order. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ManualDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the discount application. + """ + description: String + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the discount application. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A market is a group of one or more regions that you want to target for international sales. +By creating a market, you can configure a distinct, localized shopping experience for +customers from a specific area of the world. For example, you can +[change currency](https://shopify.dev/api/admin-graphql/current/mutations/marketCurrencySettingsUpdate), +[configure international pricing](https://shopify.dev/apps/internationalization/product-price-lists), +or [add market-specific domains or subfolders](https://shopify.dev/api/admin-graphql/current/objects/MarketWebPresence). +""" +type Market implements HasMetafieldDefinitions & HasMetafields & Node { + """ + 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 market’s currency settings. + """ + currencySettings: MarketCurrencySettings! + + """ + Whether the market is enabled to receive visitors and sales. **Note**: Regions in inactive + markets can't be selected on the storefront or in checkout. + """ + enabled: Boolean! @deprecated(reason: "Use `status` instead.") + + """ + A short, human-readable unique identifier for the market. This is changeable by the merchant. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The name of the market. Not shown to customers. + """ + name: String! + + """ + 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.") + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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.") + + """ + 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 list of products with publishing and pricing information associated with markets. +""" +type MarketCatalog implements Catalog & Node { + """ + 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 + ): MarketConnection! + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple MarketCatalogs. +""" +type MarketCatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketCatalogEdge!]! + + """ + A list of nodes that are contained in MarketCatalogEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketCatalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketCatalog and a cursor during pagination. +""" +type MarketCatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketCatalogEdge. + """ + node: MarketCatalog! +} + +""" +An auto-generated type for paginating through multiple Markets. +""" +type MarketConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketEdge!]! + + """ + A list of nodes that are contained in MarketEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Market!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a market. +""" +input MarketCreateInput { + """ + 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 + + """ + 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 + + """ + The name of the market. Not shown to customers. + """ + name: String! + + """ + The regions to be included in the market. Each region can only be included in one market at + a time. + """ + regions: [MarketRegionCreateInput!]! +} + +""" +Return type for `marketCreate` mutation. +""" +type MarketCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +A market's currency settings. +""" +type MarketCurrencySettings { + """ + The currency which this market's prices are defined in, and the + currency which its 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. For single country markets this will be true when + the market's base currency is the same as the default currency for the region. + """ + localCurrencies: Boolean! +} + +""" +The input fields used to update the currency settings of a market. +""" +input MarketCurrencySettingsUpdateInput { + """ + The currency which this market’s prices are defined in, and the + currency which its customers must use if local currencies are disabled. + """ + baseCurrency: CurrencyCode + + """ + 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 +} + +""" +Return type for `marketCurrencySettingsUpdate` mutation. +""" +type MarketCurrencySettingsUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketCurrencySettingsUserError!]! +} + +""" +Error codes for failed market multi-currency operations. +""" +type MarketCurrencySettingsUserError implements DisplayableError { + """ + The error code. + """ + code: MarketCurrencySettingsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketCurrencySettingsUserError`. +""" +enum MarketCurrencySettingsUserErrorCode { + """ + The 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 + + """ + The specified currency is not supported. + """ + UNSUPPORTED_CURRENCY +} + +""" +Return type for `marketDelete` mutation. +""" +type MarketDeletePayload { + """ + The ID of the deleted market. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one Market and a cursor during pagination. +""" +type MarketEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketEdge. + """ + node: Market! +} + +""" +The market localizable content of a resource's field. +""" +type MarketLocalizableContent { + """ + The hash digest representation of the content value. + """ + digest: String + + """ + The resource field that's being localized. + """ + key: String! + + """ + The content value. + """ + value: String +} + +""" +A resource that has market localizable fields. +""" +type MarketLocalizableResource { + """ + The market localizable content. + """ + marketLocalizableContent: [MarketLocalizableContent!]! + + """ + Market localizations for the market localizable content. + """ + marketLocalizations( + """ + Filters market localizations by market ID. + """ + marketId: ID! + ): [MarketLocalization!]! + + """ + The GID of the resource. + """ + resourceId: ID! +} + +""" +An auto-generated type for paginating through multiple MarketLocalizableResources. +""" +type MarketLocalizableResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketLocalizableResourceEdge!]! + + """ + A list of nodes that are contained in MarketLocalizableResourceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MarketLocalizableResource!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketLocalizableResource and a cursor during pagination. +""" +type MarketLocalizableResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketLocalizableResourceEdge. + """ + node: MarketLocalizableResource! +} + +""" +The type of resources that are market localizable. +""" +enum MarketLocalizableResourceType { + """ + A metafield. Market localizable fields: `value`. + """ + METAFIELD + + """ + A Metaobject. Market Localizable fields are determined by the Metaobject type. + """ + METAOBJECT +} + +""" +The market localization of a field within a resource, which is determined by the market ID. +""" +type MarketLocalization { + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """ + The market that the localization is specific to. + """ + market: Market! + + """ + Whether the original content has changed since this market localization was updated. + """ + outdated: Boolean! + + """ + The date and time when the market localization was updated. + """ + updatedAt: DateTime + + """ + The value of the market localization. + """ + value: String +} + +""" +The input fields and values for creating or updating a market localization. +""" +input MarketLocalizationRegisterInput { + """ + 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! + + """ + 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 { + """ + The market localizations that were created or updated. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +Return type for `marketLocalizationsRemove` mutation. +""" +type MarketLocalizationsRemovePayload { + """ + The market localizations that were deleted. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +A geographic region which comprises a market. +""" +interface MarketRegion { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple MarketRegions. +""" +type MarketRegionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketRegionEdge!]! + + """ + A list of nodes that are contained in MarketRegionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketRegion!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A country which comprises a market. +""" +type MarketRegionCountry implements MarketRegion & Node { + """ + The ISO code identifying the country. + """ + code: CountryCode! + + """ + The currency which this country uses given its market settings. + """ + currency: CurrencySetting! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +The input fields for creating a market region with exactly one required option. +""" +input MarketRegionCreateInput { + """ + A country code for the region. + """ + countryCode: CountryCode! +} + +""" +Return type for `marketRegionDelete` mutation. +""" +type MarketRegionDeletePayload { + """ + The ID of the deleted market region. + """ + deletedId: ID + + """ + The parent market object of the deleted region. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketRegion and a cursor during pagination. +""" +type MarketRegionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketRegionEdge. + """ + node: MarketRegion! +} + +""" +Return type for `marketRegionsCreate` mutation. +""" +type MarketRegionsCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketRegionsDelete` mutation. +""" +type MarketRegionsDeletePayload { + """ + The ID of the deleted market region. + """ + deletedIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +The input fields used to update a market. +""" +input MarketUpdateInput { + """ + 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 + + """ + A unique identifier for the market. For example `"ca"`. + """ + handle: String + + """ + The name of the market. Not shown to customers. + """ + name: String +} + +""" +Return type for `marketUpdate` mutation. +""" +type MarketUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Defines errors encountered while managing a Market. +""" +type MarketUserError implements DisplayableError { + """ + The error code. + """ + code: MarketUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketUserError`. +""" +enum MarketUserErrorCode { + """ + B2B markets must be merchant managed. + """ + B2B_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + The input value is blank. + """ + BLANK + + """ + 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 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 + + """ + 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 + + """ + 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 + + """ + 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 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 + + """ + 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 market region wasn't found. + """ + REGION_NOT_FOUND + + """ + 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") + + """ + 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 { + """ + 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. + """ + market: Market! + + """ + The list of root URLs for each of the web presence’s locales. As of version + `2024-04` this value will no longer have a trailing slash. + """ + rootUrls: [MarketWebPresenceRootUrl!]! + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. This field will be null if + `domain` isn't null. + """ + subfolderSuffix: String +} + +""" +An auto-generated type for paginating through multiple MarketWebPresences. +""" +type MarketWebPresenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketWebPresenceEdge!]! + + """ + A list of nodes that are contained in MarketWebPresenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketWebPresence!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields used to create a web presence for a market. +""" +input MarketWebPresenceCreateInput { + """ + The 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 + + """ + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceCreate` mutation. +""" +type MarketWebPresenceCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketWebPresenceDelete` mutation. +""" +type MarketWebPresenceDeletePayload { + """ + The ID of the deleted web presence. + """ + deletedId: ID + + """ + The market for which the web presence was deleted. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketWebPresence and a cursor during pagination. +""" +type MarketWebPresenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketWebPresenceEdge. + """ + node: MarketWebPresence! +} + +""" +The URL for the homepage of the online store in the context of a particular market and a +particular locale. +""" +type MarketWebPresenceRootUrl { + """ + The locale that the storefront loads in. + """ + locale: String! + + """ + The URL. + """ + url: URL! +} + +""" +The input fields used to update a web presence for a market. +""" +input MarketWebPresenceUpdateInput { + """ + The 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 + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be null if `domainId` is not null. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceUpdate` mutation. +""" +type MarketWebPresenceUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketingActivitiesDeleteAllExternal` mutation. +""" +type MarketingActivitiesDeleteAllExternalPayload { + """ + The asynchronous job that performs the deletion. The status of the job may be + used to determine when it's safe again to create new activities. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The marketing activity resource represents marketing that a + merchant created through an app. +""" +type MarketingActivity implements Node { + """ + The URL of the marketing activity listing page in the marketing section. + """ + activityListUrl: URL + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyV2 + + """ + The app which created this marketing activity. + """ + app: App! + + """ + The errors generated when an app publishes the marketing activity. + """ + appErrors: MarketingActivityExtensionAppErrors + + """ + The allocated budget for the marketing activity. + """ + budget: MarketingBudget + + """ + The date and time when the marketing activity was created. + """ + createdAt: DateTime! + + """ + The completed content in the marketing activity creation form. + """ + formData: String + + """ + The hierarchy level of the marketing activity. + """ + hierarchyLevel: MarketingActivityHierarchyLevel + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the marketing activity is in the main workflow version of the marketing automation. + """ + inMainWorkflowVersion: Boolean! + + """ + The marketing activity represents an external marketing activity. + """ + isExternal: Boolean! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannel: MarketingChannel! @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + Associated marketing event of this marketing activity. + """ + marketingEvent: MarketingEvent + + """ + ID of the parent activity of this marketing activity. + """ + parentActivityId: ID + + """ + ID of the parent activity of this marketing activity. + """ + parentRemoteId: String + + """ + A contextual description of the marketing activity based on the platform and tactic used. + """ + sourceAndMedium: String! + + """ + The current state of the marketing activity. + """ + status: MarketingActivityStatus! + + """ + The severity of the marketing activity's status. + """ + statusBadgeType: MarketingActivityStatusBadgeType @deprecated(reason: "Use `statusBadgeTypeV2` instead.") + + """ + The severity of the marketing activity's status. + """ + statusBadgeTypeV2: BadgeType + + """ + The rendered status of the marketing activity. + """ + statusLabel: String! + + """ + The [date and time]( + https://help.shopify.com/https://en.wikipedia.org/wiki/ISO_8601 + ) when the activity's status last changed. + """ + statusTransitionedAt: DateTime + + """ + The method of marketing used for this marketing activity. + """ + tactic: MarketingTactic! + + """ + The status to which the marketing activity is currently transitioning. + """ + targetStatus: MarketingActivityStatus + + """ + The marketing activity's title, which is rendered on the marketing listing page. + """ + title: String! + + """ + The date and time when the marketing activity was updated. + """ + updatedAt: DateTime! + + """ + The value portion of the URL query parameter used in attributing sessions to this activity. + """ + urlParameterValue: String + + """ + The set of [Urchin Tracking Module]( + https://help.shopify.com/https://en.wikipedia.org/wiki/UTM_parameters + ) used in the URL for tracking this marketing activity. + """ + utmParameters: UTMParameters +} + +""" +The input fields combining budget amount and its marketing budget type. +""" +input MarketingActivityBudgetInput { + """ + Budget type for marketing activity. + """ + budgetType: MarketingBudgetBudgetType + + """ + Amount of budget for the marketing activity. + """ + total: MoneyInput +} + +""" +An auto-generated type for paginating through multiple MarketingActivities. +""" +type MarketingActivityConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingActivityEdge!]! + + """ + A list of nodes that are contained in MarketingActivityEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingActivity!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating an externally-managed marketing activity. +""" +input MarketingActivityCreateExternalInput { + """ + The 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 + + """ + 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 { + """ + The external marketing activity that was created. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to create a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityCreateInput { + """ + The 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! + + """ + 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 { + """ + The created marketing activity. + """ + marketingActivity: MarketingActivity @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The path to return back to shopify admin from embedded editor. + """ + redirectPath: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `marketingActivityDeleteExternal` mutation. +""" +type MarketingActivityDeleteExternalPayload { + """ + The ID of the marketing activity that was deleted, if one was deleted. + """ + deletedMarketingActivityId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An auto-generated type which holds one MarketingActivity and a cursor during pagination. +""" +type MarketingActivityEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingActivityEdge. + """ + node: MarketingActivity! +} + +""" +The error code resulted from the marketing activity extension integration. +""" +enum MarketingActivityExtensionAppErrorCode { + """ + The 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 validation errors. + """ + VALIDATION_ERROR +} + +""" +Represents errors returned from apps when using the marketing activity extension. +""" +type MarketingActivityExtensionAppErrors { + """ + The app error type. + """ + code: MarketingActivityExtensionAppErrorCode! + + """ + The list of errors returned by the app. + """ + userErrors: [UserError!]! +} + +""" +Set of possible statuses for an external marketing activity. +""" +enum MarketingActivityExternalStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity 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 { + """ + An advertisement activity. Must be parented by an ad group or a campaign + activity, and must be assigned tracking parameters (URL or UTM). + """ + AD + + """ + A group of advertisement activities. Must be parented by a campaign activity. + """ + AD_GROUP + + """ + A campaign activity. May contain either ad groups or ads as child activities. + If childless, then the campaign activity should have tracking parameters + assigned (URL or UTM) otherwise it won't appear in marketing reports. + """ + CAMPAIGN +} + +""" +The set of valid sort keys for the MarketingActivity query. +""" +enum MarketingActivitySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by 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 +} + +""" +Status helps to identify if this marketing activity has been completed, queued, failed etc. +""" +enum MarketingActivityStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity is permanently unavailable. + """ + DELETED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """ + This marketing activity is disconnected and no longer editable. + """ + DISCONNECTED + + """ + This marketing activity has been edited, but it is not yet created. + """ + DRAFT + + """ + This marketing activity is unable to run. + """ + FAILED + + """ + This marketing activity has completed running. + """ + INACTIVE + + """ + This marketing activity is currently not running. + """ + PAUSED + + """ + This marketing activity is pending creation on the app's marketing platform. + """ + PENDING + + """ + This marketing activity is scheduled to run. + """ + SCHEDULED + + """ + The marketing activity's status is unknown. + """ + UNDEFINED +} + +""" +StatusBadgeType helps to identify the color of the status badge. +""" +enum MarketingActivityStatusBadgeType { + """ + This status badge has type 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 { + """ + 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 { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to update a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityUpdateInput { + """ + The 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 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 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! + + """ + 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.") + + """ + The ID of the recommendation that the marketing activity was created from, if one exists. + """ + marketingRecommendationId: ID @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The 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.") + + """ + 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. 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 { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The redirect path from the embedded editor to the Shopify admin. + """ + redirectPath: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for creating or updating an externally-managed marketing activity. +""" +input MarketingActivityUpsertExternalInput { + """ + The 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 { + """ + The external marketing activity that was created or updated. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An error that occurs during the execution of marketing activity and engagement mutations. +""" +type MarketingActivityUserError implements DisplayableError { + """ + The error code. + """ + code: MarketingActivityUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketingActivityUserError`. +""" +enum MarketingActivityUserErrorCode { + """ + The 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 { + """ + The budget type for a marketing activity. + """ + budgetType: MarketingBudgetBudgetType! + + """ + The amount of budget for marketing activity. + """ + total: MoneyV2! +} + +""" +The budget type for a marketing activity. +""" +enum MarketingBudgetBudgetType { + """ + A daily budget. + """ + DAILY + + """ + A budget for the lifetime of a marketing activity. + """ + LIFETIME +} + +""" +The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. +""" +enum MarketingChannel { + """ + 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 { + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or + yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyV2 + + """ + 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 is strongly preferred, and support for cumulative metrics may + be deprecated in the future. + """ + isCumulative: Boolean! + + """ + 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 returning customers that have placed an order. Doesn't include + adjustments such as edits, exchanges, or returns. + """ + returningCustomers: Decimal + + """ + The amount of sales generated from the marketing content. + """ + sales: MoneyV2 + + """ + The total number of marketing emails or messages that were sent. + """ + sendsCount: Int + + """ + The number of online store sessions generated from the marketing content. + """ + sessionsCount: Int + + """ + The total number of times marketing content was distributed or reposted to + either one's own network of followers through a social media platform or other + digital channels. For message-based platforms such as email or SMS, this + represents the number of times marketing emails or messages were forwarded. + """ + sharesCount: Int + + """ + The total number of unique clicks on the marketing content. + """ + uniqueClicksCount: Int + + """ + The total number of all users who saw marketing content since it was + published. For message-based platforms such as email or SMS, this represents + the number of unique users that opened a marketing email or message. For + video-based content, this represents the number of unique users that played video content. + """ + uniqueViewsCount: Int + + """ + The total number of unsubscribes on the marketing content. For social media + platforms, this represents the number of unfollows. + """ + unsubscribesCount: Int + + """ + The UTC offset for the time zone in which the metrics are being reported, in + the format `"+HH:MM"` or `"-HH:MM"`. Used in combination with occurredOn when + aggregating daily metrics. Must match the account settings for the shop to + minimize eventual discrepancies in reporting. + """ + utcOffset: UtcOffset! + + """ + The total number of views on the marketing content. For message-based + platforms such as email or SMS, this represents the number of times marketing + emails or messages were opened. For video-based content, this represents the + number of times videos were played. + """ + viewsCount: Int +} + +""" +Return type for `marketingEngagementCreate` mutation. +""" +type MarketingEngagementCreatePayload { + """ + The marketing engagement that was created. This represents customer activity + taken on a marketing activity or a marketing channel. + """ + marketingEngagement: MarketingEngagement + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields for a marketing engagement. +""" +input MarketingEngagementInput { + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or + yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyInput + + """ + 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 is strongly preferred, and support for cumulative metrics may + be deprecated in the future. + """ + isCumulative: Boolean! + + """ + 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 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 { + """ + Informational message about the engagement data that has been marked for deletion. + """ + result: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +Represents actions that market a merchant's store or products. +""" +type MarketingEvent implements LegacyInteroperability & Node { + """ + The app that the marketing event is attributed to. + """ + app: App! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The unique string identifier of the channel to which this activity belongs. + For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + A human-readable description of the marketing event. + """ + description: String + + """ + The date and time when the marketing event ended. + """ + endedAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL where the marketing event can be managed. + """ + manageUrl: URL + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """ + The URL where the marketing event can be previewed. + """ + previewUrl: URL + + """ + An optional ID that helps Shopify validate engagement data. + """ + remoteId: String + + """ + The date and time when the marketing event is scheduled to end. + """ + scheduledToEndAt: DateTime + + """ + Where the `MarketingEvent` occurred and what kind of content was used. + Because `utmSource` and `utmMedium` are often used interchangeably, this is + based on a combination of `marketingChannel`, `referringDomain`, and `type` to + provide a consistent representation for any given piece of marketing + regardless of the app that created it. + """ + sourceAndMedium: String! + + """ + The date and time when the marketing event started. + """ + startedAt: DateTime! + + """ + The display text for the marketing event type. + """ + targetTypeDisplayText: String! @deprecated(reason: "Use `sourceAndMedium` instead.") + + """ + The marketing event type. + """ + type: MarketingTactic! + + """ + The name of the marketing campaign. + """ + utmCampaign: String + + """ + The medium that the marketing campaign is using. Example values: `cpc`, `banner`. + """ + utmMedium: String + + """ + The referrer of the marketing event. Example values: `google`, `newsletter`. + """ + utmSource: String +} + +""" +An auto-generated type for paginating through multiple MarketingEvents. +""" +type MarketingEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingEventEdge!]! + + """ + A list of nodes that are contained in MarketingEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketingEvent and a cursor during pagination. +""" +type MarketingEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingEventEdge. + """ + node: MarketingEvent! +} + +""" +The set of valid sort keys for the MarketingEvent query. +""" +enum MarketingEventSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by 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 `started_at` value. + """ + STARTED_AT +} + +""" +The available types of tactics for a marketing activity. +""" +enum MarketingTactic { + """ + An abandoned cart recovery email. + """ + ABANDONED_CART + + """ + An ad, such as a Facebook ad. + """ + AD + + """ + An affiliate link. + """ + AFFILIATE + + """ + A link. + """ + LINK + + """ + A loyalty program. + """ + LOYALTY + + """ + A messaging app, such as Facebook Messenger. + """ + MESSAGE + + """ + A newsletter. + """ + NEWSLETTER + + """ + A notification in the Shopify admin. + """ + NOTIFICATION + + """ + A blog post. + """ + POST + + """ + A retargeting ad. + """ + RETARGETING + + """ + Search engine optimization. + """ + SEO + + """ + A popup on the online store. + """ + STOREFRONT_APP + + """ + A transactional email. + """ + TRANSACTIONAL +} + +""" +Represents a media interface. +""" +interface Media { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! +} + +""" +An auto-generated type for paginating through multiple Media. +""" +type MediaConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MediaEdge!]! + + """ + A list of nodes that are contained in MediaEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Media!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a media object. +""" +enum MediaContentType { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MediaEdge. + """ + node: Media! +} + +""" +Represents a media error. This typically occurs when there is an issue with the media itself causing it to fail validation. +Check the media before attempting to upload again. +""" +type MediaError { + """ + Code representing the type of error. + """ + code: MediaErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +Error types for media. +""" +enum MediaErrorCode { + """ + Media 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 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 { + """ + 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 & Media & Node { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """ + The MIME type of the image. + """ + mimeType: String + + """ + The original source of the image. + """ + originalSource: MediaImageOriginalSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +The original source for an image. +""" +type MediaImageOriginalSource { + """ + The size of the original file in bytes. + """ + fileSize: Int + + """ + The URL of the original image, valid only for a short period. + """ + url: URL +} + +""" +Represents the preview image for a media. +""" +type MediaPreviewImage { + """ + The preview image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """ + Current status of the preview image. + """ + status: MediaPreviewImageStatus! +} + +""" +The possible statuses for a media preview image. +""" +enum MediaPreviewImageStatus { + """ + Preview image 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 { + """ + 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 { + """ + The error code. + """ + code: MediaUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MediaUserError`. +""" +enum MediaUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 { + """ + The code representing the type of warning. + """ + code: MediaWarningCode! + + """ + Translated warning message. + """ + message: String +} + +""" +Warning types for media. +""" +enum MediaWarningCode { + """ + 3D model physical size might be invalid. The dimensions of your model are very + 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 { + """ + The menu's handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the menu is a default. The handle for default menus can't be updated and default menus can't be deleted. + """ + isDefault: Boolean! + + """ + A list of items on the menu sorted by position. + """ + items( + """ + The number of menu items to be returned. + """ + limit: Int + ): [MenuItem!]! + + """ + The menu's title. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple Menus. +""" +type MenuConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MenuEdge!]! + + """ + A list of nodes that are contained in MenuEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Menu!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `menuCreate` mutation. +""" +type MenuCreatePayload { + """ + The created menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuCreateUserError!]! +} + +""" +An error that occurs during the execution of `MenuCreate`. +""" +type MenuCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuCreateUserError`. +""" +enum MenuCreateUserErrorCode { + """ + The 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 { + """ + The ID of the deleted menu. + """ + deletedMenuId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MenuDelete`. +""" +type MenuDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MenuDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuDeleteUserError`. +""" +enum MenuDeleteUserErrorCode { + """ + Menu does not exist. + """ + MENU_DOES_NOT_EXIST + + """ + Default menu cannot be deleted. + """ + UNABLE_TO_DELETE_DEFAULT_MENU +} + +""" +An auto-generated type which holds one Menu and a cursor during pagination. +""" +type MenuEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MenuEdge. + """ + node: Menu! +} + +""" +Individual navigation links that make up store menus, giving customers clickable +paths to explore the store. Menu items are the building blocks that connect +shoppers to products, collections, pages, or external resources. + +For example, within a "Products" menu, individual menu items might link to +specific collections like "Summer Collection" or "Best Sellers," each with its +own title, URL, and resource connection. + +Use the `MenuItem` object to: +- Define individual navigation links and their destinations +- Create nested menu hierarchies through item relationships +- Use tags for collection filtering +- Connect menu links to specific store resources + +Menu items support various link types, enabling connections to internal store +content or external websites. The nested items capability allows for dropdown or +multi-level navigation structures that help organize complex store catalogs. +""" +type MenuItem { + """ + A globally-unique ID of the navigation menu item. + """ + id: ID! + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItem!]! + + """ + The ID of the resource to link to. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!]! + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's url. + """ + url: String +} + +""" +The input fields required to create a valid menu item. +""" +input MenuItemCreateInput { + """ + 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 + + """ + 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 { + """ + 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 { + """ + A globally-unique ID of the online store navigation menu item. + """ + id: ID + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemUpdateInput!] + + """ + The menu item's association with an existing resource. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!] + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's url 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 { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `menuUpdate` mutation. +""" +type MenuUpdatePayload { + """ + The updated menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuUpdateUserError!]! +} + +""" +An error that occurs during the execution of `MenuUpdate`. +""" +type MenuUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuUpdateUserError`. +""" +enum MenuUpdateUserErrorCode { + """ + The 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 { + """ + 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 approval for accelerated onboarding to channel integration apps. +""" +type MerchantApprovalSignals { + """ + Whether the shop's Shopify Payments account identity is verified. Returns + `false` if the identity is unverified or if the shop doesn't have a Shopify + Payments account. + """ + identityVerified: Boolean! + + """ + Whether Shopify has pre-verified the merchant's business for onboarding to + channel integration apps. Returns `false` if the shop isn't marked for verification. + """ + verifiedByShopify: Boolean! + + """ + Which tier of the Shopify verification was determined for the merchant's + business for onboarding to channel integration apps. + """ + verifiedByShopifyTier: String! +} + +""" +Metafields enable you to attach additional information to a Shopify resource, such +as a [Product](https://shopify.dev/api/admin-graphql/latest/objects/product) or +a [Collection](https://shopify.dev/api/admin-graphql/latest/objects/collection). +For more information about where you can attach metafields refer to [HasMetafields](https://shopify.dev/api/admin-graphql/latest/interfaces/HasMetafields). +Some examples of the data that metafields enable you to store are +specifications, size charts, downloadable documents, release dates, images, or part numbers. +Metafields are identified by an owner resource, namespace, and key. and store a +value along with type information for that value. +""" +type Metafield implements HasCompareDigest & LegacyInteroperability & Node { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! + + """ + The date and time when the metafield was created. + """ + createdAt: DateTime! + + """ + The metafield definition that the metafield belongs to, if any. + """ + definition: MetafieldDefinition + + """ + The description of the metafield. + """ + description: String @deprecated(reason: "This field will be removed in a future release. Use the `description` on the metafield definition instead.\n") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The data stored in the metafield in JSON format. + """ + jsonValue: JSON! + + """ + The unique identifier for the metafield within its namespace. + """ + key: String! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The container for a group of metafields that the metafield is associated with. + """ + namespace: String! + + """ + The resource that the metafield is attached to. + """ + owner: HasMetafields! + + """ + The type of resource that the metafield is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + Returns a reference object if the metafield definition's type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of reference objects if the metafield's type is a resource reference list. + """ + references( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 type of data that is stored in the metafield. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: String! + + """ + The date and time when the metafield was updated. + """ + updatedAt: DateTime! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! +} + +""" +Access permissions for the definition's metafields. +""" +type MetafieldAccess { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccess + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccess! + + """ + The explicit grants for this metafield definition, superseding the default admin access + for the specified grantees. + """ + grants: [MetafieldAccessGrant!]! @deprecated(reason: "Explicit grants are [deprecated](https:\/\/shopify.dev\/changelog\/deprecating-explicit-access-grants-for-app-owned-metafields).\n This will be removed in 2025-07.") + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccess +} + +""" +An explicit access grant for the metafields under this definition. + +Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields). +""" +type MetafieldAccessGrant { + """ + The level of access the grantee has. + """ + access: MetafieldGrantAccessLevel! + + """ + The grantee being granted access. + """ + grantee: String! +} + +""" +The input fields for an explicit access grant to be deleted for the metafields under this definition. +""" +input MetafieldAccessGrantDeleteInput { + """ + The grantee whose grant should be deleted. + """ + grantee: String! +} + +""" +The input fields for an explicit access grant to be created or updated for the metafields under this definition. + +Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields). +""" +input MetafieldAccessGrantInput { + """ + The level of access being granted. + """ + access: MetafieldGrantAccessLevel! + + """ + The grantee being granted access. + """ + grantee: String! +} + +""" +The input fields for possible operations for modifying access grants. Exactly one option is required. + +Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields). +""" +input MetafieldAccessGrantOperationInput { + """ + The input fields for an explicit access grant to be created or updated for the metafields under this definition. + + Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields). + """ + create: MetafieldAccessGrantInput + + """ + The input fields for an explicit access grant to be deleted for the metafields under this definition. + """ + delete: MetafieldAccessGrantDeleteInput + + """ + The input fields for an explicit access grant to be created or updated for the metafields under this definition. + + Explicit grants are [deprecated](https://shopify.dev/changelog/deprecating-explicit-access-grants-for-app-owned-metafields). + """ + update: MetafieldAccessGrantInput +} + +""" +The input fields that set access permissions for the definition's metafields. +""" +input MetafieldAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccessInput! + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccessInput + + """ + The list of explicit grants to grant for the metafields under this definition. + """ + grants: [MetafieldAccessGrantInput!] @deprecated(reason: "Explicit grants are [deprecated](https:\/\/shopify.dev\/changelog\/deprecating-explicit-access-grants-for-app-owned-metafields).\n This will be removed in 2025-01.") + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccessInput +} + +""" +The input fields for the access settings for the metafields under the definition. +""" +input MetafieldAccessUpdateInput { + """ + The admin access setting to use for the metafields under this definition. + """ + admin: MetafieldAdminAccessInput! + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput + + """ + The set of grant operations to perform. + """ + grants: [MetafieldAccessGrantOperationInput!] @deprecated(reason: "Explicit grants are [deprecated](https:\/\/shopify.dev\/changelog\/deprecating-explicit-access-grants-for-app-owned-metafields).\n This will be removed in 2025-01.") + + """ + The storefront access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput +} + +""" +Metafield access permissions for the Admin API. +""" +enum MetafieldAdminAccess { + """ + 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 { + """ + 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 +} + +""" +An auto-generated type for paginating through multiple Metafields. +""" +type MetafieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldEdge!]! + + """ + A list of nodes that are contained in MetafieldEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Metafield!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ + + """ + Read and write access. + """ + READ_WRITE +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccessInput { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ + + """ + Read and write access. + """ + READ_WRITE +} + +""" +Metafield definitions enable you to define additional validation constraints for metafields, and enable the +merchant to edit metafield values in context. +""" +type MetafieldDefinition implements Node { + """ + The access settings associated with the metafield definition. + """ + access: MetafieldAccess! + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what subtypes of resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraints + + """ + The description of the metafield definition. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The metafields that belong to the metafield definition. + """ + metafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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!]! + + """ + Whether each of the metafields that belong to the metafield definition are visible from the Storefront API. + """ + visibleToStorefrontApi: Boolean! @deprecated(reason: "Use `access.storefront` instead. This will be removed in 2025-01.") +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitions. +""" +type MetafieldDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Metafield definition constraint criteria to filter metafield definitions by. +""" +enum MetafieldDefinitionConstraintStatus { + """ + Returns both constrained and unconstrained metafield definitions. + """ + CONSTRAINED_AND_UNCONSTRAINED + + """ + Only returns metafield definitions that are constrained to a resource subtype. + """ + CONSTRAINED_ONLY + + """ + Only returns metafield definitions that are not constrained to a resource subtype. + """ + UNCONSTRAINED_ONLY +} + +""" +The input fields used to identify a subtype of a resource for the purposes of metafield definition constraints. +""" +input MetafieldDefinitionConstraintSubtypeIdentifier { + """ + The category of the resource subtype. + """ + key: String! + + """ + The specific subtype value within the identified subtype category. + """ + value: String! +} + +""" +A constraint subtype value that the metafield definition applies to. +""" +type MetafieldDefinitionConstraintValue { + """ + The subtype value of the constraint. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues. +""" +type MetafieldDefinitionConstraintValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionConstraintValueEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionConstraintValueEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [MetafieldDefinitionConstraintValue!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldDefinitionConstraintValue and a cursor during pagination. +""" +type MetafieldDefinitionConstraintValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldDefinitionConstraintValueEdge. + """ + node: MetafieldDefinitionConstraintValue! +} + +""" +The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) +that determine what subtypes of resources a metafield definition applies to. +""" +type MetafieldDefinitionConstraints { + """ + The category of resource subtypes that the definition applies to. + """ + key: String + + """ + The specific constraint subtype values that the definition applies to. + """ + values( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! +} + +""" +Return type for `metafieldDefinitionCreate` mutation. +""" +type MetafieldDefinitionCreatePayload { + """ + The metafield definition that was created. + """ + createdDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionCreateUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionCreate`. +""" +type MetafieldDefinitionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionCreateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionCreateUserError`. +""" +enum MetafieldDefinitionCreateUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + A duplicate option. + """ + DUPLICATE_OPTION + + """ + The maximum limit of grants per definition type has been exceeded. + """ + GRANT_LIMIT_EXCEEDED + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + A field contains an invalid character. + """ + INVALID_CHARACTER + + """ + 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 + + """ + 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 +} + +""" +Return type for `metafieldDefinitionDelete` mutation. +""" +type MetafieldDefinitionDeletePayload { + """ + The ID of the deleted metafield definition. + """ + deletedDefinitionId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionDelete`. +""" +type MetafieldDefinitionDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionDeleteUserError`. +""" +enum MetafieldDefinitionDeleteUserErrorCode { + """ + 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 { + """ + The position 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! +} + +""" +The input fields required to create a metafield definition. +""" +input MetafieldDefinitionInput { + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessInput + + """ + 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!] + + """ + Whether metafields for the metafield definition are visible using the Storefront API. + """ + visibleToStorefrontApi: Boolean @deprecated(reason: "Use `access.storefront` instead. This will be removed in 2025-01.") +} + +""" +Return type for `metafieldDefinitionPin` mutation. +""" +type MetafieldDefinitionPinPayload { + """ + The metafield definition that was pinned. + """ + pinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionPinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionPin`. +""" +type MetafieldDefinitionPinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionPinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionPinUserError`. +""" +enum MetafieldDefinitionPinUserErrorCode { + """ + The metafield definition is already pinned. + """ + ALREADY_PINNED + + """ + 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 +} + +""" +Possible metafield definition pinned statuses. +""" +enum MetafieldDefinitionPinnedStatus { + """ + All metafield definitions. + """ + ANY + + """ + Only metafield definitions that are pinned. + """ + PINNED + + """ + Only metafield definitions that are not pinned. + """ + UNPINNED +} + +""" +The set of valid sort keys for the MetafieldDefinition query. +""" +enum MetafieldDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `pinned_position` value. + """ + PINNED_POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The type and name for the optional validation configuration of a metafield. + +For example, a supported validation might consist of a `max` name and a `number_integer` type. +This validation can then be used to enforce a maximum character length for a `single_line_text_field` metafield. +""" +type MetafieldDefinitionSupportedValidation { + """ + The name of the metafield definition validation. + """ + name: String! + + """ + The type of input for the validation. + """ + type: String! +} + +""" +A metafield definition type provides basic foundation and validation for a metafield. +""" +type MetafieldDefinitionType { + """ + The category associated with the metafield definition type. + """ + category: String! + + """ + The name of the type for the metafield definition. + See the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + name: String! + + """ + The supported validations for a metafield definition type. + """ + supportedValidations: [MetafieldDefinitionSupportedValidation!]! + + """ + Whether metafields without a definition can be migrated to a definition of this type. + """ + supportsDefinitionMigrations: Boolean! + + """ + The value type for a metafield created with this definition type. + """ + valueType: MetafieldValueType! @deprecated(reason: "`valueType` is deprecated and `name` should be used for type information.") +} + +""" +Return type for `metafieldDefinitionUnpin` mutation. +""" +type MetafieldDefinitionUnpinPayload { + """ + The metafield definition that was unpinned. + """ + unpinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUnpinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUnpin`. +""" +type MetafieldDefinitionUnpinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUnpinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUnpinUserError`. +""" +enum MetafieldDefinitionUnpinUserErrorCode { + """ + 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 { + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessUpdateInput + + """ + 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 cannot 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!] + + """ + Whether each of the metafields that belong to the metafield definition are visible from the Storefront API. + """ + visibleToStorefrontApi: Boolean @deprecated(reason: "Use `access.storefront` instead. This will be removed in 2025-01.") +} + +""" +Return type for `metafieldDefinitionUpdate` mutation. +""" +type MetafieldDefinitionUpdatePayload { + """ + The metafield definition that was updated. + """ + updatedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUpdateUserError!]! + + """ + The asynchronous job updating the metafield definition's validation_status. + """ + validationJob: Job +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUpdate`. +""" +type MetafieldDefinitionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUpdateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUpdateUserError`. +""" +enum MetafieldDefinitionUpdateUserErrorCode { + """ + 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 + + """ + The maximum limit of grants per definition type has been exceeded. + """ + GRANT_LIMIT_EXCEEDED + + """ + 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 + + """ + 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 { + """ + The validation name. + """ + name: String! + + """ + The name for the metafield type of this validation. + """ + type: String! + + """ + The validation value. + """ + value: String +} + +""" +The name and value for a metafield definition validation. + +For example, for a metafield definition of `single_line_text_field` type, you +can set a validation with the name `min` and a value of `10`. +This validation will ensure that the value of the metafield is at least 10 characters. + +Refer to the [list of supported validations](https://shopify.dev/apps/build/custom-data/metafields/list-of-validation-options). +""" +input MetafieldDefinitionValidationInput { + """ + The name for the metafield definition validation. + """ + name: String! + + """ + The value for the metafield definition validation. + """ + value: String! +} + +""" +Possible metafield definition validation statuses. +""" +enum MetafieldDefinitionValidationStatus { + """ + All of this definition's metafields are valid. + """ + ALL_VALID + + """ + Asynchronous validation of this definition's metafields is in progress. + """ + IN_PROGRESS + + """ + Some of this definition's metafields are invalid. + """ + SOME_INVALID +} + +""" +The input fields to delete a metafield. +""" +input MetafieldDeleteInput { + """ + The ID of the metafield to delete. + """ + id: ID! +} + +""" +Return type for `metafieldDelete` mutation. +""" +type MetafieldDeletePayload { + """ + The ID of the deleted metafield. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Metafield and a cursor during pagination. +""" +type MetafieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldEdge. + """ + node: Metafield! +} + +""" +Possible access levels for explicit metafield access grants. +""" +enum MetafieldGrantAccessLevel { + """ + Read metafield access. + """ + READ + + """ + Read and write metafield access. + """ + READ_WRITE +} + +""" +Identifies a metafield by its owner resource, namespace, and key. +""" +type MetafieldIdentifier { + """ + The key of the metafield. + """ + key: String! + + """ + The namespace of the metafield. + """ + namespace: String! + + """ + GID of the owner resource that the metafield belongs to. + """ + ownerId: ID! +} + +""" +The input fields that identify metafields. +""" +input MetafieldIdentifierInput { + """ + The 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! +} + +""" +The input fields to use to create or update a metafield through a mutation on the owning resource. +An alternative way to create or update a metafield is by using the +[metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation. +""" +input MetafieldInput { + """ + The description of the metafield. + """ + description: String @deprecated(reason: "Use metafield definitions to set descriptions instead. The corresponding input field is available on [MetafieldDefinitionInput](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/input-objects\/MetafieldDefinitionInput#field-metafielddefinitioninput-description) when creating metafield definitions and [MetafieldDefinitionUpdateInput](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/input-objects\/MetafieldDefinitionUpdateInput#field-metafielddefinitionupdateinput-description) when updating. This will be removed in 2025-07.") + + """ + The unique ID of the metafield. Using `owner_id`, `namespace`, and `key` is preferred for creating and updating. + """ + id: ID + + """ + 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 is 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 { + """ + 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 Discount metafield owner type. + """ + DISCOUNT + + """ + The draft order metafield owner type. + """ + DRAFTORDER + + """ + The Fulfillment Constraint Rule metafield owner type. + """ + FULFILLMENT_CONSTRAINT_RULE + + """ + 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 Image metafield owner type. + """ + PRODUCTIMAGE @deprecated(reason: "`PRODUCTIMAGE` is deprecated. Use `MEDIA_IMAGE` instead. This will be removed in 2024-10.") + + """ + 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 = Collection | Company | Customer | GenericFile | MediaImage | Metaobject | Model3d | OnlineStorePage | Order | Product | ProductVariant | TaxonomyValue | Video + +""" +An auto-generated type for paginating through multiple MetafieldReferences. +""" +type MetafieldReferenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldReferenceEdge!]! + + """ + A list of nodes that are contained in MetafieldReferenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldReference]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldReference and a cursor during pagination. +""" +type MetafieldReferenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldReferenceEdge. + """ + node: MetafieldReference +} + +""" +Types of resources that may use metafields to reference other resources. +""" +union MetafieldReferencer = AppInstallation | Collection | Company | CompanyLocation | Customer | DeliveryCustomization | DiscountAutomaticNode | DiscountCodeNode | DiscountNode | DraftOrder | FulfillmentOrder | Location | Market | Metaobject | OnlineStoreArticle | OnlineStoreBlog | OnlineStorePage | Order | PaymentCustomization | Product | ProductVariant | Shop + +""" +Defines a relation between two resources via a reference metafield. +The referencer owns the joining field with a given namespace and key, +while the target is referenced by the field. +""" +type MetafieldRelation { + """ + The key of the field making the reference. + """ + key: String! + + """ + The name of the field making the reference. + """ + name: String! + + """ + The namespace of the metafield making the reference, or type of the metaobject. + """ + namespace: String! + + """ + The resource making the reference. + """ + referencer: MetafieldReferencer! + + """ + The referenced resource. + """ + target: MetafieldReference! @deprecated(reason: "No longer supported. Access the object directly instead.") +} + +""" +An auto-generated type for paginating through multiple MetafieldRelations. +""" +type MetafieldRelationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldRelationEdge!]! + + """ + A list of nodes that are contained in MetafieldRelationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldRelation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldRelation and a cursor during pagination. +""" +type MetafieldRelationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldRelationEdge. + """ + node: MetafieldRelation! +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccess { + """ + Liquid-only access. This access permission is deprecated and can not be set. + """ + LEGACY_LIQUID_ONLY + + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccessInput { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +By default, the Storefront API can't read metafields. To make specific metafields visible in the Storefront API, +you need to create a `MetafieldStorefrontVisibility` record. A `MetafieldStorefrontVisibility` record is a list +of the metafields, defined by the `owner_type`, `namespace`, and `key`, to make visible in the Storefront API. + +Learn about [exposing metafields in the Storefront API] +(https://shopify.dev/custom-storefronts/products-collections/metafields) +for more details. +""" +type MetafieldStorefrontVisibility implements LegacyInteroperability & Node { + """ + The date and time when the metafield was set to visible in the Storefront API. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The key of a metafield to make visible in the Storefront API. + """ + key: String! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The namespace of a metafield to make visible in the Storefront API. + """ + namespace: String! + + """ + The owner type of a metafield to make visible in the Storefront API. + """ + ownerType: MetafieldOwnerType! + + """ + The date and time when the `MetafieldStorefrontVisibility` record was updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple MetafieldStorefrontVisibilities. +""" +type MetafieldStorefrontVisibilityConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldStorefrontVisibilityEdge!]! + + """ + A list of nodes that are contained in MetafieldStorefrontVisibilityEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [MetafieldStorefrontVisibility!]! + + """ + 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 `metafieldStorefrontVisibilityCreate` mutation. +""" +type MetafieldStorefrontVisibilityCreatePayload { + """ + The `MetafieldStorefrontVisibility` that was created. + """ + metafieldStorefrontVisibility: MetafieldStorefrontVisibility + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `metafieldStorefrontVisibilityDelete` mutation. +""" +type MetafieldStorefrontVisibilityDeletePayload { + """ + The ID of the deleted `MetafieldStorefrontVisibility` record. + """ + deletedMetafieldStorefrontVisibilityId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one MetafieldStorefrontVisibility and a cursor during pagination. +""" +type MetafieldStorefrontVisibilityEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldStorefrontVisibilityEdge. + """ + node: MetafieldStorefrontVisibility! +} + +""" +The input fields to create a MetafieldStorefrontVisibility record. +""" +input MetafieldStorefrontVisibilityInput { + """ + The key of a metafield to make visible in the Storefront API. + """ + key: String! + + """ + The namespace of a metafield to make visible in the Storefront API. If omitted the app reserved namespace will be used. + """ + namespace: String + + """ + The owner type of a metafield to make visible in the Storefront API. + """ + ownerType: MetafieldOwnerType! +} + +""" +Possible metafield validation statuses. +""" +enum MetafieldValidationStatus { + """ + 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 { + """ + A `true` or `false` value. + """ + BOOLEAN + + """ + A whole number. + """ + INTEGER + + """ + A JSON string. + """ + JSON_STRING + + """ + A text field. + """ + STRING +} + +""" +Return type for `metafieldsDelete` mutation. +""" +type MetafieldsDeletePayload { + """ + List of metafield identifiers that were deleted, null if the corresponding metafield isn't found. + """ + deletedMetafields: [MetafieldIdentifier] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a metafield value to set. +""" +input MetafieldsSetInput { + """ + The `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! + + """ + The type of data that is stored in the metafield. + The type must be one of the [supported types](https://shopify.dev/apps/metafields/types). + + Required when there is 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 { + """ + The list of metafields that were set. + """ + metafields: [Metafield!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldsSetUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldsSet`. +""" +type MetafieldsSetUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldsSetUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldsSetUserError`. +""" +enum MetafieldsSetUserErrorCode { + """ + 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 + + """ + 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 +} + +""" +Provides an object instance represented by a MetaobjectDefinition. +""" +type Metaobject implements Node { + """ + Metaobject capabilities for this Metaobject. + """ + capabilities: MetaobjectCapabilityData! + + """ + 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! +} + +""" +Access permissions for the definition's metaobjects. +""" +type MetaobjectAccess { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccess! + + """ + The access permitted on the Storefront API. + """ + storefront: MetaobjectStorefrontAccess! +} + +""" +The input fields that set access permissions for the definition's metaobjects. +""" +input MetaobjectAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccess + + """ + 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 { + """ + 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 +} + +""" +Return type for `metaobjectBulkDelete` mutation. +""" +type MetaobjectBulkDeletePayload { + """ + The asynchronous job that deletes the metaobjects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Specifies the condition by which metaobjects are deleted. +Exactly one field of input is required. +""" +input MetaobjectBulkDeleteWhereCondition { + """ + A list of metaobjects IDs to delete. + """ + ids: [ID!] + + """ + Deletes all metaobjects with the specified `type`. + """ + type: String +} + +""" +Provides the capabilities of a metaobject definition. +""" +type MetaobjectCapabilities { + """ + Indicates whether a metaobject definition can be displayed as a page on the Online Store. + """ + onlineStore: MetaobjectCapabilitiesOnlineStore + + """ + Indicate whether a metaobject definition is publishable. + """ + publishable: MetaobjectCapabilitiesPublishable! + + """ + Indicate whether a metaobject definition is renderable and exposes SEO data. + """ + renderable: MetaobjectCapabilitiesRenderable + + """ + Indicate whether a metaobject definition is translatable. + """ + translatable: MetaobjectCapabilitiesTranslatable! +} + +""" +The Online Store capability of a metaobject definition. +""" +type MetaobjectCapabilitiesOnlineStore { + """ + The data associated with the Online Store capability. + """ + data: MetaobjectCapabilityDefinitionDataOnlineStore + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The publishable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesPublishable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The renderable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesRenderable { + """ + The data associated with the renderable capability. + """ + data: MetaobjectCapabilityDefinitionDataRenderable + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The translatable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesTranslatable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metaobject capability. +""" +input MetaobjectCapabilityCreateInput { + """ + The input for enabling the 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 { + """ + 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 { + """ + Online Store capability input. + """ + onlineStore: MetaobjectCapabilityDataOnlineStoreInput + + """ + Publishable capability input. + """ + publishable: MetaobjectCapabilityDataPublishableInput +} + +""" +The Online Store capability for the parent metaobject. +""" +type MetaobjectCapabilityDataOnlineStore { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The input fields for the Online Store capability to control renderability on the Online Store. +""" +input MetaobjectCapabilityDataOnlineStoreInput { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The publishable capability for the parent metaobject. +""" +type MetaobjectCapabilityDataPublishable { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The input fields for publishable capability to adjust visibility on channels. +""" +input MetaobjectCapabilityDataPublishableInput { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The Online Store capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataOnlineStore { + """ + Flag indicating if a sufficient number of redirects are available to redirect all published entries. + """ + canCreateRedirects: Boolean! + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! +} + +""" +The input fields of the Online Store capability. +""" +input MetaobjectCapabilityDefinitionDataOnlineStoreInput { + """ + 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 { + """ + The metaobject field used as an alias for the SEO page description. + """ + metaDescriptionKey: String + + """ + The metaobject field used as an alias for the SEO page title. + """ + metaTitleKey: String +} + +""" +The input fields of the renderable capability for SEO aliases. +""" +input MetaobjectCapabilityDefinitionDataRenderableInput { + """ + The metaobject field used as an alias for the SEO page 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 { + """ + 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 { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the renderable capability. +""" +input MetaobjectCapabilityRenderableInput { + """ + 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 { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for updating a metaobject capability. +""" +input MetaobjectCapabilityUpdateInput { + """ + 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 { + """ + 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 { + """ + 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! +} + +""" +Return type for `metaobjectCreate` mutation. +""" +type MetaobjectCreatePayload { + """ + The created metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Provides the definition of a generic object structure composed of metafields. +""" +type MetaobjectDefinition implements Node { + """ + Access configuration for the metaobject definition. + """ + access: MetaobjectAccess! + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilities! + + """ + The app used to create the metaobject definition. + """ + createdByApp: App! + + """ + The staff member who created the metaobject definition. + """ + createdByStaff: StaffMember + + """ + The administrative description. + """ + description: String + + """ + The key of a field to reference as the display name for each object. + """ + displayNameKey: String + + """ + The fields defined for this object type. + """ + fieldDefinitions: [MetaobjectFieldDefinition!]! + + """ + Whether this metaobject definition has field whose type can visually represent + a metaobject with the `thumbnailField`. + """ + hasThumbnailField: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A paginated connection to the metaobjects associated with the definition. + """ + metaobjects( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 type of the object definition. Defines the namespace of associated metafields. + """ + type: String! +} + +""" +An auto-generated type for paginating through multiple MetaobjectDefinitions. +""" +type MetaobjectDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectDefinitionEdge!]! + + """ + A list of nodes that are contained in MetaobjectDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetaobjectDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a metaobject definition. +""" +input MetaobjectDefinitionCreateInput { + """ + 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 { + """ + The created metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDefinitionDelete` mutation. +""" +type MetaobjectDefinitionDeletePayload { + """ + The ID of the deleted metaobjects definition. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one MetaobjectDefinition and a cursor during pagination. +""" +type MetaobjectDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectDefinitionEdge. + """ + node: MetaobjectDefinition! +} + +""" +The input fields for updating a metaobject definition. +""" +input MetaobjectDefinitionUpdateInput { + """ + 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 { + """ + The updated metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDelete` mutation. +""" +type MetaobjectDeletePayload { + """ + The ID of the deleted metaobject. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one Metaobject and a cursor during pagination. +""" +type MetaobjectEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectEdge. + """ + node: Metaobject! +} + +""" +Provides a field definition and the data value assigned to it. +""" +type MetaobjectField { + """ + The field definition for this object key. + """ + definition: MetaobjectFieldDefinition! + + """ + The assigned field value in JSON format. + """ + jsonValue: JSON + + """ + The object key of this field. + """ + key: String! + + """ + For resource reference fields, provides the referenced object. + """ + reference: MetafieldReference + + """ + For resource reference list fields, provides the list of referenced objects. + """ + references( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 +} + +""" +Defines a field for a MetaobjectDefinition with properties +such as the field's data type and validations. +""" +type MetaobjectFieldDefinition { + """ + 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!]! +} + +""" +The input fields for creating a metaobject field definition. +""" +input MetaobjectFieldDefinitionCreateInput { + """ + 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!] +} + +""" +The input fields for deleting a metaobject field definition. +""" +input MetaobjectFieldDefinitionDeleteInput { + """ + The key of the field definition to delete. + """ + key: String! +} + +""" +The input fields for possible operations for modifying field definitions. Exactly one option is required. +""" +input MetaobjectFieldDefinitionOperationInput { + """ + The input fields for creating a metaobject field definition. + """ + create: MetaobjectFieldDefinitionCreateInput + + """ + The input fields for 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 { + """ + 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!] +} + +""" +The input fields for a metaobject field value. +""" +input MetaobjectFieldInput { + """ + The key of the field. + """ + key: String! + + """ + The value of the field. + """ + value: String! +} + +""" +The input fields for retrieving a metaobject by handle. +""" +input MetaobjectHandleInput { + """ + The 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 { + """ + The metaobjects is active for public use. + """ + ACTIVE + + """ + The metaobjects is an internal record. + """ + DRAFT +} + +""" +Metaobject access permissions for the Storefront API. +""" +enum MetaobjectStorefrontAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Provides attributes for visual representation. +""" +type MetaobjectThumbnail { + """ + The file to be used for visual representation of this metaobject. + """ + file: File + + """ + The hexadecimal color code to be used for respresenting this metaobject. + """ + hex: String +} + +""" +The input fields for updating a metaobject. +""" +input MetaobjectUpdateInput { + """ + 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 +} + +""" +Return type for `metaobjectUpdate` mutation. +""" +type MetaobjectUpdatePayload { + """ + The updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +The input fields for upserting a metaobject. +""" +input MetaobjectUpsertInput { + """ + 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 { + """ + The created or updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Defines errors encountered while managing metaobject resources. +""" +type MetaobjectUserError implements DisplayableError { + """ + The error code. + """ + code: MetaobjectUserErrorCode + + """ + The index of the failing list element in an array. + """ + elementIndex: Int + + """ + The key of the failing object element. + """ + elementKey: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetaobjectUserError`. +""" +enum MetaobjectUserErrorCode { + """ + 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 set of valid sort keys for the MethodDefinition query. +""" +enum MethodDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `rate_provider_type` value. + """ + RATE_PROVIDER_TYPE + + """ + 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 +} + +""" +You can use the `MobilePlatformApplication` resource to enable +[shared web credentials](https://developer.apple.com/documentation/security/shared_web_credentials) for Shopify iOS apps, +as well as to create [iOS universal link](https://developer.apple.com/ios/universal-links/) +or [Android app link](https://developer.android.com/training/app-links/) +verification endpoints for merchant Shopify iOS or Android apps. +Shared web credentials let iOS users access a native app after logging into the +respective website in Safari without re-entering +their username and password. If a user changes their credentials in the app, then those changes are reflected in Safari. +You must use a custom domain to integrate shared web credentials with Shopify. With each platform's link system, +users can tap a link to a shop's website and get seamlessly redirected to a merchant's installed app without going +through a browser or manually selecting an app. + +For full configuration instructions on iOS shared web credentials, +see the [associated domains setup](https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains) +technical documentation. + +For full configuration instructions on iOS universal links or Android App Links, +see the respective [iOS universal link](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content) +or [Android app link](https://developer.android.com/training/app-links) technical documentation. +""" +union MobilePlatformApplication = AndroidApplication | AppleApplication + +""" +An auto-generated type for paginating through multiple MobilePlatformApplications. +""" +type MobilePlatformApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MobilePlatformApplicationEdge!]! + + """ + A list of nodes that are contained in MobilePlatformApplicationEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MobilePlatformApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationCreateAndroidInput { + """ + 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 { + """ + 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 { + """ + Android based mobile platform application. + """ + android: MobilePlatformApplicationCreateAndroidInput + + """ + Apple based mobile platform application. + """ + apple: MobilePlatformApplicationCreateAppleInput +} + +""" +Return type for `mobilePlatformApplicationCreate` mutation. +""" +type MobilePlatformApplicationCreatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +Return type for `mobilePlatformApplicationDelete` mutation. +""" +type MobilePlatformApplicationDeletePayload { + """ + The ID of the mobile platform application that was just deleted. + """ + deletedMobilePlatformApplicationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An auto-generated type which holds one MobilePlatformApplication and a cursor during pagination. +""" +type MobilePlatformApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MobilePlatformApplicationEdge. + """ + node: MobilePlatformApplication! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationUpdateAndroidInput { + """ + 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 { + """ + 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 { + """ + Android based Mobile Platform Application. + """ + android: MobilePlatformApplicationUpdateAndroidInput + + """ + Apple based Mobile Platform Application. + """ + apple: MobilePlatformApplicationUpdateAppleInput +} + +""" +Return type for `mobilePlatformApplicationUpdate` mutation. +""" +type MobilePlatformApplicationUpdatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +Represents an error in the input of a mutation. +""" +type MobilePlatformApplicationUserError implements DisplayableError { + """ + The error code. + """ + code: MobilePlatformApplicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MobilePlatformApplicationUserError`. +""" +enum MobilePlatformApplicationUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +Represents a Shopify hosted 3D model. +""" +type Model3d implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The 3d model's bounding box information. + """ + boundingBox: Model3dBoundingBox + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The 3d model's filename. + """ + filename: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The 3d model's original source. + """ + originalSource: Model3dSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The 3d model's sources. + """ + sources: [Model3dSource!]! + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Bounding box information of a 3d model. +""" +type Model3dBoundingBox { + """ + Size in meters of the smallest volume which contains the 3d model. + """ + size: Vector3! +} + +""" +A source for a Shopify-hosted 3d model. + +Types of sources include GLB and USDZ formatted 3d models, where the former +is an original 3d model and the latter has been converted from the original. + +If the original source is in GLB format and over 15 MBs in size, then both the +original and the USDZ formatted source are optimized to reduce the file size. +""" +type Model3dSource { + """ + The 3d model source's filesize. + """ + filesize: Int! + + """ + The 3d model source's format. + """ + format: String! + + """ + The 3d model source's MIME type. + """ + mimeType: String! + + """ + The 3d model source's URL. + """ + url: String! +} + +""" +A monetary value string without a currency symbol or code. Example value: `"100.57"`. +""" +scalar Money + +""" +A collection of monetary values in their respective currencies. Typically used +in the context of multi-currency pricing and transactions, +when an amount in the shop's currency is converted to the customer's currency of choice (the presentment currency). +""" +type MoneyBag { + """ + Amount in presentment currency. + """ + presentmentMoney: MoneyV2! + + """ + Amount in shop currency. + """ + shopMoney: MoneyV2! +} + +""" +The input fields for a monetary value with currency. +""" +input MoneyInput { + """ + Decimal money amount. + """ + amount: Decimal! + + """ + Currency of the money. + """ + currencyCode: CurrencyCode! +} + +""" +A precise monetary value and its associated currency. For example, 12.99 USD. +""" +type MoneyV2 { + """ + A monetary value in decimal format, allowing for precise representation of cents or fractional + currency. For example, 12.99. + """ + amount: Decimal! + + """ + The three-letter currency code that represents a world currency used in a store. Currency codes + include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, + and non-standard codes. For example, USD. + """ + currencyCode: CurrencyCode! +} + +""" +The input for moving a single object to a specific position in a set. + +Provide this input only for objects whose position actually changed; do not send inputs for the entire set. + +- id: The ID (GID) of the object to move. +- newPosition: The zero-based index of the object's position within the set at the time this move is applied. + +Moves are applied sequentially, so `newPosition` for each move is evaluated after all prior moves in the same list. +If `newPosition` is greater than or equal to the number of objects, the object is moved to the end of the set. +Values do not have to be unique. Objects not included in the move list keep +their relative order, aside from any displacement caused by the moves. +""" +input MoveInput { + """ + The ID of the object to be moved. + """ + id: ID! + + """ + Zero-based index of the object's position at the time this move is applied. If + the value is >= the number of objects, the object is placed at the end. + """ + newPosition: UnsignedInt64! +} + +""" +The schema's entry point for all mutation operations. +""" +type Mutation { + """ + Updates the email state value for an abandonment. + """ + abandonmentEmailStateUpdate( + """ + The 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! + ): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") + + """ + Updates the marketing activities delivery statuses for an abandonment. + """ + abandonmentUpdateActivitiesDeliveryStatuses( + """ + The ID of the abandonment that needs to be updated. + """ + abandonmentId: ID! + + """ + The 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! + ): AbandonmentUpdateActivitiesDeliveryStatusesPayload + + """ + Creates a one-time charge for app features or services that don't require + recurring billing. This mutation is ideal for apps that sell individual + features, premium content, or services on a per-use basis rather than + subscription models. + + For example, a design app might charge merchants once for premium templates, + or a marketing app could bill for individual campaign setups without ongoing monthly fees. + + Use the `AppPurchaseOneTimeCreate` mutation to: + - Charge for premium features or content purchases + - Bill for professional services or setup fees + - Generate revenue from one-time digital product sales + + The mutation returns a confirmation URL that merchants must visit to approve + the charge. Test and development stores are not charged, allowing safe testing + of billing flows. + + Explore one-time billing options on the [app purchases page](https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases). + """ + appPurchaseOneTimeCreate( + """ + The name of the one-time purchase from the app. + """ + name: String! + + """ + The amount to be charged to the store for the app one-time purchase. + """ + price: MoneyInput! + + """ + The URL where the merchant is redirected after approving the app one-time purchase. + """ + returnUrl: URL! + + """ + Whether the app one-time purchase is a test transaction. + """ + test: Boolean = false + ): AppPurchaseOneTimeCreatePayload + + """ + Cancels an active app subscription, stopping future billing cycles. The + cancellation behavior depends on the `replacementBehavior` setting - it can + either disable auto-renewal (allowing the subscription to continue until the + end of the current billing period) or immediately cancel with prorated refunds. + + When a merchant decides to discontinue using subscription features, this + mutation provides a clean cancellation workflow that respects billing periods + and merchant expectations. + + Use the `AppSubscriptionCancel` mutation to: + - Process merchant-initiated subscription cancellations + - Terminate subscriptions due to policy violations or account issues + - Handle subscription cancellations during app uninstallation workflows + + The cancellation timing and merchant access depends on the + `replacementBehavior` setting and the app's specific implementation of + subscription management. + + For subscription lifecycle management and cancellation best practices, consult + the [subscription management + guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). + """ + appSubscriptionCancel( + """ + The ID of the app subscription to be cancelled. + """ + id: ID! + + """ + Whether to issue prorated credits for the unused portion of the app subscription. There will + 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 + + """ + Allows an app to charge a store for features or services on a recurring basis. + """ + 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 the usage pricing plan of an app subscription line item. + """ + 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! + ): AppSubscriptionLineItemUpdatePayload + + """ + Extends the trial period for an existing app subscription, giving merchants + additional time to evaluate premium features before committing to paid + billing. This mutation provides flexibility in trial management and can + improve conversion rates by accommodating merchant needs. + + Trial extensions are particularly valuable when merchants need more time to + fully evaluate complex features, experience technical setup delays, or require + additional approval processes within their organization before committing to + paid subscriptions. + + Use the `AppSubscriptionTrialExtend` mutation to: + - Accommodate merchant requests for additional evaluation time + - Compensate for service interruptions during trial periods + - Support complex enterprise evaluation and approval workflows + - Implement customer success strategies that improve trial-to-paid conversion + - Handle technical onboarding delays that impact trial effectiveness + + The extension modifies the existing trial end date, allowing continued access + to subscription features without immediate billing. This approach maintains + subscription continuity while providing merchants the flexibility they need + for thorough feature evaluation. + + Trial extension strategies and conversion techniques are covered in the [offer free + trials guide](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! + ): AppSubscriptionTrialExtendPayload + + """ + Enables an app to charge a store for features or services on a per-use basis. + The usage charge value is counted towards the `cappedAmount` limit that was + specified in the `appUsagePricingDetails` field when the app subscription was created. + If you create an app usage charge that causes the total usage charges in a + billing interval to exceed the capped amount, then a `Total price exceeds + balance remaining` error is returned. + """ + 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! + ): AppUsageRecordCreatePayload + + """ + Starts the cancelation process of a running bulk operation. + + There may be a short delay from when a cancelation starts until the operation is actually canceled. + """ + bulkOperationCancel( + """ + The ID of the bulk operation to cancel. + """ + id: ID! + ): BulkOperationCancelPayload + + """ + Creates and runs a bulk operation mutation. + + To learn how to bulk import large volumes of data asynchronously, refer to the + [bulk import data guide](https://shopify.dev/api/usage/bulk-operations/imports). + """ + bulkOperationRunMutation( + """ + An optional identifier which may be used for querying. + """ + clientIdentifier: String + + """ + The mutation to be executed in bulk. + """ + mutation: String! + + """ + The staged upload path of the file containing mutation variables. + """ + stagedUploadPath: String! + ): BulkOperationRunMutationPayload + + """ + Creates and runs a bulk operation query. + + See the [bulk operations guide](https://shopify.dev/api/usage/bulk-operations/queries) for more details. + """ + bulkOperationRunQuery( + """ + The query to be executed in bulk. + """ + query: String! + ): BulkOperationRunQueryPayload + + """ + Creates product feedback for multiple products. + """ + bulkProductResourceFeedbackCreate( + """ + An array of inputs to create the feedback. Limited to 50. + """ + feedbackInput: [ProductResourceFeedbackInput!]! + ): BulkProductResourceFeedbackCreatePayload + + """ + Creates a new carrier service. + """ + carrierServiceCreate( + """ + The input fields used to create a carrier service. + """ + input: DeliveryCarrierServiceCreateInput! + ): CarrierServiceCreatePayload + + """ + Removes an existing carrier service. + """ + carrierServiceDelete( + """ + The global ID of the carrier service to delete. + """ + id: ID! + ): CarrierServiceDeletePayload + + """ + Updates a carrier service. Only the app that creates a carrier service can update it. + """ + carrierServiceUpdate( + """ + The input fields used to update a carrier service. + """ + input: DeliveryCarrierServiceUpdateInput! + ): CarrierServiceUpdatePayload + + """ + Creates a cart transform function that lets merchants customize how products + are bundled and presented during checkout. This gives merchants powerful + control over their merchandising strategy by allowing apps to modify cart line + items programmatically, supporting advanced approaches like dynamic bundles or + personalized product recommendations. + + For example, a bundle app might create a cart transform that automatically + groups related products (like a camera, lens, and case) into a single bundle + line item when customers add them to their cart, complete with bundle pricing + and unified presentation. + + Use `CartTransformCreate` to: + - Deploy custom bundling logic to merchant stores + - Enable dynamic product grouping during checkout + - Implement personalized product recommendations + - Create conditional offers based on cart contents + - Support complex pricing strategies for product combinations + + The mutation processes synchronously and returns the created cart transform + along with any validation errors. Once created, the cart transform function + becomes active for the shop and will process cart modifications according to + your defined logic. Cart transforms integrate with [Shopify + Functions](https://shopify.dev/docs/api/functions) to provide powerful + customization capabilities while maintaining checkout performance. + + Cart Transform functions can be configured to block checkout on failure or + allow graceful degradation, giving you control over how errors are handled in + the customer experience. + + Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle). + """ + cartTransformCreate( + """ + Whether a run failure should block cart and checkout operations. + """ + blockOnFailure: Boolean = false + + """ + The identifier of the Function providing the cart transform. + """ + functionId: String! + + """ + Additional metafields to associate to the cart transform. + """ + metafields: [MetafieldInput!] = [] + ): CartTransformCreatePayload + + """ + Removes an existing cart transform function from the merchant's store, + disabling any customized bundle or cart modification logic it provided. This + mutation persistently deletes the transform configuration and stops all + associated cart processing. + + For example, when discontinuing a bundle app or removing specific + merchandising features, you would delete the corresponding cart transform to + ensure customers no longer see the bundled products or modified cart behavior. + + Use `CartTransformDelete` to: + - Deactivate customized bundle logic when removing app features + - Clean up unused transform functions + - Disable cart modifications during app uninstallation + - Remove outdated merchandising strategies + - Restore default cart behavior for merchants + + The deletion processes immediately and returns the ID of the removed cart + transform for confirmation. Once deleted, the transform function stops + processing new cart operations, though existing cart sessions may retain their + current state until refresh. This ensures a clean transition without + disrupting active customer sessions. + + Consider the timing of deletions carefully, as removing transforms during peak + shopping periods could affect customer experience if they have active carts + with transformed items. + + Learn more about [managing cart transforms](https://shopify.dev/docs/apps/selling-strategies/bundles). + """ + cartTransformDelete( + """ + A globally-unique identifier for the cart transform. + """ + id: ID! + ): CartTransformDeletePayload + + """ + Updates the context of a catalog. + """ + catalogContextUpdate( + """ + The ID of the catalog for which to update the context. + """ + catalogId: ID! + + """ + The contexts to add to the catalog. + """ + contextsToAdd: CatalogContextInput + + """ + The contexts to remove from the catalog. + """ + contextsToRemove: CatalogContextInput + ): CatalogContextUpdatePayload + + """ + Creates a new catalog. For a complete explanation of a + [`Catalog`](https://shopify.dev/api/admin-graphql/latest/interfaces/catalog)'s + behaviour, and how you can use it with [`Publication`s](https://shopify.dev/api/admin-graphql/latest/objects/Publication) and [`PriceList`s](https://shopify.dev/api/admin-graphql/latest/objects/PriceList), see [here](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalogCreate( + """ + The properties of the new catalog. + """ + input: CatalogCreateInput! + ): CatalogCreatePayload + + """ + 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! + ): CatalogDeletePayload + + """ + Updates an existing catalog. + """ + catalogUpdate( + """ + The ID of the catalog to update. + """ + id: ID! + + """ + The properties of the updated catalog. + """ + input: CatalogUpdateInput! + ): CatalogUpdatePayload + + """ + Updates the checkout branding settings for a + [checkout profile](https://shopify.dev/api/admin-graphql/unstable/queries/checkoutProfile). + + If the settings don't exist, then new settings are created. The checkout branding settings applied to a + published checkout profile will be immediately visible within the store's checkout. The checkout branding + settings applied to a draft checkout profile could be previewed within the admin checkout editor. + + To learn more about updating checkout branding settings, refer to the checkout branding + [tutorial](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! + ): CheckoutBrandingUpsertPayload + + """ + 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! + + """ + 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!]! + ): CollectionAddProductsPayload + + """ + Asynchronously adds a set of products to a given collection. It can take a + long time to run. Instead of returning a collection, it returns a job which + should be polled. + """ + collectionAddProductsV2( + """ + The ID of the collection that's being updated. + """ + id: ID! + + """ + The IDs of the products that are being added to the collection. If the + collection's sort order is manual, the products will be added in the order + in which they are provided. + """ + productIds: [ID!]! + ): CollectionAddProductsV2Payload + + """ + 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 + + """ + 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 + + """ + Publishes a collection to a channel. + """ + collectionPublish( + """ + Specify a collection to publish and the sales channels to publish it to. + """ + input: CollectionPublishInput! + ): CollectionPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Removes multiple 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! + + """ + The IDs of products to remove from the collection. The mutation doesn't + validate that the products belong to the collection or whether the products exist. + """ + productIds: [ID!]! + ): CollectionRemoveProductsPayload + + """ + Asynchronously reorders products within a specified collection. Instead of + returning an updated collection, this mutation returns a job, which should be + [polled](https://shopify.dev/api/admin-graphql/latest/queries/job). The [`Collection.sortOrder`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-collection-sortorder) + must be `MANUAL`. + + How to use this mutation: + - Provide only the products that actually moved in the `moves` list; do not + send the entire product list. For example: to move the product at index 1 to + index N, send a single move for that product with `newPosition: N`. + - Each move is applied sequentially in the order provided. + - `newPosition` is a zero-based index within the collection at the moment the + move is applied (after any prior moves in the list). + - Products not included in `moves` keep their relative order, aside from any displacement caused by the moves. + - If `newPosition` is greater than or equal to the number of products, the product is placed at the end. + + Example: + - Initial order: [A, B, C, D, E] (indices 0..4) + - Moves (applied in order): + - E -> newPosition: 1 + - C -> newPosition: 4 + - Result: [A, E, B, D, C] + + Displaced products will have their position altered in a consistent manner with no gaps. + """ + collectionReorderProducts( + """ + The ID of the collection on which to reorder products. + """ + id: ID! + + """ + A list of moves to perform, evaluated in order. Provide only products whose + positions changed; do not send the full list. + `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 + + """ + Unpublishes a collection. + """ + collectionUnpublish( + """ + Specify a collection to unpublish and the sales channels to remove it from. + """ + input: CollectionUnpublishInput! + ): CollectionUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), + modifying its properties, products, or publication settings. Collections help organize + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) together + in the [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + + Use the `collectionUpdate` mutation to programmatically modify collections in scenarios such as: + + - Updating collection details, like title, description, or image + - Modifying SEO metadata for better search visibility + - Changing which products are included (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 + + """ + 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!] + + """ + The updated title for the combined listing. + """ + title: String + ): CombinedListingUpdatePayload + + """ + Deletes a list of companies. + """ + companiesDelete( + """ + A list of IDs of companies to delete. + """ + companyIds: [ID!]! + ): CompaniesDeletePayload + + """ + Deletes a company address. + """ + companyAddressDelete( + """ + The ID of the address to delete. + """ + addressId: ID! + ): CompanyAddressDeletePayload + + """ + Assigns the customer as a company contact. + """ + companyAssignCustomerAsContact( + """ + The ID of the company to assign the contact to. + """ + companyId: ID! + + """ + The ID of the customer to assign as the contact. + """ + customerId: ID! + ): CompanyAssignCustomerAsContactPayload + + """ + Assigns the main contact for the company. + """ + companyAssignMainContact( + """ + The ID of the company contact to be assigned as the main contact. + """ + companyContactId: ID! + + """ + The ID of the company to assign the main contact to. + """ + companyId: ID! + ): CompanyAssignMainContactPayload + + """ + Assigns a role to a contact for a location. + """ + companyContactAssignRole( + """ + The ID of the contact to assign a role to. + """ + companyContactId: ID! + + """ + The ID of the role to assign to a contact. + """ + companyContactRoleId: ID! + + """ + The ID of the location to assign a role to a contact. + """ + companyLocationId: ID! + ): CompanyContactAssignRolePayload + + """ + Assigns roles on a company contact. + """ + companyContactAssignRoles( + """ + The contact whose roles are being assigned. + """ + companyContactId: ID! + + """ + The new roles to assign. + """ + rolesToAssign: [CompanyContactRoleAssign!]! + ): CompanyContactAssignRolesPayload + + """ + Creates a company contact and the associated customer. + """ + companyContactCreate( + """ + The ID of the company that the company contact belongs to. + """ + companyId: ID! + + """ + The fields to use to create the company contact. + """ + input: CompanyContactInput! + ): CompanyContactCreatePayload + + """ + Deletes a company contact. + """ + companyContactDelete( + """ + The ID of the company contact to delete. + """ + companyContactId: ID! + ): CompanyContactDeletePayload + + """ + Removes a company contact from a Company. + """ + companyContactRemoveFromCompany( + """ + The ID of the company contact to remove from the Company. + """ + companyContactId: ID! + ): CompanyContactRemoveFromCompanyPayload + + """ + Revokes a role on a company contact. + """ + companyContactRevokeRole( + """ + The ID of the contact to revoke a role from. + """ + companyContactId: ID! + + """ + The ID of the role assignment to revoke from a contact. + """ + companyContactRoleAssignmentId: ID! + ): CompanyContactRevokeRolePayload + + """ + Revokes roles on a company contact. + """ + companyContactRevokeRoles( + """ + The contact whose roles are being revoked. + """ + companyContactId: ID! + + """ + Flag to revoke all roles on the contact. + """ + revokeAll: Boolean = false + + """ + The current role assignment IDs to revoke. + """ + roleAssignmentIds: [ID!] + ): CompanyContactRevokeRolesPayload + + """ + Sends the company contact a welcome email. + """ + companyContactSendWelcomeEmail( + """ + The ID of the company contact to send welcome email to. + """ + companyContactId: ID! + + """ + The welcome email fields. + """ + email: EmailInput + ): CompanyContactSendWelcomeEmailPayload + + """ + Updates a company contact. + """ + companyContactUpdate( + """ + The ID of the company contact to be updated. + """ + companyContactId: ID! + + """ + The fields to use to update the company contact. + """ + input: CompanyContactInput! + ): CompanyContactUpdatePayload + + """ + Deletes one or more company contacts. + """ + companyContactsDelete( + """ + The list of IDs of the company contacts to delete. + """ + companyContactIds: [ID!]! + ): CompanyContactsDeletePayload + + """ + Creates a company. + """ + companyCreate( + """ + The fields to use when creating the company. + """ + input: CompanyCreateInput! + ): CompanyCreatePayload + + """ + Deletes a company. + """ + companyDelete( + """ + The ID of the company to delete. + """ + id: ID! + ): CompanyDeletePayload + + """ + Updates an address on a company location. + """ + companyLocationAssignAddress( + """ + The 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! + ): CompanyLocationAssignAddressPayload + + """ + Assigns roles on a company location. + """ + companyLocationAssignRoles( + """ + The location whose roles are being assigned. + """ + companyLocationId: ID! + + """ + The roles to assign. + """ + rolesToAssign: [CompanyLocationRoleAssign!]! + ): CompanyLocationAssignRolesPayload + + """ + Assigns tax exemptions to the company location. + """ + companyLocationAssignTaxExemptions( + """ + The location to which the tax exemptions will be assigned. + """ + companyLocationId: ID! + + """ + The tax exemptions that are being assigned to the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Creates a company location. + """ + companyLocationCreate( + """ + The ID of the company that the company location belongs to. + """ + companyId: ID! + + """ + The fields to use to create the company location. + """ + input: CompanyLocationInput! + ): CompanyLocationCreatePayload + + """ + Creates a tax registration for a company location. + """ + companyLocationCreateTaxRegistration( + """ + The ID of the company location that the tax registration gets assigned to. + """ + locationId: ID! + + """ + The unique tax id for the tax registration. + """ + taxId: String! + ): CompanyLocationCreateTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Deletes a company location. + """ + companyLocationDelete( + """ + The ID of the company location to delete. + """ + companyLocationId: ID! + ): CompanyLocationDeletePayload + + """ + Revokes roles on a company location. + """ + companyLocationRevokeRoles( + """ + The location whose roles are being revoked. + """ + companyLocationId: ID! + + """ + The current roles to revoke. + """ + rolesToRevoke: [ID!]! + ): CompanyLocationRevokeRolesPayload + + """ + Revokes tax exemptions from the company location. + """ + companyLocationRevokeTaxExemptions( + """ + The location from which the tax exemptions will be revoked. + """ + companyLocationId: ID! + + """ + The tax exemptions that are being revoked from the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Revokes tax registration on a company location. + """ + companyLocationRevokeTaxRegistration( + """ + The location whose tax registration is being revoked. + """ + companyLocationId: ID! + ): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Updates a company location. + """ + companyLocationUpdate( + """ + The ID of the company location to update. + """ + companyLocationId: ID! + + """ + The input fields to update in the company location. + """ + input: CompanyLocationUpdateInput! + ): CompanyLocationUpdatePayload + + """ + Deletes a list of company locations. + """ + companyLocationsDelete( + """ + A list of IDs of company locations to delete. + """ + companyLocationIds: [ID!]! + ): CompanyLocationsDeletePayload + + """ + Revokes the main contact from the company. + """ + companyRevokeMainContact( + """ + The ID of the company to revoke the main contact from. + """ + companyId: ID! + ): CompanyRevokeMainContactPayload + + """ + Updates a company. + """ + companyUpdate( + """ + The ID of the company to be updated. + """ + companyId: ID! + + """ + The input fields to update the company. + """ + input: CompanyInput! + ): CompanyUpdatePayload + + """ + Add tax exemptions for the customer. + """ + customerAddTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions to add for the customer, in the format of an + array or a comma-separated list. Example values: + `["CA_BC_RESELLER_EXEMPTION", "CA_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerAddTaxExemptionsPayload + + """ + Cancels a pending erasure of a customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#cancel-customer-data-erasure). + + To request an erasure of a customer's data use the [customerRequestDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerRequestDataErasure). + """ + customerCancelDataErasure( + """ + The ID of the customer for whom to cancel a pending data erasure. + """ + customerId: ID! + ): CustomerCancelDataErasurePayload + + """ + Create a new customer. 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). + """ + customerCreate( + """ + The input fields to create a customer. + """ + input: CustomerInput! + ): CustomerCreatePayload + + """ + Delete a customer. 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). + """ + customerDelete( + """ + Specifies the customer to delete. + """ + input: CustomerDeleteInput! + ): CustomerDeletePayload + + """ + Update a customer's email marketing information information. + """ + customerEmailMarketingConsentUpdate( + """ + Specifies the input fields to update a customer's email marketing consent information. + """ + input: CustomerEmailMarketingConsentUpdateInput! + ): CustomerEmailMarketingConsentUpdatePayload + + """ + Generate an account activation URL for a customer. + """ + customerGenerateAccountActivationUrl( + """ + The ID of the customer that the URL is generated for. + """ + customerId: ID! + ): CustomerGenerateAccountActivationUrlPayload + + """ + Merges two customers. + """ + customerMerge( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePayload + + """ + Creates a vaulted payment method for a customer from duplication data. + + This data must be obtained from another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodCreateFromDuplicationData( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! + + """ + The encrypted payment method data. + """ + encryptedDuplicationData: String! + ): CustomerPaymentMethodCreateFromDuplicationDataPayload + + """ + Creates a credit card payment method for a customer using a session id. + These values are only obtained through card imports happening from a PCI compliant environment. + Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly. + """ + customerPaymentMethodCreditCardCreate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! + + """ + The Cardserver session ID. Obtained by storing card data with Shopify's + Cardsink. Exchanging raw card data for a session ID must be done in a PCI + complaint environment. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardCreatePayload + + """ + Updates the credit card payment method for a customer. + """ + customerPaymentMethodCreditCardUpdate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! + + """ + The Cardserver session ID. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardUpdatePayload + + """ + Returns encrypted data that can be used to duplicate the payment method in another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodGetDuplicationData( + """ + The payment method to be duplicated. + """ + customerPaymentMethodId: ID! + + """ + The customer the payment method will be duplicated into. + """ + targetCustomerId: ID! + + """ + The shop the payment method will be duplicated into. + """ + targetShopId: ID! + ): CustomerPaymentMethodGetDuplicationDataPayload + + """ + Returns a URL that allows the customer to update a specific payment method. + + Currently, `customerPaymentMethodGetUpdateUrl` only supports Shop Pay. + """ + customerPaymentMethodGetUpdateUrl( + """ + The payment method to be updated. + """ + customerPaymentMethodId: ID! + ): CustomerPaymentMethodGetUpdateUrlPayload + + """ + Creates a PayPal billing agreement for a customer. + """ + 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! + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean = false + ): CustomerPaymentMethodPaypalBillingAgreementCreatePayload + + """ + Updates a PayPal billing agreement for a customer. + """ + customerPaymentMethodPaypalBillingAgreementUpdate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! + ): CustomerPaymentMethodPaypalBillingAgreementUpdatePayload + + """ + Create a payment method from remote gateway identifiers. NOTE: This operation + processes payment methods asynchronously. The returned payment method will + initially have incomplete details. Developers must poll this payment method + using customerPaymentMethod query until all payment method details are + available, or the payment method is revoked (usually within seconds). + """ + customerPaymentMethodRemoteCreate( + """ + The ID of the customer. + """ + customerId: ID! + + """ + Remote gateway payment method details. + """ + remoteReference: CustomerPaymentMethodRemoteInput! + ): CustomerPaymentMethodRemoteCreatePayload + + """ + Create a payment method from a credit card stored by Stripe. + """ + customerPaymentMethodRemoteCreditCardCreate( + """ + The ID of the customer. + """ + customerId: ID! + + """ + The Stripe Customer ID. + """ + stripeCustomerId: String! + + """ + The Stripe Payment Method ID. Starting on 2025, stripe_payment_method_id will become mandatory for all API versions. + """ + stripePaymentMethodId: String + ): CustomerPaymentMethodRemoteCreditCardCreatePayload @deprecated(reason: "This will be removed in 2025-01. Use `customerPaymentMethodRemoteCreate` instead.") + + """ + Revokes a customer's payment method. + """ + customerPaymentMethodRevoke( + """ + The ID of the customer payment method to be revoked. + """ + customerPaymentMethodId: ID! + ): CustomerPaymentMethodRevokePayload + + """ + Sends a link to the customer so they can update a specific payment method. + """ + customerPaymentMethodSendUpdateEmail( + """ + The payment method to be updated. + """ + customerPaymentMethodId: ID! + + """ + Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input. + """ + email: EmailInput + ): CustomerPaymentMethodSendUpdateEmailPayload + + """ + Remove tax exemptions from a customer. + """ + customerRemoveTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions to remove for the customer, in the format of an + array or a comma-separated list. Example values: + `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerRemoveTaxExemptionsPayload + + """ + Replace tax exemptions for a customer. + """ + customerReplaceTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions that will replace the current exemptions for a + customer. Can be an array or a comma-separated list. + Example values: `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerReplaceTaxExemptionsPayload + + """ + Enqueues a request to erase customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#erase-customer-personal-data). + + To cancel the data erasure request use the [customerCancelDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerCancelDataErasure). + """ + customerRequestDataErasure( + """ + The ID of the customer to erase. + """ + customerId: ID! + ): CustomerRequestDataErasurePayload + + """ + Creates a customer segment members query. + """ + customerSegmentMembersQueryCreate( + """ + The input fields to create a customer segment members query. + """ + input: CustomerSegmentMembersQueryInput! + ): CustomerSegmentMembersQueryCreatePayload + + """ + Update a customer's SMS marketing consent information. + """ + customerSmsMarketingConsentUpdate( + """ + Specifies the input fields to update a customer's SMS marketing consent information. + """ + input: CustomerSmsMarketingConsentUpdateInput! + ): CustomerSmsMarketingConsentUpdatePayload + + """ + Update a customer's attributes. 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). + """ + customerUpdate( + """ + Provides updated fields for the customer. To set marketing consent, use the + `customerEmailMarketingConsentUpdate` or `customerSmsMarketingConsentUpdate` + mutations instead. + """ + input: CustomerInput! + ): CustomerUpdatePayload + + """ + Updates a customer's default address. + """ + customerUpdateDefaultAddress( + """ + The ID of the customer's new default address. + """ + addressId: ID! + + """ + The ID of the customer whose default address is being updated. + """ + customerId: ID! + ): CustomerUpdateDefaultAddressPayload + + """ + Opt out a customer from data sale. + """ + dataSaleOptOut( + """ + The email address of the customer to opt out of data sale. + """ + email: String! + ): DataSaleOptOutPayload + + """ + Creates a delegate access token. + + 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). + """ + 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!]! + ): DeliveryCustomizationActivationPayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationCreate( + """ + The input data used to create the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + ): DeliveryCustomizationCreatePayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationDelete( + """ + The global ID of the delivery customization. + """ + id: ID! + ): DeliveryCustomizationDeletePayload + + """ + Updates a delivery customization. + """ + deliveryCustomizationUpdate( + """ + The input data used to update the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + + """ + The global ID of the delivery customization. + """ + id: ID! + ): DeliveryCustomizationUpdatePayload + + """ + Create a delivery profile. + """ + deliveryProfileCreate( + """ + Specifies the input fields for a delivery profile. + """ + profile: DeliveryProfileInput! + ): DeliveryProfileCreatePayload + + """ + Enqueue the removal of a delivery profile. + """ + deliveryProfileRemove( + """ + The ID of the delivery profile to remove. + """ + id: ID! + ): DeliveryProfileRemovePayload + + """ + Update a delivery profile. + """ + deliveryProfileUpdate( + """ + The ID of the delivery profile to update. + """ + id: ID! + + """ + Whether this delivery profile should leave legacy mode. + """ + leaveLegacyModeProfiles: Boolean @deprecated(reason: "Legacy mode profiles are no longer supported.") + + """ + Specifies the input fields for a delivery profile. + """ + profile: DeliveryProfileInput! + ): DeliveryProfileUpdatePayload + + """ + 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! + + """ + 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 + + """ + Set the delivery settings for a shop. + """ + deliverySettingUpdate( + """ + Specifies the input fields for the delivery shop level settings. + """ + setting: DeliverySettingInput! + ): DeliverySettingUpdatePayload + + """ + Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles. + """ + deliveryShippingOriginAssign( + """ + The ID of the location to assign as the shipping origin. + """ + locationId: ID! + ): DeliveryShippingOriginAssignPayload + + """ + Activates an automatic discount. + """ + discountAutomaticActivate( + """ + The ID of the automatic discount to activate. + """ + id: ID! + ): DiscountAutomaticActivatePayload + + """ + Creates an automatic discount that's managed by an app. + Use this mutation with [Shopify Functions](https://shopify.dev/docs/apps/build/functions) + when you need advanced, custom, or dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create an automatic discount using an app's + "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create code discounts with custom logic, use the + [`discountCodeAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppCreate) + mutation. + """ + discountAutomaticAppCreate( + """ + The input data used to create the automatic discount. + """ + automaticAppDiscount: DiscountAutomaticAppInput! + ): DiscountAutomaticAppCreatePayload + + """ + Updates an existing automatic discount that's managed by an app using + [Shopify Functions](https://shopify.dev/docs/apps/build/functions). + Use this mutation when you need advanced, custom, or + dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to update a new "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To update code discounts with custom logic, use the + [`discountCodeAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppUpdate) + mutation instead. + """ + discountAutomaticAppUpdate( + """ + The input fields required to update the automatic discount. + """ + automaticAppDiscount: DiscountAutomaticAppInput! + + """ + The ID of the automatic discount to update. + """ + id: ID! + ): DiscountAutomaticAppUpdatePayload + + """ + Creates an + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) + mutation. + """ + discountAutomaticBasicCreate( + """ + The input data used to create the automatic amount off discount. + """ + automaticBasicDiscount: DiscountAutomaticBasicInput! + ): DiscountAutomaticBasicCreatePayload + + """ + Updates an existing + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate) + mutation instead. + """ + discountAutomaticBasicUpdate( + """ + The input data used to update the automatic amount off discount. + """ + automaticBasicDiscount: DiscountAutomaticBasicInput! + + """ + The ID of the automatic amount off discount to update. + """ + id: ID! + ): DiscountAutomaticBasicUpdatePayload + + """ + Deletes multiple automatic discounts in a single operation, providing + efficient bulk management for stores with extensive discount catalogs. This + mutation processes deletions asynchronously to handle large volumes without + blocking other operations. + + For example, when cleaning up expired seasonal promotions or removing outdated + automatic discounts across product categories, merchants can delete dozens of + discounts simultaneously rather than processing each individually. + + Use `DiscountAutomaticBulkDelete` to: + - Remove multiple automatic discounts efficiently + - Clean up expired or obsolete promotions + - Streamline discount management workflows + - Process large-scale discount removals asynchronously + + The operation returns a job object for tracking deletion progress and any validation errors encountered during processing. + + Learn more about [discount management](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomatic). + """ + discountAutomaticBulkDelete( + """ + The IDs of the automatic discounts to delete. + """ + ids: [ID!] + + """ + The ID of the saved search to use for filtering automatic discounts to delete. + """ + savedSearchId: ID + + """ + 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 + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyCreate) + mutation. + """ + discountAutomaticBxgyCreate( + """ + The input data used to create the automatic BXGY discount. + """ + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + ): DiscountAutomaticBxgyCreatePayload + + """ + Updates an existing + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyUpdate) + mutation instead. + """ + discountAutomaticBxgyUpdate( + """ + The input data used to update the automatic BXGY discount. + """ + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + + """ + The ID of the automatic BXGY discount to update. + """ + id: ID! + ): DiscountAutomaticBxgyUpdatePayload + + """ + Deactivates an automatic discount. + """ + discountAutomaticDeactivate( + """ + The ID of the automatic discount to deactivate. + """ + id: ID! + ): DiscountAutomaticDeactivatePayload + + """ + Deletes an existing automatic discount from the store, permanently removing it + from all future order calculations. This mutation provides a clean way to + remove promotional campaigns that are no longer needed. + + For example, when a seasonal promotion ends or a flash sale concludes, + merchants can use this mutation to ensure the discount no longer applies to + new orders while preserving historical order data. + + Use `DiscountAutomaticDelete` to: + - Remove expired promotional campaigns + - Clean up test discounts during development + - Delete automatic discounts that conflict with new promotions + - Maintain a clean discount configuration + + The mutation returns the ID of the deleted discount for confirmation and any + validation errors if the deletion cannot be completed. Once deleted, the + automatic discount will no longer appear in discount lists or apply to new + customer orders. + """ + discountAutomaticDelete( + """ + The ID of the automatic discount to delete. + """ + id: ID! + ): DiscountAutomaticDeletePayload + + """ + Creates automatic free shipping discounts that apply to qualifying orders + without requiring discount codes. These promotions automatically activate when + customers meet specified criteria, streamlining the checkout experience. + + For example, a store might create an automatic free shipping discount for + orders over variable pricing to encourage larger purchases, or offer free + shipping to specific customer segments during promotional periods. + + Use `DiscountAutomaticFreeShippingCreate` to: + - Set up code-free shipping promotions + - Create order value-based shipping incentives + - Target specific customer groups with shipping benefits + - Establish location-based shipping discounts + + The mutation validates discount configuration and returns the created + automatic discount node along with any configuration errors that need resolution. + + Learn more about [automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticNode). + """ + discountAutomaticFreeShippingCreate( + """ + The input data used to create the automatic free shipping discount. + """ + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + ): DiscountAutomaticFreeShippingCreatePayload + + """ + Updates existing automatic free shipping discounts, allowing merchants to + modify promotion criteria, shipping destinations, and eligibility requirements + without recreating the entire discount structure. + + For example, extending a holiday free shipping promotion to include additional + countries, adjusting the minimum order value threshold, or expanding customer + eligibility to include new segments. + + Use `DiscountAutomaticFreeShippingUpdate` to: + - Modify shipping discount thresholds and criteria + - Expand or restrict geographic availability + - Update customer targeting and eligibility rules + - Adjust promotion timing and activation periods + + Changes take effect immediately for new orders, while the mutation validates + all modifications and reports any configuration conflicts through user errors. + + Learn more about [managing automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping). + """ + discountAutomaticFreeShippingUpdate( + """ + The input data used to update the automatic free shipping discount. + """ + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + + """ + The ID of the automatic free shipping discount to update. + """ + id: ID! + ): DiscountAutomaticFreeShippingUpdatePayload + + """ + Activates a previously created code discount, making it available for + customers to use during checkout. This mutation transitions inactive discount + codes into an active state where they can be applied to orders. + + For example, after creating a "SUMMER20" discount code but leaving it inactive + during setup, merchants can activate it when ready to launch their summer + promotion campaign. + + Use `DiscountCodeActivate` to: + - Launch scheduled promotional campaigns + - Reactivate previously paused discount codes + - Enable discount codes after configuration changes + - Control the timing of discount availability + + The mutation returns the updated discount code node with its new active status + and handles any validation errors that might prevent activation, such as + conflicting discount rules or invalid date ranges. + """ + discountCodeActivate( + """ + The ID of the code discount to activate. + """ + id: ID! + ): DiscountCodeActivatePayload + + """ + Creates a code discount. The discount type must be provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Functions can implement + [order](https://shopify.dev/docs/api/functions/reference/order-discounts), + [product](https://shopify.dev/docs/api/functions/reference/product-discounts), or [shipping](https://shopify.dev/docs/api/functions/reference/shipping-discounts) + discount functions. Use this mutation with Shopify Functions when you need + custom logic beyond [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create a code discount using an app's + "Volume" discount type that applies a percentage off when customers purchase + more than the minimum quantity + of a product. For an example implementation, refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create automatic discounts with custom logic, use [`discountAutomaticAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppCreate). + """ + discountCodeAppCreate( + """ + The input data used to create the discount. + """ + codeAppDiscount: DiscountCodeAppInput! + ): DiscountCodeAppCreatePayload + + """ + Updates a code discount, where the discount type is provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Use this mutation + when you need advanced, custom, or dynamic discount capabilities that aren't + supported by [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + > Note: + > To update automatic discounts, use [`discountAutomaticAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppUpdate). + """ + discountCodeAppUpdate( + """ + The input fields required to update the discount. + """ + codeAppDiscount: DiscountCodeAppInput! + + """ + The ID of the discount to update. + """ + id: ID! + ): DiscountCodeAppUpdatePayload + + """ + Creates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicCreate) mutation. + """ + discountCodeBasicCreate( + """ + The input data used to create the discount code. + """ + basicCodeDiscount: DiscountCodeBasicInput! + ): DiscountCodeBasicCreatePayload + + """ + Updates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To update discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicUpdate) mutation. + """ + discountCodeBasicUpdate( + """ + The input data used to update the discount code. + """ + basicCodeDiscount: DiscountCodeBasicInput! + + """ + The ID of the discount code to update. + """ + id: ID! + ): DiscountCodeBasicUpdatePayload + + """ + Activates multiple [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can activate discounts for all codes that match a search + criteria, or activate a predefined set of discount codes. + """ + discountCodeBulkActivate( + """ + The IDs of the discounts to activate. + """ + ids: [ID!] + + """ + The ID of the saved search for filtering discounts to activate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + 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!] + + """ + The ID of the saved search for filtering discounts to deactivate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + 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!] + + """ + The ID of the saved search for filtering discounts to delete. Saved searches + represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyCreate) + mutation. + """ + discountCodeBxgyCreate( + """ + The input data used to create the BXGY code discount. + """ + bxgyCodeDiscount: DiscountCodeBxgyInput! + ): DiscountCodeBxgyCreatePayload + + """ + Updates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyUpdate) + mutation. + """ + discountCodeBxgyUpdate( + """ + The input data used to update the BXGY code discount. + """ + bxgyCodeDiscount: DiscountCodeBxgyInput! + + """ + The ID of the BXGY code discount to update. + """ + id: ID! + ): DiscountCodeBxgyUpdatePayload + + """ + Temporarily suspends a code discount without permanently removing it from the + store. Deactivation allows merchants to pause promotional campaigns while + preserving the discount configuration for potential future use. + + For example, when a flash sale needs to end immediately or a discount code + requires temporary suspension due to inventory issues, merchants can + deactivate it to stop new redemptions while keeping the discount structure intact. + + Use `DiscountCodeDeactivate` to: + - Pause active promotional campaigns timely + - Temporarily suspend problematic discount codes + - Control discount availability during inventory shortages + - Maintain discount history while stopping usage + + Deactivated discounts remain in the system and can be reactivated later, + unlike deletion which persistently removes the code. Customers attempting to + use deactivated codes will receive appropriate error messages. + """ + discountCodeDeactivate( + """ + The ID of the code discount to deactivate. + """ + id: ID! + ): DiscountCodeDeactivatePayload + + """ + Removes a code discount from the store, making it permanently unavailable for + customer use. This mutation provides a clean way to eliminate discount codes + that are no longer needed or have been replaced. + + For example, when a seasonal promotion ends or a discount code has been + compromised, merchants can delete it entirely rather than just deactivating + it, ensuring customers cannot attempt to use expired promotional codes. + + Use `DiscountCodeDelete` to: + - persistently remove outdated promotional codes + - Clean up discount code lists after campaigns end + - Eliminate compromised or leaked discount codes + - Maintain organized discount management + + Once deleted, the discount code cannot be recovered and any customer attempts + to use it will fail. This differs from deactivation, which preserves the code + for potential future reactivation. + """ + discountCodeDelete( + """ + The ID of the code discount to delete. + """ + id: ID! + ): DiscountCodeDeletePayload + + """ + Creates an [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticFreeShippingCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingCreate) mutation. + """ + discountCodeFreeShippingCreate( + """ + The input data used to create the discount code. + """ + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + ): DiscountCodeFreeShippingCreatePayload + + """ + Updates a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update a free shipping discount that's automatically applied on a cart + and at checkout, use the [`discountAutomaticFreeShippingUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingUpdate) mutation. + """ + discountCodeFreeShippingUpdate( + """ + The input data used to update the discount code. + """ + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + + """ + The ID of the discount code to update. + """ + id: ID! + ): DiscountCodeFreeShippingUpdatePayload + + """ + Asynchronously delete + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. + """ + discountCodeRedeemCodeBulkDelete( + """ + The ID of the + [`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! + + """ + 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!] + + """ + The ID of a + [saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id). + """ + savedSearchId: ID + + """ + 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 + + """ + 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! + ): DiscountRedeemCodeBulkAddPayload + + """ + Updates a dispute evidence. + """ + disputeEvidenceUpdate( + """ + The ID of the dispute evidence to be updated. + """ + id: ID! + + """ + The updated properties for a dispute evidence. + """ + input: ShopifyPaymentsDisputeEvidenceUpdateInput! + ): DisputeEvidenceUpdatePayload + + """ + Adds tags to multiple draft orders. + """ + draftOrderBulkAddTags( + """ + The IDs of the draft orders to add tags to. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + 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 + + """ + Deletes multiple draft orders. + """ + draftOrderBulkDelete( + """ + The IDs of the draft orders to delete. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + ): DraftOrderBulkDeletePayload + + """ + Removes tags from multiple draft orders. + """ + draftOrderBulkRemoveTags( + """ + The IDs of the draft orders to remove tags from. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + 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 + + """ + Calculates the properties of a draft order. Useful for determining information + such as total taxes or price without actually creating a draft order. + """ + draftOrderCalculate( + """ + The fields for the draft order. + """ + input: DraftOrderInput! + ): DraftOrderCalculatePayload + + """ + Completes a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) and + converts it into a [regular order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + The order appears in the merchant's orders list, and the customer can be notified about their order. + + Use the `draftOrderComplete` mutation when a merchant is ready to finalize a draft order and create a real + order in their store. The `draftOrderComplete` mutation also supports sales channel attribution for tracking + order sources using the [`sourceName`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete#arguments-sourceName) + argument, [cart validation](https://shopify.dev/docs/apps/build/checkout/cart-checkout-validation) + controls for app integrations, and detailed error reporting for failed completions. + + You can complete a draft order with different [payment scenarios](https://help.shopify.com/manual/fulfillment/managing-orders/payments): + + - Mark the order as paid immediately. + - Set the order as payment pending using [payment terms](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms). + - Specify a custom payment amount. + - Select a specific payment gateway. + + > Note: + > When completing a draft order, inventory is [reserved](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + for the items in the order. This means the items will no longer be available for other customers to purchase. + Make sure to verify inventory availability before completing the draft order. + """ + draftOrderComplete( + """ + The draft order to complete. + """ + id: ID! + + """ + The gateway for the completed draft order. + """ + paymentGatewayId: ID + + """ + 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 + + """ + Creates a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) + with attributes such as customer information, line items, shipping and billing addresses, and payment terms. + Draft orders are useful for merchants that need to: + + - Create new orders for sales made by phone, in person, by chat, or elsewhere. + When a merchant accepts payment for a draft order, an order is created. + - Send invoices to customers with a secure checkout link. + - Use custom items to represent additional costs or products not in inventory. + - Re-create orders manually from active sales channels. + - Sell products at discount or wholesale rates. + - Take pre-orders. + + After creating a draft order, you can: + - Send an invoice to the customer using the [`draftOrderInvoiceSend`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderInvoiceSend) mutation. + - Complete the draft order using the [`draftOrderComplete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete) mutation. + - Update the draft order using the [`draftOrderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderUpdate) mutation. + - Duplicate a draft order using the [`draftOrderDuplicate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDuplicate) mutation. + - Delete the draft order using the [`draftOrderDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDelete) mutation. + + > Note: + > When you create a draft order, you can't [reserve or hold inventory](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + for the items in the order by default. + > However, you can reserve inventory using the [`reserveInventoryUntil`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderCreate#arguments-input.fields.reserveInventoryUntil) input. + """ + draftOrderCreate( + """ + The fields used to create the draft order. + """ + input: DraftOrderInput! + ): DraftOrderCreatePayload + + """ + Creates a draft order from order. + """ + draftOrderCreateFromOrder( + """ + Specifies the order's id that we create the draft order from. + """ + orderId: ID! + ): DraftOrderCreateFromOrderPayload + + """ + Creates a merchant checkout for the given draft order. + """ + draftOrderCreateMerchantCheckout( + """ + Specifies the Draft order's id that we create the checkout for. + """ + id: ID! + ): DraftOrderCreateMerchantCheckoutPayload @deprecated(reason: "This mutation is no longer supported.") + + """ + Deletes a draft order. + """ + draftOrderDelete( + """ + Specify the draft order to delete by its ID. + """ + input: DraftOrderDeleteInput! + ): DraftOrderDeletePayload + + """ + Duplicates a draft order. + """ + draftOrderDuplicate( + """ + The ID of the draft order to duplicate. + """ + draftOrderId: ID @deprecated(reason: "Use `id` instead.") + + """ + The ID of the draft order to duplicate. + """ + id: ID + ): DraftOrderDuplicatePayload + + """ + Previews a draft order invoice email. + """ + draftOrderInvoicePreview( + """ + Specifies the draft order invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order invoice email to preview. + """ + id: ID! + ): DraftOrderInvoicePreviewPayload + + """ + Sends an email invoice for a draft order. + """ + draftOrderInvoiceSend( + """ + Specifies the draft order invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order to send the invoice for. + """ + id: ID! + ): DraftOrderInvoiceSendPayload + + """ + Updates a draft order. + + If a checkout has been started for a draft order, any update to the draft will unlink the checkout. Checkouts + are created but not immediately completed when opening the merchant credit card modal in the admin, and when a + buyer opens the invoice URL. This is usually fine, but there is an edge case where a checkout is in progress + and the draft is updated before the checkout completes. This will not interfere with the checkout and order + creation, but if the link from draft to checkout is broken the draft will remain open even after the order is + created. + """ + draftOrderUpdate( + """ + Specifies the draft order to update. + """ + id: ID! + + """ + The draft order properties to update. + """ + input: DraftOrderInput! + ): DraftOrderUpdatePayload + + """ + Updates the server pixel to connect to an EventBridge endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + eventBridgeServerPixelUpdate( + """ + The ARN for the EventBridge endpoint to which customer events are to be sent. + """ + arn: ARN! + ): EventBridgeServerPixelUpdatePayload + + """ + Creates a new 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). + """ + eventBridgeWebhookSubscriptionCreate( + """ + The type of event that triggers the webhook. + """ + topic: WebhookSubscriptionTopic! + + """ + Specifies the input fields for an EventBridge webhook subscription. + """ + webhookSubscription: EventBridgeWebhookSubscriptionInput! + ): EventBridgeWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates an Amazon EventBridge webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + eventBridgeWebhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for an EventBridge webhook subscription. + """ + webhookSubscription: EventBridgeWebhookSubscriptionInput! + ): EventBridgeWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Acknowledges file update failure by resetting FAILED status to READY and clearing any media errors. + """ + fileAcknowledgeUpdateFailed( + """ + Specifies the file(s) to acknowledge the failed updates of. + """ + fileIds: [ID!]! + ): FileAcknowledgeUpdateFailedPayload + + """ + Creates file assets for a store from external URLs or files that were previously uploaded using the + [`stagedUploadsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/stageduploadscreate) + mutation. + + Use the `fileCreate` mutation to add various types of media and documents to your store. These files are added to the + [**Files** page](https://shopify.com/admin/settings/files) in the Shopify admin and can be referenced by other + resources in your store. + + The `fileCreate` mutation supports multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing + - **External videos**: YouTube and Vimeo videos for enhanced product experiences + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types for store resources + + The mutation handles duplicate filenames using configurable resolution modes that automatically append UUIDs, + replace existing files, or raise errors when conflicts occur. + + > Note: + > Files are processed asynchronously. Check the + > [`fileStatus`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/File#fields-fileStatus) + > field to monitor processing completion. The maximum number of files that can be created in a single batch is 250. + + After creating files, you can make subsequent updates using the following mutations: + + - [`fileUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileUpdate): + Update file properties such as alt text or replace file contents while preserving the same URL. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + To list all files in your store, use the + [`files`](https://shopify.dev/docs/api/admin-graphql/latest/queries/files) query. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileCreate( + """ + List of new files to be created. + """ + files: [FileCreateInput!]! + ): FileCreatePayload + + """ + Deletes file assets that were previously uploaded to your store. + + Use the `fileDelete` mutation to permanently remove media and file assets from your store when they are no longer needed. + This mutation handles the complete removal of files from both your store's file library and any associated references + to products or other resources. + + The `fileDelete` mutation supports removal of multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing content + - **External Videos**: YouTube and Vimeo videos linked to your products + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types stored in your + [**Files** page](https://shopify.com/admin/settings/files) + + When you delete files that are referenced by products, the mutation automatically removes those references and + reorders any remaining media to maintain proper positioning. Product file references are database relationships + managed through a media reference system, not just links in product descriptions. The Shopify admin provides a UI + to manage these relationships, and when files are deleted, the system automatically cleans up all references. + Files that are currently being processed by other operations are rejected to prevent conflicts. + + > Caution: + > File deletion is permanent and can't be undone. When you delete a file that's being used in your store, + > it will immediately stop appearing wherever it was displayed. For example, if you delete a product image, + > that product will show a broken image or placeholder on your storefront and in the admin. The same applies + > to any other files linked from themes, blog posts, or pages. Before deleting files, you can use the + > [`files` query](https://shopify.dev/api/admin-graphql/latest/queries/files) to list and review + > your store's file assets. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileDelete( + """ + The IDs of the files to be deleted. + """ + fileIds: [ID!]! + ): FileDeletePayload + + """ + Updates properties, content, and metadata associated with an existing file + asset that has already been uploaded to Shopify. + + Use the `fileUpdate` mutation to modify various aspects of files already stored in your store. + Files can be updated individually or in batches. + + The `fileUpdate` mutation supports updating multiple file properties: + + - **Alt text**: Update accessibility descriptions for images and other media. + - **File content**: Replace image or generic file content while maintaining the same URL. + - **Filename**: Modify file names (extension must match the original). + - **Product references**: Add or remove associations between files and products. Removing file-product associations + deletes the file from the product's media gallery and clears the image from any product variants that were using it. + + The mutation handles different file types with specific capabilities: + + - **Images**: Update preview images, original source, filename, and alt text. + - **Generic files**: Update original source, filename, and alt text. + - **Videos and 3D models**: Update alt text and product references. + + > Note: + > Files must be in `ready` state before they can be updated. The mutation includes file locking to prevent + > conflicts during updates. You can't simultaneously update both `originalSource` and `previewImageSource`. + + After updating files, you can use related mutations for additional file management: + + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Create new file assets from external URLs or staged uploads. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileUpdate( + """ + List of files to be updated. + """ + files: [FileUpdateInput!]! + ): FileUpdatePayload + + """ + Generates a signature for a Flow action payload. + """ + flowGenerateSignature( + """ + The unique identifier of the Flow action definition. + """ + id: ID! + + """ + The request payload used to generate the signature. + """ + payload: String! + ): FlowGenerateSignaturePayload + + """ + Triggers any workflows that begin with the trigger specified in the request + body. To learn more, refer to [_Create Shopify Flow + triggers_](https://shopify.dev/apps/flow/triggers). + """ + flowTriggerReceive( + """ + The payload needed to run the Trigger. + """ + body: String @deprecated(reason: "Use `payload` and `handle` to execute your Flow trigger.") + + """ + The handle of the trigger. + """ + handle: String + + """ + The payload needed to run the Trigger. + """ + payload: JSON + ): FlowTriggerReceivePayload + + """ + Cancels a fulfillment. + """ + fulfillmentCancel( + """ + The ID of the fulfillment to be canceled. + """ + id: ID! + ): FulfillmentCancelPayload + + """ + Creates a fulfillment constraint rule and its metafield. + """ + fulfillmentConstraintRuleCreate( + """ + The identifier of the function providing the constraint rule. + """ + functionId: String! + + """ + Metafields to associate to the fulfillment constraint rule. + """ + metafields: [MetafieldInput!] = [] + ): FulfillmentConstraintRuleCreatePayload + + """ + Deletes a fulfillment constraint rule and its metafields. + """ + fulfillmentConstraintRuleDelete( + """ + A globally-unique identifier for the fulfillment constraint rule. + """ + id: ID! + ): FulfillmentConstraintRuleDeletePayload + + """ + Creates a fulfillment for one or many fulfillment orders. + The fulfillment orders are associated with the same order and are assigned to the same location. + """ + fulfillmentCreateV2( + """ + The input fields used to create a fulfillment from fulfillment orders. + """ + fulfillment: FulfillmentV2Input! + + """ + An optional message for the fulfillment request. + """ + message: String + ): FulfillmentCreateV2Payload @deprecated(reason: "Use `fulfillmentCreate` instead.") + + """ + Creates a fulfillment event for a specified fulfillment. + """ + fulfillmentEventCreate( + """ + The input fields used to create a fulfillment event for a fulfillment. + """ + fulfillmentEvent: FulfillmentEventInput! + ): FulfillmentEventCreatePayload + + """ + Accept a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderAcceptCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for accepting the cancellation request. + """ + message: String + ): FulfillmentOrderAcceptCancellationRequestPayload + + """ + Accepts a fulfillment request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderAcceptFulfillmentRequest( + """ + The ID of the fulfillment order associated with the fulfillment request. + """ + id: ID! + + """ + An optional reason for accepting the fulfillment request. + """ + message: String + ): FulfillmentOrderAcceptFulfillmentRequestPayload + + """ + Marks a fulfillment order as canceled. + """ + fulfillmentOrderCancel( + """ + The ID of the fulfillment order to mark as canceled. + """ + id: ID! + ): FulfillmentOrderCancelPayload + + """ + Marks an in-progress fulfillment order as incomplete, + indicating the fulfillment service is unable to ship any remaining items, + and closes the fulfillment request. + + This mutation can only be called for fulfillment orders that meet the following criteria: + - Assigned to a fulfillment service location, + - The fulfillment request has been accepted, + - The fulfillment order status is `IN_PROGRESS`. + + This mutation can only be called by the fulfillment service app that accepted the fulfillment request. + Calling this mutation returns the control of the fulfillment order to the merchant, allowing them to + move the fulfillment order line items to another location and fulfill from there, + remove and refund the line items, or to request fulfillment from the same fulfillment service again. + + Closing a fulfillment order is explained in + [the fulfillment service guide](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-7-optional-close-a-fulfillment-order). + """ + fulfillmentOrderClose( + """ + The ID of the fulfillment order to mark as incomplete. + """ + id: ID! + + """ + An optional reason for marking the fulfillment order as incomplete. + """ + message: String + ): FulfillmentOrderClosePayload + + """ + Applies a fulfillment hold on a fulfillment order. + + As of the + [2025-01 API version](https://shopify.dev/changelog/apply-multiple-holds-to-a-single-fulfillment-order), + the mutation can be successfully executed on fulfillment orders that are already on hold. + To place multiple holds on a fulfillment order, apps need to supply the + [handle](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentHold#field-handle) + field. Each app can place up to + 10 active holds + per fulfillment order. If an app attempts to place more than this, the mutation will return + [a user error indicating that the limit has been reached](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-fulfillmentorderholdlimitreached). + The app would need to release one of its existing holds before being able to apply a new one. + """ + fulfillmentOrderHold( + """ + The 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! + ): FulfillmentOrderHoldPayload + + """ + Mark line items associated with a fulfillment order as being ready for pickup by a customer. + + Sends a Ready For Pickup notification to the customer to let them know that their order is ready + to be picked up. + """ + fulfillmentOrderLineItemsPreparedForPickup( + """ + The input for marking fulfillment order line items as ready for pickup. + """ + input: FulfillmentOrderLineItemsPreparedForPickupInput! + ): FulfillmentOrderLineItemsPreparedForPickupPayload + + """ + Merges a set or multiple sets of fulfillment orders together into one based on + line item inputs and quantities. + """ + fulfillmentOrderMerge( + """ + One or more sets of fulfillment orders to be merged. + """ + fulfillmentOrderMergeInputs: [FulfillmentOrderMergeInput!]! + ): FulfillmentOrderMergePayload + + """ + Changes the location which is assigned to fulfill a number of unfulfilled fulfillment order line items. + + Moving a fulfillment order will fail in the following circumstances: + + * The fulfillment order is closed. + * The 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! + + """ + The ID of the location where the fulfillment order will be moved. + """ + newLocationId: ID! + ): FulfillmentOrderMovePayload + + """ + Marks a scheduled fulfillment order as open. + + From API version 2026-01, this will also mark a fulfillment order as open when + it is assigned to a merchant managed location and has had progress reported. + """ + fulfillmentOrderOpen( + """ + The ID of the fulfillment order to mark as open. + """ + id: ID! + ): FulfillmentOrderOpenPayload + + """ + Rejects a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for rejecting the cancellation request. + """ + message: String + ): FulfillmentOrderRejectCancellationRequestPayload + + """ + Rejects a fulfillment request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectFulfillmentRequest( + """ + The ID of the fulfillment order associated with the fulfillment request. + """ + id: ID! + + """ + 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 + + """ + Releases the fulfillment hold on a fulfillment order. + """ + fulfillmentOrderReleaseHold( + """ + A configurable ID used to track the automation system releasing this hold. + """ + externalId: String + + """ + The ID of the fulfillment order for which to release the fulfillment hold. + """ + id: ID! + ): FulfillmentOrderReleaseHoldPayload + + """ + Reschedules a scheduled fulfillment order. + + Updates the value of the `fulfillAt` field on a scheduled fulfillment order. + + The fulfillment order will be marked as ready for fulfillment at this date and time. + """ + fulfillmentOrderReschedule( + """ + 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! + ): FulfillmentOrderReschedulePayload + + """ + Splits a fulfillment order or orders based on line item inputs and quantities. + """ + fulfillmentOrderSplit( + """ + The fulfillment orders, line items and quantities to be split into new fulfillment orders. + """ + fulfillmentOrderSplits: [FulfillmentOrderSplitInput!]! + ): FulfillmentOrderSplitPayload + + """ + Sends a cancellation request to the fulfillment service of a fulfillment order. + """ + fulfillmentOrderSubmitCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for the cancellation request. + """ + message: String + ): FulfillmentOrderSubmitCancellationRequestPayload + + """ + Sends a fulfillment request to the fulfillment service of a fulfillment order. + """ + 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! + + """ + 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 + + """ + Shipping method associated with the fulfillment service provider. Applies only to Fulfill By Amazon fulfillment service. + """ + shippingMethod: String @deprecated(reason: "The Fulfillment by Amazon feature will no longer be supported from March 30, 2023. To continue using Amazon fulfillment, merchants need to set up a Multi-Channel Fulfillment solution recommended by Amazon: https:\/\/help.shopify.com\/manual\/shipping\/fulfillment-services\/amazon#activate-fulfillment-by-amazon. This will be removed in 2024-10.") + ): FulfillmentOrderSubmitFulfillmentRequestPayload + + """ + Releases the fulfillment holds on a list of fulfillment orders. + """ + fulfillmentOrdersReleaseHolds( + """ + A configurable ID used to track the automation system releasing these holds. + """ + externalId: String + + """ + The IDs of the fulfillment orders for which to release the fulfillment holds. + """ + ids: [ID!]! + ): FulfillmentOrdersReleaseHoldsPayload @deprecated(reason: "Use `fulfillmentOrderReleaseHold` instead. This will be removed in 2024-10.") + + """ + 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!]! + ): FulfillmentOrdersSetFulfillmentDeadlinePayload + + """ + Creates a fulfillment service. + + ## Fulfillment service location + + When creating a fulfillment service, a new location will be automatically created on the shop + and will be associated with this fulfillment service. + This location will be named after the fulfillment service and inherit the shop's address. + + If you are using API version `2023-10` or later, and you need to specify + custom attributes for the fulfillment service location + (for example, to change its address to a country different from the shop's country), + use the + [LocationEdit](https://shopify.dev/api/admin-graphql/latest/mutations/locationEdit) + mutation after creating the fulfillment service. + """ + fulfillmentServiceCreate( + """ + The URL to send requests for the fulfillment service. + + If `callbackUrl` is provided ([optional as of API version "2026-01"](https://shopify.dev/changelog/fulfillment-service-callback-url-is-now-optional)), + the following considerations apply: + + - 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). + """ + 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 can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean = false @deprecated(reason: "The non-SKU sharing fulfillment services are deprecated.\nAs of API version `2025-01` this argument defaults to true.\n") + + """ + 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 + + """ + 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. + """ + destinationLocationId: ID + + """ + The ID of the fulfillment service to delete. + """ + id: ID! + ): FulfillmentServiceDeletePayload + + """ + Updates a fulfillment service. + + If you need to update the location managed by the fulfillment service (for + example, to change the address of a fulfillment service), use the [LocationEdit](https://shopify.dev/api/admin-graphql/latest/mutations/locationEdit) mutation. + """ + 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 + + """ + 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, + and `true` is the only valid value for `fulfillmentOrdersOptIn`. + """ + fulfillmentOrdersOptIn: Boolean @deprecated(reason: "Migration period has ended.") + + """ + The id of the fulfillment service. + """ + id: ID! + + """ + 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 can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nIn the next version, all new fulfillment services will support SKU sharing by default.\n") + + """ + 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 + + """ + Updates tracking information for a fulfillment. + """ + fulfillmentTrackingInfoUpdateV2( + """ + The ID of the fulfillment. + """ + fulfillmentId: ID! + + """ + 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.") + + """ + Create a gift card. + """ + giftCardCreate( + """ + The input fields to create a gift card. + """ + input: GiftCardCreateInput! + ): GiftCardCreatePayload + + """ + Disable a gift card. A disabled gift card cannot be used by a customer. A disabled gift card cannot be re-enabled. + """ + giftCardDisable( + """ + The ID of the gift card to disable. + """ + id: ID! + ): GiftCardDisablePayload @deprecated(reason: "Use `giftCardDeactivate` instead. This will be removed in 2024-10.") + + """ + Update a gift card. + """ + giftCardUpdate( + """ + The ID of the gift card to be updated. + """ + id: ID! + + """ + The input fields to update the gift card. + """ + input: GiftCardUpdateInput! + ): GiftCardUpdatePayload + + """ + Activate an inventory item at a location. + """ + 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! + + """ + The ID of the location of the inventory item being activated. + """ + locationId: ID! + + """ + The initial on_hand quantity of the inventory item being activated at the location. + """ + onHand: Int + ): InventoryActivatePayload + + """ + Apply changes to inventory quantities. + """ + inventoryAdjustQuantities( + """ + The information required to adjust inventory quantities. + """ + input: InventoryAdjustQuantitiesInput! + ): InventoryAdjustQuantitiesPayload + + """ + Modify the activation status of an inventory item at locations. Activating an + inventory item at a particular location allows that location to stock that + inventory item. Deactivating an inventory item at a location removes the + inventory item's quantities and turns off the inventory item from that location. + """ + inventoryBulkToggleActivation( + """ + The ID of the inventory item to modify the activation status locations for. + """ + inventoryItemId: ID! + + """ + A list of pairs of locations and activate status to update for the specified inventory item. + """ + inventoryItemUpdates: [InventoryBulkToggleActivationInput!]! + ): InventoryBulkToggleActivationPayload + + """ + Removes an inventory item's quantities from a location, and turns off inventory at the location. + """ + inventoryDeactivate( + """ + The ID of the inventory level to deactivate. + """ + inventoryLevelId: ID! + ): InventoryDeactivatePayload + + """ + Updates an inventory item. + """ + inventoryItemUpdate( + """ + The ID of the inventory item to update. + """ + id: ID! + + """ + The input fields that update an + [`inventoryItem`](https://shopify.dev/api/admin-graphql/latest/queries/inventoryitem). + """ + input: InventoryItemInput! + ): InventoryItemUpdatePayload + + """ + Moves inventory between inventory quantity names at a single location. + """ + inventoryMoveQuantities( + """ + The information required to move inventory quantities. + """ + input: InventoryMoveQuantitiesInput! + ): InventoryMoveQuantitiesPayload + + """ + Set inventory on-hand quantities using absolute values. + """ + inventorySetOnHandQuantities( + """ + The information required to set inventory on hand quantities. + """ + input: InventorySetOnHandQuantitiesInput! + ): InventorySetOnHandQuantitiesPayload @deprecated(reason: "Use `inventorySetQuantities` to set on_hand or available quantites instead.") + + """ + Set quantities of specified name using absolute values. This mutation supports compare-and-set functionality to handle + concurrent requests properly. If `ignoreCompareQuantity` is not set to true, + the mutation will only update the quantity if the persisted quantity matches the `compareQuantity` value. + If the `compareQuantity` value does not match the persisted value, the mutation will return an error. In order to opt out + of the `compareQuantity` check, the `ignoreCompareQuantity` argument can be set to true. + + > Note: + > Only use this mutation if calling on behalf of a system that acts as the source of truth for inventory quantities, + > otherwise please consider using the [inventoryAdjustQuantities](https://shopify.dev/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) mutation. + > + > + > Opting out of the `compareQuantity` check can lead to inaccurate inventory + quantities if multiple requests are made concurrently. + > It is recommended to always include the `compareQuantity` value to ensure + the accuracy of the inventory quantities and to opt out + > of the check using `ignoreCompareQuantity` only when necessary. + """ + inventorySetQuantities( + """ + The information required to set inventory quantities. + """ + input: InventorySetQuantitiesInput! + ): InventorySetQuantitiesPayload + + """ + Set up scheduled changes of inventory items. + """ + inventorySetScheduledChanges( + """ + The input fields for setting up scheduled changes of inventory items. + """ + input: InventorySetScheduledChangesInput! + ): InventorySetScheduledChangesPayload + + """ + 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. + """ + locationActivate( + """ + The ID of a location to activate. + """ + locationId: ID! + ): LocationActivatePayload + + """ + Adds a new location. + """ + locationAdd( + """ + The properties of the location to add. + """ + input: LocationAddInput! + ): LocationAddPayload + + """ + Deactivates a location and moves inventory, pending orders, and moving transfers to a destination location. + """ + 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 + + """ + The ID of a location to deactivate. + """ + locationId: ID! + ): LocationDeactivatePayload + + """ + Deletes a location. + """ + locationDelete( + """ + The ID of a location to delete. + """ + locationId: ID! + ): LocationDeletePayload + + """ + Edits an existing location. + + [As of the 2023-10 API version](https://shopify.dev/changelog/apps-can-now-change-the-name-and-address-of-their-fulfillment-service-locations), + apps can change the name and address of their fulfillment service locations. + """ + locationEdit( + """ + The ID of a location to edit. + """ + id: ID! + + """ + The updated properties for the location. + """ + input: LocationEditInput! + ): LocationEditPayload + + """ + Disables local pickup for a location. + """ + locationLocalPickupDisable( + """ + The ID of the location to disable local pickup for. + """ + locationId: ID! + ): LocationLocalPickupDisablePayload + + """ + Enables local pickup for a location. + """ + locationLocalPickupEnable( + """ + The settings required to enable local pickup for a location. + """ + localPickupSettings: DeliveryLocationLocalPickupEnableInput! + ): LocationLocalPickupEnablePayload + + """ + Creates a new market. + """ + marketCreate( + """ + The properties of the new market. + """ + input: MarketCreateInput! + ): MarketCreatePayload + + """ + 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! + ): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") + + """ + Deletes a market definition. + """ + marketDelete( + """ + The ID of the market to delete. + """ + id: ID! + ): MarketDeletePayload + + """ + Creates or updates market localizations. + """ + marketLocalizationsRegister( + """ + The 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! + ): MarketLocalizationsRegisterPayload + + """ + Deletes market localizations. + """ + marketLocalizationsRemove( + """ + The list of market IDs. + """ + marketIds: [ID!]! + + """ + The list of market localization keys. + """ + marketLocalizationKeys: [String!]! + + """ + The ID of the resource for which market localizations are being deleted. + """ + resourceId: ID! + ): MarketLocalizationsRemovePayload + + """ + Deletes a market region. + """ + marketRegionDelete( + """ + The ID of the market region to delete. + """ + id: ID! + ): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Creates regions that belong to an existing market. + """ + marketRegionsCreate( + """ + The ID of the market to add the regions to. + """ + marketId: ID! + + """ + The regions to be created. + """ + regions: [MarketRegionCreateInput!]! + ): MarketRegionsCreatePayload @deprecated(reason: "This mutation is deprecated and will be removed in the future. Use `marketCreate` or `marketUpdate` instead.") + + """ + Deletes a list of market regions. + """ + marketRegionsDelete( + """ + A list of IDs of the market regions to delete. + """ + ids: [ID!]! + ): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Updates the properties of a market. + """ + marketUpdate( + """ + The ID of the market to update. + """ + id: ID! + + """ + The properties to update. + """ + input: MarketUpdateInput! + ): MarketUpdatePayload + + """ + Creates a web presence for a market. + """ + marketWebPresenceCreate( + """ + The ID of the market for which to create a web presence. + """ + marketId: ID! + + """ + The details of the web presence to be created. + """ + webPresence: MarketWebPresenceCreateInput! + ): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") + + """ + Deletes a market web presence. + """ + marketWebPresenceDelete( + """ + The ID of the web presence to delete. + """ + webPresenceId: ID! + ): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") + + """ + Updates a market web presence. + """ + marketWebPresenceUpdate( + """ + The web_presence fields used to update the market's web presence. + """ + webPresence: MarketWebPresenceUpdateInput! + + """ + The ID of the web presence to update. + """ + webPresenceId: ID! + ): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") + + """ + Deletes all external marketing activities. Deletion is performed by a + background job, as it may take a bit of time to complete if a large number of + activities are to be deleted. Attempting to create or modify external + activities before the job has completed will result in the + create/update/upsert mutation returning an error. + """ + marketingActivitiesDeleteAllExternal: MarketingActivitiesDeleteAllExternalPayload + + """ + Create new marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. + """ + marketingActivityCreate( + """ + The Input of marketing activity create. + """ + input: MarketingActivityCreateInput! + ): MarketingActivityCreatePayload + + """ + Creates a new external marketing activity. + """ + marketingActivityCreateExternal( + """ + The input field for creating an external marketing activity. + """ + input: MarketingActivityCreateExternalInput! + ): MarketingActivityCreateExternalPayload + + """ + Deletes an external marketing activity. + """ + marketingActivityDeleteExternal( + """ + The ID of the marketing activity. A marketing activity ID or remote ID must be provided. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. A marketing activity ID or remote ID + must be provided. + """ + remoteId: String + ): MarketingActivityDeleteExternalPayload + + """ + Updates a marketing activity with the latest information. Marketing activity + app extensions are deprecated and will be removed in the near future. + """ + marketingActivityUpdate( + """ + The Input of the marketing activity. + """ + input: MarketingActivityUpdateInput! + ): MarketingActivityUpdatePayload + + """ + Update an external marketing activity. + """ + marketingActivityUpdateExternal( + """ + The input field for updating an external marketing activity. + """ + input: MarketingActivityUpdateExternalInput! + + """ + The ID of the marketing activity. Specify either the marketing activity ID, + remote ID, or UTM to update the marketing activity. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. Specify either the marketing activity + ID, remote ID, or UTM to update the marketing activity. + """ + remoteId: String + + """ + Specifies the [Urchin Traffic Module (UTM) + parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are + associated with a related marketing campaign. Specify either the marketing + activity ID, remote ID, or UTM to update the marketing activity. + """ + utm: UTMInput + ): MarketingActivityUpdateExternalPayload + + """ + Creates a new external marketing activity or updates an existing one. When + optional fields are absent or null, associated information will be removed + from an existing marketing activity. + """ + marketingActivityUpsertExternal( + """ + The input field for creating or updating an external marketing activity. + """ + input: MarketingActivityUpsertExternalInput! + ): MarketingActivityUpsertExternalPayload + + """ + Creates a new marketing engagement for a marketing activity or a marketing channel. + """ + marketingEngagementCreate( + """ + The 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 + + """ + 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 + + """ + Marks channel-level engagement data such that it no longer appears in reports. + Activity-level data cannot be deleted directly, instead the MarketingActivity itself should be deleted to + hide it from reports. + """ + marketingEngagementsDelete( + """ + The handle of the channel for which engagement data should be deleted. + """ + channelHandle: String + + """ + When true, engagements for all channels that belong to the api client will be deleted. + """ + deleteEngagementsForAllChannels: Boolean = false + ): MarketingEngagementsDeletePayload + + """ + Creates a menu. + """ + menuCreate( + """ + The menu's handle. + """ + handle: String! + + """ + List of the menu's items. + """ + items: [MenuItemCreateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuCreatePayload + + """ + Deletes a menu. + """ + menuDelete( + """ + The ID of the menu to be deleted. + """ + id: ID! + ): MenuDeletePayload + + """ + Updates a menu. + """ + menuUpdate( + """ + The menu's handle. + """ + handle: String + + """ + ID of the menu to be updated. + """ + id: ID! + + """ + List of the menu's items. + """ + items: [MenuItemUpdateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuUpdatePayload + + """ + Creates a metafield definition. Any metafields existing under the same owner type, namespace, and key will be + checked against this definition and will have their type updated accordingly. For metafields that are not + valid, they will remain unchanged but any attempts to update them must align with this definition. + """ + metafieldDefinitionCreate( + """ + Specifies the input fields for a metafield definition. + """ + definition: MetafieldDefinitionInput! + ): MetafieldDefinitionCreatePayload + + """ + Delete a metafield definition. + Optionally deletes all associated metafields asynchronously when specified. + """ + metafieldDefinitionDelete( + """ + Whether to delete all associated metafields. + """ + deleteAllAssociatedMetafields: Boolean = false + + """ + The id of the metafield definition to delete. + """ + id: ID! + ): MetafieldDefinitionDeletePayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionPin( + """ + The ID of the metafield definition to pin. + """ + definitionId: ID! + ): MetafieldDefinitionPinPayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionUnpin( + """ + The ID of the metafield definition to unpin. + """ + definitionId: ID! + ): MetafieldDefinitionUnpinPayload + + """ + Updates a metafield definition. + """ + metafieldDefinitionUpdate( + """ + The input fields for the metafield definition update. + """ + definition: MetafieldDefinitionUpdateInput! + ): MetafieldDefinitionUpdatePayload + + """ + Deletes a metafield. + """ + metafieldDelete(input: MetafieldDeleteInput!): MetafieldDeletePayload @deprecated(reason: "This mutation will be removed in 2025-01. Use `metafieldsDelete` instead.") + + """ + Creates a `MetafieldStorefrontVisibility` record to make all metafields that belong to the specified resource + and have the established `namespace` and `key` combination visible in the Storefront API. + """ + metafieldStorefrontVisibilityCreate( + """ + Specifies the input fields for a `MetafieldStorefrontVisibility` record. + """ + input: MetafieldStorefrontVisibilityInput! + ): MetafieldStorefrontVisibilityCreatePayload @deprecated(reason: "This mutation will be removed in 2025-01. Use the `metafieldDefinitionCreate` or `metafieldDefinitionUpdate` mutations with `access.storefront` set instead.\n") + + """ + Deletes a `MetafieldStorefrontVisibility` record. All metafields that belongs to the specified record will no + longer be visible in the Storefront API. + """ + metafieldStorefrontVisibilityDelete( + """ + The ID of the `MetafieldStorefrontVisibility` record to delete. + """ + id: ID! + ): MetafieldStorefrontVisibilityDeletePayload @deprecated(reason: "This mutation will be removed in 2025-01. Use the `metafieldDefinitionUpdate` mutation with `access.storefront` set instead.\n") + + """ + Deletes multiple metafields in bulk. + """ + metafieldsDelete( + """ + A list of identifiers specifying metafields to delete. At least one identifier must be specified. + """ + metafields: [MetafieldIdentifierInput!]! + ): MetafieldsDeletePayload + + """ + Sets metafield values. Metafield values will be set regardless if they were previously created or not. + + Allows a maximum of 25 metafields to be set at a time, with a maximum total request payload size of 10MB. + + This operation is atomic, meaning no changes are persisted if an error is encountered. + + As of `2024-07`, this operation supports compare-and-set functionality to better handle concurrent requests. + If `compareDigest` is set for any metafield, the mutation will only set that + metafield if the persisted metafield value matches the digest used on + `compareDigest`. + If the metafield doesn't exist yet, but you want to guarantee that the + operation will run in a safe manner, set `compareDigest` to `null`. + The `compareDigest` value can be acquired by querying the metafield object and selecting `compareDigest` as a field. + If the `compareDigest` value does not match the digest for the persisted value, the mutation will return an error. + You can opt out of write guarantees by not sending `compareDigest` in the request. + """ + metafieldsSet( + """ + The list of metafield values to set. Maximum of 25. + """ + metafields: [MetafieldsSetInput!]! + ): MetafieldsSetPayload + + """ + Asynchronously delete metaobjects and their associated metafields in bulk. + """ + metaobjectBulkDelete( + """ + Specifies the condition by which metaobjects are deleted. + Exactly one field of input is required. + """ + where: MetaobjectBulkDeleteWhereCondition! + ): MetaobjectBulkDeletePayload + + """ + Creates a new metaobject. + """ + metaobjectCreate( + """ + The parameters for the metaobject to create. + """ + metaobject: MetaobjectCreateInput! + ): MetaobjectCreatePayload + + """ + Creates a new metaobject definition. + """ + metaobjectDefinitionCreate( + """ + The input fields for creating a metaobject definition. + """ + definition: MetaobjectDefinitionCreateInput! + ): MetaobjectDefinitionCreatePayload + + """ + Deletes the specified metaobject definition. + Also deletes all related metafield definitions, metaobjects, and metafields asynchronously. + """ + metaobjectDefinitionDelete( + """ + The ID of the metaobjects definition to delete. + """ + id: ID! + ): MetaobjectDefinitionDeletePayload + + """ + Updates a metaobject definition with new settings and metafield definitions. + """ + metaobjectDefinitionUpdate( + """ + The input fields for updating a metaobject definition. + """ + definition: MetaobjectDefinitionUpdateInput! + + """ + The ID of the metaobject definition to update. + """ + id: ID! + ): MetaobjectDefinitionUpdatePayload + + """ + Deletes the specified metaobject and its associated metafields. + """ + metaobjectDelete( + """ + The ID of the metaobject to delete. + """ + id: ID! + ): MetaobjectDeletePayload + + """ + Updates an existing metaobject. + """ + metaobjectUpdate( + """ + The ID of the metaobject to update. + """ + id: ID! + + """ + Specifies parameters to update on the metaobject. + """ + metaobject: MetaobjectUpdateInput! + ): MetaobjectUpdatePayload + + """ + Retrieves a metaobject by handle, then updates it with the provided input values. + If no matching metaobject is found, a new metaobject is created with the provided input values. + """ + metaobjectUpsert( + """ + The identifier of the metaobject to upsert. + """ + handle: MetaobjectHandleInput! + + """ + The parameters to upsert the metaobject. + """ + metaobject: MetaobjectUpsertInput! + ): MetaobjectUpsertPayload + + """ + Create a mobile platform application. + """ + mobilePlatformApplicationCreate( + """ + The input to create a mobile platform application. + """ + input: MobilePlatformApplicationCreateInput! + ): MobilePlatformApplicationCreatePayload + + """ + Delete a mobile platform application. + """ + mobilePlatformApplicationDelete( + """ + The ID of the Mobile Platform Application to be deleted. + """ + id: ID! + ): MobilePlatformApplicationDeletePayload + + """ + Update a mobile platform application. + """ + mobilePlatformApplicationUpdate( + """ + The ID of the Mobile Platform Application to be updated. + """ + id: ID! + + """ + The input to updat a Mobile Platform Application. + """ + input: MobilePlatformApplicationUpdateInput! + ): MobilePlatformApplicationUpdatePayload + + """ + Cancels an order, with options for refunding, restocking inventory, and customer notification. + + > Caution: + > Order cancellation is irreversible. An order that has been cancelled can't be restored to its original state. + + Use the `orderCancel` mutation to programmatically cancel orders in scenarios such as: + + - Customer-requested cancellations due to size, color, or other preference changes + - Payment processing failures or declined transactions + - Fraud detection and prevention + - Insufficient inventory availability + - Staff errors in order processing + - Wholesale or B2B order management workflows + + The `orderCancel` mutation provides flexible refund options including refunding to original payment methods + or issuing store credit. If a payment was only authorized (temporarily held) but not yet charged, + that hold will be automatically released when the order is cancelled, even if you choose not to refund other payments. + + The mutation supports different cancellation reasons: customer requests, payment declines, fraud, + inventory issues, staff errors, or other unspecified reasons. Each cancellation can include optional + staff notes for internal documentation (notes aren't visible to customers). + + An order can only be cancelled if it meets the following criteria: + + - The order hasn't already been cancelled. + - The order has no pending payment authorizations. + - The order has no active returns in progress. + - The order has no outstanding fulfillments that can't be cancelled. + + Orders might be assigned to locations that become + [deactivated](https://help.shopify.com/manual/fulfillment/setup/locations-management#deactivate-and-reactivate-locations) + after the order was created. When cancelling such orders, inventory behavior depends on payment status: + + - **Paid orders**: Cancellation will fail with an error if restocking is enabled, since inventory + can't be returned to deactivated locations. + - **Unpaid orders**: Cancellation succeeds but inventory is not restocked anywhere, even when the + restock option is enabled. The committed inventory effectively becomes unavailable rather than being + returned to stock at the deactivated location. + + After you cancel an order, you can still make limited updates to certain fields (like + notes and tags) using the + [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate). + + For partial refunds or more complex refund scenarios on active orders, + such as refunding only specific line items while keeping the rest of the order fulfilled, + consider using the [`refundCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/refundCreate) + mutation instead of full order cancellation. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCancel( + """ + 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! + + """ + 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! + + """ + 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 + + """ + 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 + + """ + Closes an open order. + """ + orderClose( + """ + The input for the mutation. + """ + input: OrderCloseInput! + ): OrderClosePayload + + """ + Creates a payment for an order by mandate. + """ + 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! + + """ + A unique key to identify the payment request. + """ + idempotencyKey: String! + + """ + The mandate ID used for payment. + """ + mandateId: ID! + + """ + The ID of the payment schedule to collect the balance for. + """ + paymentScheduleId: ID + ): OrderCreateMandatePaymentPayload + + """ + Deletes an order. For more information on which orders can be deleted, refer to [Delete an order](https://help.shopify.com/manual/orders/cancel-delete-order#delete-an-order). + """ + orderDelete( + """ + The ID of the order to be deleted. + """ + orderId: ID! + ): OrderDeletePayload + + """ + Adds a custom line item to an existing order. For example, you could add a + gift wrapping service as a [custom line item](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing#add-a-custom-line-item). + To learn how to edit existing orders, refer to [Edit an existing order with Admin API](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditAddCustomItem( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + to which the custom item is added. + """ + id: ID! + + """ + 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 + + """ + 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 + + """ + Whether the custom item is taxable. Defaults to `true`. + """ + taxable: Boolean + + """ + The name of the custom item to add. + """ + title: String! + ): OrderEditAddCustomItemPayload + + """ + Adds a discount to a line item 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). + """ + 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) + to update. + """ + id: ID! + + """ + The ID of the calculated line item to add the discount to. + """ + lineItemId: ID! + ): OrderEditAddLineItemDiscountPayload + + """ + Adds a shipping line to 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). + """ + orderEditAddShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + to edit. + """ + id: ID! + + """ + The shipping line to be added. + """ + shippingLine: OrderEditAddShippingLineInput! + ): OrderEditAddShippingLinePayload + + """ + Adds a line item from an existing product variant. As of API version 2025-04, the [orderEditAddVariant](https://shopify.dev/api/admin-graphql/latest/mutations/ordereditaddvariant) + API will respect the contextual pricing of the 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) + to edit. + """ + id: ID! + + """ + The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location) + to check for inventory availability. A default location ID is chosen automatically if none is provided. + """ + locationId: ID + + """ + The quantity of the item to add to the order. Must be a positive value. + """ + quantity: Int! + + """ + The ID of the variant to add. + """ + variantId: ID! + ): OrderEditAddVariantPayload + + """ + Starts editing an order. Mutations are operating on `OrderEdit`. + All order edits start with `orderEditBegin`, have any number of `orderEdit`* + mutations made, and end with `orderEditCommit`. + """ + orderEditBegin( + """ + The ID of the order to begin editing. + """ + id: ID! + ): OrderEditBeginPayload + + """ + Applies and saves staged changes to an order. Mutations are operating on `OrderEdit`. + All order edits start with `orderEditBegin`, have any number of `orderEdit`* + mutations made, and end with `orderEditCommit`. + """ + orderEditCommit( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + that will have its changes applied to the order. + """ + id: ID! + + """ + Whether to notify the customer or not. + """ + notifyCustomer: Boolean + + """ + Note for staff members. + """ + staffNote: String + ): OrderEditCommitPayload + + """ + Removes a discount on the current order edit. For more information on how to + use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveDiscount( + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + from which to remove the discount. + """ + id: ID! + ): OrderEditRemoveDiscountPayload + + """ + 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! + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + from which to remove the discount. + """ + id: ID! + ): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") + + """ + Removes a shipping line from an existing order. For more information on how to + use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + to edit. + """ + id: ID! + + """ + The ID of the calculated shipping line to remove. + """ + shippingLineId: ID! + ): OrderEditRemoveShippingLinePayload + + """ + Sets the quantity of a line item on an order that is being edited. 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). + """ + orderEditSetQuantity( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + to edit. The edit changes the quantity on the line item. + """ + id: ID! + + """ + The ID of the calculated line item to edit. + """ + lineItemId: ID! + + """ + The 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.") + + """ + 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 + + """ + 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! + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + from which to update the discount. + """ + id: ID! + ): OrderEditUpdateDiscountPayload + + """ + Updates a shipping line on the current order edit. For more information on how + to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditUpdateShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + from which to update the shipping line. + """ + id: ID! + + """ + The updated shipping line. + """ + shippingLine: OrderEditUpdateShippingLineInput! + + """ + The ID of the calculated shipping line to update. + """ + shippingLineId: ID! + ): OrderEditUpdateShippingLinePayload + + """ + Sends an email invoice for an order. + """ + 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! + ): OrderInvoiceSendPayload + + """ + Marks an order as paid by recording a payment transaction for the outstanding amount. + + Use the `orderMarkAsPaid` mutation to record payments received outside the standard checkout + process. The `orderMarkAsPaid` mutation is particularly useful in scenarios where: + + - Orders were created with manual payment methods (cash on delivery, bank deposit, money order) + - Payments were received offline and need to be recorded in the system + - Previously authorized payments need to be captured manually + - Orders require manual payment reconciliation due to external payment processing + + The mutation validates that the order can be marked as paid before processing. + An order can be marked as paid only if it has a positive outstanding balance and its + [financial status](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) + isn't already `PAID`. The mutation will either create a new sale transaction for the full + outstanding amount or capture an existing authorized transaction, depending on the order's current payment state. + + After successfully marking an order as paid, the order's financial status is updated to + reflect the payment, and payment events are logged for tracking and analytics + purposes. + + Learn more about [managing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + in apps. + """ + orderMarkAsPaid( + """ + The input for the mutation. + """ + input: OrderMarkAsPaidInput! + ): OrderMarkAsPaidPayload + + """ + Opens a closed order. + """ + orderOpen( + """ + The input for the mutation. + """ + input: OrderOpenInput! + ): OrderOpenPayload + + """ + Create a risk assessment for an order. + """ + orderRiskAssessmentCreate( + """ + The input fields required to create a risk assessment. + """ + orderRiskAssessmentInput: OrderRiskAssessmentCreateInput! + ): OrderRiskAssessmentCreatePayload + + """ + Updates the attributes of an order, such as the customer's email, the shipping address for the order, + tags, and [metafields](https://shopify.dev/docs/apps/build/custom-data) associated with the order. + + If you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts, then use + the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) + mutation instead. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + If you need to remove a customer from an order, then use the [`orderCustomerRemove`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCustomerRemove) + mutation instead. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderUpdate( + """ + The attributes of the updated order. + """ + input: OrderInput! + ): OrderUpdatePayload + + """ + Activates and deactivates payment customizations. + """ + paymentCustomizationActivation( + """ + The enabled status of the payment customizations. + """ + enabled: Boolean! + + """ + The global IDs of the payment customizations. + """ + ids: [ID!]! + ): PaymentCustomizationActivationPayload + + """ + Creates a payment customization. + """ + paymentCustomizationCreate( + """ + The input data used to create the payment customization. + """ + paymentCustomization: PaymentCustomizationInput! + ): PaymentCustomizationCreatePayload + + """ + Deletes a payment customization. + """ + paymentCustomizationDelete( + """ + The global ID of the payment customization. + """ + id: ID! + ): PaymentCustomizationDeletePayload + + """ + Updates a payment customization. + """ + paymentCustomizationUpdate( + """ + The global ID of the payment customization. + """ + id: ID! + + """ + The input data used to update the payment customization. + """ + paymentCustomization: PaymentCustomizationInput! + ): PaymentCustomizationUpdatePayload + + """ + Sends an email payment reminder for a payment schedule. + """ + paymentReminderSend( + """ + The payment schedule id associated with the reminder. + """ + paymentScheduleId: ID! + ): PaymentReminderSendPayload + + """ + Create payment terms on an order. To create payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsCreate( + """ + The attributes used to create the payment terms. + """ + paymentTermsAttributes: PaymentTermsCreateInput! + + """ + Specifies the reference orderId to add the payment terms for. + """ + referenceId: ID! + ): PaymentTermsCreatePayload + + """ + Delete payment terms for an order. To delete payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsDelete( + """ + The input fields used to delete the payment terms. + """ + input: PaymentTermsDeleteInput! + ): PaymentTermsDeletePayload + + """ + Update payment terms on an order. To update payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsUpdate( + """ + The input fields used to update the payment terms. + """ + input: PaymentTermsUpdateInput! + ): PaymentTermsUpdatePayload + + """ + Creates a price list. You can use the `priceListCreate` mutation to create a + new price list and associate it with a catalog. This enables you to sell your + products with contextual pricing. + """ + priceListCreate( + """ + The properties of the new price list. + """ + input: PriceListCreateInput! + ): PriceListCreatePayload + + """ + Deletes a price list. For example, you can delete a price list so that it no + longer applies for products in the associated market. + """ + priceListDelete( + """ + The ID of the price list to be deleted. + """ + id: ID! + ): PriceListDeletePayload + + """ + Creates or updates fixed prices on a price list. You can use the + `priceListFixedPricesAdd` mutation to set a fixed price for specific product + variants. This lets you change product variant pricing on a per country basis. + Any existing fixed price list prices for these variants will be overwritten. + """ + priceListFixedPricesAdd( + """ + The ID of the price list to which the fixed prices will be added or updated. + """ + priceListId: ID! + + """ + The list of fixed prices to add or update in the price list. + """ + prices: [PriceListPriceInput!]! + ): PriceListFixedPricesAddPayload + + """ + Updates the fixed prices for all variants for a product on a price list. You + can use the `priceListFixedPricesByProductUpdate` mutation to set or remove a + fixed price for all variants of a product associated with the price list. + """ + priceListFixedPricesByProductUpdate( + """ + The price list to update the prices for. + """ + priceListId: ID! + + """ + 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!] + ): PriceListFixedPricesByProductUpdatePayload + + """ + Deletes specific fixed prices from a price list using a product variant ID. + You can use the `priceListFixedPricesDelete` mutation to delete a set of fixed + prices from a price list. After deleting the set of fixed prices from the + price list, the price of each product variant reverts to the original price + that was determined by the price list adjustment. + """ + priceListFixedPricesDelete( + """ + The ID of the price list from which the fixed prices will be removed. + """ + priceListId: ID! + + """ + A list of product variant IDs whose fixed prices will be removed from the price list. + """ + variantIds: [ID!]! + ): PriceListFixedPricesDeletePayload + + """ + Updates fixed prices on a price list. You can use the + `priceListFixedPricesUpdate` mutation to set a fixed price for specific + product variants or to delete prices for variants associated with the price list. + """ + priceListFixedPricesUpdate( + """ + The price list that the prices will be updated against. + """ + priceListId: ID! + + """ + The fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of product variant IDs to remove from the price list. + """ + variantIdsToDelete: [ID!]! + ): PriceListFixedPricesUpdatePayload + + """ + Updates a price list. + If you modify the currency, then any fixed prices set on the price list will be deleted. + """ + priceListUpdate( + """ + The ID of the price list to update. + """ + id: ID! + + """ + The input data used to update the price list. + """ + input: PriceListUpdateInput! + ): PriceListUpdatePayload + + """ + Activate a price rule. + """ + priceRuleActivate( + """ + ID of the price rule to update. + """ + id: ID! + ): PriceRuleActivatePayload @deprecated(reason: "Use `discountCodeActivate` instead. This will be removed in 2024-10.") + + """ + Create a price rule using the input. + """ + priceRuleCreate( + """ + The input fields to create a price rule. + """ + priceRule: PriceRuleInput! + + """ + The input fields to create a discount code for the price rule. + """ + priceRuleDiscountCode: PriceRuleDiscountCodeInput + ): PriceRuleCreatePayload @deprecated(reason: "Use `discountCodeBasicCreate` instead. This will be removed in 2024-10.") + + """ + Deactivate a price rule. + """ + priceRuleDeactivate( + """ + ID of the price rule to update. + """ + id: ID! + ): PriceRuleDeactivatePayload @deprecated(reason: "Use `discountCodeDeactivate` instead. This will be removed in 2024-10.") + + """ + Delete a price rule. + """ + priceRuleDelete( + """ + The ID of the price rule object. + """ + id: ID! + ): PriceRuleDeletePayload @deprecated(reason: "Use `discountCodeDelete` instead. This will be removed in 2024-10.") + + """ + Create a discount code for a price rule. + """ + priceRuleDiscountCodeCreate( + """ + The code to create for the price rule. + """ + code: String! + + """ + The ID of the price rule object. + """ + priceRuleId: ID! + ): PriceRuleDiscountCodeCreatePayload @deprecated(reason: "Use `discountRedeemCodeBulkAdd` instead. This will be removed in 2024-10.") + + """ + Update a discount code for a price rule. + """ + priceRuleDiscountCodeUpdate( + """ + The new code of a price rule. + """ + code: String! + + """ + The ID of the price rule object. + """ + priceRuleId: ID! + ): PriceRuleDiscountCodeUpdatePayload @deprecated(reason: "Use `discountCodeBasicUpdate` instead. This will be removed in 2024-10.") + + """ + Updates a price rule using its ID and an input. + """ + priceRuleUpdate( + """ + ID of the price rule to update. + """ + id: ID! + + """ + The input fields to update a price rule. + """ + priceRule: PriceRuleInput! + + """ + The input fields to update the discount code of the price rule. + """ + priceRuleDiscountCode: PriceRuleDiscountCodeInput + ): PriceRuleUpdatePayload @deprecated(reason: "Use `discountCodeBasicUpdate` instead. This will be removed in 2024-10.") + + """ + Deletes a private metafield. + Private metafields are automatically deleted when the app that created them is uninstalled. + """ + privateMetafieldDelete( + """ + The input fields for the private metafield to delete. + """ + input: PrivateMetafieldDeleteInput! + ): PrivateMetafieldDeletePayload @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Creates or updates a private metafield. Use private metafields when you don't + want the metafield data to be accessible by merchants or other apps. + Private metafields are accessible only by the application that created them and only from the GraphQL Admin API. + + An application can create a maximum of 10 private metafields per shop resource. + """ + privateMetafieldUpsert( + """ + Specifies the input fields for the private metafield. + """ + input: PrivateMetafieldInput! + ): PrivateMetafieldUpsertPayload @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Appends images to a product. + """ + productAppendImages( + """ + Specifies the new images and the product that they're being added to. + """ + input: ProductAppendImagesInput! + ): ProductAppendImagesPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead. This will be removed in 2024-10.") + + """ + Creates a new product bundle or componentized product. + """ + productBundleCreate( + """ + Input for creating a product bundle or componentized product. + """ + input: ProductBundleCreateInput! + ): ProductBundleCreatePayload + + """ + Updates a product bundle or componentized product. + """ + productBundleUpdate( + """ + Input for updating a product bundle or componentized product. + """ + input: ProductBundleUpdateInput! + ): ProductBundleUpdatePayload + + """ + Changes the status of a product. This allows you to set the availability of the product across all channels. + """ + productChangeStatus( + """ + The ID of the product. + """ + productId: ID! + + """ + The status to be assigned to the product. + """ + status: ProductStatus! + ): ProductChangeStatusPayload @deprecated(reason: "Use `productUpdate` instead.") + + """ + Creates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productCreate` mutation helps you create many products at once, avoiding the tedious or time-consuming + process of adding them one by one in the Shopify admin. Common examples include creating products for a + new collection, launching a new product line, or adding seasonal products. + + You can define product + [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue), + allowing you to create products with different variations like sizes or colors. You can also associate media + files to your products, including images and videos. + + The `productCreate` mutation only supports creating a product with its initial + [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To create multiple product variants for a single product and manage prices, use the + [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + mutation. + + > Note: + > The `productCreate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be created per day. + + After you create a product, you can make subsequent edits to the product using one of the following mutations: + + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers. The `productCreate` mutation creates products + in an unpublished state by default, so you must perform a separate operation to publish the product. + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Used to update a single product, such as changing the product's title, description, vendor, or associated media. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productCreate( + """ + The properties of the new product. + """ + input: ProductInput! + + """ + The media to add to the product. + """ + media: [CreateMediaInput!] + ): ProductCreatePayload + + """ + Creates media for a product. + """ + productCreateMedia( + """ + List of new media to be added to a product. + """ + media: [CreateMediaInput!]! + + """ + Specifies the product associated with the media. + """ + productId: ID! + ): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") + + """ + Permanently deletes a product and all its associated data, including variants, media, publications, and inventory items. + + Use the `productDelete` mutation to programmatically remove products from your store when they need to be + permanently deleted from your catalog, such as when removing discontinued items, cleaning up test data, or + synchronizing with external inventory management systems. + + The `productDelete` mutation removes the product from all associated collections, + and removes all associated data for the product, including: + + - All product variants and their inventory items + - Product media (images, videos) that are not referenced by other products + - [Product options](https://shopify.dev/api/admin-graphql/latest/objects/ProductOption) and [option values](https://shopify.dev/api/admin-graphql/latest/objects/ProductOptionValue) + - Product publications across all sales channels + - Product tags and metadata associations + + The `productDelete` mutation also has the following effects on existing orders and transactions: + + - **Draft orders**: Existing draft orders that reference this product will + retain the product information as stored data, but the product reference will + be removed. Draft orders can still be completed with the stored product details. + - **Completed orders and refunds**: Previously completed orders that included + this product aren't affected. The product information in completed orders is + preserved for record-keeping, and existing refunds for this product remain + valid and processable. + + > Caution: + > Product deletion is irreversible. After a product is deleted, it can't be recovered. Consider archiving + > or unpublishing products instead if you might need to restore them later. + + If you need to delete a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/objects/Location), + you might encounter timeout errors. To avoid these timeout errors, you can set the + [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productDelete#arguments-synchronous) + parameter to `false` to run the deletion asynchronously, which returns a + [`ProductDeleteOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductDeleteOperation) + that you can monitor for completion status. + + If you need more granular control over product cleanup, consider using these alternative mutations: + + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Update the product status to archived or unpublished instead of deleting. + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete): + Delete specific variants while keeping the product. + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete): + Delete the choices available for a product, such as size, color, or material. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model). + """ + productDelete( + """ + Specifies the product to delete by its ID. + """ + input: ProductDeleteInput! + ): ProductDeletePayload + + """ + Deletes a product asynchronously, including all associated variants and media. + """ + productDeleteAsync( + """ + The ID of the product to be deleted. + """ + productId: ID! + ): ProductDeleteAsyncPayload @deprecated(reason: "Use `productDelete` instead. This will be removed in 2024-10.") + + """ + Removes product images from the product. + """ + productDeleteImages( + """ + This is the ID of the product. + """ + id: ID! + + """ + This is the array of image IDs to delete from the product. + """ + imageIds: [ID!]! + ): ProductDeleteImagesPayload @deprecated(reason: "Use `productDeleteMedia` instead. This will be removed in 2024-10.") + + """ + Deletes media for a product. + """ + productDeleteMedia( + """ + The media IDs to be deleted. + """ + mediaIds: [ID!]! + + """ + Specifies the product ID from which the media will be deleted. + """ + productId: ID! + ): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Duplicates a product. + + If you need to duplicate a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/input-objects/ProductVariantInput) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/input-objects/InventoryLevelInput), + you might encounter timeout errors. + + To avoid these timeout errors, you can instead duplicate the product asynchronously. + + In API version 2024-10 and higher, include `synchronous: false` argument in + this mutation to perform the duplication asynchronously. + + In API version 2024-07 and lower, use the asynchronous [`ProductDuplicateAsyncV2`](https://shopify.dev/api/admin-graphql/2024-07/mutations/productDuplicateAsyncV2). + + Metafield values are not duplicated if the unique values capability is enabled. + """ + productDuplicate( + """ + 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! + ): ProductDuplicatePayload + + """ + Asynchronously duplicate a single product. + + For API version 2024-10 and higher, use the `productDuplicate` mutation with the `synchronous: false` argument instead. + """ + productDuplicateAsyncV2( + """ + The params for duplicating the product. + """ + input: ProductDuplicateAsyncInput! + ): ProductDuplicateAsyncV2Payload @deprecated(reason: "Use `productDuplicate` instead. This will be removed in 2024-10.") + + """ + Creates a product feed for a specific publication. + """ + productFeedCreate( + """ + The properties of the new product feed. + """ + input: ProductFeedInput + ): ProductFeedCreatePayload + + """ + Deletes a product feed for a specific publication. + """ + productFeedDelete( + """ + The ID of the product feed to be deleted. + """ + id: ID! + ): ProductFeedDeletePayload + + """ + Runs the full product sync for a given shop. + """ + productFullSync( + """ + Syncs only products that haven't changed since the specified timestamp. + """ + beforeUpdatedAt: DateTime + + """ + The product feed which needs syncing. + """ + id: ID! + + """ + Syncs only products that have changed since the specified timestamp. + """ + updatedAtSince: DateTime + ): ProductFullSyncPayload + + """ + Updates an image of a product. + """ + productImageUpdate( + """ + Image to be updated. + """ + image: ImageInput! + + """ + The ID of the product on which to update the image. + """ + productId: ID! + ): ProductImageUpdatePayload @deprecated(reason: "Use `productUpdateMedia` instead. This will be removed in 2024-10.") + + """ + Adds multiple selling plan groups to a product. + """ + productJoinSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductJoinSellingPlanGroupsPayload + + """ + Removes multiple groups from a product. + """ + productLeaveSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductLeaveSellingPlanGroupsPayload + + """ + Updates an [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + on a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as size, color, or material. Each option includes a name, position, and a list of values. The combination + of a product option and value creates a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + + Use the `productOptionUpdate` mutation for the following use cases: + + - **Update product choices**: Modify an existing option, like "Size" (Small, Medium, Large) or + "Color" (Red, Blue, Green), so customers can select their preferred variant. + - **Enable personalization features**: Update an option (for example, + "Engraving text") to let customers customize their purchase. + - **Offer seasonal or limited edition products**: Update a value + (for example, "Holiday red") on an existing option to support limited-time or seasonal variants. + - **Integrate with apps that manage product configuration**: Allow third-party apps to update options, like + "Bundle size", when customers select or customize + [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). + - **Link options to metafields**: Associate a product option with a custom + [metafield](https://shopify.dev/docs/apps/build/custom-data), like "Fabric code", for + richer integrations with other systems or apps. + + > Note: + > The `productOptionUpdate` mutation enforces strict data integrity for product options and variants. + All option positions must be sequential, and every option should be used by at least one variant. + + After you update a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionUpdate( + """ + Option to update. + """ + option: OptionUpdateInput! + + """ + New option values to create. + """ + optionValuesToAdd: [OptionValueCreateInput!] + + """ + IDs of the existing option values to delete. + """ + optionValuesToDelete: [ID!] + + """ + Existing option values to update. + """ + optionValuesToUpdate: [OptionValueUpdateInput!] + + """ + The ID of the Product the Option belongs to. + """ + productId: ID! + + """ + 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 + + """ + 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! + ): ProductOptionsCreatePayload + + """ + Deletes one or more [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + from a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). Product options + define the choices available for a product, such as size, color, or material. + + > Caution: + > Removing an option can affect a product's + > [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) and their + > configuration. Deleting an option might also delete associated option values and, depending on the chosen + > [strategy](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productoptionsdelete#arguments-strategy), + > might affect variants. + + Use the `productOptionsDelete` mutation for the following use cases: + + - **Simplify product configuration**: Remove obsolete or unnecessary options + (for example, discontinue "Material" if all variants are now the same material). + - **Clean up after seasonal or limited-time offerings**: Delete options that are no longer + relevant (for example, "Holiday edition"). + - **Automate catalog management**: Enable apps or integrations to programmatically remove options as product + data changes. + + > Note: + > The `productOptionsDelete` mutation enforces strict data integrity for product options and variants. + > All option positions must remain sequential, and every remaining option must be used by at least one variant. + + After you delete a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsDelete( + """ + IDs of the options to delete from the product. + """ + options: [ID!]! + + """ + ID of the product from which to delete the options. + """ + productId: ID! + + """ + The strategy defines which behavior the mutation should observe,such as how + to handle a situation where deleting an option would result in duplicate variants. + """ + strategy: ProductOptionDeleteStrategy = DEFAULT + ): ProductOptionsDeletePayload + + """ + Reorders the [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [option values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue) on a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + updating the order in which [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + are presented to customers. + + The `productOptionsReorder` mutation accepts a list of product options, each identified by `id` or `name`, and an + optional list of values (also by `id` or `name`) specifying the new order. The order of options in the + mutation's input determines their new positions (for example, the first option becomes `option1`). + The order of values within each option determines their new positions. The mutation recalculates the order of + variants based on the new option and value order. + + Suppose a product has the following variants: + + 1. `"Red / Small"` + 2. `"Green / Medium"` + 3. `"Blue / Small"` + + You reorder options and values: + + ``` + options: [ + { name: "Size", values: [{ name: "Small" }, { name: "Medium" }] }, + { name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } + ] + ``` + + The resulting variant order will be: + + 1. `"Small / Green"` + 2. `"Small / Red"` + 3. `"Small / Blue"` + 4. `"Medium / Green"` + + Use the `productOptionsReorder` mutation for the following use cases: + + - **Change the order of product options**: For example, display "Color" before "Size" in a store. + - **Reorder option values within an option**: For example, show "Red" before "Blue" in a color picker. + - **Control the order of product variants**: The order of options and their + values determines the sequence in which variants are listed and selected. + - **Highlight best-selling options**: Present the most popular or relevant options and values first. + - **Promote merchandising strategies**: Highlight seasonal colors, limited editions, or featured sizes. + + > Note: + > The `productOptionsReorder` mutation enforces strict data integrity for product options and variants. + > All option positions must be sequential, and every option should be used by at least one variant. + + After you reorder product options, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [managing product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsReorder( + """ + Options to reorder on the product. + """ + options: [OptionReorderInput!]! + + """ + The ID of the product to update. + """ + productId: ID! + ): ProductOptionsReorderPayload + + """ + Publishes a product. Products that are sold exclusively on subscription + (`requiresSellingPlan: true`) can only be published on online stores. + """ + productPublish( + """ + Specifies the product to publish and the channels to publish it to. + """ + input: ProductPublishInput! + ): ProductPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Asynchronously reorders a set of images for a given product. + """ + productReorderImages( + """ + The ID of the product on which to reorder images. + """ + id: ID! + + """ + A list of moves to perform which will be evaluated in order. + """ + moves: [MoveInput!]! + ): ProductReorderImagesPayload @deprecated(reason: "Use `productReorderMedia` instead. This will be removed in 2024-10.") + + """ + Asynchronously reorders the media attached to a product, changing the sequence + in which images, videos, and other media appear in product displays. This + affects how media is presented across all sales channels. + + For example, merchants can move their best product photo to the first position + or reorder images to tell a better product story, with changes appearing in + storefronts once processing completes. + + Use `ProductReorderMedia` to: + - Optimize media presentation order for better customer experience + - Implement drag-and-drop media management interfaces + - Automate media sequencing based on performance or quality metrics + + The operation processes asynchronously to handle products with large media collections without blocking other operations. + + Learn more about [product media](https://shopify.dev/docs/api/admin-graphql/latest/objects/Media). + """ + productReorderMedia( + """ + The ID of the product on which to reorder medias. + """ + id: ID! + + """ + A list of moves to perform which will be evaluated in order. + """ + moves: [MoveInput!]! + ): ProductReorderMediaPayload + + """ + Performs multiple operations to create or update products in a single request. + + Use the `productSet` mutation to sync information from an external data source into Shopify, manage large + product catalogs, and perform batch updates. The mutation is helpful for bulk product management, including price + adjustments, inventory updates, and product lifecycle management. + + The behavior of `productSet` depends on the type of field it's modifying: + + - **For list fields**: Creates new entries, updates existing entries, and deletes existing entries + that aren't included in the mutation's input. Common examples of list fields include + [`collections`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.collections), + [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.metafields), + and [`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.variants). + + - **For all other field types**: Updates only the included fields. Any omitted fields will remain unchanged. + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + You can run `productSet` in one of the following modes: + + - **Synchronously**: Returns the updated product in the response. + - **Asynchronously**: Returns a [`ProductSetOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductSetOperation) object. + Use the [`productOperation`](https://shopify.dev/api/admin-graphql/latest/queries/productOperation) query to check the status of the operation and + retrieve details of the updated product and its product variants. + + If you need to only manage product variants, then use one of the following mutations: + + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete) + + If you need to only manage product options, then use one of the following mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about [syncing product data from an external source](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/sync-data). + """ + productSet( + """ + The properties of the newly created or updated product. + """ + input: ProductSetInput! + + """ + Whether the mutation should be run synchronously or asynchronously. + + 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 + + """ + Unpublishes a product. + """ + productUnpublish( + """ + Specifies the product to unpublish and the channel to unpublish it from. + """ + input: ProductUnpublishInput! + ): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productUpdate` mutation helps you modify many products at once, avoiding the tedious or time-consuming + process of updating them one by one in the Shopify admin. Common examples including updating + product details like status or tags. + + The `productUpdate` mutation doesn't support updating + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To update multiple product variants for a single product and manage prices, use the + [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + mutation. + + > Note: + > The `productUpdate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be updated per day. + + After updating a product, you can make additional changes using one of the following mutations: + + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers, if the product is currently unpublished. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productUpdate( + """ + The updated properties for a product. + """ + input: ProductInput! + + """ + List of new media to be added to the product. + """ + media: [CreateMediaInput!] + ): ProductUpdatePayload + + """ + Updates media for a product. + """ + productUpdateMedia( + """ + A list of media updates. + """ + media: [UpdateMediaInput!]! + + """ + Specifies the product on which media will be updated. + """ + productId: ID! + ): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Appends existing media from a product to specific variants of that product, + creating associations between media files and particular product options. This + allows different variants to showcase relevant images or videos. + + For example, a t-shirt product might have color variants where each color + variant displays only the images showing that specific color, helping + customers see exactly what they're purchasing. + + Use `ProductVariantAppendMedia` to: + - Associate specific images with product variants for accurate display + - Build variant-specific media management in product interfaces + - Implement automated media assignment based on variant attributes + + The operation links existing product media to variants without duplicating + files, maintaining efficient media storage while enabling variant-specific displays. + + Learn more about [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + """ + productVariantAppendMedia( + """ + Specifies the product associated to the media. + """ + productId: ID! + + """ + A list of pairs of variants and media to be attached to the variants. + """ + variantMedia: [ProductVariantAppendMediaInput!]! + ): ProductVariantAppendMediaPayload + + """ + Creates a product variant. + """ + productVariantCreate( + """ + The properties for the new product variant. + """ + input: ProductVariantInput! + ): ProductVariantCreatePayload @deprecated(reason: "Use `productVariantsBulkCreate` instead. This will be removed in 2024-10.") + + """ + Deletes a product variant. + """ + productVariantDelete( + """ + The ID of the product variant to be deleted. + """ + id: ID! + ): ProductVariantDeletePayload @deprecated(reason: "Use `productVariantsBulkDelete` instead. This will be removed in 2024-10.") + + """ + Detaches media from product variants. + """ + productVariantDetachMedia( + """ + Specifies the product to which the variants and media are associated. + """ + productId: ID! + + """ + A list of pairs of variants and media to be deleted from the variants. + """ + variantMedia: [ProductVariantDetachMediaInput!]! + ): ProductVariantDetachMediaPayload + + """ + Adds multiple selling plan groups to a product variant. + """ + productVariantJoinSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductVariantJoinSellingPlanGroupsPayload + + """ + Remove multiple groups from a product variant. + """ + productVariantLeaveSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! + + """ + The IDs of the selling plan groups to leave. + """ + sellingPlanGroupIds: [ID!]! + ): ProductVariantLeaveSellingPlanGroupsPayload + + """ + Creates new bundles, updates existing bundles, and removes bundle components for one or multiple bundles. + """ + productVariantRelationshipBulkUpdate( + """ + The input options for the product variant being updated. + """ + input: [ProductVariantRelationshipUpdateInput!]! + ): ProductVariantRelationshipBulkUpdatePayload + + """ + Updates a product variant. + """ + productVariantUpdate( + """ + The updated properties for the product variant. + """ + input: ProductVariantInput! + ): ProductVariantUpdatePayload @deprecated(reason: "Use `productVariantsBulkUpdate` instead. This will be removed in 2024-10.") + + """ + 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! + + """ + 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 + + """ + Deletes multiple variants in a single product. This mutation can be called directly or via the bulkOperation. + """ + productVariantsBulkDelete( + """ + The ID of the product with the variants to update. + """ + productId: ID! + + """ + An array of product variants IDs to delete. + """ + variantsIds: [ID!]! + ): ProductVariantsBulkDeletePayload + + """ + 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! + ): ProductVariantsBulkReorderPayload + + """ + Updates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk + operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkUpdate` mutation to efficiently modify product variants—such as different sizes, + colors, or materials—associated with an existing product. The mutation is helpful if you need to update a + product's variants in bulk, such as importing from an external system. + + The mutation supports: + + - Updating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using the + [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) mutation, + which is used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkUpdate( + """ + 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! + + """ + An array of product variants to update. + """ + variants: [ProductVariantsBulkInput!]! + ): ProductVariantsBulkUpdatePayload + + """ + Updates the server pixel to connect to a Google PubSub endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + pubSubServerPixelUpdate( + """ + The Google PubSub project ID. + """ + pubSubProject: String! + + """ + The Google PubSub topic ID. + """ + pubSubTopic: String! + ): PubSubServerPixelUpdatePayload + + """ + Creates a new 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). + """ + pubSubWebhookSubscriptionCreate( + """ + The type of event that triggers the webhook. + """ + topic: WebhookSubscriptionTopic! + + """ + Specifies the input fields for a Google Cloud Pub/Sub webhook subscription. + """ + webhookSubscription: PubSubWebhookSubscriptionInput! + ): PubSubWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates a Google Cloud Pub/Sub webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + pubSubWebhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for a Google Cloud Pub/Sub webhook subscription. + """ + webhookSubscription: PubSubWebhookSubscriptionInput! + ): PubSubWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Creates a publication. + """ + publicationCreate( + """ + The input fields to use when creating the publication. + """ + input: PublicationCreateInput! + ): PublicationCreatePayload + + """ + Deletes a publication. + """ + publicationDelete( + """ + The ID of the publication to delete. + """ + id: ID! + ): PublicationDeletePayload + + """ + Updates a publication. + """ + publicationUpdate( + """ + The ID of the publication to update. + """ + id: ID! + + """ + The input fields to use when updating the publication. + """ + input: PublicationUpdateInput! + ): PublicationUpdatePayload + + """ + Publishes a resource to a channel. If the resource is a product, then it's + visible in the channel only if the product status is `active`. Products that + are sold exclusively on subscription (`requiresSellingPlan: true`) can be + published only on online stores. + """ + publishablePublish( + """ + The resource to create or update publications for. + """ + id: ID! + + """ + Specifies the input fields required to publish a resource. + """ + input: [PublicationInput!]! + ): PublishablePublishPayload + + """ + Publishes a resource to current channel. If the resource is a product, then + it's visible in the channel only if the product status is `active`. Products + that are sold exclusively on subscription (`requiresSellingPlan: true`) can be + published only on online stores. + """ + publishablePublishToCurrentChannel( + """ + The resource to create or update publications for. + """ + id: ID! + ): PublishablePublishToCurrentChannelPayload + + """ + Unpublishes a resource from a channel. If the resource is a product, then it's + visible in the channel only if the product status is `active`. + """ + publishableUnpublish( + """ + The resource to delete or update publications for. + """ + id: ID! + + """ + Specifies the input fields required to unpublish a resource. + """ + input: [PublicationInput!]! + ): PublishableUnpublishPayload + + """ + Unpublishes a resource from the current channel. If the resource is a product, + then it's visible in the channel only if the product status is `active`. + """ + publishableUnpublishToCurrentChannel( + """ + The resource to delete or update publications for. + """ + id: ID! + ): PublishableUnpublishToCurrentChannelPayload + + """ + Updates quantity pricing on a price list. You can use the + `quantityPricingByVariantUpdate` mutation to set fixed prices, quantity rules, + and quantity price breaks. This mutation does not allow partial successes. If + any of the requested resources fail to update, none of the requested resources + will be updated. Delete operations are executed before create operations. + """ + 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! + ): QuantityPricingByVariantUpdatePayload + + """ + Creates or updates existing quantity rules on a price list. + You can use the `quantityRulesAdd` mutation to set order level minimums, + maximumums and increments for specific product variants. + """ + quantityRulesAdd( + """ + The ID of the price list to which the quantity rules will be added or updated. + """ + priceListId: ID! + + """ + The list of quantity rules to add or update in the price list. + """ + quantityRules: [QuantityRuleInput!]! + ): QuantityRulesAddPayload + + """ + Deletes specific quantity rules from a price list using a product variant ID. + You can use the `quantityRulesDelete` mutation to delete a set of quantity rules from a price list. + """ + quantityRulesDelete( + """ + The ID of the price list from which the quantity rules will be deleted. + """ + priceListId: ID! + + """ + A list of product variant IDs whose quantity rules will be removed from the price list. + """ + variantIds: [ID!]! + ): QuantityRulesDeletePayload + + """ + Creates a refund for an order, allowing you to process returns and issue payments back to customers. + + Use the `refundCreate` mutation to programmatically process refunds in scenarios where you need to + return money to customers, such as when handling returns, processing chargebacks, or correcting + order errors. + + The `refundCreate` mutation supports various refund scenarios: + + - Refunding line items with optional restocking + - Refunding shipping costs + - Refunding duties and import taxes + - Refunding additional fees + - Processing refunds through different payment methods + - Issuing store credit refunds (when enabled) + + You can create both full and partial refunds, and optionally allow over-refunding in specific + cases. + + After creating a refund, you can track its status and details through the order's + [`refunds`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.refunds) + field. The refund is associated with the order and can be used for reporting and reconciliation purposes. + + Learn more about + [managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + and [refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties). + + > Note: + > The refunding behavior of the `refundCreate` mutation is similar to the + [`refundReturn`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnRefund) + mutation. The key difference is that the `refundCreate` mutation lets you to specify restocking behavior + for line items, whereas the `returnRefund` mutation focuses solely on handling the financial refund without + any restocking input. + """ + refundCreate( + """ + The input fields that are used in the mutation for creating a refund. + """ + input: RefundInput! + ): RefundCreatePayload + + """ + Approves a customer's return request. + If this mutation is successful, then the `Return.status` field of the + approved return is set to `OPEN`. + """ + returnApproveRequest( + """ + The input fields to approve a return. + """ + input: ReturnApproveRequestInput! + ): ReturnApproveRequestPayload + + """ + Cancels a return and restores the items back to being fulfilled. + Canceling a return is only available before any work has been done + on the return (such as an inspection or refund). + """ + returnCancel( + """ + The ID of the return to cancel. + """ + id: ID! + + """ + Whether the customer receives an email notification regarding the canceled return. + """ + notifyCustomer: Boolean = false @deprecated(reason: "Not supported. This argument will be removed in a future version.") + ): ReturnCancelPayload + + """ + Indicates a return is complete, either when a refund has been made and items restocked, + or simply when it has been marked as returned in the system. + """ + returnClose( + """ + The ID of the return to close. + """ + id: ID! + ): ReturnClosePayload + + """ + Creates a return from an existing order that has at least one fulfilled + [line item](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + that hasn't yet been refunded. If you create a return on an archived order, then the order is automatically + unarchived. + + Use the `returnCreate` mutation when your workflow involves + [approving](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnApproveRequest) or + [declining](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnDeclineRequest) requested returns + outside of the Shopify platform. + + The `returnCreate` mutation performs the following actions: + + - Creates a return in the `OPEN` state, and assumes that the return request from the customer has already been + approved + - Creates a [reverse fulfillment order](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), + and enables you to create a [reverse delivery](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) + for the reverse fulfillment order + - Creates a sales agreement with a `RETURN` reason, which links to all sales created for the return or exchange + - Generates sales records that reverse the sales records for the items being returned + - Generates sales records for any exchange line items + + After you've created a return, use the + [`return`](https://shopify.dev/docs/api/admin-graphql/latest/queries/return) query to retrieve the + return by its ID. Learn more about providing a + [return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + for merchants. + """ + returnCreate( + """ + Specifies the input fields for a return. + """ + returnInput: ReturnInput! + ): ReturnCreatePayload + + """ + Declines a return on an order. + When a return is declined, each `ReturnLineItem.fulfillmentLineItem` can be associated to a new return. + Use the `ReturnCreate` or `ReturnRequest` mutation to initiate a new return. + """ + returnDeclineRequest( + """ + The input fields for declining a customer's return request. + """ + input: ReturnDeclineRequestInput! + ): ReturnDeclineRequestPayload + + """ + Removes return lines from a return. + """ + returnLineItemRemoveFromReturn( + """ + The ID of the return for line item removal. + """ + returnId: ID! + + """ + The return line items to remove from the return. + """ + returnLineItems: [ReturnLineItemRemoveFromReturnInput!]! + ): ReturnLineItemRemoveFromReturnPayload @deprecated(reason: "Use `removeFromReturn` instead.") + + """ + Refunds a return when its status is `OPEN` or `CLOSED` and associates it with the related return request. + """ + returnRefund( + """ + The input fields to refund a return. + """ + returnRefundInput: ReturnRefundInput! + ): ReturnRefundPayload @deprecated(reason: "Use `returnProcess` instead.") + + """ + Reopens a closed return. + """ + returnReopen( + """ + The ID of the return to reopen. + """ + id: ID! + ): ReturnReopenPayload + + """ + A customer's return request that hasn't been approved or declined. + This mutation sets the value of the `Return.status` field to `REQUESTED`. + To create a return that has the `Return.status` field set to `OPEN`, use the `returnCreate` mutation. + """ + returnRequest( + """ + The input fields for requesting a return. + """ + input: ReturnRequestInput! + ): ReturnRequestPayload + + """ + 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! + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryCreateWithShippingPayload + + """ + Disposes reverse delivery line items for a reverse delivery on the same shop. + """ + reverseDeliveryDispose( + """ + The input parameters required to dispose reverse delivery line items. + """ + dispositionInputs: [ReverseDeliveryDisposeInput!]! + ): ReverseDeliveryDisposePayload @deprecated(reason: "Use `reverseFulfillmentOrderDispose` instead. This will be removed in 2024-10.") + + """ + 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! + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryShippingUpdatePayload + + """ + Disposes reverse fulfillment order line items. + """ + reverseFulfillmentOrderDispose( + """ + The input parameters required to dispose reverse fulfillment order line items. + """ + dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]! + ): ReverseFulfillmentOrderDisposePayload + + """ + Creates a saved search. + """ + savedSearchCreate( + """ + Specifies the input fields for a saved search. + """ + input: SavedSearchCreateInput! + ): SavedSearchCreatePayload + + """ + Delete a saved search. + """ + savedSearchDelete( + """ + The input fields to delete a saved search. + """ + input: SavedSearchDeleteInput! + ): SavedSearchDeletePayload + + """ + Updates a saved search. + """ + savedSearchUpdate( + """ + The input fields to update a saved search. + """ + input: SavedSearchUpdateInput! + ): SavedSearchUpdatePayload + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + Updates a script tag. + """ + scriptTagUpdate( + """ + The ID of the script tag to update. + """ + id: ID! + + """ + Specifies the input fields for a script tag. + """ + input: ScriptTagInput! + ): ScriptTagUpdatePayload + + """ + Creates a segment. + """ + segmentCreate( + """ + The name of the segment to be created. Segment names must be unique. + """ + name: String! + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String! + ): SegmentCreatePayload + + """ + Deletes a segment. + """ + segmentDelete( + """ + Specifies the segment to delete. + """ + id: ID! + ): SegmentDeletePayload + + """ + Updates a segment. + """ + segmentUpdate( + """ + Specifies the segment to be updated. + """ + id: ID! + + """ + The new name for the segment. + """ + name: String + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + ): SegmentUpdatePayload + + """ + Adds multiple product variants to a selling plan group. + """ + sellingPlanGroupAddProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the product variants to add. + """ + productVariantIds: [ID!]! + ): SellingPlanGroupAddProductVariantsPayload + + """ + Adds multiple products to a selling plan group. + """ + sellingPlanGroupAddProducts( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the products to add. + """ + productIds: [ID!]! + ): SellingPlanGroupAddProductsPayload + + """ + Creates a Selling Plan Group. + """ + sellingPlanGroupCreate( + """ + The properties of the new Selling Plan Group. + """ + input: SellingPlanGroupInput! + + """ + The resources this Selling Plan Group should be applied to. + """ + resources: SellingPlanGroupResourceInput + ): SellingPlanGroupCreatePayload + + """ + Delete a Selling Plan Group. This does not affect subscription contracts. + """ + sellingPlanGroupDelete( + """ + The id of the selling plan group to delete. + """ + id: ID! + ): SellingPlanGroupDeletePayload + + """ + Removes multiple product variants from a selling plan group. + """ + sellingPlanGroupRemoveProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the product variants to remove. + """ + productVariantIds: [ID!]! + ): SellingPlanGroupRemoveProductVariantsPayload + + """ + Removes multiple products from a selling plan group. + """ + sellingPlanGroupRemoveProducts( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the products to remove. + """ + productIds: [ID!]! + ): SellingPlanGroupRemoveProductsPayload + + """ + Update a Selling Plan Group. + """ + sellingPlanGroupUpdate( + """ + The Selling Plan Group to update. + """ + id: ID! + + """ + The properties of the Selling Plan Group to update. + """ + input: SellingPlanGroupInput! + ): SellingPlanGroupUpdatePayload + + """ + Creates a new unconfigured server pixel. A single server pixel can exist for + an app and shop combination. If you call this mutation when a server pixel + already exists, then an error will return. + """ + serverPixelCreate: ServerPixelCreatePayload + + """ + Deletes the Server Pixel associated with the current app & shop. + """ + serverPixelDelete: ServerPixelDeletePayload + + """ + Deletes a shipping package. + """ + shippingPackageDelete( + """ + The ID of the shipping package to remove. + """ + id: ID! + ): ShippingPackageDeletePayload + + """ + Set a shipping package as the default. + The default shipping package is the one used to calculate shipping costs on checkout. + """ + shippingPackageMakeDefault( + """ + The ID of the shipping package to set as the default. + """ + id: ID! + ): ShippingPackageMakeDefaultPayload + + """ + Updates a shipping package. + """ + shippingPackageUpdate( + """ + The ID of the shipping package to update. + """ + id: ID! + + """ + Specifies the input fields for a shipping package. + """ + shippingPackage: CustomShippingPackageInput! + ): ShippingPackageUpdatePayload + + """ + Deletes a locale for a shop. This also deletes all translations of this locale. + """ + shopLocaleDisable( + """ + ISO code of the locale to delete. + """ + locale: String! + ): ShopLocaleDisablePayload + + """ + Adds a locale for a shop. The newly added locale is in the unpublished state. + """ + shopLocaleEnable( + """ + ISO code of the locale to enable. + """ + locale: String! + + """ + The list of markets web presences to add the locale to. + """ + marketWebPresenceIds: [ID!] + ): ShopLocaleEnablePayload + + """ + Updates a locale for a shop. + """ + shopLocaleUpdate( + """ + ISO code of the locale to update. + """ + locale: String! + + """ + Specifies the input fields for a shop locale. + """ + shopLocale: ShopLocaleInput! + ): ShopLocaleUpdatePayload + + """ + Updates a shop policy. + """ + shopPolicyUpdate( + """ + The properties to use when updating the shop policy. + """ + shopPolicy: ShopPolicyInput! + ): ShopPolicyUpdatePayload + + """ + The `ResourceFeedback` object lets your app report the status of shops and their resources. For example, if + your app is a marketplace channel, then you can use resource feedback to alert + merchants that they need to connect their marketplace account by signing in. + + Resource feedback notifications are displayed to the merchant on the home + screen of their Shopify admin, and in the product details view for any + products that are published to your app. + + This resource should be used only in cases where you're describing steps that + a merchant is required to complete. If your app offers optional or promotional + set-up steps, or if it makes recommendations, then don't use resource feedback + to let merchants know about them. + + ## Sending feedback on a shop + + You can send resource feedback on a shop to let the merchant know what steps + they need to take to make sure that your app is set up correctly. Feedback can + have one of two states: `requires_action` or `success`. 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. + And to remove the feedback message from the Shopify admin, send a `success` + feedback request. + + #### Important + Sending feedback replaces previously sent feedback for the shop. Send a new + `shopResourceFeedbackCreate` mutation to push the latest state of a shop or + its resources to Shopify. + """ + shopResourceFeedbackCreate( + """ + The fields required to create shop feedback. + """ + input: ResourceFeedbackCreateInput! + ): ShopResourceFeedbackCreatePayload + + """ + Creates an alternate currency payout for a Shopify Payments account. + """ + shopifyPaymentsPayoutAlternateCurrencyCreate( + """ + The ID of the Shopify Payments account on which the mutation is being performed. + """ + accountId: ID + + """ + The currency of the balance to payout. + """ + currency: CurrencyCode! + ): ShopifyPaymentsPayoutAlternateCurrencyCreatePayload + + """ + Generates the URL and signed paramaters needed to upload an asset to Shopify. + """ + stagedUploadTargetGenerate( + """ + The input fields for generating a staged upload. + """ + input: StagedUploadTargetGenerateInput! + ): StagedUploadTargetGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Uploads multiple images. + """ + stagedUploadTargetsGenerate( + """ + The input fields for generating staged uploads. + """ + input: [StageImageInput!]! + ): StagedUploadTargetsGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Creates staged upload targets for file uploads such as images, videos, and 3D models. + + Use the `stagedUploadsCreate` mutation instead of direct file creation mutations when: + + - **Uploading large files**: Files over a few MB benefit from staged uploads for better reliability + - **Uploading media files**: Videos, 3D models, and high-resolution images + - **Bulk importing**: CSV files, product catalogs, or other bulk data + - **Using external file sources**: When files are stored remotely and need to be transferred to Shopify + + The `stagedUploadsCreate` mutation is the first step in Shopify's secure two-step upload process: + + **Step 1: Create staged upload targets** (this mutation) + - Generate secure, temporary upload URLs for your files. + - Receive authentication parameters for the upload. + + **Step 2: Upload files and create assets** + - Upload your files directly to the provided URLs using the authentication parameters. + - Use the returned `resourceUrl` as the `originalSource` in subsequent mutations like `fileCreate`. + + This approach provides better performance for large files, handles network interruptions gracefully, + and ensures secure file transfers to Shopify's storage infrastructure. + + > Note: + > File size is required when uploading + > [`VIDEO`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-VIDEO) or + > [`MODEL_3D`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-MODEL_3D) + > resources. + + After creating staged upload targets, complete the process by: + + 1. **Uploading files**: Send your files to the returned [`url`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.url) + using the provided + [`parameters`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.parameters) + for authentication + 2. **Creating file assets**: Use the [`resourceUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.resourceUrl) + as the `originalSource` in mutations such as: + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Creates file assets from staged uploads + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Updates products with new media from staged uploads + + Learn more about [uploading media to Shopify](https://shopify.dev/apps/online-store/media/products). + """ + stagedUploadsCreate( + """ + The information required to generate staged upload targets. + """ + input: [StagedUploadInput!]! + ): StagedUploadsCreatePayload + + """ + Activates the specified standard metafield definition from its template. + + Refer to the [list of standard metafield definition templates](https://shopify.dev/apps/metafields/definitions/standard-definitions). + """ + standardMetafieldDefinitionEnable( + """ + The ID of the standard metafield definition template to enable. + """ + id: ID + + """ + 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! = false + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean = false @deprecated(reason: "Use `capabilities.smartCollectionCondition` instead. This will be removed in 2025-07.") + + """ + Whether metafields for the definition are visible using the Storefront API. + """ + visibleToStorefrontApi: Boolean = null + ): StandardMetafieldDefinitionEnablePayload + + """ + Enables the specified standard metaobject definition from its template. + """ + standardMetaobjectDefinitionEnable( + """ + The type of the metaobject definition to enable. + """ + type: String! + ): StandardMetaobjectDefinitionEnablePayload + + """ + Creates a credit transaction that increases the store credit account balance by the given amount. + This operation will create an account if one does not already exist. + A store credit account owner can hold multiple accounts each with a different currency. + Use the most appropriate currency for the given store credit account owner. + """ + 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! + ): StoreCreditAccountCreditPayload + + """ + 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! + ): StoreCreditAccountDebitPayload + + """ + Creates a storefront access token for use with the [Storefront API](https://shopify.dev/docs/api/storefront). + + An app can have a maximum of 100 active storefront access tokens for each shop. + + [Get started 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 new subscription billing attempt. 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). + """ + subscriptionBillingAttemptCreate( + """ + The information to apply as a billing attempt. + """ + subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput! + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionBillingAttemptCreatePayload + + """ + Asynchronously queries and charges all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkCharge( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """ + Criteria to filter the billing cycles on which the action is executed. + """ + filters: SubscriptionBillingCycleBulkFilters + ): SubscriptionBillingCycleBulkChargePayload + + """ + Asynchronously queries all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkSearch( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """ + Criteria to filter the billing cycles on which the action is executed. + """ + filters: SubscriptionBillingCycleBulkFilters + ): SubscriptionBillingCycleBulkSearchPayload + + """ + Creates a new subscription billing attempt for a specified billing cycle. This + is the alternative mutation for [subscriptionBillingAttemptCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate). + For more information, refer to [Create a subscription contract](https://shopify.dev/docs/apps/selling-strategies/subscriptions/contracts/create#step-4-create-a-billing-attempt). + """ + subscriptionBillingCycleCharge( + """ + 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 ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionBillingCycleChargePayload + + """ + Commits the updates of a Subscription Billing Cycle Contract draft. + """ + subscriptionBillingCycleContractDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! + ): SubscriptionBillingCycleContractDraftCommitPayload + + """ + Concatenates a contract to a Subscription Draft. + """ + subscriptionBillingCycleContractDraftConcatenate( + """ + 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! + ): SubscriptionBillingCycleContractDraftConcatenatePayload + + """ + Edit the contents of a subscription contract for the specified billing cycle. + """ + subscriptionBillingCycleContractEdit( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleContractEditPayload + + """ + Delete the schedule and contract edits of the selected subscription billing cycle. + """ + subscriptionBillingCycleEditDelete( + """ + Input object used to select and use billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleEditDeletePayload + + """ + Delete the current and future schedule and contract edits of a list of subscription billing cycles. + """ + subscriptionBillingCycleEditsDelete( + """ + The globally-unique identifier of the subscription contract that the billing cycle belongs to. + """ + contractId: ID! + + """ + Select billing cycles to be deleted. + """ + targetSelection: SubscriptionBillingCyclesTargetSelection! + ): SubscriptionBillingCycleEditsDeletePayload + + """ + Modify the schedule of a specific billing cycle. + """ + subscriptionBillingCycleScheduleEdit( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + + """ + Data used to create or modify billing cycle schedule edit. + """ + input: SubscriptionBillingCycleScheduleEditInput! + ): SubscriptionBillingCycleScheduleEditPayload + + """ + Skips a Subscription Billing Cycle. + """ + subscriptionBillingCycleSkip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleSkipPayload + + """ + Unskips a Subscription Billing Cycle. + """ + subscriptionBillingCycleUnskip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleUnskipPayload + + """ + Activates a Subscription Contract. Contract status must be either active, paused, or failed. + """ + subscriptionContractActivate( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractActivatePayload + + """ + Creates a Subscription Contract. + """ + subscriptionContractAtomicCreate( + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionContractAtomicCreateInput! + ): SubscriptionContractAtomicCreatePayload + + """ + Cancels a Subscription Contract. + """ + subscriptionContractCancel( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractCancelPayload + + """ + Creates a Subscription Contract Draft. + You can submit all the desired information for the draft using [Subscription Draft Input object](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionDraftInput). + You can also update the draft using the [Subscription Contract Update](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionContractUpdate) mutation. + The draft is not saved until you call the [Subscription Draft Commit](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit) mutation. + """ + subscriptionContractCreate( + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionContractCreateInput! + ): SubscriptionContractCreatePayload + + """ + Expires a Subscription Contract. + """ + subscriptionContractExpire( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractExpirePayload + + """ + Fails a Subscription Contract. + """ + subscriptionContractFail( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractFailPayload + + """ + Pauses a Subscription Contract. + """ + subscriptionContractPause( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractPausePayload + + """ + Allows for the easy change of a Product in a Contract or a Product price change. + """ + subscriptionContractProductChange( + """ + The properties of the Product changes. + """ + input: SubscriptionContractProductChangeInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractProductChangePayload + + """ + Sets the next billing date of a Subscription Contract. This field is managed by the apps. + Alternatively you can utilize our + [Billing Cycles APIs](https://shopify.dev/docs/apps/selling-strategies/subscriptions/billing-cycles), + which provide auto-computed billing dates and additional functionalities. + """ + subscriptionContractSetNextBillingDate( + """ + The gid of the Subscription Contract to set the next billing date for. + """ + contractId: ID! + + """ + The next billing date. + """ + date: DateTime! + ): SubscriptionContractSetNextBillingDatePayload + + """ + The subscriptionContractUpdate mutation allows you to create a draft of an + existing subscription contract. This [draft](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionDraft) + can be reviewed and modified as needed. Once the draft is committed with [subscriptionDraftCommit](https://shopify.dev/api/admin-graphql/latest/mutations/subscriptionDraftCommit), + the changes are applied to the original subscription contract. + """ + subscriptionContractUpdate( + """ + The gid of the Subscription Contract to update. + """ + contractId: ID! + ): SubscriptionContractUpdatePayload + + """ + Commits the updates of a Subscription Contract draft. + """ + subscriptionDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! + ): SubscriptionDraftCommitPayload + + """ + Adds a subscription discount to a subscription draft. + """ + subscriptionDraftDiscountAdd( + """ + The ID of the Subscription Contract draft to add a subscription discount to. + """ + draftId: ID! + + """ + The properties of the new Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountAddPayload + + """ + Applies a code discount on the subscription draft. + """ + subscriptionDraftDiscountCodeApply( + """ + The gid of the subscription contract draft to apply a subscription code discount on. + """ + draftId: ID! + + """ + Code discount redeem code. + """ + redeemCode: String! + ): SubscriptionDraftDiscountCodeApplyPayload + + """ + Removes a subscription discount from a subscription draft. + """ + subscriptionDraftDiscountRemove( + """ + The gid of the subscription draft discount to remove. + """ + discountId: ID! + + """ + The gid of the subscription contract draft to remove a subscription discount from. + """ + draftId: ID! + ): SubscriptionDraftDiscountRemovePayload + + """ + Updates a subscription discount on a subscription draft. + """ + subscriptionDraftDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """ + The properties to update on the Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountUpdatePayload + + """ + Adds a subscription free shipping discount to a subscription draft. + """ + subscriptionDraftFreeShippingDiscountAdd( + """ + The ID of the subscription contract draft to add a subscription free shipping discount to. + """ + draftId: ID! + + """ + The properties of the new subscription free shipping discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountAddPayload + + """ + Updates a subscription free shipping discount on a subscription draft. + """ + subscriptionDraftFreeShippingDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """ + The properties to update on the Subscription Free Shipping Discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountUpdatePayload + + """ + Adds a subscription line to a subscription draft. + """ + subscriptionDraftLineAdd( + """ + The gid of the Subscription Contract draft to add a subscription line to. + """ + draftId: ID! + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineInput! + ): SubscriptionDraftLineAddPayload + + """ + Removes a subscription line from a subscription draft. + """ + subscriptionDraftLineRemove( + """ + The gid of the Subscription Contract draft to remove a subscription line from. + """ + draftId: ID! + + """ + The gid of the Subscription Line to remove. + """ + lineId: ID! + ): SubscriptionDraftLineRemovePayload + + """ + Updates a subscription line on a subscription draft. + """ + subscriptionDraftLineUpdate( + """ + The gid of the Subscription Contract draft to update a subscription line from. + """ + draftId: ID! + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineUpdateInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! + ): SubscriptionDraftLineUpdatePayload + + """ + Updates a Subscription Draft. + """ + subscriptionDraftUpdate( + """ + The gid of the Subscription Draft to update. + """ + draftId: ID! + + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionDraftInput! + ): SubscriptionDraftUpdatePayload + + """ + Add tags to an order, a draft order, a customer, a product, or an online store article. + """ + tagsAdd( + """ + The ID of a resource to add tags to. + """ + id: ID! + + """ + A list of tags to add to the resource. Can be an array of strings or a + single string composed of a comma-separated list of values. Example values: + `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"`. + """ + tags: [String!]! + ): TagsAddPayload + + """ + Remove tags from an order, a draft order, a customer, a product, or an online store article. + """ + tagsRemove( + """ + The ID of the resource to remove tags from. + """ + id: ID! + + """ + A list of tags to remove from the resource in the form of an array of + strings. Example value: `["tag1", "tag2", "tag3"]`. + """ + tags: [String!]! + ): TagsRemovePayload + + """ + Allows tax app configurations for tax partners. + """ + taxAppConfigure( + """ + Configures whether the tax app is correctly configured and ready to be used. + """ + ready: Boolean! + ): TaxAppConfigurePayload + + """ + Trigger the voiding of an uncaptured authorization transaction. + """ + transactionVoid( + """ + An uncaptured authorization transaction. + """ + parentTransactionId: ID! + ): TransactionVoidPayload + + """ + Creates or updates translations. + """ + translationsRegister( + """ + ID of the resource that is being translated. + """ + resourceId: ID! + + """ + Specifies the input fields for a translation. + """ + translations: [TranslationInput!]! + ): TranslationsRegisterPayload + + """ + Deletes translations. + """ + translationsRemove( + """ + The list of translation locales. Only locales returned in `shopLocales` are valid. + """ + locales: [String!]! + + """ + The list of market IDs. + """ + marketIds: [ID!] + + """ + ID of the translatable resource for which translations are being deleted. + """ + resourceId: ID! + + """ + The list of translation keys. + """ + translationKeys: [String!]! + ): TranslationsRemovePayload + + """ + Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. + """ + urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload + + """ + Asynchronously delete [URLRedirect](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) + objects in bulk by IDs. + Learn more about [URLRedirect](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect) + objects. + """ + urlRedirectBulkDeleteByIds( + """ + A list of [`URLRedirect`]( + https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect + ) object IDs to delete. + """ + ids: [ID!]! + ): UrlRedirectBulkDeleteByIdsPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySavedSearch( + """ + The ID of the URL redirect saved search for filtering. + """ + savedSearchId: ID! + ): UrlRedirectBulkDeleteBySavedSearchPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySearch( + """ + Search query for filtering redirects on (both Redirect from and Redirect to fields). + """ + search: String! + ): UrlRedirectBulkDeleteBySearchPayload + + """ + Creates a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectCreate( + """ + The fields to use when creating the redirect. + """ + urlRedirect: UrlRedirectInput! + ): UrlRedirectCreatePayload + + """ + Deletes a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectDelete( + """ + The ID of the redirect to delete. + """ + id: ID! + ): UrlRedirectDeletePayload + + """ + Creates a [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object. + + After creating the `UrlRedirectImport` object, the `UrlRedirectImport` request + can be performed using the [`urlRedirectImportSubmit`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportSubmit) mutation. + """ + urlRedirectImportCreate( + """ + The staged upload URL of the CSV file. + You can download [a sample URL redirect CSV file](https://help.shopify.com/csv/sample-redirect-template.csv). + """ + url: URL! + ): UrlRedirectImportCreatePayload + + """ + Submits a `UrlRedirectImport` request to be processed. + + The `UrlRedirectImport` request is first created with the [`urlRedirectImportCreate`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportCreate) mutation. + """ + urlRedirectImportSubmit( + """ + The ID of the [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object. + """ + id: ID! + ): UrlRedirectImportSubmitPayload + + """ + Updates a URL redirect. + """ + urlRedirectUpdate( + """ + The ID of the URL redirect to update. + """ + id: ID! + + """ + The input fields required to update the URL redirect. + """ + urlRedirect: UrlRedirectInput! + ): UrlRedirectUpdatePayload + + """ + Creates a validation. + """ + validationCreate( + """ + The input fields for a new validation. + """ + validation: ValidationCreateInput! + ): ValidationCreatePayload + + """ + Deletes a validation. + """ + validationDelete( + """ + The ID representing the installed validation. + """ + id: ID! + ): ValidationDeletePayload + + """ + Update a validation. + """ + validationUpdate( + """ + The ID representing the validation to update. + """ + id: ID! + + """ + The input fields to update a validation. + """ + validation: ValidationUpdateInput! + ): ValidationUpdatePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by creating a web pixel record on the store where you installed your app. + + When you run the `webPixelCreate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelCreate( + """ + The web pixel settings in JSON format. + """ + webPixel: WebPixelInput! + ): WebPixelCreatePayload + + """ + Deletes the web pixel shop settings. + """ + webPixelDelete( + """ + The ID of the web pixel to delete. + """ + id: ID! + ): WebPixelDeletePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by updating a web pixel record on the store where you installed your app. + + When you run the `webPixelUpdate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelUpdate( + """ + The ID of the web pixel to update. + """ + id: ID! + + """ + The web pixel settings in JSON format. + """ + webPixel: WebPixelInput! + ): WebPixelUpdatePayload + + """ + Set up webhook subscriptions so your app gets notified instantly when things + happen in a merchant's store. Instead of constantly checking for changes, + webhooks push updates to your app the moment they occur, making integrations + faster and more efficient. + + For example, an inventory management app might create subscriptions for + `orders/paid` and `inventory_levels/update` events to automatically adjust + stock levels and trigger fulfillment processes when customers complete purchases. + + Use `webhookSubscriptionCreate` to: + - Set up real-time event notifications for your app + - Configure specific topics like order creation, product updates, or customer changes + - Define endpoint destinations (HTTPS, EventBridge, or Pub/Sub) + - Filter events using Shopify search syntax to receive notifications only for relevant events + - Configure field inclusion to control which data fields are included in webhook payloads + + The mutation supports multiple endpoint types and advanced filtering options, + allowing you to create precisely targeted webhook subscriptions that match + your app's integration needs. The API version is inherited from the app + configuration and cannot be specified per subscription. Filters use Shopify + search syntax to determine which events trigger notifications. + + Successful creation returns the webhook subscription fields that you request + in your query. The mutation validates topic availability, filter syntax, and + endpoint configuration. + + Learn more about [creating webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + + + 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 + + """ + Removes an existing webhook subscription, stopping all future event + notifications for that subscription. This mutation provides a clean way to + deactivate webhooks when they're no longer needed. + + For example, when an app feature is disabled or when you need to change webhook configurations, you can delete + the old webhook subscription to prevent unnecessary event delivery and potential errors. Alternatively, for + endpoint changes, you might consider updating the existing subscription instead of deleting and recreating it. + + Use `webhookSubscriptionDelete` to: + - Clean up unused webhook subscriptions + - Stop event delivery to deprecated endpoints + - Remove subscriptions during app uninstallation + - Reduce unnecessary resource usage by removing unused subscriptions + + The mutation returns the deleted subscription's ID for confirmation when + successful. Validation errors are included in the response if you request them + in your query, as with all GraphQL mutations. + + Learn more about [managing webhook subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionDelete( + """ + The ID of the webhook subscription to delete. + """ + id: ID! + ): WebhookSubscriptionDeletePayload + + """ + Updates an existing webhook subscription's configuration, allowing you to + modify endpoints, topics, filters, and other subscription settings without + recreating the entire subscription. This mutation provides flexible webhook + management for evolving app requirements. + + For example, when migrating from HTTP endpoints to EventBridge, you can update + the subscription's endpoint configuration while preserving the same topic + subscriptions and filters, ensuring continuity of event delivery during + infrastructure changes. + + Use `webhookSubscriptionUpdate` to: + - Change webhook endpoint URLs or destination types + - Modify event filtering criteria to refine event relevance + - Adjust field inclusion settings to optimize payload sizes + - Configure metafield namespace access for extended data + + The mutation supports comprehensive configuration changes including endpoint + type switching (HTTP to Pub/Sub, for instance), topic modifications, and + advanced filtering updates. The API version is inherited from the app + configuration and cannot be changed per subscription. + + Updates are applied atomically, ensuring that webhook delivery continues + uninterrupted during configuration changes. The response includes the updated + subscription fields that you request in your query, and validation errors if requested. + + Learn more about [updating webhook configurations](https://shopify.dev/docs/apps/build/webhooks/subscribe). + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for a webhook subscription. + """ + webhookSubscription: WebhookSubscriptionInput! + ): WebhookSubscriptionUpdatePayload +} + +""" +A signed upload parameter for uploading an asset to Shopify. + +Deprecated in favor of +[StagedUploadParameter](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadParameter), +which is used in +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget) +and returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type MutationsStagedUploadTargetGenerateUploadParameter { + """ + The upload parameter name. + """ + name: String! + + """ + The upload parameter value. + """ + value: String! +} + +""" +A default cursor that you can use in queries to paginate your results. Each edge in a connection can +return a cursor, which is a reference to the edge's position in the connection. You can use an edge's cursor as +the starting point to retrieve the nodes before or after it in a connection. + +To learn more about using cursor-based pagination, refer to +[Paginating results with GraphQL](https://shopify.dev/api/usage/pagination-graphql). +""" +interface Navigable { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! +} + +""" +A navigation item, holding basic link attributes. +""" +type NavigationItem { + """ + The unique identifier of the navigation item. + """ + id: String! + + """ + The name of the navigation item. + """ + title: String! + + """ + The URL of the page that the navigation item links to. + """ + url: URL! +} + +""" +An object with an ID field to support global identification, in accordance with the +[Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). +This interface is used by the [node](https://shopify.dev/api/admin-graphql/unstable/queries/node) +and [nodes](https://shopify.dev/api/admin-graphql/unstable/queries/nodes) queries. +""" +interface Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The input fields for dimensions of an object. +""" +input ObjectDimensionsInput { + """ + 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! +} + +""" +The shop's online store channel. +""" +type OnlineStore { + """ + Storefront password information. + """ + passwordProtection: OnlineStorePasswordProtection! +} + +""" +An article in the blogging system. +""" +type OnlineStoreArticle implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Shopify stores come with a built-in blogging engine, allowing a shop to have one or more blogs. Blogs are meant +to be used as a type of magazine or newsletter for the shop, with content that changes over time. +""" +type OnlineStoreBlog implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +A page on the Online Store. +""" +type OnlineStorePage implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Storefront password information. +""" +type OnlineStorePasswordProtection { + """ + Whether the storefront password is enabled. + """ + enabled: Boolean! +} + +""" +Online Store preview URL of the object. +""" +interface OnlineStorePreviewable { + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL +} + +""" +The input fields for the options and values of the combined listing. +""" +input OptionAndValueInput { + """ + 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 + + """ + The ordered values of the Product's Option. + """ + values: [String!]! +} + +""" +The input fields for creating a product option. +""" +input OptionCreateInput { + """ + 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 { + """ + Specifies the product option to reorder by ID. + """ + id: ID + + """ + Specifies the product option to reorder by name. + """ + name: String + + """ + Values associated with the option. + """ + values: [OptionValueReorderInput!] +} + +""" +The input fields for creating or updating a product option. +""" +input OptionSetInput { + """ + Specifies the product option to update. + """ + id: ID + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Value associated with an option. + """ + values: [OptionValueSetInput!] +} + +""" +The input fields for updating a product option. +""" +input OptionUpdateInput { + """ + Specifies the product option to update. + """ + id: ID! + + """ + 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 { + """ + 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 { + """ + Specifies the product option value by ID. + """ + id: ID + + """ + Specifies the product option value by name. + """ + name: String +} + +""" +The input fields for creating or updating a product option value. +""" +input OptionValueSetInput { + """ + Specifies the product option value. + """ + id: ID + + """ + Value associated with an option. + """ + name: String +} + +""" +The input fields for updating a product option value. +""" +input OptionValueUpdateInput { + """ + Specifies the product option value. + """ + id: ID! + + """ + 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 & HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + A list of additional fees applied to an order, such as duties, import fees, or [tax lines](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.additionalFees.taxLines). + """ + additionalFees: [AdditionalFee!]! + + """ + A list of sales agreements associated with the order, such as contracts + defining payment terms, or delivery schedules between merchants and customers. + """ + agreements( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 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 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 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! + + """ + 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 the order has had any edits applied. For example, adding or removing + line items, updating quantities, or changing prices. + """ + edited: Boolean! + + """ + The email address associated with the customer for this order. + Used for sending order confirmations, shipping notifications, and other order-related communications. + Returns `null` if no email address was provided during checkout. + """ + email: String + + """ + Whether taxes on the order are estimated. + This field returns `false` when taxes on the order are finalized and aren't subject to any changes. + """ + estimatedTaxes: Boolean! + + """ + A list of events associated with the order. Events track significant changes + and activities related to the order, such as creation, payment, fulfillment, + and cancellation. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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` | + You can apply one or more filters to a query. Learn more 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 + ): [Fulfillment!]! + + """ + The total number of fulfillments for the order, including canceled ones. + """ + fulfillmentsCount: Count + + """ + Whether the order has been paid in full. This field returns `true` when the + total amount received equals or exceeds the order total. + """ + fullyPaid: Boolean! + + """ + Whether the merchant has added a timeline comment to the order. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL of the first page of the online store that the customer visited before they submitted the order. + """ + landingPageDisplayText: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.landingPageHtml` instead") + + """ + The first page of the online store that the customer visited before they submitted the order. + """ + landingPageUrl: URL @deprecated(reason: "Use `customerJourneySummary.lastVisit.landingPage` instead") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + A list of the order's line items. Line items represent the individual products and quantities that make up the order. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + A list of the order's line items. Line items represent the individual products and quantities that make up the order. + """ + lineItemsMutable( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): LineItemMutableConnection! @deprecated(reason: "Use `lineItems` instead. This will be removed in 2024-10.") + + """ + 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.") + + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The unique identifier for the order that appears on the order page in the Shopify admin and the **Order status** page. + For example, "#1001", "EN1001", or "1001-A". + This value isn't unique across multiple stores. Use this field to identify + orders in the Shopify admin and for order tracking. + """ + name: String! + + """ + The net payment for the order, based on the total amount received minus the total amount refunded, in shop currency. + """ + netPayment: Money! @deprecated(reason: "Use `netPaymentSet` instead.") + + """ + The net payment for the order, based on the total amount received minus the + total amount refunded, in shop and presentment currencies. + """ + netPaymentSet: MoneyBag! + + """ + A list of line items that can't be fulfilled. + For example, tips and fully refunded line items can't be fulfilled. + For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + nonFulfillableLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 total amount of all additional fees, such as import fees or taxes, that were applied when an order was created. + Returns `null` if additional fees aren't applicable. + """ + originalTotalAdditionalFeesSet: MoneyBag + + """ + The total amount of duties calculated when an order was created, before any + modifications. Modifications include returns, refunds, order edits, and + cancellations. Use [`currentTotalDutiesSet`](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.currentTotalDutiesSet) + to retrieve the current duties amount after adjustments. + """ + originalTotalDutiesSet: MoneyBag + + """ + The total price of the order at the time of order creation, in shop and presentment currencies. + Use this to compare the original order value against the current total after edits, returns, or refunds. + """ + originalTotalPriceSet: MoneyBag! + + """ + The payment collection details for the order, including payment status, outstanding amounts, and collection information. + Use this to understand when and how payments should be collected, especially + for orders with deferred or installment payment terms. + """ + paymentCollectionDetails: OrderPaymentCollectionDetails! + + """ + A list of the names of all payment gateways used for the order. + For example, "Shopify Payments" and "Cash on Delivery (COD)". + """ + paymentGatewayNames: [String!]! + + """ + The payment terms associated with the order, such as net payment due dates or + early payment discounts. Payment terms define when and how an order should be + paid. Returns `null` if no specific payment terms were set for the order. + """ + paymentTerms: PaymentTerms + + """ + The phone number associated with the customer for this order. + Useful for contacting customers about shipping updates, delivery notifications, or order issues. + Returns `null` if no phone number was provided during checkout. + """ + phone: String + + """ + The fulfillment location that was assigned when the order was created. + Orders can have multiple fulfillment orders. These fulfillment orders can each + be assigned to a different location which is responsible for fulfilling a + subset of the items in an order. The `Order.physicalLocation` field will only + point to one of these locations. + Use the [`FulfillmentOrder`](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder) + object for up to date fulfillment location information. + """ + physicalLocation: Location @deprecated(reason: "Use `fulfillmentOrders` to get the fulfillment location for the order") + + """ + The purchase order (PO) number that's associated with an order. + This is typically provided by business customers who require a PO number for their procurement. + """ + poNumber: String + + """ + The currency used by the customer when placing the order. For example, "USD", "EUR", or "CAD". + This may differ from the shop's base currency when serving international customers or using multi-currency pricing. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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! + + """ + 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 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 duties from the order to include in the refund. + """ + refundDuties: [RefundDutyInput!] + + """ + The line items from the order to include in the refund. + """ + refundLineItems: [RefundLineItemInput!] + + """ + 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 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 { + """ + 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 agreement associated with an order placement. +""" +type OrderAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The order associated with the agreement. + """ + order: Order! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 [application](https://shopify.dev/apps) that created the order. +""" +type OrderApp { + """ + The application icon. + """ + icon: Image! + + """ + The application ID. + """ + id: ID! + + """ + The name of the application. + """ + name: String! +} + +""" +Return type for `orderCancel` mutation. +""" +type OrderCancelPayload { + """ + The job that asynchronously cancels the order. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + orderCancelUserErrors: [OrderCancelUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `orderCancelUserErrors` instead.") +} + +""" +Represents the reason for the order's cancellation. +""" +enum OrderCancelReason { + """ + The customer wanted to cancel the order. + """ + CUSTOMER + + """ + Payment was declined. + """ + DECLINED + + """ + The order was fraudulent. + """ + FRAUD + + """ + There was insufficient inventory. + """ + INVENTORY + + """ + The order was canceled for an unlisted reason. + """ + OTHER + + """ + Staff made an error. + """ + STAFF +} + +""" +Errors related to order cancellation. +""" +type OrderCancelUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCancelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCancelUserError`. +""" +enum OrderCancelUserErrorCode { + """ + 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 +} + +""" +Details about the order cancellation. +""" +type OrderCancellation { + """ + Staff provided note for the order cancellation. + """ + staffNote: String +} + +""" +The input fields for the authorized transaction to capture and the total amount to capture from it. +""" +input OrderCaptureInput { + """ + The 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! + + """ + The ID of the authorized transaction to capture. + """ + parentTransactionId: ID! +} + +""" +Return type for `orderCapture` mutation. +""" +type OrderCapturePayload { + """ + The created capture transaction. + """ + transaction: OrderTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying an open order to close. +""" +input OrderCloseInput { + """ + The ID of the order to close. + """ + id: ID! +} + +""" +Return type for `orderClose` mutation. +""" +type OrderClosePayload { + """ + The closed order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Orders. +""" +type OrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderEdge!]! + + """ + A list of nodes that are contained in OrderEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Order!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `orderCreateMandatePayment` mutation. +""" +type OrderCreateMandatePaymentPayload { + """ + The async job used for charging the payment. + """ + job: Job + + """ + The Unique ID for the created payment. + """ + paymentReferenceId: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateMandatePaymentUserError!]! +} + +""" +An error that occurs during the execution of `OrderCreateMandatePayment`. +""" +type OrderCreateMandatePaymentUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateMandatePaymentUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateMandatePaymentUserError`. +""" +enum OrderCreateMandatePaymentUserErrorCode { + """ + Errors for mandate payment on order. + """ + ORDER_MANDATE_PAYMENT_ERROR_CODE +} + +""" +Return type for `orderDelete` mutation. +""" +type OrderDeletePayload { + """ + Deleted order ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderDeleteUserError!]! +} + +""" +Errors related to deleting an order. +""" +type OrderDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: OrderDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderDeleteUserError`. +""" +enum OrderDeleteUserErrorCode { + """ + The 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 { + """ + 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 { + """ + 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 **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 +} + +""" +A summary of the important details for a dispute on an order. +""" +type OrderDisputeSummary implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The type that the dispute was initiated as. + """ + initiatedAs: DisputeType! + + """ + The current status of the dispute. + """ + status: DisputeStatus! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. +""" +type OrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderEdge. + """ + node: Order! +} + +""" +Return type for `orderEditAddCustomItem` mutation. +""" +type OrderEditAddCustomItemPayload { + """ + The custom line item that will be added to the order based on the current edits. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditAddLineItemDiscount` mutation. +""" +type OrderEditAddLineItemDiscountPayload { + """ + The discount applied to a line item during this order edit. + """ + addedDiscountStagedChange: OrderStagedChangeAddLineItemDiscount + + """ + The line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields used to add a shipping line. +""" +input OrderEditAddShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Return type for `orderEditAddShippingLine` mutation. +""" +type OrderEditAddShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The [calculated shipping line](https://shopify.dev/api/admin-graphql/latest/objects/calculatedshippingline) + that's added during this order edit. + """ + calculatedShippingLine: CalculatedShippingLine + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditAddShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditAddShippingLine`. +""" +type OrderEditAddShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditAddShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditAddShippingLineUserError`. +""" +enum OrderEditAddShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditAddVariant` mutation. +""" +type OrderEditAddVariantPayload { + """ + The [calculated line item](https://shopify.dev/api/admin-graphql/latest/objects/calculatedlineitem) + that's added during this order edit. + """ + calculatedLineItem: CalculatedLineItem + + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An agreement associated with an edit to the order. +""" +type OrderEditAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount. + """ + fixedValue: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentValue: Float +} + +""" +Return type for `orderEditBegin` mutation. +""" +type OrderEditBeginPayload { + """ + The order that will be edited. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditCommit` mutation. +""" +type OrderEditCommitPayload { + """ + The order with changes applied. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveDiscount` mutation. +""" +type OrderEditRemoveDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveDiscount`. +""" +type OrderEditRemoveDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveDiscountUserError`. +""" +enum OrderEditRemoveDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditRemoveLineItemDiscount` mutation. +""" +type OrderEditRemoveLineItemDiscountPayload { + """ + The calculated line item after removal of the discount. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveShippingLine` mutation. +""" +type OrderEditRemoveShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveShippingLine`. +""" +type OrderEditRemoveShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveShippingLineUserError`. +""" +enum OrderEditRemoveShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditSetQuantity` mutation. +""" +type OrderEditSetQuantityPayload { + """ + The calculated line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + The calculated order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditUpdateDiscount` mutation. +""" +type OrderEditUpdateDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateDiscount`. +""" +type OrderEditUpdateDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateDiscountUserError`. +""" +enum OrderEditUpdateDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields used to update a shipping line. +""" +input OrderEditUpdateShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput + + """ + The title of the shipping line. + """ + title: String +} + +""" +Return type for `orderEditUpdateShippingLine` mutation. +""" +type OrderEditUpdateShippingLinePayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateShippingLine`. +""" +type OrderEditUpdateShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateShippingLineUserError`. +""" +enum OrderEditUpdateShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for specifying the information to be updated on an order when using the orderUpdate mutation. +""" +input OrderInput { + """ + 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! + + """ + 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 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 + + """ + 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 { + """ + The order associated with the invoice email. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderInvoiceSendUserError!]! +} + +""" +An error that occurs during the execution of `OrderInvoiceSend`. +""" +type OrderInvoiceSendUserError implements DisplayableError { + """ + The error code. + """ + code: OrderInvoiceSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderInvoiceSendUserError`. +""" +enum OrderInvoiceSendUserErrorCode { + """ + An error occurred while sending the invoice. + """ + ORDER_INVOICE_SEND_UNSUCCESSFUL +} + +""" +The input fields for specifying the order to mark as paid. +""" +input OrderMarkAsPaidInput { + """ + The ID of the order to mark as paid. + """ + id: ID! +} + +""" +Return type for `orderMarkAsPaid` mutation. +""" +type OrderMarkAsPaidPayload { + """ + The order marked as paid. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying a closed order to open. +""" +input OrderOpenInput { + """ + The ID of the order to open. + """ + id: ID! +} + +""" +Return type for `orderOpen` mutation. +""" +type OrderOpenPayload { + """ + The opened order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The payment collection details for an order that requires additional payment following an edit to the order. +""" +type OrderPaymentCollectionDetails { + """ + The URL to use for collecting an additional payment on the order. + """ + additionalPaymentCollectionUrl: URL + + """ + The list of vaulted payment methods for the order with their permissions. + """ + vaultedPaymentMethods: [PaymentMandate!] +} + +""" +The status of a customer's payment for an order. +""" +type OrderPaymentStatus { + """ + A message describing an error during the asynchronous processing of a payment. + """ + errorMessage: String + + """ + The ID of the payment, initially returned by an `orderCreateMandatePayment` or `orderCreatePayment` mutation. + """ + paymentReferenceId: String! + + """ + The status of the payment. + """ + status: OrderPaymentStatusResult! + + """ + The transaction associated with the payment. + """ + transactions: [OrderTransaction!]! + + """ + A translated message describing an error during the asynchronous processing of a payment. + """ + translatedErrorMessage: String +} + +""" +The type of a payment status. +""" +enum OrderPaymentStatusResult { + """ + The payment is authorized. + """ + AUTHORIZED + + """ + The payment is captured. + """ + CAPTURED + + """ + There was an error initiating the payment. + """ + ERROR + + """ + The payment is awaiting processing. + """ + INITIATED + + """ + 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 { + """ + 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 { + """ + Whether the risk level is shown in the Shopify admin. If false, then this + order risk is ignored when Shopify determines the overall risk level for the order. + """ + display: Boolean! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") + + """ + The likelihood that an order is fraudulent, based on this order risk. The + level can be set by Shopify risk analysis or by an app. + """ + level: OrderRiskLevel @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """ + The risk message that's shown to the merchant in the Shopify admin. + """ + message: String @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") +} + +""" +The risk assessments for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskAssessment { + """ + Optional facts used to describe the risk assessment. The values in here are specific to the provider. + See the [examples for the mutation orderRiskAssessmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/orderRiskAssessmentCreate#section-examples). + """ + facts: [RiskFact!]! + + """ + The app that provided the assessment, `null` if the assessment was provided by Shopify. + """ + provider: App + + """ + The likelihood that the order is fraudulent, based on this risk assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +The input fields for an order risk assessment. +""" +input OrderRiskAssessmentCreateInput { + """ + The list of facts used to determine the fraud assessment. + """ + facts: [OrderRiskAssessmentFactInput!]! + + """ + The ID of the order receiving the fraud assessment. + """ + orderId: ID! + + """ + The risk level of the fraud assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +Return type for `orderRiskAssessmentCreate` mutation. +""" +type OrderRiskAssessmentCreatePayload { + """ + The order risk assessment created. + """ + orderRiskAssessment: OrderRiskAssessment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderRiskAssessmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `OrderRiskAssessmentCreate`. +""" +type OrderRiskAssessmentCreateUserError implements DisplayableError { + """ + The error code. + """ + code: OrderRiskAssessmentCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderRiskAssessmentCreateUserError`. +""" +enum OrderRiskAssessmentCreateUserErrorCode { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The list of risk assessments for the order. + """ + assessments: [OrderRiskAssessment!]! + + """ + The recommendation for the order based on the results of the risk assessments. + This suggests the action the merchant should take with regards to its risk of fraud. + """ + recommendation: OrderRiskRecommendationResult! +} + +""" +The set of valid sort keys for the Order query. +""" +enum OrderSortKeys { + """ + Sorts by the date and time the order was created. + """ + CREATED_AT + + """ + Sorts by the customer's name. + """ + CUSTOMER_NAME + + """ + Sort by shipping address to analyze regional sales patterns or plan logistics. + """ + DESTINATION + + """ + Sorts by the financial status of the order. + """ + FINANCIAL_STATUS + + """ + Sorts by the order's fulfillment status. + """ + FULFILLMENT_STATUS + + """ + Sort by the `id` value. + """ + ID + + """ + Sorts by the order number. + """ + ORDER_NUMBER + + """ + Sort by the purchase order number to match external procurement systems or track recent orders. + """ + PO_NUMBER + + """ + Sorts by the date and time the order was processed. + """ + PROCESSED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the total quantity of all line items to identify large purchases or analyze inventory demand patterns. + """ + TOTAL_ITEMS_QUANTITY + + """ + Sorts by the total sold price of an order in the shop currency, excluding any returns/refunds/removals. + """ + TOTAL_PRICE + + """ + Sorts by the date and time the order was last updated. + """ + UPDATED_AT +} + +""" +A change that has been applied to an order. +""" +union OrderStagedChange = OrderStagedChangeAddCustomItem | OrderStagedChangeAddLineItemDiscount | OrderStagedChangeAddShippingLine | OrderStagedChangeAddVariant | OrderStagedChangeDecrementItem | OrderStagedChangeIncrementItem | OrderStagedChangeRemoveShippingLine + +""" +A change to the order representing the addition of a +custom line item. For example, you might want to add gift wrapping service +as a custom line item. +""" +type OrderStagedChangeAddCustomItem { + """ + The price of an individual item without any discounts applied. This value can't be negative. + """ + originalUnitPrice: MoneyV2! + + """ + The quantity of the custom item to add to the order. This value must be greater than zero. + """ + quantity: Int! + + """ + The title of the custom item. + """ + title: String! +} + +""" +The discount applied to an item that was added during the current order edit. +""" +type OrderStagedChangeAddLineItemDiscount { + """ + The description of the discount. + """ + description: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The pricing value of the discount. + """ + value: PricingValue! +} + +""" +A new [shipping line](https://shopify.dev/api/admin-graphql/latest/objects/shippingline) +added as part of an order edit. +""" +type OrderStagedChangeAddShippingLine { + """ + The phone number at the shipping address. + """ + phone: String + + """ + The shipping line's title that's shown to the buyer. + """ + presentmentTitle: String + + """ + The price that applies to the shipping line. + """ + price: MoneyV2! + + """ + The title of the shipping line. + """ + title: String +} + +""" +A change to the order representing the addition of an existing product variant. +""" +type OrderStagedChangeAddVariant { + """ + The quantity of the product variant that was added. + """ + quantity: Int! + + """ + The product variant that was added. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple OrderStagedChanges. +""" +type OrderStagedChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderStagedChangeEdge!]! + + """ + A list of nodes that are contained in OrderStagedChangeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderStagedChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An removal of items from an existing line item on the order. +""" +type OrderStagedChangeDecrementItem { + """ + The number of items removed. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! + + """ + The intention to restock the removed items. + """ + restock: Boolean! +} + +""" +An auto-generated type which holds one OrderStagedChange and a cursor during pagination. +""" +type OrderStagedChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderStagedChangeEdge. + """ + node: OrderStagedChange! +} + +""" +An addition of items to an existing line item on the order. +""" +type OrderStagedChangeIncrementItem { + """ + The number of items added. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! +} + +""" +A shipping line removed during an order edit. +""" +type OrderStagedChangeRemoveShippingLine { + """ + The removed shipping line. + """ + shippingLine: ShippingLine! +} + +""" +The `OrderTransaction` object represents a payment transaction that's associated with an order. An order +transaction is a specific action or event that happens within the context of an order, such as a customer paying +for a purchase or receiving a refund, or other payment-related activity. + +Use the `OrderTransaction` object to capture the complete lifecycle of a payment, from initial +authorization to final settlement, including refunds and currency exchanges. Common use cases for using the +`OrderTransaction` object include: + +- Processing new payments for orders +- Managing payment authorizations and captures +- Processing refunds for returned items +- Tracking payment status and errors +- Managing multi-currency transactions +- Handling payment gateway integrations + +Each `OrderTransaction` object has a [`kind`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionKind) +that defines the type of transaction and a [`status`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionStatus) +that indicates the current state of the transaction. The object stores detailed information about payment +methods, gateway processing, and settlement details. + +Learn more about [payment processing](https://help.shopify.com/manual/payments) +and [payment gateway integrations](https://www.shopify.com/ca/payment-gateways). +""" +type OrderTransaction implements Node { + """ + The masked account number associated with the payment method. + """ + accountNumber: String + + """ + The amount of money. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The 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 + + """ + 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! + + """ + 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! + + """ + 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. + The value of this field depends on which payment gateway processed the transaction. + """ + 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! + + """ + Specifies the available amount to capture on the gateway. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettled: Money @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + Specifies the available amount with currency to capture on the gateway in shop and presentment currencies. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettledSet: MoneyBag + + """ + Specifies the available amount with currency to capture on the gateway. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettledV2: MoneyV2 @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + Staff member who was logged into the Shopify POS device when the transaction was processed. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple OrderTransactions. +""" +type OrderTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderTransactionEdge!]! + + """ + A list of nodes that are contained in OrderTransactionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OrderTransaction and a cursor during pagination. +""" +type OrderTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderTransactionEdge. + """ + node: OrderTransaction! +} + +""" +A standardized error code, independent of the payment provider. +""" +enum OrderTransactionErrorCode { + """ + The 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 + + """ + Call the card issuer. + """ + CALL_ISSUER + + """ + The card was declined. + """ + CARD_DECLINED + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + 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 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 { + """ + The amount of money for this transaction. + """ + amount: Money! + + """ + The payment gateway to use for this transaction. + """ + gateway: String! + + """ + The kind of transaction. + """ + kind: OrderTransactionKind! + + """ + The ID of the order associated with the transaction. + """ + orderId: ID! + + """ + The ID of the optional parent transaction, for example the authorization of a capture. + """ + parentId: ID +} + +""" +The different kinds of order transactions. +""" +enum OrderTransactionKind { + """ + An 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 { + """ + 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 { + """ + The updated order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Returns information about pagination in a connection, in accordance with the +[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). +For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +""" +type PageInfo { + """ + The cursor corresponding to the last node in edges. + """ + endCursor: String + + """ + Whether there are more pages to fetch following the current page. + """ + hasNextPage: Boolean! + + """ + Whether there are any pages prior to the current page. + """ + hasPreviousPage: Boolean! + + """ + The cursor corresponding to the first node in edges. + """ + startCursor: String +} + +""" +A payment customization. +""" +type PaymentCustomization implements HasMetafieldDefinitions & HasMetafields & Node { + """ + The enabled status of the payment customization. + """ + enabled: Boolean! + + """ + The error history on the most recent version of the payment customization. + """ + errorHistory: FunctionsErrorHistory + + """ + The ID of the Shopify Function implementing the payment customization. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The Shopify Function implementing the payment customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the payment customization. + """ + title: String! +} + +""" +Return type for `paymentCustomizationActivation` mutation. +""" +type PaymentCustomizationActivationPayload { + """ + The IDs of the updated payment customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple PaymentCustomizations. +""" +type PaymentCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentCustomizationEdge!]! + + """ + A list of nodes that are contained in PaymentCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `paymentCustomizationCreate` mutation. +""" +type PaymentCustomizationCreatePayload { + """ + Returns the created payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Return type for `paymentCustomizationDelete` mutation. +""" +type PaymentCustomizationDeletePayload { + """ + Returns the deleted payment customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type which holds one PaymentCustomization and a cursor during pagination. +""" +type PaymentCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentCustomizationEdge. + """ + node: PaymentCustomization! +} + +""" +An error that occurs during the execution of a payment customization mutation. +""" +type PaymentCustomizationError implements DisplayableError { + """ + The error code. + """ + code: PaymentCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentCustomizationError`. +""" +enum PaymentCustomizationErrorCode { + """ + Shop plan not eligible to use Functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function 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 + + """ + 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 { + """ + The enabled status of the payment customization. + """ + enabled: Boolean + + """ + The ID of the function providing the payment customization. + """ + functionId: String + + """ + 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 { + """ + Returns the updated payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Payment details related to a transaction. +""" +union PaymentDetails = CardPaymentDetails | ShopPayInstallmentsPaymentDetails + +""" +All possible instrument outputs for Payment Mandates. +""" +union PaymentInstrument = VaultCreditCard | VaultPaypalBillingAgreement + +""" +A payment instrument and the permission +the owner of the instrument gives to the merchant to debit it. +""" +type PaymentMandate implements Node { + """ + The unique ID of a payment mandate. + """ + id: ID! + + """ + The outputs details of the payment instrument. + """ + paymentInstrument: PaymentInstrument! +} + +""" +Some of the payment methods used in Shopify. +""" +enum PaymentMethods { + AMERICAN_EXPRESS + BITCOIN + BOGUS + 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 { + """ + Whether the payment reminder email was successfully sent. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentReminderSendUserError!]! +} + +""" +An error that occurs during the execution of `PaymentReminderSend`. +""" +type PaymentReminderSendUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentReminderSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentReminderSendUserError`. +""" +enum PaymentReminderSendUserErrorCode { + """ + An error occurred while sending the payment reminder. + """ + PAYMENT_REMINDER_SEND_UNSUCCESSFUL +} + +""" +Represents the payment schedule for a single payment defined in the payment terms. +""" +type PaymentSchedule implements Node { + """ + Amount owed for this payment schedule. + """ + amount: MoneyV2! @deprecated(reason: "Use `balanceDue`, `totalBalance`, or `Order.totalOutstandingSet` instead.") + + """ + Date and time when the payment schedule is paid or fulfilled. + """ + completedAt: DateTime + + """ + 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! +} + +""" +An auto-generated type for paginating through multiple PaymentSchedules. +""" +type PaymentScheduleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentScheduleEdge!]! + + """ + A list of nodes that are contained in PaymentScheduleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentSchedule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentSchedule and a cursor during pagination. +""" +type PaymentScheduleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentScheduleEdge. + """ + node: PaymentSchedule! +} + +""" +The input fields used to create a payment schedule for payment terms. +""" +input PaymentScheduleInput { + """ + Specifies the date and time 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 { + """ + List of the digital wallets which the shop supports. + """ + supportedDigitalWallets: [DigitalWallet!]! +} + +""" +Represents the payment terms for an order or draft order. +""" +type PaymentTerms implements Node { + """ + The draft order associated with the payment terms. + """ + draftOrder: DraftOrder + + """ + 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 { + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] + + """ + Specifies the payment terms template ID used to generate payment terms. + """ + paymentTermsTemplateId: ID! +} + +""" +Return type for `paymentTermsCreate` mutation. +""" +type PaymentTermsCreatePayload { + """ + The created payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsCreateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsCreate`. +""" +type PaymentTermsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsCreateUserError`. +""" +enum PaymentTermsCreateUserErrorCode { + """ + An error occurred while creating payment terms. + """ + PAYMENT_TERMS_CREATION_UNSUCCESSFUL +} + +""" +The input fields used to delete the payment terms. +""" +input PaymentTermsDeleteInput { + """ + The ID of the payment terms being deleted. + """ + paymentTermsId: ID! +} + +""" +Return type for `paymentTermsDelete` mutation. +""" +type PaymentTermsDeletePayload { + """ + The deleted payment terms ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsDeleteUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsDelete`. +""" +type PaymentTermsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsDeleteUserError`. +""" +enum PaymentTermsDeleteUserErrorCode { + """ + An error occurred while deleting payment terms. + """ + PAYMENT_TERMS_DELETE_UNSUCCESSFUL +} + +""" +The input fields to create payment terms. Payment terms set the date that payment is due. +""" +input PaymentTermsInput { + """ + Specifies the 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 +} + +""" +Represents the payment terms template object. +""" +type PaymentTermsTemplate implements Node { + """ + The description of the payment terms template. + """ + description: String! + + """ + The number of days between the issued date and due date if this is the net type of payment terms. + """ + dueInDays: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the payment terms template. + """ + name: String! + + """ + The type of the payment terms template. + """ + paymentTermsType: PaymentTermsType! + + """ + The translated payment terms template name. + """ + translatedName: String! +} + +""" +The type of a payment terms or a payment terms template. +""" +enum PaymentTermsType { + """ + The payment terms or payment terms template is 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 { + """ + The attributes used to update the payment terms. + """ + paymentTermsAttributes: PaymentTermsInput! + + """ + The ID of the payment terms being updated. + """ + paymentTermsId: ID! +} + +""" +Return type for `paymentTermsUpdate` mutation. +""" +type PaymentTermsUpdatePayload { + """ + The updated payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsUpdateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsUpdate`. +""" +type PaymentTermsUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsUpdateUserError`. +""" +enum PaymentTermsUpdateUserErrorCode { + """ + An error occurred while updating payment terms. + """ + PAYMENT_TERMS_UPDATE_UNSUCCESSFUL +} + +""" +The set of valid sort keys for the Payout query. +""" +enum PayoutSortKeys { + """ + Sort by the `adjustment_gross` value. + """ + ADJUSTMENT_GROSS + + """ + Sort by the `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 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 `shipping_label_gross` value. + """ + SHIPPING_LABEL_GROSS + + """ + Sort by the `status` value. + """ + STATUS +} + +""" +Represents a valid PayPal Express subscriptions gateway status. +""" +enum PaypalExpressSubscriptionsGatewayStatus { + """ + The status is disabled. + """ + DISABLED + + """ + The status is enabled. + """ + ENABLED + + """ + The status is pending. + """ + PENDING +} + +""" +The input fields used to include the line items of a specified fulfillment order +that should be marked as prepared for pickup by a customer. +""" +input PreparedFulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! +} + +""" +How to calculate the parent product variant's price while bulk updating variant relationships. +""" +enum PriceCalculationType { + """ + The price of the parent will be the sum of the components price times their quantity. + """ + COMPONENTS_SUM + + """ + The price of the parent will be set to the price provided. + """ + FIXED + + """ + The price of the parent will not be adjusted. + """ + NONE +} + +""" +The input fields for updating the price of a parent product variant. +""" +input PriceInput { + """ + The specific type of calculation done to determine the price of the parent variant. + The price is calculated during Bundle creation. Updating a component variant won't recalculate the price. + """ + calculation: PriceCalculationType + + """ + The price of the parent product variant. This will be be used if calcualtion is set to 'FIXED'. + """ + price: Money +} + +""" +Represents a price list, including information about related prices and eligibility rules. +You can use price lists to specify either fixed prices or adjusted relative prices that +override initial product variant prices. Price lists are applied to customers +using context rules, which determine price list eligibility. + + For more information on price lists, refer to + [Support different pricing models](https://shopify.dev/apps/internationalization/product-price-lists). +""" +type PriceList implements Node { + """ + The catalog that the price list is associated with. + """ + catalog: Catalog + + """ + The currency for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """ + The number of fixed prices on the price list. + """ + fixedPricesCount: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Relative adjustments to other prices. + """ + parent: PriceListParent + + """ + A list of prices associated with the price list. + """ + prices( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The type of price adjustment, such as percentage increase or decrease. + """ + type: PriceListAdjustmentType! + + """ + The value of price adjustment, where positive numbers reduce the prices and negative numbers + increase them. + """ + value: Float! +} + +""" +The input fields to set a price list adjustment. +""" +input PriceListAdjustmentInput { + """ + The 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 { + """ + The type of price list adjustment setting for compare at price. + """ + compareAtMode: PriceListCompareAtMode! +} + +""" +The input fields to set a price list's adjustment settings. +""" +input PriceListAdjustmentSettingsInput { + """ + Determines how adjustments are applied to compare at prices. + """ + compareAtMode: PriceListCompareAtMode! = ADJUSTED +} + +""" +Represents a percentage price adjustment type. +""" +enum PriceListAdjustmentType { + """ + Percentage decrease type. Prices will have a lower value. + """ + PERCENTAGE_DECREASE + + """ + Percentage increase type. Prices will have a higher value. + """ + PERCENTAGE_INCREASE +} + +""" +Represents how the compare at price will be determined for a price list. +""" +enum PriceListCompareAtMode { + """ + The compare at price is adjusted based on percentage specified in price list. + """ + ADJUSTED + + """ + The compare at prices are set to `null` unless explicitly defined by a fixed price value. + """ + NULLIFY +} + +""" +An auto-generated type for paginating through multiple PriceLists. +""" +type PriceListConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListEdge!]! + + """ + A list of nodes that are contained in PriceListEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceList!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a price list. +""" +input PriceListCreateInput { + """ + The 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 + + """ + 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 { + """ + The newly created price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Return type for `priceListDelete` mutation. +""" +type PriceListDeletePayload { + """ + The ID of the deleted price list. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +An auto-generated type which holds one PriceList and a cursor during pagination. +""" +type PriceListEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListEdge. + """ + node: PriceList! +} + +""" +Return type for `priceListFixedPricesAdd` mutation. +""" +type PriceListFixedPricesAddPayload { + """ + The list of fixed prices that were added to or updated in the price list. + """ + prices: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Error codes for failed price list fixed prices by product bulk update operations. +""" +type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListFixedPricesByProductBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListFixedPricesByProductBulkUpdateUserError`. +""" +enum PriceListFixedPricesByProductBulkUpdateUserErrorCode { + """ + Duplicate ID in input. + """ + DUPLICATE_ID_IN_INPUT + + """ + IDs must be mutually exclusive across add or delete operations. + """ + ID_MUST_BE_MUTUALLY_EXCLUSIVE + + """ + 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 { + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The product for which the fixed prices were added. + """ + pricesToAddProducts: [Product!] + + """ + The product for which the fixed prices were deleted. + """ + pricesToDeleteProducts: [Product!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListFixedPricesByProductBulkUpdateUserError!]! +} + +""" +Return type for `priceListFixedPricesDelete` mutation. +""" +type PriceListFixedPricesDeletePayload { + """ + A list of product variant IDs whose fixed prices were removed from the price list. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Return type for `priceListFixedPricesUpdate` mutation. +""" +type PriceListFixedPricesUpdatePayload { + """ + A list of deleted variant IDs for prices. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The prices that were added to the price list. + """ + pricesAdded: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Represents relative adjustments from one price list to other prices. + You can use a `PriceListParent` to specify an adjusted relative price using a percentage-based + adjustment. Adjusted prices work in conjunction with exchange rules and rounding. + + [Adjustment types](https://shopify.dev/api/admin-graphql/latest/enums/pricelistadjustmenttype) + support both percentage increases and decreases. +""" +type PriceListParent { + """ + A price list adjustment. + """ + adjustment: PriceListAdjustment! + + """ + A price list's settings for adjustment. + """ + settings: PriceListAdjustmentSettings! +} + +""" +The input fields to create a price list adjustment. +""" +input PriceListParentCreateInput { + """ + The relative adjustments to other prices. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +The input fields used to update a price list's adjustment. +""" +input PriceListParentUpdateInput { + """ + The relative adjustments to other prices.. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +Represents information about pricing for a product variant + as defined on a price list, such as the price, compare at price, and +origin type. You can use a `PriceListPrice` to specify a fixed price for a +specific product variant. For examples, refer to [PriceListFixedPricesAdd](https://shopify.dev/api/admin-graphql/latest/mutations/priceListFixedPricesAdd) and [PriceList](https://shopify.dev/api/admin-graphql/latest/queries/priceList#section-examples). +""" +type PriceListPrice { + """ + The compare-at price of the product variant on this price list. + """ + compareAtPrice: MoneyV2 + + """ + The origin of a price, either fixed (defined on the price list) or relative + (calculated using a price list adjustment configuration). + """ + originType: PriceListPriceOriginType! + + """ + The price of the product variant on this price list. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListPriceEdge!]! + + """ + A list of nodes that are contained in PriceListPriceEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceListPrice!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceListPrice and a cursor during pagination. +""" +type PriceListPriceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListPriceEdge. + """ + node: PriceListPrice! +} + +""" +The input fields for providing the fields and values to use when creating or updating a fixed price list price. +""" +input PriceListPriceInput { + """ + The 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! +} + +""" +Represents the origin of a price, either fixed (defined on the price list) or +relative (calculated using a price list adjustment configuration). For examples, refer to [PriceList](https://shopify.dev/api/admin-graphql/latest/queries/priceList#section-examples). +""" +enum PriceListPriceOriginType { + """ + The price is defined on the price list. + """ + FIXED + + """ + The price is relative to the adjustment type and value. + """ + RELATIVE +} + +""" +An error for a failed price list price operation. +""" +type PriceListPriceUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListPriceUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListPriceUserError`. +""" +enum PriceListPriceUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The 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 { + """ + 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! +} + +""" +The set of valid sort keys for the PriceList query. +""" +enum PriceListSortKeys { + """ + 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 +} + +""" +The input fields used to update a price list. +""" +input PriceListUpdateInput { + """ + The ID of the catalog to associate with this price list. + """ + catalogId: ID + + """ + 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 { + """ + The updated price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Error codes for failed contextual pricing operations. +""" +type PriceListUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListUserError`. +""" +enum PriceListUserErrorCode { + """ + An app catalog cannot be assigned to a price list. + """ + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + The input value is blank. + """ + BLANK + + """ + Cannot assign a catalog to a price list that also has context rules. + """ + CATALOG_ASSIGNMENT_NOT_ALLOWED + + """ + The context type of a catalog cannot be changed. + """ + CATALOG_CANNOT_CHANGE_CONTEXT_TYPE + + """ + Quantity price breaks can be associated only with company location catalogs. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_PRICE_BREAKS + + """ + Quantity rules can be associated only with company location catalogs. + """ + 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 + + """ + A price list context rule cannot have more than one country. + """ + CONTEXT_RULE_COUNTRIES_LIMIT + + """ + A price list for this country is already taken. + """ + CONTEXT_RULE_COUNTRY_TAKEN + + """ + Only one context rule option may be specified. + """ + CONTEXT_RULE_LIMIT_ONE_OPTION + + """ + Cannot save the price list with context rule because the limit of context rules per shop was reached. + """ + CONTEXT_RULE_LIMIT_REACHED @deprecated(reason: "The limit is removed. This will be removed in 2025-01.") + + """ + The specified market wasn't found. + """ + CONTEXT_RULE_MARKET_NOT_FOUND + + """ + A price list for this market is already taken. + """ + CONTEXT_RULE_MARKET_TAKEN + + """ + A country in a context rule must use a valid currency. + """ + COUNTRY_CURRENCY_MISMATCH + + """ + A country catalog cannot be assigned to a price list. + """ + COUNTRY_PRICE_LIST_ASSIGNMENT + + """ + A price list’s currency must be of the pricing rule’s country. + """ + CURRENCY_COUNTRY_MISMATCH + + """ + 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 context rule's market does not use the price list currency. + """ + MARKET_CURRENCY_MISMATCH + + """ + 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 +} + +""" +Price rules are a set of conditions, including entitlements and prerequisites, +that must be met in order for a discount code to apply. + +We recommend using the types and queries detailed at [Getting started with discounts](https://shopify.dev/docs/apps/selling-strategies/discounts/getting-started) +instead. These will replace the GraphQL `PriceRule` object and REST Admin +`PriceRule` and `DiscountCode` resources. +""" +type PriceRule implements CommentEventSubject & HasEvents & LegacyInteroperability & Node { + """ + The maximum number of times that the price rule can be allocated onto an order. + """ + allocationLimit: Int + + """ + The method by which the price rule's value is allocated to its entitled items. + """ + allocationMethod: PriceRuleAllocationMethod! + + """ + The application that created the price rule. + """ + app: App + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The date and time when the price rule was created. + """ + createdAt: DateTime! + + """ + The customers that can use this price rule. + """ + customerSelection: PriceRuleCustomerSelection! + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + How many discount codes associated with the price rule. + """ + discountCodesCount: Count + + """ + The date and time when the price rule ends. For open-ended price rules, use `null`. + """ + endsAt: DateTime + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatio @deprecated(reason: "Use `prerequisiteToEntitlementQuantityRatio` instead.") + + """ + The paginated list of events associated with the price rule. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | ---- | ---- | ---- | ---- | ---- | ---- | + | comments | boolean | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `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` | + | verb | string | The action that occured. Use `action` in version 2024-10 or later. | + You can apply one or more filters to a query. Learn more 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! +} + +""" +Return type for `priceRuleActivate` mutation. +""" +type PriceRuleActivatePayload { + """ + The activated price rule. + """ + priceRule: PriceRule + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +The method by which the price rule's value is allocated to its entitled items. +""" +enum PriceRuleAllocationMethod { + """ + The value will be applied once across the entitled items. + """ + ACROSS + + """ + The value will be applied to each of the entitled items. + """ + EACH +} + +""" +An auto-generated type for paginating through multiple PriceRules. +""" +type PriceRuleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceRuleEdge!]! + + """ + A list of nodes that are contained in PriceRuleEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceRule!]! + + """ + 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 `priceRuleCreate` mutation. +""" +type PriceRuleCreatePayload { + """ + The newly created price rule. + """ + priceRule: PriceRule + + """ + The newly created discount code. + """ + priceRuleDiscountCode: PriceRuleDiscountCode + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +A selection of customers for whom the price rule applies. +""" +type PriceRuleCustomerSelection { + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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!]! +} + +""" +The input fields to update a price rule customer selection. +""" +input PriceRuleCustomerSelectionInput { + """ + List of customers to add to the current list of customers to whom the price rule applies. `savedSearchIds` must be empty. + """ + customerIdsToAdd: [ID!] + + """ + A list of customers to remove from the current list of customers to whom the price rule applies. + """ + customerIdsToRemove: [ID!] + + """ + Whether the price rule applies to all customers. + """ + forAllCustomers: Boolean = false + + """ + List of customer segments that contain the customers to whom the price rule + applies. No single customer IDs may be present. + """ + segmentIds: [ID!] +} + +""" +Return type for `priceRuleDeactivate` mutation. +""" +type PriceRuleDeactivatePayload { + """ + The deactivated price rule. + """ + priceRule: PriceRule + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +Return type for `priceRuleDelete` mutation. +""" +type PriceRuleDeletePayload { + """ + The ID price of the deleted price rule. + """ + deletedPriceRuleId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The shop of the deleted price rule. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +A discount code of a price rule. +""" +type PriceRuleDiscountCode implements Node { + """ + The application that created the discount code. + """ + app: App + + """ + The code to apply the discount. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The number of times that the price rule has been used. This value is updated + asynchronously and can be different than the actual usage count. + """ + usageCount: Int! +} + +""" +An auto-generated type for paginating through multiple PriceRuleDiscountCodes. +""" +type PriceRuleDiscountCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceRuleDiscountCodeEdge!]! + + """ + A list of nodes that are contained in PriceRuleDiscountCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceRuleDiscountCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `priceRuleDiscountCodeCreate` mutation. +""" +type PriceRuleDiscountCodeCreatePayload { + """ + The updated price rule. + """ + priceRule: PriceRule + + """ + The newly created discount code. + """ + priceRuleDiscountCode: PriceRuleDiscountCode + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination. +""" +type PriceRuleDiscountCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceRuleDiscountCodeEdge. + """ + node: PriceRuleDiscountCode! +} + +""" +The input fields to manipulate a discount code. +""" +input PriceRuleDiscountCodeInput { + """ + The code to use the discount. + """ + code: String +} + +""" +Return type for `priceRuleDiscountCodeUpdate` mutation. +""" +type PriceRuleDiscountCodeUpdatePayload { + """ + The updated price rule. + """ + priceRule: PriceRule + + """ + The updated discount code. + """ + priceRuleDiscountCode: PriceRuleDiscountCode + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +An auto-generated type which holds one PriceRule and a cursor during pagination. +""" +type PriceRuleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceRuleEdge. + """ + node: PriceRule! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRuleEntitlementToPrerequisiteQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +Specifies the quantity of prerequisite items required for the price rule to be +applicable, compared to quantity of entitled items. +""" +input PriceRuleEntitlementToPrerequisiteQuantityRatioInput { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int +} + +""" +Possible error codes that could be returned by a price rule mutation. +""" +enum PriceRuleErrorCode { + """ + The allocation method must be `ACROSS` for the provided target selection. + """ + ALLOCATION_METHOD_MUST_BE_ACROSS_FOR_GIVEN_TARGET_SELECTION + + """ + The discount must apply on either one-time purchase or subscription items, or both. + """ + APPLIES_ON_NOTHING + + """ + The input value is blank. + """ + BLANK + + """ + Invalid BOGO target selection. + """ + BOGO_INVALID_TARGET_SELECTION + + """ + Invalid BOGO target type. + """ + BOGO_INVALID_TARGET_TYPE + + """ + Invalid BOGO value type. + """ + BOGO_INVALID_VALUE_TYPE + + """ + Can't use both prerequisite customers and saved search. + """ + BOTH_CUSTOMER_AND_SAVED_SEARCH_PREREQUISITES_SELECTED + + """ + Can't have both prerequisite customers and prerequisite segments. + """ + BOTH_CUSTOMER_AND_SEGMENT_PREREQUISITES_SELECTED + + """ + Can't have both saved searches and segments prerequisites. + """ + BOTH_SAVED_SEARCH_AND_SEGMENT_PREREQUISITES_SELECTED + + """ + Can't entitle collections in combination with product variants or products. + """ + CANNOT_ENTITLE_COLLECTIONS_WITH_PRODUCTS_OR_VARIANTS + + """ + Can't use collections as a prequisite in combination with product variants or products. + """ + CANNOT_PREREQUISITE_COLLECTION_WITH_PRODUCT_OR_VARIANTS + + """ + The customer prerequisites exceeded the maximum number. + """ + CUSTOMER_PREREQUISITES_EXCEEDED_MAX + + """ + Invalid customer prerequisites selection. + """ + CUSTOMER_PREREQUISITES_INVALID_SELECTION + + """ + Customer prerequisites are missing. + """ + CUSTOMER_PREREQUISITES_MISSING + + """ + A duplicate customer prerequisite ID exists. + """ + CUSTOMER_PREREQUISITE_DUPLICATE + + """ + A duplicate customer saved search exists. + """ + CUSTOMER_SAVED_SEARCH_DUPLICATE + + """ + The customer saved search exceeded the maximum number. + """ + CUSTOMER_SAVED_SEARCH_EXCEEDED_MAX + + """ + Invalid customer saved search. + """ + CUSTOMER_SAVED_SEARCH_INVALID + + """ + The customer segment prerequisites exceeded the maximum number. + """ + CUSTOMER_SEGMENT_EXCEEDED_MAX + + """ + The customer segment prerequisite ID is invalid. + """ + CUSTOMER_SEGMENT_INVALID + + """ + A duplicate customer segment prerequisite ID exists. + """ + CUSTOMER_SEGMENT_PREREQUISITE_DUPLICATE + + """ + A duplicate discount code exists. + """ + DISCOUNT_CODE_DUPLICATE + + """ + The discount end date must be after the start date. + """ + END_DATE_BEFORE_START_DATE + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + Can't exceed the maximum number. + """ + 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 + + """ + 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 target type is invalid when defining a prerequisite shipping price range. + """ + INVALID_TARGET_TYPE_PREREQUISITE_SHIPPING_PRICE_RANGE + + """ + Can't add the same collection twice. + """ + ITEM_ENTITLEMENTS_DUPLICATE_COLLECTION + + """ + Can't add the same product twice. + """ + ITEM_ENTITLEMENTS_DUPLICATE_PRODUCT + + """ + Can't add the same collection twice. + """ + ITEM_ENTITLEMENTS_DUPLICATE_VARIANT + + """ + Can't exceed the maximum number of collection entitlements. + """ + ITEM_ENTITLEMENTS_EXCEEDED_MAX_COLLECTION + + """ + Can't exceed the maximum number of product entitlements. + """ + ITEM_ENTITLEMENTS_EXCEEDED_MAX_PRODUCT + + """ + Can't exceed the maximum number of variant entitlements. + """ + ITEM_ENTITLEMENTS_EXCEEDED_MAX_VARIANT + + """ + Invalid collection. + """ + ITEM_ENTITLEMENTS_INVALID_COLLECTION + + """ + Invalid product. + """ + ITEM_ENTITLEMENTS_INVALID_PRODUCT + + """ + Invalid combination of target type and selection. + """ + ITEM_ENTITLEMENTS_INVALID_TARGET_TYPE_OR_SELECTION + + """ + Invalid variant. + """ + ITEM_ENTITLEMENTS_INVALID_VARIANT + + """ + Entitlements are missing. + """ + ITEM_ENTITLEMENTS_MISSING + + """ + Invalid entitlement type. + """ + ITEM_ENTITLEMENT_INVALID_TYPE + + """ + Can't add the same collection twice. + """ + ITEM_PREREQUISITES_DUPLICATE_COLLECTION + + """ + Can't add the same product twice. + """ + ITEM_PREREQUISITES_DUPLICATE_PRODUCT + + """ + Can't add the same variant twice. + """ + ITEM_PREREQUISITES_DUPLICATE_VARIANT + + """ + Can't exceed the maximum number of item prerequisites. + """ + ITEM_PREREQUISITES_EXCEEDED_MAX + + """ + Invalid collection. + """ + ITEM_PREREQUISITES_INVALID_COLLECTION + + """ + Invalid product. + """ + ITEM_PREREQUISITES_INVALID_PRODUCT + + """ + Invalid type. + """ + ITEM_PREREQUISITES_INVALID_TYPE + + """ + Invalid variant. + """ + ITEM_PREREQUISITES_INVALID_VARIANT + + """ + Item prerequisites must have at least one item prerequisite if the prerequisite quantity ratio is defined. + """ + ITEM_PREREQUISITES_MISSING + + """ + Item prerequisites must be empty if the prerequisite quantity ratio isn't defined. + """ + ITEM_PREREQUISITES_MUST_BE_EMPTY + + """ + 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 + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + The recurring cycle limit must be 1 when a discount doesn't apply on subscription items. + """ + MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS + + """ + Only one of the minimum subtotal or minimum quantity condition can be defined. + """ + PREREQUISITE_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT + + """ + The allocation limit must be a non-zero positive number. + """ + PRICE_RULE_ALLOCATION_LIMIT_IS_ZERO + + """ + The allocation limit can only be set on Buy x, get y (BXGY) discounts. + """ + PRICE_RULE_ALLOCATION_LIMIT_ON_NON_BOGO + + """ + The number of discount codes in the shop has reached its limit. + """ + PRICE_RULE_EXCEEDED_MAX_DISCOUNT_CODE + + """ + The percentage value must be between 0 and -100. + """ + PRICE_RULE_PERCENTAGE_VALUE_OUTSIDE_RANGE + + """ + A duplicate country code exists. + """ + SHIPPING_ENTITLEMENTS_DUPLICATE_COUNTRY + + """ + Can't exceed the maximum number of entitlements. + """ + SHIPPING_ENTITLEMENTS_EXCEEDED_MAX + + """ + The country is unknown. + """ + SHIPPING_ENTITLEMENTS_INVALID_COUNTRY + + """ + Invalid target type or selection. + """ + SHIPPING_ENTITLEMENTS_INVALID_TARGET_TYPE_OR_SELECTION + + """ + Missing entitlements. + """ + SHIPPING_ENTITLEMENTS_MISSING + + """ + Unsupported destination type. + """ + SHIPPING_ENTITLEMENTS_UNSUPPORTED_DESTINATION_TYPE + + """ + The number of discounts in the shop has reached its limit. + """ + SHOP_EXCEEDED_MAX_PRICE_RULES + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + Too many arguments provided. + """ + TOO_MANY_ARGUMENTS + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The variant is already entitled through a product. + """ + VARIANT_ALREADY_ENTITLED_THROUGH_PRODUCT +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleFeature { + """ + 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 { + """ + The monetary value of the price rule. + """ + amount: Money! +} + +""" +The input fields to manipulate a price rule. +""" +input PriceRuleInput { + """ + 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 + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The customers that can use this price rule. + """ + customerSelection: PriceRuleCustomerSelectionInput + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatioInput @deprecated(reason: "Use `prerequisiteToEntitlementQuantityRatio` instead. This will be removed in 2024-10.") + + """ + The items to which the price rule applies. + """ + itemEntitlements: PriceRuleItemEntitlementsInput + + """ + The items required for the price rule to be applicable. + """ + itemPrerequisites: PriceRuleItemPrerequisitesInput + + """ + Whether the price rule can be applied only once per customer. + """ + oncePerCustomer: Boolean = false + + """ + The number of the entitled items must fall within this range for the price rule to be applicable. + """ + prerequisiteQuantityRange: PriceRuleQuantityRangeInput + + """ + The shipping cost must fall within this range for the price rule to be applicable. + """ + prerequisiteShippingPriceRange: PriceRuleMoneyRangeInput + + """ + The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable. + """ + prerequisiteSubtotalRange: PriceRuleMoneyRangeInput + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + prerequisiteToEntitlementQuantityRatio: PriceRulePrerequisiteToEntitlementQuantityRatioInput + + """ + The shipping lines to which the price rule applies. + """ + shippingEntitlements: PriceRuleShippingEntitlementsInput + + """ + The type of lines (line_item or shipping_line) to which the price rule applies. + """ + target: PriceRuleTarget + + """ + Title of the price rule. + """ + title: String + + """ + The maximum number of times that the price rule can be used in total. + """ + usageLimit: Int + + """ + PriceRuleValidityPeriod for the price rule. + """ + validityPeriod: PriceRuleValidityPeriodInput + + """ + The value of the price rule. + """ + value: PriceRuleValueInput +} + +""" +The items to which this price rule applies. This may be multiple products, +product variants, collections or combinations of the aforementioned. +""" +type PriceRuleItemEntitlements { + """ + The collections to which the price rule applies. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! +} + +""" +The input fields to update a price rule line item entitlement. +""" +input PriceRuleItemEntitlementsInput { + """ + The collections to which the price rule applies. + """ + collectionIds: [ID!] + + """ + The products to which the price rule applies. + """ + productIds: [ID!] + + """ + The product variants to which the price rule applies. + """ + productVariantIds: [ID!] + + """ + Whether the price rule applies to all items. + """ + targetAllLineItems: Boolean = false +} + +""" +The input fields to update a price rule's item prerequisites. +""" +input PriceRuleItemPrerequisitesInput { + """ + The collections needed for the price rule to be applied. + """ + collectionIds: [ID!] + + """ + The products needed for the price rule to be applied. + """ + productIds: [ID!] + + """ + The product variants needed for the price rule to be applied. + """ + productVariantIds: [ID!] +} + +""" +Single or multiple line item products, product variants or collections required +for the price rule to be applicable, can also be provided in combination. +""" +type PriceRuleLineItemPrerequisites { + """ + The collections required for the price rule to be applicable. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + 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 input fields to update the money range within which the price rule is applicable. +""" +input PriceRuleMoneyRangeInput { + """ + The lower bound of the money range. + """ + greaterThan: Money + + """ + The lower or equal bound of the money range. + """ + greaterThanOrEqualTo: Money + + """ + The upper bound of the money range. + """ + lessThan: Money + + """ + The upper or equal bound of the money range. + """ + lessThanOrEqualTo: Money +} + +""" +The value of a percent price rule. +""" +type PriceRulePercentValue { + """ + The percent value of the price rule. + """ + percentage: Float! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRulePrerequisiteToEntitlementQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +Specifies the quantity of prerequisite items required for the price rule to be +applicable, compared to quantity of entitled items. +""" +input PriceRulePrerequisiteToEntitlementQuantityRatioInput { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int +} + +""" +A quantity range within which the price rule is applicable. +""" +type PriceRuleQuantityRange { + """ + The lower bound of the quantity range. + """ + greaterThan: Int + + """ + The lower bound or equal of the quantity range. + """ + greaterThanOrEqualTo: Int + + """ + The upper bound of the quantity range. + """ + lessThan: Int + + """ + The upper bound or equal of the quantity range. + """ + lessThanOrEqualTo: Int +} + +""" +The input fields to update the quantity range within which the price rule is applicable. +""" +input PriceRuleQuantityRangeInput { + """ + The lower bound of the quantity range. + """ + greaterThan: Int + + """ + The lower or equal bound of the quantity range. + """ + greaterThanOrEqualTo: Int + + """ + The upper bound of the quantity range. + """ + lessThan: Int + + """ + The upper or equal bound of the quantity range. + """ + lessThanOrEqualTo: Int +} + +""" +Shareable URL for the discount code associated with the price rule. +""" +type PriceRuleShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: PriceRuleShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable price rule URL lands. +""" +enum PriceRuleShareableUrlTargetType { + """ + The URL lands on a collection page. + """ + COLLECTION + + """ + The URL lands on a home page. + """ + HOME + + """ + The URL lands on a product page. + """ + PRODUCT +} + +""" +The input fields to update a price rule shipping entitlement. +""" +input PriceRuleShippingEntitlementsInput { + """ + 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 = false + + """ + Whether the price rule applies to all shipping lines. + """ + targetAllShippingLines: Boolean = false +} + +""" +The shipping lines to which the price rule applies to. +""" +type PriceRuleShippingLineEntitlements { + """ + The codes for the countries to which the price rule applies to. + """ + countryCodes: [CountryCode!]! + + """ + Whether the price rule is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! + + """ + Whether the price rule applies to all shipping lines. + """ + targetAllShippingLines: Boolean! +} + +""" +The set of valid sort keys for the PriceRule query. +""" +enum PriceRuleSortKeys { + """ + 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 price rule. +""" +enum PriceRuleStatus { + """ + The price rule is active. + """ + ACTIVE + + """ + The price rule is expired. + """ + EXPIRED + + """ + The price rule is scheduled. + """ + SCHEDULED +} + +""" +The type of lines (line_item or shipping_line) to which the price rule applies. +""" +enum PriceRuleTarget { + """ + The price rule applies to line items. + """ + LINE_ITEM + + """ + The price rule applies to shipping lines. + """ + SHIPPING_LINE +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleTrait { + """ + The price rule supports 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 +} + +""" +Return type for `priceRuleUpdate` mutation. +""" +type PriceRuleUpdatePayload { + """ + The updated price rule. + """ + priceRule: PriceRule + + """ + The updated discount code. + """ + priceRuleDiscountCode: PriceRuleDiscountCode + + """ + The list of errors that occurred from executing the mutation. + """ + priceRuleUserErrors: [PriceRuleUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `priceRuleUserErrors` instead.") +} + +""" +Represents an error that happens during execution of a price rule mutation. +""" +type PriceRuleUserError implements DisplayableError { + """ + Error code to uniquely identify the error. + """ + code: PriceRuleErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A time period during which a price rule is applicable. +""" +type PriceRuleValidityPeriod { + """ + The time after which the price rule becomes invalid. + """ + end: DateTime + + """ + The time after which the price rule is valid. + """ + start: DateTime! +} + +""" +The input fields to update the validity period of a price rule. +""" +input PriceRuleValidityPeriodInput { + """ + The time after which the price rule becomes invalid. + """ + end: DateTime + + """ + The time after which the price rule is valid. + """ + start: DateTime! +} + +""" +The type of the price rule value. The price rule value might be a percentage value, or a fixed amount. +""" +union PriceRuleValue = PriceRuleFixedAmountValue | PriceRulePercentValue + +""" +The input fields to update a price rule. +""" +input PriceRuleValueInput { + """ + The fixed amount value of the price rule. + """ + fixedAmountValue: Money + + """ + The percentage value of the price rule. + """ + percentageValue: Float +} + +""" +One type of value given to a customer when a discount is applied to an order. +The application of a discount with this value gives the customer the specified percentage off a specified item. +""" +type PricingPercentageValue { + """ + The percentage value of the object. This is a number between -100 (free) and 0 (no discount). + """ + percentage: Float! +} + +""" +The type of value given to a customer when a discount is applied to an order. +For example, the application of the discount might give the customer a +percentage off a specified item. Alternatively, the application of the discount +might give the customer a monetary value in a given currency off an order. +""" +union PricingValue = MoneyV2 | PricingPercentageValue + +""" +Private metafields represent custom metadata that is attached to a resource. +Private metafields are accessible only by the application that created them and only from the GraphQL Admin API. + +An application can create a maximum of 10 private metafields per shop resource. + +Private metafields are deprecated. Metafields created using a reserved namespace are private by default. See our guide for +[migrating private metafields](https://shopify.dev/docs/apps/custom-data/metafields/migrate-private-metafields). +""" +type PrivateMetafield implements Node { + """ + The date and time when the private metafield was created. + """ + createdAt: DateTime! + + """ + The ID of the private metafield. + """ + id: ID! + + """ + The key name of the private metafield. + """ + key: String! + + """ + The namespace of the private metafield. + """ + namespace: String! + + """ + The date and time when the private metafield was updated. + """ + updatedAt: DateTime! + + """ + The value of a private metafield. + """ + value: String! + + """ + Represents the private metafield value type. + """ + valueType: PrivateMetafieldValueType! +} + +""" +An auto-generated type for paginating through multiple PrivateMetafields. +""" +type PrivateMetafieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PrivateMetafieldEdge!]! + + """ + A list of nodes that are contained in PrivateMetafieldEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PrivateMetafield!]! + + """ + 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 private metafield to delete. +""" +input PrivateMetafieldDeleteInput { + """ + The key of the private metafield. + """ + key: String! + + """ + The namespace of the private metafield. + """ + namespace: String! + + """ + The ID of the resource that owns the metafield. If the field is blank, then the `Shop` resource owns the metafield. + """ + owner: ID +} + +""" +Return type for `privateMetafieldDelete` mutation. +""" +type PrivateMetafieldDeletePayload { + """ + The ID of private metafield that was deleted. + """ + deletedPrivateMetafieldId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one PrivateMetafield and a cursor during pagination. +""" +type PrivateMetafieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PrivateMetafieldEdge. + """ + node: PrivateMetafield! +} + +""" +The input fields for a private metafield. +""" +input PrivateMetafieldInput { + """ + The key of the private metafield. + """ + key: String! + + """ + The namespace of the private metafield. + """ + namespace: String! + + """ + The resource that owns the metafield. If the field is blank, then the `Shop` resource owns the metafield. + """ + owner: ID + + """ + The `value` and `valueType` of the private metafield, wrapped in a `ValueInput` object. + """ + valueInput: PrivateMetafieldValueInput! +} + +""" +Return type for `privateMetafieldUpsert` mutation. +""" +type PrivateMetafieldUpsertPayload { + """ + The private metafield that was created or updated. + """ + privateMetafield: PrivateMetafield + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for the value and value type of the private metafield. +""" +input PrivateMetafieldValueInput { + """ + The value of a private metafield. + """ + value: String! + + """ + Represents the private metafield value type. + """ + valueType: PrivateMetafieldValueType! +} + +""" +Supported private metafield value types. +""" +enum PrivateMetafieldValueType { + """ + An integer metafield. + """ + INTEGER + + """ + A JSON string metafield. + """ + JSON_STRING + + """ + A string metafield. + """ + STRING +} + +""" +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 HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node & OnlineStorePreviewable & Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + bodyHtml: String @deprecated(reason: "Use `descriptionHtml` instead.") + + """ + A list of [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) + that are associated with a product in a bundle. + """ + bundleComponents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `provisionally_published` | | - + `product_publication_status:189769876-approved` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | published_status | string | Filter by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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 featured image for the product. + """ + featuredImage: Image @deprecated(reason: "Use `featuredMedia` instead.") + + """ + The featured [media](https://shopify.dev/docs/apps/build/online-store/product-media) + associated with the product. + """ + featuredMedia: Media + + """ + The information that lets merchants know what steps they need to take + to make sure that the app is set up correctly. + + For example, if a merchant hasn't set up a product correctly in the app, + then the feedback might include a message that says "You need to add a price + to this product". + """ + feedback: ResourceFeedback + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view the gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + A unique, human-readable string of the product's title. A handle can contain + letters, hyphens (`-`), and numbers, but no spaces. + The handle is used in the online store URL for the product. + """ + handle: String! + + """ + Whether the product has only a single variant with the default option and value. + """ + hasOnlyDefaultVariant: Boolean! + + """ + Whether the product has variants that are out of stock. + """ + hasOutOfStockVariants: Boolean! + + """ + Whether at least one of the product variants requires + [bundle components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle). + + Learn more about + [store eligibility for bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles#store-eligibility). + """ + hasVariantsThatRequiresComponents: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The images associated with the product. + """ + images( + """ + The elements that come after the specified [cursor](https://shopify.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! + ): 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! + + """ + The total count of [media](https://shopify.dev/docs/apps/build/online-store/product-media) + that's associated with a product. + """ + mediaCount: Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL + + """ + The product's URL on the online store. + If `null`, then the product isn't published to the online store sales channel. + """ + onlineStoreUrl: URL + + """ + A list of product options. The limit is defined by the + [shop's resource limits for product options](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) + (`Shop.resourceLimits.maxProductOptions`). + """ + options( + """ + Truncate the array result to this size. + """ + first: Int + ): [ProductOption!]! + + """ + The price range of the product. + """ + priceRange: ProductPriceRange! @deprecated(reason: "Use `priceRangeV2` instead.") + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRangeV2: ProductPriceRangeV2! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The product category specified by the merchant. + """ + productCategory: ProductCategory @deprecated(reason: "Use `category` instead.") + + """ + 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.") + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String! + + """ + 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + A list of the channels where the product is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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.") + + """ + The date and time when the product was published to the online store. + """ + publishedAt: DateTime + + """ + Whether the product is published for a customer only in a specified context. + For example, a product might be published for a customer only in a specific location. + """ + publishedInContext( + """ + The context used to determine publication status. + """ + context: ContextualPublicationContext! + ): Boolean! + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), + then the product is unpublished from all channels, except the online store. + """ + requiresSellingPlan: Boolean! + + """ + The resource that's either published or staged to be published to + the [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublicationOnCurrentPublication: ResourcePublicationV2 + + """ + 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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + 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 + ): [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.") + + """ + 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! + + """ + 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. + """ + 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 input fields for specifying product images to append. +""" +input ProductAppendImagesInput { + """ + The ID of the product. + """ + id: ID! + + """ + A list of images to be appended to the product. + """ + images: [ImageInput!]! +} + +""" +Return type for `productAppendImages` mutation. +""" +type ProductAppendImagesPayload { + """ + List of new images appended to the product. + """ + newImages( + """ + 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 product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The product's component information. +""" +type ProductBundleComponent { + """ + The product that's related as a component. + """ + componentProduct: Product! + + """ + The list of products' variants that are components. + """ + componentVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductBundleComponentEdge!]! + + """ + A list of nodes that are contained in ProductBundleComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductBundleComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductBundleComponent and a cursor during pagination. +""" +type ProductBundleComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductBundleComponentEdge. + """ + node: ProductBundleComponent! +} + +""" +The input fields for a single component related to a componentized product. +""" +input ProductBundleComponentInput { + """ + The 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! + + """ + 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 { + """ + The option that existed on the component product prior to the fixed bundle creation. + """ + componentOption: ProductOption! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The component option values that are actively selected for this relationship. + """ + values: [ProductBundleComponentOptionSelectionValue!]! +} + +""" +The input fields for a single option related to a component product. +""" +input ProductBundleComponentOptionSelectionInput { + """ + The ID of the option present on the component product. + """ + componentOptionId: ID! + + """ + The name to create for this option on the parent product. + """ + name: String! + + """ + Array of selected option values. + """ + values: [String!]! +} + +""" +The status of a component option value related to a bundle. +""" +enum ProductBundleComponentOptionSelectionStatus { + """ + The component option value is 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 { + """ + Selection status of the option. + """ + selectionStatus: ProductBundleComponentOptionSelectionStatus! + + """ + The value of the option. + """ + value: String! +} + +""" +A quantity option related to a bundle. +""" +type ProductBundleComponentQuantityOption { + """ + The name of the option value. + """ + name: String! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The quantity values of the option. + """ + values: [ProductBundleComponentQuantityOptionValue!]! +} + +""" +Input for the quantity option related to a component product. This will become a +new option on the parent bundle product that doesn't have a corresponding option +on the component. +""" +input ProductBundleComponentQuantityOptionInput { + """ + The option name to create on the parent product. + """ + name: String! + + """ + Array of option values. + """ + values: [ProductBundleComponentQuantityOptionValueInput!]! +} + +""" +A quantity option value related to a componentized product. +""" +type ProductBundleComponentQuantityOptionValue { + """ + The name of the option value. + """ + name: String! + + """ + The quantity of the option value. + """ + quantity: Int! +} + +""" +The input fields for a single quantity option value related to a component product. +""" +input ProductBundleComponentQuantityOptionValueInput { + """ + The name associated with the option, e.g. one-pack, two-pack. + """ + name: String! + + """ + How many of the variant will be included for the option value (e.g. two-pack has quantity 2). + """ + quantity: Int! +} + +""" +The input fields for creating a componentized product. +""" +input ProductBundleCreateInput { + """ + The component products to bundle with the bundle product. + """ + components: [ProductBundleComponentInput!]! + + """ + The title of the product to create. + """ + title: String! +} + +""" +Return type for `productBundleCreate` mutation. +""" +type ProductBundleCreatePayload { + """ + The asynchronous ProductBundleOperation creating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Defines errors encountered while managing a product bundle. +""" +type ProductBundleMutationUserError implements DisplayableError { + """ + The error code. + """ + code: ProductBundleMutationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductBundleMutationUserError`. +""" +enum ProductBundleMutationUserErrorCode { + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductBundleMutationUserError!]! +} + +""" +The input fields for updating a componentized product. +""" +input ProductBundleUpdateInput { + """ + The components to update existing ones. If none provided, no changes occur. + Note: This replaces, not adds to, current components. + """ + components: [ProductBundleComponentInput!] + + """ + The ID of the componentized product to update. + """ + productId: ID! + + """ + The title to rename the componentized product to, if provided. + """ + title: String +} + +""" +Return type for `productBundleUpdate` mutation. +""" +type ProductBundleUpdatePayload { + """ + The asynchronous ProductBundleOperation updating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The details of a specific product category within the [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). +""" +type ProductCategory { + """ + The product taxonomy node associated with the product category. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +The input fields to use when adding a product category to a product. The +[Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) +contains the full list of available values. +""" +input ProductCategoryInput { + """ + The ID of the node in the Shopify taxonomy that represents the product category. + """ + productTaxonomyNodeId: ID! +} + +""" +Return type for `productChangeStatus` mutation. +""" +type ProductChangeStatusPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductChangeStatusUserError!]! +} + +""" +An error that occurs during the execution of `ProductChangeStatus`. +""" +type ProductChangeStatusUserError implements DisplayableError { + """ + The error code. + """ + code: ProductChangeStatusUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductChangeStatusUserError`. +""" +enum ProductChangeStatusUserErrorCode { + """ + 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 { + """ + Claiming ownership of bundles lets the app render a custom UI for the bundles' card on the + products details page in the Shopify admin. + + Bundle ownership can only be claimed when creating the product. If you create `ProductVariantComponents` + in any of its product variants, then the bundle ownership is automatically assigned to the app making the call. + + [Learn more](https://shopify.dev/docs/apps/selling-strategies/bundles/product-config). + """ + bundles: Boolean +} + +""" +The set of valid sort keys for products belonging to a collection. +""" +enum ProductCollectionSortKeys { + """ + Sort by best selling. + """ + BEST_SELLING + + """ + Sort by collection default order. + """ + COLLECTION_DEFAULT + + """ + Sort by creation time. + """ + CREATED + + """ + Sort by id. + """ + ID + + """ + Sort by manual order. + """ + MANUAL + + """ + Sort by price. + """ + PRICE + + """ + Sort by relevance. + """ + RELEVANCE + + """ + Sort by title. + """ + TITLE +} + +""" +The compare-at price range of the product. +""" +type ProductCompareAtPriceRange { + """ + The highest variant's compare-at price. + """ + maxVariantCompareAtPrice: MoneyV2! + + """ + The lowest variant's compare-at price. + """ + minVariantCompareAtPrice: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple Products. +""" +type ProductConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductEdge!]! + + """ + A list of nodes that are contained in ProductEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Product!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product in a specific country. +Prices vary between countries. +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 object. +""" +type ProductContextualPricing { + """ + The number of fixed quantity rules for the product's variants on the price list. + """ + fixedQuantityRulesCount: Int! + + """ + The pricing of the variant with the highest price in the given context. + """ + maxVariantPricing: ProductVariantContextualPricing + + """ + The pricing of the variant with the lowest price in the given context. + """ + minVariantPricing: ProductVariantContextualPricing + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRange: ProductPriceRangeV2! +} + +""" +Return type for `productCreateMedia` mutation. +""" +type ProductCreateMediaPayload { + """ + The newly created media. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productCreate` mutation. +""" +type ProductCreatePayload { + """ + The product object. + """ + product: Product + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productDeleteAsync` mutation. +""" +type ProductDeleteAsyncPayload { + """ + The ID of the product that was requested to be deleted. + """ + deleteProductId: ID + + """ + The background job that will delete the product and its associated variants and media. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductDeleteUserError!]! +} + +""" +Return type for `productDeleteImages` mutation. +""" +type ProductDeleteImagesPayload { + """ + The array of image IDs to delete. + """ + deletedImageIds: [ID!]! + + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the product to delete. +""" +input ProductDeleteInput { + """ + The ID of the product. + """ + id: ID! +} + +""" +Return type for `productDeleteMedia` mutation. +""" +type ProductDeleteMediaPayload { + """ + List of media IDs which were deleted. + """ + deletedMediaIds: [ID!] + + """ + List of product image IDs which were deleted. + """ + deletedProductImageIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the deleted media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productDelete` mutation. +""" +type ProductDeletePayload { + """ + The ID of the deleted product. + """ + deletedProductId: ID + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An error that occurred while setting the activation status of an inventory item. +""" +type ProductDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductDeleteUserError`. +""" +enum ProductDeleteUserErrorCode { + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST +} + +""" +The input fields for the product async duplicate mutation. +""" +input ProductDuplicateAsyncInput { + """ + 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! +} + +""" +Return type for `productDuplicateAsyncV2` mutation. +""" +type ProductDuplicateAsyncV2Payload { + """ + The duplicated product ID. + """ + duplicatedProductId: ID + + """ + The asynchronous job for duplicating the product. + """ + productDuplicateJobId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductDuplicateUserError!]! +} + +""" +Represents a product duplication job. +""" +type ProductDuplicateJob { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Return type for `productDuplicate` mutation. +""" +type ProductDuplicatePayload { + """ + The asynchronous job that duplicates the product images. + """ + imageJob: Job + + """ + The duplicated product. + """ + newProduct: Product + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An error that occurred while duplicating the product. +""" +type ProductDuplicateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductDuplicateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductDuplicateUserError`. +""" +enum ProductDuplicateUserErrorCode { + """ + Cannot duplicate a bundle product. + """ + BUNDLES_ERROR + + """ + The title cannot be empty. + """ + EMPTY_TITLE + + """ + Cannot duplicate a product which has no variants. + """ + EMPTY_VARIANT + + """ + Something went wrong when saving the product, please try again. + """ + FAILED_TO_SAVE + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + The product does not exist. + """ + PRODUCT_DOES_NOT_EXIST +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. +""" +type ProductEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductEdge. + """ + node: Product! +} + +""" +A product feed. +""" +type ProductFeed implements Node { + """ + The country of the product feed. + """ + country: CountryCode + + """ + A globally-unique ID. + """ + id: ID! + + """ + The language of the product feed. + """ + language: LanguageCode + + """ + The status of the product feed. + """ + status: ProductFeedStatus! +} + +""" +An auto-generated type for paginating through multiple ProductFeeds. +""" +type ProductFeedConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductFeedEdge!]! + + """ + A list of nodes that are contained in ProductFeedEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductFeed!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `productFeedCreate` mutation. +""" +type ProductFeedCreatePayload { + """ + The newly created product feed. + """ + productFeed: ProductFeed + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedCreateUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedCreate`. +""" +type ProductFeedCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedCreateUserError`. +""" +enum ProductFeedCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Return type for `productFeedDelete` mutation. +""" +type ProductFeedDeletePayload { + """ + The ID of the product feed that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedDelete`. +""" +type ProductFeedDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedDeleteUserError`. +""" +enum ProductFeedDeleteUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +An auto-generated type which holds one ProductFeed and a cursor during pagination. +""" +type ProductFeedEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductFeedEdge. + """ + node: ProductFeed! +} + +""" +The input fields required to create a product feed. +""" +input ProductFeedInput { + """ + The 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 { + """ + The product feed is active. + """ + ACTIVE + + """ + The product feed is inactive. + """ + INACTIVE +} + +""" +Return type for `productFullSync` mutation. +""" +type ProductFullSyncPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFullSyncUserError!]! +} + +""" +An error that occurs during the execution of `ProductFullSync`. +""" +type ProductFullSyncUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFullSyncUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFullSyncUserError`. +""" +enum ProductFullSyncUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The set of valid sort keys for the ProductImage query. +""" +enum ProductImageSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION + + """ + 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 `productImageUpdate` mutation. +""" +type ProductImageUpdatePayload { + """ + The image that has been updated. + """ + 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 list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for creating or updating a product. +""" +input ProductInput { + """ + A description of the product. Supports HTML formatting. + """ + bodyHtml: String @deprecated(reason: "Use `descriptionHtml` instead. This will be removed in 2024-10.") + + """ + 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!] + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + You can specify this field only when you create a product. + """ + combinedListingRole: CombinedListingsRole + + """ + The [custom product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + customProductType: String + + """ + 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 + + """ + 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 private metafields to associate with this product. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields). This will be removed in 2024-10.\n") + + """ + The product category in the Shopify product taxonomy. + """ + productCategory: ProductCategoryInput @deprecated(reason: "Use `category` instead. This will be removed in 2024-10.") + + """ + 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 standardized product type in the Shopify product taxonomy. + """ + standardizedProductType: StandardizedProductTypeInput @deprecated(reason: "Use `category` instead. This will be removed in 2024-10.") + + """ + 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 { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productLeaveSellingPlanGroups` mutation. +""" +type ProductLeaveSellingPlanGroupsPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The set of valid sort keys for the ProductMedia query. +""" +enum ProductMediaSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +An entity that represents details of an asynchronous operation on a product. +""" +interface ProductOperation { + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! +} + +""" +Represents the state of this product operation. +""" +enum ProductOperationStatus { + """ + Operation is currently running. + """ + ACTIVE + + """ + Operation is complete. + """ + COMPLETE + + """ + Operation has been created. + """ + CREATED +} + +""" +The product property names. For example, "Size", "Color", and "Material". +Variants are selected based on permutations of these options. +The limit for each product property name is 255 characters. +""" +type ProductOption implements HasPublishedTranslations & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The metafield identifier linked to this option. + """ + linkedMetafield: LinkedMetafield + + """ + The product option’s name. + """ + name: String! + + """ + Similar to values, option_values returns all the corresponding option value + objects to the product option, including values not assigned to any variants. + """ + optionValues: [ProductOptionValue!]! + + """ + The product option's position. + """ + position: Int! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The corresponding value to the product option name. + """ + values: [String!]! +} + +""" +The set of strategies available for use on the `productOptionDelete` mutation. +""" +enum ProductOptionDeleteStrategy { + """ + The default strategy, the specified `Option` may only have one corresponding `value`. + """ + DEFAULT + + """ + An `Option` with multiple `values` can be deleted, 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 { + """ + The product with which the option being updated is associated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionUpdateUserError!]! +} + +""" +Error codes for failed `ProductOptionUpdate` mutation. +""" +type ProductOptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionUpdateUserError`. +""" +enum ProductOptionUpdateUserErrorCode { + """ + 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 + + """ + 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 { + """ + 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 +} + +""" +The product option value names. For example, "Red", "Blue", and "Green" for a "Color" option. +""" +type ProductOptionValue implements HasPublishedTranslations & Node { + """ + Whether the product option value has any linked variants. + """ + hasVariants: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the linked metafield. + """ + linkedMetafieldValue: String + + """ + The name of the product option value. + """ + name: String! + + """ + The swatch associated with the product option value. + """ + swatch: ProductOptionValueSwatch + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +A swatch associated with a product option value. +""" +type ProductOptionValueSwatch { + """ + The color representation of the swatch. + """ + color: Color + + """ + An image representation of the swatch. + """ + image: MediaImage +} + +""" +Return type for `productOptionsCreate` mutation. +""" +type ProductOptionsCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsCreateUserError!]! +} + +""" +Error codes for failed `ProductOptionsCreate` mutation. +""" +type ProductOptionsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsCreateUserError`. +""" +enum ProductOptionsCreateUserErrorCode { + """ + 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 { + """ + IDs of the options deleted. + """ + deletedOptionsIds: [ID!] + + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsDeleteUserError!]! +} + +""" +Error codes for failed `ProductOptionsDelete` mutation. +""" +type ProductOptionsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsDeleteUserError`. +""" +enum ProductOptionsDeleteUserErrorCode { + """ + 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 { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsReorderUserError!]! +} + +""" +Error codes for failed `ProductOptionsReorder` mutation. +""" +type ProductOptionsReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsReorderUserError`. +""" +enum ProductOptionsReorderUserErrorCode { + """ + 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 price range of the product. +""" +type ProductPriceRange { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +The price range of the product. +""" +type ProductPriceRangeV2 { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +Represents the channels where a product is published. +""" +type ProductPublication { + """ + The channel where the product was or is published. + """ + channel: Channel! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The product that was or is going to be published on the channel. + """ + product: Product! + + """ + The date that the product was or is going to be published on the channel. + """ + publishDate: DateTime +} + +""" +An auto-generated type for paginating through multiple ProductPublications. +""" +type ProductPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductPublicationEdge!]! + + """ + A list of nodes that are contained in ProductPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductPublication and a cursor during pagination. +""" +type ProductPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductPublicationEdge. + """ + node: ProductPublication! +} + +""" +The input fields for specifying a publication to which a product will be published. +""" +input ProductPublicationInput { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + ID of the publication. + """ + publicationId: ID + + """ + The date and time that the product was (or will be) published. + """ + publishDate: DateTime +} + +""" +The input fields for specifying a product to publish and the channels to publish it to. +""" +input ProductPublishInput { + """ + The product to create or update publications for. + """ + id: ID! + + """ + The publication that the product is published to. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productPublish` mutation. +""" +type ProductPublishPayload { + """ + The product that has been published. + """ + product: Product + + """ + The channels where the product is published. + """ + productPublications: [ProductPublication!] @deprecated(reason: "Use Product.publications instead.") + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productReorderImages` mutation. +""" +type ProductReorderImagesPayload { + """ + The asynchronous job which reorders the images. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productReorderMedia` mutation. +""" +type ProductReorderMediaPayload { + """ + The asynchronous job which reorders the media. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Reports the status of product for a Sales Channel or Storefront API. +This might include why a product is not available in a Sales Channel +and how a merchant might fix this. +""" +type ProductResourceFeedback { + """ + The time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + The feedback messages presented to the merchant. + """ + messages: [String!]! + + """ + The ID of the product associated with the feedback. + """ + productId: ID! + + """ + The timestamp of the product associated with the feedback. + """ + productUpdatedAt: DateTime! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +""" +The input fields used to create a product feedback. +""" +input ProductResourceFeedbackInput { + """ + The 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! + + """ + 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 { + """ + 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 create or update a product via ProductSet mutation. +""" +input ProductSetInput { + """ + 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!] + + """ + The role of the product in a product grouping. It can only be set during creation. + """ + combinedListingRole: CombinedListingsRole + + """ + The [custom product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + customProductType: String + + """ + 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 + + """ + The IDs of the media to associate with the product. + """ + mediaIds: [ID!] @deprecated(reason: "Use `files` instead. This will be removed in 2024-10.") + + """ + The metafields to associate with this product. + """ + metafields: [MetafieldInput!] + + """ + The product category in the Shopify product taxonomy. + """ + productCategory: ProductCategoryInput @deprecated(reason: "Use `category` instead. This will be removed in 2024-10.") + + """ + 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 standardized product type in the Shopify product taxonomy. + """ + standardizedProductType: StandardizedProductTypeInput @deprecated(reason: "Use `category` instead. This will be removed in 2024-10.") + + """ + 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. + """ + variants: [ProductVariantSetInput!] + + """ + The name of the product's vendor. + """ + vendor: String +} + +""" +An entity that represents details of an asynchronous +[ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductSetOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Return type for `productSet` mutation. +""" +type ProductSetPayload { + """ + The product object. + """ + product: Product + + """ + The product set operation, returned when run in asynchronous mode. + """ + productSetOperation: ProductSetOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Defines errors for ProductSet mutation. +""" +type ProductSetUserError implements DisplayableError { + """ + The error code. + """ + code: ProductSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductSetUserError`. +""" +enum ProductSetUserErrorCode { + """ + 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 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +The possible product statuses. +""" +enum ProductStatus { + """ + The product is ready to sell and can be published to sales channels and apps. + Products with an active status aren't automatically published to sales + channels, such as the online store, or apps. By default, existing products are set to active. + """ + ACTIVE + + """ + The product is no longer being sold and isn't available to customers on sales channels and apps. + """ + ARCHIVED + + """ + The product isn't ready to sell and is unavailable to customers on sales + channels and apps. By default, duplicated and unarchived products are set to draft. + """ + DRAFT +} + +""" +Represents a [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) node. +""" +type ProductTaxonomyNode implements Node { + """ + The full name of the product taxonomy node. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. + """ + fullName: String! + + """ + The ID of the product taxonomy node. + """ + id: ID! + + """ + Whether the node is a leaf node. + """ + isLeaf: Boolean! + + """ + Whether the node is a root node. + """ + isRoot: Boolean! + + """ + The name of the product taxonomy node. For example, Dog Beds. + """ + name: String! +} + +""" +The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. +""" +input ProductUnpublishInput { + """ + The ID of the product to create or update publications for. + """ + id: ID! + + """ + The channels to unpublish the product from. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productUnpublish` mutation. +""" +type ProductUnpublishPayload { + """ + The product that has been unpublished. + """ + product: Product + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productUpdateMedia` mutation. +""" +type ProductUpdateMediaPayload { + """ + The updated media object. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product on which media was updated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productUpdate` mutation. +""" +type ProductUpdatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The `ProductVariant` object represents a version of a +[product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that comes in more than one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), +such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, +blue t-shirt would be one product variant and a large, blue t-shirt would be another. + +Use the `ProductVariant` object to manage the full lifecycle and configuration of a product's variants. Common +use cases for using the `ProductVariant` object include: + +- Tracking inventory for each variant +- Setting unique prices for each variant +- Assigning barcodes and SKUs to connect variants to fulfillment services +- Attaching variant-specific images and media +- Setting delivery and tax requirements +- Supporting product bundles, subscriptions, and selling plans + +A `ProductVariant` is associated with a parent +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) object. +`ProductVariant` serves as the central link between a product's merchandising configuration, inventory, +pricing, fulfillment, and sales channels within the GraphQL Admin API schema. Each variant +can reference other GraphQL types such as: + +- [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem): Used for inventory tracking +- [`Image`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Image): Used for variant-specific images +- [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup): Used for subscriptions and selling plans + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). +""" +type ProductVariant implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node { + """ + Whether the product variant is available for sale. + """ + availableForSale: Boolean! + + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant in the default shop currency. + """ + compareAtPrice: Money + + """ + The pricing that applies for a customer in a given context. As of API version + 2025-04, only active markets are considered in the price resolution. + """ + contextualPricing( + """ + The context used to generate contextual pricing for the variant. + """ + context: ContextualPricingContext! + ): ProductVariantContextualPricing! + + """ + The date and time when the variant was created. + """ + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The [delivery profile](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile) for the variant. + """ + deliveryProfile: DeliveryProfile + + """ + Display name of the variant, based on product's title + variant's title. + """ + displayName: String! + + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! + + """ + List of prices and compare-at prices in the presentment currencies for this shop. + """ + presentmentPrices( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The product that this variant belongs to. + """ + product: Product! + + """ + 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! + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be omitted + from channels that don't support bundles. + """ + requiresComponents: Boolean! + + """ + List of product options applied to the variant. + """ + selectedOptions: [SelectedOption!]! + + """ + The total sellable quantity of the variant for online channels. + This doesn't represent the total available inventory or capture + [limitations based on customer location](https://help.shopify.com/manual/markets/inventory_and_fulfillment). + """ + sellableOnlineQuantity: Int! + + """ + Count of selling plan groups associated with the product variant. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all selling plan groups defined in the current shop associated with the product variant. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + A case-sensitive identifier for the product variant in the shop. + Required in order to connect to a fulfillment service. + """ + sku: String + + """ + The Storefront GraphQL API ID of the `ProductVariant`. + + The Storefront GraphQL API will no longer return Base64 encoded IDs to match + the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` + field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + Avalara tax code for the product variant. Applies only to the stores that have the Avalara AvaTax app installed. + """ + taxCode: String @deprecated(reason: "This field should no longer be used in new integrations. This field will not be available in future API versions.") + + """ + Whether a tax is charged when the product variant is sold. + """ + taxable: Boolean! + + """ + The title of the product variant. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The date and time (ISO 8601 format) when the product variant was last modified. + """ + updatedAt: DateTime! +} + +""" +The input fields required to append media to a single variant. +""" +input ProductVariantAppendMediaInput { + """ + Specifies the media to append to the variant. + """ + mediaIds: [ID!]! + + """ + Specifies the variant to which media will be appended. + """ + variantId: ID! +} + +""" +Return type for `productVariantAppendMedia` mutation. +""" +type ProductVariantAppendMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +A product variant component that is included within a bundle. + +These are the individual product variants that make up a bundle product, +where each component has a specific required quantity. +""" +type ProductVariantComponent implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product variant associated with the component. + """ + productVariant: ProductVariant! + + """ + The required quantity of the component. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ProductVariantComponents. +""" +type ProductVariantComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantComponentEdge!]! + + """ + A list of nodes that are contained in ProductVariantComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +""" +type ProductVariantComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantComponentEdge. + """ + node: ProductVariantComponent! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. +""" +type ProductVariantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantEdge!]! + + """ + A list of nodes that are contained in ProductVariantEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductVariant!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product variant in a specific country. +Prices vary between countries. +""" +type ProductVariantContextualPricing { + """ + The final compare-at price after all adjustments are applied. + """ + compareAtPrice: MoneyV2 + + """ + The final price after all adjustments are applied. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! +} + +""" +Return type for `productVariantCreate` mutation. +""" +type ProductVariantCreatePayload { + """ + The product associated with the variant. + """ + product: Product + + """ + The successfully created variant. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productVariantDelete` mutation. +""" +type ProductVariantDeletePayload { + """ + The ID of the deleted product variant. + """ + deletedProductVariantId: ID + + """ + The product associated with the deleted product variant. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields required to detach media from a single variant. +""" +input ProductVariantDetachMediaInput { + """ + Specifies the media to detach from the variant. + """ + mediaIds: [ID!]! + + """ + Specifies the variant from which media will be detached. + """ + variantId: ID! +} + +""" +Return type for `productVariantDetachMedia` mutation. +""" +type ProductVariantDetachMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. +""" +type ProductVariantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantEdge. + """ + node: ProductVariant! +} + +""" +The input fields for the bundle components for core. +""" +input ProductVariantGroupRelationshipInput { + """ + The ID of the product variant that's a component of the bundle. + """ + id: ID! + + """ + The number of units of the product variant required to construct one unit of the bundle. + """ + quantity: Int! +} + +""" +The input fields for specifying a product variant to create or update. +""" +input ProductVariantInput { + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Specifies the product variant to update or create a new variant if absent. + """ + id: ID + + """ + The ID of the image that's associated with the variant. Deprecated as of the 2023-07 release. + """ + imageId: ID @deprecated(reason: "Use `mediaId` instead.") + + """ + The URL of an image to associate with the variant. This field can only be used + through mutations that create product images and must match one of the URLs + being created on the product. + + Deprecated as of the 2023-07 release. + """ + imageSrc: String @deprecated(reason: "Use `mediaSrc` instead.") + + """ + 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. + Supported as input with the `productVariantCreate` mutation only. + """ + inventoryQuantities: [InventoryLevelInput!] + + """ + The ID of the media to associate with the variant. This field can only be used + in mutations that create media images and must match one of the IDs being + created on the product. This field only accepts one value. + """ + mediaId: ID + + """ + The URL of the media to associate with the variant. This field can only be + used in mutations that create media images and must match one of the URLs + being created on the product. This field only accepts one value. + """ + mediaSrc: [String!] + + """ + Additional customizable information about the product variant. + """ + metafields: [MetafieldInput!] + + """ + The custom properties that a shop owner uses to define product variants. + """ + options: [String!] + + """ + 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 + + """ + The private metafields associated with the product. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The product to create the variant for. Used as input only to the `productVariantCreate` mutation. + """ + productId: ID + + """ + 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 tax code associated with the variant. + """ + taxCode: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean + title: String @deprecated(reason: "Variant title is not a writable field. This field is generated from the selected variant options.") +} + +""" +The valid values for the inventory policy of a product variant once it is out of stock. +""" +enum ProductVariantInventoryPolicy { + """ + 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 { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productVariantLeaveSellingPlanGroups` mutation. +""" +type ProductVariantLeaveSellingPlanGroupsPayload { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields representing a product variant position. +""" +input ProductVariantPositionInput { + """ + Specifies the ID of the product variant to update. + """ + id: ID! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! +} + +""" +The compare-at price and price of a variant sharing a currency. +""" +type ProductVariantPricePair { + """ + The compare-at price of the variant with associated currency. + """ + compareAtPrice: MoneyV2 + + """ + The price of the variant with associated currency. + """ + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductVariantPricePairs. +""" +type ProductVariantPricePairConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantPricePairEdge!]! + + """ + A list of nodes that are contained in ProductVariantPricePairEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantPricePair!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. +""" +type ProductVariantPricePairEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantPricePairEdge. + """ + node: ProductVariantPricePair! +} + +""" +Return type for `productVariantRelationshipBulkUpdate` mutation. +""" +type ProductVariantRelationshipBulkUpdatePayload { + """ + The product variants with successfully updated product variant relationships. + """ + parentProductVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantRelationshipBulkUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ProductVariantRelationshipBulkUpdate`. +""" +type ProductVariantRelationshipBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantRelationshipBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantRelationshipBulkUpdateUserError`. +""" +enum ProductVariantRelationshipBulkUpdateUserErrorCode { + """ + 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 { + """ + A product ID which contains product variants that have relationships with other variants. + """ + parentProductId: ID + + """ + The product variant ID representing that which contains the relationships with other variants. + """ + parentProductVariantId: ID + + """ + 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 + + """ + 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 { + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Specifies the product variant to update or create a new variant if absent. + """ + id: ID + + """ + 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 ID of the media to associate with the variant. + """ + mediaId: ID @deprecated(reason: "Use `file` instead. This will be removed in 2024-10.") + + """ + Additional customizable information about the product variant. + """ + 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 + + """ + 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 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 set of valid sort keys for the ProductVariant query. +""" +enum ProductVariantSortKeys { + """ + Sort by the `full_title` value. + """ + FULL_TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by available inventory quantity in the location specified by the `query:"location_id:"` argument. + Don't use this sort key when no `location_id` in query is specified. + """ + INVENTORY_LEVELS_AVAILABLE + + """ + Sort by the `inventory_management` value. + """ + INVENTORY_MANAGEMENT + + """ + Sort by the `inventory_policy` value. + """ + INVENTORY_POLICY + + """ + Sort by the `inventory_quantity` value. + """ + INVENTORY_QUANTITY + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `popular` value. + """ + POPULAR + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `sku` value. + """ + SKU + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +Return type for `productVariantUpdate` mutation. +""" +type ProductVariantUpdatePayload { + """ + The product associated with the variant. + """ + product: Product + + """ + The updated variant. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productVariantsBulkCreate` mutation. +""" +type ProductVariantsBulkCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The newly created variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkCreateUserError!]! +} + +""" +The set of strategies available for use on the `productVariantsBulkCreate` mutation. +""" +enum ProductVariantsBulkCreateStrategy { + """ + The default strategy. Deletes the standalone default ("Default Title") variant + when it's the only variant on the product. Preserves the standalone custom variant. + """ + DEFAULT + + """ + Deletes the existing standalone variant when the product has only a single default ("Default Title") or custom variant. + """ + REMOVE_STANDALONE_VARIANT +} + +""" +Error codes for failed product variant bulk create mutations. +""" +type ProductVariantsBulkCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkCreateUserError`. +""" +enum ProductVariantsBulkCreateUserErrorCode { + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Variant price must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Invalid input detected. + """ + INVALID + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + 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 + + """ + 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 + + """ + Inventory locations cannot exceed the allowed resource limit or 10. + """ + TOO_MANY_INVENTORY_LOCATIONS + + """ + Quantity could not be set. The location was not found. + """ + TRACKED_VARIANT_LOCATION_NOT_FOUND + + """ + 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 { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkDeleteUserError!]! +} + +""" +Error codes for failed bulk variant delete mutations. +""" +type ProductVariantsBulkDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkDeleteUserError`. +""" +enum ProductVariantsBulkDeleteUserErrorCode { + """ + 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 { + """ + The value of the barcode associated with the product variant. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Specifies the product variant to update or delete. + """ + id: ID + + """ + The 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 + + """ + 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 + + """ + The private metafields associated with the product. + """ + privateMetafields: [PrivateMetafieldInput!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The tax code associated with the variant. + """ + taxCode: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean +} + +""" +Return type for `productVariantsBulkReorder` mutation. +""" +type ProductVariantsBulkReorderPayload { + """ + The updated product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkReorderUserError!]! +} + +""" +Error codes for failed bulk product variants reorder operation. +""" +type ProductVariantsBulkReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkReorderUserError`. +""" +enum ProductVariantsBulkReorderUserErrorCode { + """ + Product 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 { + """ + The updated product object. + """ + product: Product + + """ + The updated variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkUpdateUserError!]! +} + +""" +Error codes for failed variant bulk update mutations. +""" +type ProductVariantsBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkUpdateUserError`. +""" +enum ProductVariantsBulkUpdateUserErrorCode { + """ + 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 price of the variant must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + Metafield value is invalid. + """ + INVALID_VALUE + + """ + 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 + + """ + 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 too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + The variant already exists. + """ + VARIANT_ALREADY_EXISTS +} + +""" +The set of valid sort keys for the ProfileItem query. +""" +enum ProfileItemSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +Return type for `pubSubServerPixelUpdate` mutation. +""" +type PubSubServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `pubSubWebhookSubscriptionCreate` mutation. +""" +type PubSubWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionCreateUserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionCreate`. +""" +type PubSubWebhookSubscriptionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionCreateUserError`. +""" +enum PubSubWebhookSubscriptionCreateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +The input fields for a PubSub webhook subscription. +""" +input PubSubWebhookSubscriptionInput { + """ + 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!] + + """ + The Pub/Sub project ID. + """ + pubSubProject: String! + + """ + The Pub/Sub topic ID. + """ + pubSubTopic: String! +} + +""" +Return type for `pubSubWebhookSubscriptionUpdate` mutation. +""" +type PubSubWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionUpdateUserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionUpdate`. +""" +type PubSubWebhookSubscriptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionUpdateUserError`. +""" +enum PubSubWebhookSubscriptionUpdateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +A publication is a group of products and collections that is published to an app. +""" +type Publication implements Node { + """ + The app associated with the publication. + """ + app: App! @deprecated(reason: "Use [AppCatalog.apps](https:\/\/shopify.dev\/api\/admin-graphql\/unstable\/objects\/AppCatalog#connection-appcatalog-apps) instead.") + + """ + Whether new products are automatically published to this publication. + """ + autoPublish: Boolean! + + """ + The catalog associated with the publication. + """ + catalog: Catalog + + """ + The list of collection publication records, each representing the publication + status and details for a collection published to this publication (typically channel). + """ + collectionPublicationsV3( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductConnection! + + """ + Whether the publication supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Publications. +""" +type PublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PublicationEdge!]! + + """ + A list of nodes that are contained in PublicationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Publication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a publication. +""" +input PublicationCreateInput { + """ + Whether to automatically add newly created products to this publication. + """ + autoPublish: Boolean = false + + """ + The ID of the catalog. + """ + catalogId: ID + + """ + 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 { + """ + The publication is populated with all products. + """ + ALL_PRODUCTS + + """ + The publication is empty. + """ + EMPTY +} + +""" +Return type for `publicationCreate` mutation. +""" +type PublicationCreatePayload { + """ + The publication that's been created. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Return type for `publicationDelete` mutation. +""" +type PublicationDeletePayload { + """ + The ID of the publication that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +An auto-generated type which holds one Publication and a cursor during pagination. +""" +type PublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PublicationEdge. + """ + node: Publication! +} + +""" +The input fields required to publish a resource. +""" +input PublicationInput { + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + ID of the publication. + """ + publicationId: ID + + """ + The date and time that the resource was published. Setting this to a date in + the future will schedule the resource to be published. Only online store + channels support future publishing. This field has no effect if you include it + in the `publishableUnpublish` mutation. + """ + publishDate: DateTime +} + +""" +The possible types of publication operations. +""" +union PublicationOperation = AddAllProductsOperation | CatalogCsvOperation | PublicationResourceOperation + +""" +A bulk update operation on a publication. +""" +type PublicationResourceOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +The input fields for updating a publication. +""" +input PublicationUpdateInput { + """ + 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!] = [] + + """ + A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToRemove: [ID!] = [] +} + +""" +Return type for `publicationUpdate` mutation. +""" +type PublicationUpdatePayload { + """ + The publication that's been updated. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Defines errors encountered while managing a publication. +""" +type PublicationUserError implements DisplayableError { + """ + The error code. + """ + code: PublicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PublicationUserError`. +""" +enum PublicationUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 +} + +""" +Represents a resource that can be published to a channel. +A publishable resource can be either a Product or Collection. +""" +interface Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + 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.") + + """ + 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! +} + +""" +Return type for `publishablePublish` mutation. +""" +type PublishablePublishPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishablePublishToCurrentChannel` mutation. +""" +type PublishablePublishToCurrentChannelPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublish` mutation. +""" +type PublishableUnpublishPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublishToCurrentChannel` mutation. +""" +type PublishableUnpublishToCurrentChannelPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents information about the purchasing company for the order or draft order. +""" +type PurchasingCompany { + """ + The company associated to the order or draft order. + """ + company: Company! + + """ + The company contact associated to the order or draft order. + """ + contact: CompanyContact + + """ + The company location associated to the order or draft order. + """ + location: CompanyLocation! +} + +""" +The input fields for a purchasing company, which is a combination of company, company contact, and company location. +""" +input PurchasingCompanyInput { + """ + ID of the company contact. + """ + companyContactId: ID! + + """ + ID of the company. + """ + companyId: ID! + + """ + ID of the company location. + """ + companyLocationId: ID! +} + +""" +Represents information about the purchasing entity for the order or draft order. +""" +union PurchasingEntity = Customer | PurchasingCompany + +""" +The input fields for a purchasing entity. Can either be a customer or a purchasing company. +""" +input PurchasingEntityInput { + """ + Represents a customer. Null if there's a purchasing company. + """ + customerId: ID + + """ + Represents a purchasing company. Null if there's a customer. + """ + purchasingCompany: PurchasingCompanyInput +} + +""" +Quantity price breaks lets you offer different rates that are based on the +amount of a specific variant being ordered. +""" +type QuantityPriceBreak implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Minimum quantity required to reach new quantity break price. + """ + minimumQuantity: Int! + + """ + The price of variant after reaching the minimum quanity. + """ + price: MoneyV2! + + """ + The price list associated with this quantity break. + """ + priceList: PriceList! + + """ + The product variant associated with this quantity break. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityPriceBreaks. +""" +type QuantityPriceBreakConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityPriceBreakEdge!]! + + """ + A list of nodes that are contained in QuantityPriceBreakEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityPriceBreak!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +""" +type QuantityPriceBreakEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityPriceBreakEdge. + """ + node: QuantityPriceBreak! +} + +""" +The input fields and values to use when creating quantity price breaks. +""" +input QuantityPriceBreakInput { + """ + The 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! +} + +""" +The set of valid sort keys for the QuantityPriceBreak query. +""" +enum QuantityPriceBreakSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `minimum_quantity` value. + """ + MINIMUM_QUANTITY + + """ + 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 input fields used to update quantity pricing. +""" +input QuantityPricingByVariantUpdateInput { + """ + A list of fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of variant IDs that identify which fixed prices to remove. + """ + pricesToDeleteByVariantId: [ID!]! + + """ + A list of quantity price breaks to add. + """ + quantityPriceBreaksToAdd: [QuantityPriceBreakInput!]! + + """ + A list of quantity price break IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDelete: [ID!]! + + """ + A list of quantity rules to add. + """ + quantityRulesToAdd: [QuantityRuleInput!]! + + """ + A list of variant IDs that identify which quantity rules to remove. + """ + quantityRulesToDeleteByVariantId: [ID!]! +} + +""" +Return type for `quantityPricingByVariantUpdate` mutation. +""" +type QuantityPricingByVariantUpdatePayload { + """ + The variants for which quantity pricing was created successfully in the price list. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityPricingByVariantUserError!]! +} + +""" +Error codes for failed volume pricing operations. +""" +type QuantityPricingByVariantUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityPricingByVariantUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityPricingByVariantUserError`. +""" +enum QuantityPricingByVariantUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 { + """ + The value that specifies the quantity increment between minimum and maximum of the rule. + Only quantities divisible by this value will be considered valid. + + The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum + must be divisible by this value. + """ + increment: Int! + + """ + Whether the quantity rule fields match one increment, one minimum and no maximum. + """ + isDefault: Boolean! + + """ + An optional value that defines the highest allowed quantity purchased by the customer. + If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + """ + maximum: Int + + """ + The value that defines the lowest allowed quantity purchased by the customer. + The minimum must be a multiple of the quantity rule's increment. + """ + minimum: Int! + + """ + Whether the values of the quantity rule were explicitly set. + """ + originType: QuantityRuleOriginType! + + """ + The product variant for which the quantity rule is applied. + """ + productVariant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityRules. +""" +type QuantityRuleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityRuleEdge!]! + + """ + A list of nodes that are contained in QuantityRuleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityRule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityRule and a cursor during pagination. +""" +type QuantityRuleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityRuleEdge. + """ + node: QuantityRule! +} + +""" +The input fields for the per-order quantity rule to be applied on the product variant. +""" +input QuantityRuleInput { + """ + The quantity increment. + """ + increment: Int! + + """ + The maximum quantity. + """ + maximum: Int = null + + """ + The minimum quantity. + """ + minimum: Int! + + """ + Product variant on which to apply the quantity rule. + """ + variantId: ID! +} + +""" +The origin of quantity rule on a price list. +""" +enum QuantityRuleOriginType { + """ + Quantity rule is explicitly defined. + """ + FIXED + + """ + Quantity rule falls back to the relative rule. + """ + RELATIVE +} + +""" +An error for a failed quantity rule operation. +""" +type QuantityRuleUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityRuleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityRuleUserError`. +""" +enum QuantityRuleUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + Quantity rules can be associated only with company location catalogs. + """ + 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 { + """ + The list of quantity rules that were added to or updated in the price list. + """ + quantityRules: [QuantityRule!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +Return type for `quantityRulesDelete` mutation. +""" +type QuantityRulesDeletePayload { + """ + A list of product variant IDs whose quantity rules were removed from the price list. + """ + deletedQuantityRulesVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start. +""" +type QueryRoot { + """ + Returns a `Abandonment` resource by ID. + """ + abandonment( + """ + The ID of the `Abandonment` to return. + """ + id: ID! + ): Abandonment + + """ + Returns an Abandonment by the Abandoned Checkout ID. + """ + abandonmentByAbandonedCheckoutId( + """ + The ID of the Abandoned Checkout ID to query by. + """ + abandonedCheckoutId: ID! + ): Abandonment + + """ + Lookup an App by ID or return the currently authenticated App. + """ + app( + """ + The ID to lookup the App by. + """ + id: ID + ): App + + """ + Fetches app by handle. + Returns null if the app doesn't exist. + """ + appByHandle( + """ + Handle of the App. + """ + handle: String! + ): App + + """ + Fetches an app by its client ID. + Returns null if the app doesn't exist. + """ + appByKey( + """ + Client ID of the app. + """ + apiKey: String! + ): App + + """ + An app discount type. + """ + appDiscountType( + """ + The ID for the function providing the app discount type. + """ + functionId: String! + ): AppDiscountType + + """ + A list of app discount types installed by apps. + """ + appDiscountTypes: [AppDiscountType!]! + + """ + Look up an app installation by ID or return the app installation for the currently authenticated app. + + Use the `appInstallation` query to: + - Fetch current access scope permissions for your app + - Retrieve active subscription details and billing status + - Validate installation state during app initialization + - Display installation-specific information in your app interface + + Learn more about [app installation](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation). + """ + appInstallation( + """ + ID used to lookup AppInstallation. + """ + id: ID + ): AppInstallation + + """ + A list of app installations. To use this query, your app needs the `read_apps` + access scope, which can only be requested after you're granted approval from + [Shopify Support](https://partners.shopify.com/current/support/). This scope + can be granted to custom and public apps. + + Returns a paginated connection of `AppInstallation` objects across multiple stores. + + Learn more about [app installation](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation). + """ + 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! + + """ + 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!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! + + """ + Returns a `DiscountAutomatic` resource by ID. + """ + automaticDiscount( + """ + The ID of the `DiscountAutomatic` to return. + """ + id: ID! + ): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") + + """ + Returns a `DiscountAutomaticNode` resource by ID. + """ + automaticDiscountNode( + """ + The ID of the `DiscountAutomaticNode` to return. + """ + id: ID! + ): DiscountAutomaticNode + + """ + 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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! + + """ + List of automatic discounts. + """ + 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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.") + + """ + Returns a list of activated carrier services and associated shop locations that support them. + """ + availableCarrierServices: [DeliveryCarrierServiceAndLocations!]! + + """ + A list of available locales. + """ + availableLocales: [Locale!]! + + """ + Returns a `DeliveryCarrierService` resource by ID. + """ + carrierService( + """ + The ID of the `DeliveryCarrierService` to return. + """ + id: ID! + ): DeliveryCarrierService + + """ + Retrieve a list of CarrierServices. + """ + 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! + + """ + 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! + + """ + Returns a `CashTrackingSession` resource by ID. + """ + cashTrackingSession( + """ + The ID of the `CashTrackingSession` to return. + """ + id: ID! + ): CashTrackingSession + + """ + Returns a shop's cash tracking sessions for locations with a POS Pro subscription. + + Tip: To query for cash tracking sessions in bulk, you can + [perform a bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/queries). + """ + cashTrackingSessions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): Catalog + + """ + Returns the most recent catalog operations for the shop. + """ + catalogOperations: [ResourceOperation!]! + + """ + The catalogs belonging to the shop. + """ + 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( + """ + 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` resource by ID. + """ + channel( + """ + The ID of the `Channel` to return. + """ + id: ID! + ): Channel @deprecated(reason: "Use `publication` instead.") + + """ + List of the 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 `publications` instead.") + + """ + Returns the visual customizations for checkout for a given checkout profile. + + To learn more about updating checkout branding settings, 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). + """ + checkoutBranding( + """ + A globally-unique identifier. + """ + checkoutProfileId: ID! + ): CheckoutBranding + + """ + A checkout profile on a shop. + """ + checkoutProfile( + """ + The ID of the checkout profile. + """ + id: ID! + ): CheckoutProfile + + """ + 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! + + """ + Returns a [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes) resource by ID. + """ + codeDiscountNode( + """ + The ID of the `DiscountCodeNode` to return. + """ + id: ID! + ): DiscountCodeNode + + """ + Returns a code discount identified by its discount code. + """ + codeDiscountNodeByCode( + """ + The case-insensitive code of the `DiscountCodeNode` to return. + """ + code: String! + ): DiscountCodeNode + + """ + Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). + """ + codeDiscountNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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). | - + `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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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! + ): 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.") + + """ + 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! + + """ + 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `provisionally_published` | | - + `product_publication_status:189769876-approved` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | published_status | string | Filter by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Returns the list of companies in the shop. + """ + 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 | + | 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. + """ + companiesCount: Count + + """ + Returns a `Company` resource by ID. + """ + company( + """ + The ID of the `Company` to return. + """ + id: ID! + ): Company + + """ + Returns a `CompanyContact` resource by ID. + """ + companyContact( + """ + The ID of the `CompanyContact` to return. + """ + id: ID! + ): CompanyContact + + """ + Returns a `CompanyContactRole` resource by ID. + """ + companyContactRole( + """ + The ID of the `CompanyContactRole` to return. + """ + id: ID! + ): CompanyContactRole + + """ + Returns a `CompanyLocation` resource by ID. + """ + companyLocation( + """ + The ID of the `CompanyLocation` to return. + """ + id: ID! + ): CompanyLocation + + """ + Returns the list of company locations in the shop. + """ + 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! + + """ + Return the AppInstallation for the currently authenticated App. + """ + currentAppInstallation: AppInstallation! + + """ + Returns the current app's most recent BulkOperation. Apps can run one bulk + query and one bulk mutation operation at a time, by shop. + """ + currentBulkOperation( + """ + The current bulk operation's type. + """ + type: BulkOperationType = QUERY + ): BulkOperation @deprecated(reason: "Use `bulkOperations` with status filter instead.") + + """ + Returns a `Customer` resource by ID. + """ + customer( + """ + The ID of the `Customer` to return. + """ + id: ID! + ): Customer + + """ + Returns the status of a customer merge request job. + """ + customerMergeJobStatus( + """ + The ID of the job performing the customer merge request. + """ + jobId: ID! + ): CustomerMergeRequest + + """ + Returns a preview of a customer merge request. + """ + customerMergePreview( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePreview! + + """ + Returns a CustomerPaymentMethod resource by its ID. + """ + customerPaymentMethod( + """ + The ID of the CustomerPaymentMethod to return. + """ + id: ID! + + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + The list of members, such as customers, that's associated with an individual segment. + 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 + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """ + The ID of the segment. + """ + segmentId: ID + + """ + 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 a `CustomerSegmentMembersQuery` resource by ID. + """ + customerSegmentMembersQuery( + """ + The ID of the `CustomerSegmentMembersQuery` to return. + """ + id: ID! + ): CustomerSegmentMembersQuery + + """ + Whether a member, which is a customer, belongs to a segment. + """ + customerSegmentMembership( + """ + The ID of the customer that has the membership. + """ + customerId: ID! + + """ + The segments to evaluate for the given customer. + """ + segmentIds: [ID!]! + ): SegmentMembershipResponse! + + """ + Returns a list of + [customers](https://shopify.dev/api/admin-graphql/latest/objects/Customer) in + your Shopify store, including key information such as name, email, location, + and purchase history. + Use this query to segment your audience, personalize marketing campaigns, or + analyze customer behavior by applying filters based on location, order + history, marketing preferences and tags. + The `customers` query supports + [pagination](https://shopify.dev/api/usage/pagination-graphql) and [sorting](https://shopify.dev/api/admin-graphql/latest/enums/CustomerSortKeys). + """ + customers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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. + """ + customersCount( + """ + 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 + + """ + 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! + ): DeliveryCustomization + + """ + 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! + + """ + Returns a Delivery Profile resource by ID. + """ + deliveryProfile( + """ + The ID of the DeliveryProfile to return. + """ + id: ID! + ): DeliveryProfile + + """ + Returns a list of saved delivery profiles. + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryProfileConnection! + + """ + Lookup a delivery promise provider. + """ + deliveryPromiseProvider( + """ + The ID of the location associated with the delivery promise provider. + """ + locationId: ID! + ): DeliveryPromiseProvider + + """ + Returns the shop-wide shipping settings. + """ + deliverySettings: DeliverySetting + + """ + The total number of discount codes for the shop. + """ + discountCodesCount( + """ + 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 + + """ + Returns a `DiscountNode` resource by ID. + """ + discountNode( + """ + The ID of the `DiscountNode` to return. + """ + id: ID! + ): 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` | + | 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. | - `order_discounts`
- `product_discounts`
- + `shipping_discounts` | | - `combines_with:product_discounts` | + | discount_class | string | Filter by the [discount + class](https://shopify.dev/docs/apps/build/discounts#discount-classes). | - + `order`
- `product`
- `shipping` | | - `discount_class:product` | + | discount_type | string | Filter by the [discount + type](https://help.shopify.com/manual/discounts/discount-types). | - + `bogo`
- `fixed_amount`
- `free_shipping`
- `percentage` | | + - `type:fixed_amount` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | method | string | Filter by the [discount + method](https://shopify.dev/docs/apps/build/discounts#discount-methods). | - + `automatic`
- `code` | | - `method:code` | + | 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` | + | 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). | - + `all`
- `all_with_app`
- `app`
- `bxgy`
- + `fixed_amount`
- `free_shipping`
- `percentage` | | - + `type:percentage` | + You can apply one or more filters to a query. Learn more 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Returns a `DiscountRedeemCodeBulkCreation` resource by ID. + """ + discountRedeemCodeBulkCreation( + """ + The ID of the `DiscountRedeemCodeBulkCreation` to return. + """ + id: ID! + ): DiscountRedeemCodeBulkCreation + + """ + List of the shop's redeemed discount code saved searches. + """ + discountRedeemCodeSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + Returns a `ShopifyPaymentsDispute` resource by ID. + """ + dispute( + """ + The ID of the `ShopifyPaymentsDispute` to return. + """ + id: ID! + ): ShopifyPaymentsDispute + + """ + Returns a `ShopifyPaymentsDisputeEvidence` resource by ID. + """ + disputeEvidence( + """ + The ID of the `ShopifyPaymentsDisputeEvidence` to return. + """ + id: ID! + ): ShopifyPaymentsDisputeEvidence + + """ + Returns a `Domain` resource by ID. + """ + domain( + """ + The ID of the `Domain` to return. + """ + id: ID! + ): Domain + + """ + Retrieves a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) by its ID. + A draft order is an order created by a merchant on behalf of their + customers. Draft orders contain all necessary order details (products, pricing, customer information) + but require payment to be accepted before they can be converted into + [completed orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete). + + Use the `draftOrder` query to retrieve information associated with the following workflows: + + - Creating orders for phone, in-person, or chat sales + - Sending invoices to customers with secure checkout links + - Managing custom items and additional costs + - Selling products at discount or wholesale rates + - Processing pre-orders and saving drafts for later completion + + A draft order is associated with a + [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + and contains multiple [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem). + Each draft order has a [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder#field-DraftOrder.fields.status), + which indicates its progress through the sales workflow. + """ + draftOrder( + """ + The ID of the `DraftOrder` to return. + """ + id: ID! + ): DraftOrder + + """ + 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! + + """ + Returns a `DraftOrderTag` resource by ID. + """ + draftOrderTag( + """ + The ID of the `DraftOrderTag` to return. + """ + id: ID! + ): 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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! + + """ + 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 | float | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Returns a Fulfillment resource by ID. + """ + fulfillment( + """ + The ID of the Fulfillment to return. + """ + id: ID! + ): Fulfillment + + """ + The fulfillment constraint rules that belong to a shop. + """ + fulfillmentConstraintRules: [FulfillmentConstraintRule!]! + + """ + Returns a `FulfillmentOrder` resource by ID. + """ + fulfillmentOrder( + """ + The ID of the `FulfillmentOrder` to return. + """ + id: ID! + ): FulfillmentOrder + + """ + The paginated list of all fulfillment orders. + The returned fulfillment orders are filtered according to the + [fulfillment order access scopes](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder#api-access-scopes) + granted to the app. + + Use this query to retrieve fulfillment orders assigned to merchant-managed locations, + third-party fulfillment service locations, or all kinds of locations together. + + For fetching only the fulfillment orders assigned to the app's locations, use the + [assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) + connection. + """ + fulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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! + + """ + Returns a FulfillmentService resource by ID. + """ + fulfillmentService( + """ + The ID of the FulfillmentService to return. + """ + id: ID! + ): FulfillmentService + + """ + Returns a gift card resource by ID. + """ + giftCard( + """ + The ID of the GiftCard to return. + """ + id: ID! + ): GiftCard + + """ + Returns a list of gift cards. + """ + 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` | + | 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The total number of gift cards issued for the shop. Limited to a maximum of 10000 by default. + """ + giftCardsCount( + """ + 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` | + | 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` | + | 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 + ): Count + + """ + Returns an + [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) + object by ID. + """ + inventoryItem( + """ + The ID of the `InventoryItem` to return. + """ + id: ID! + ): InventoryItem + + """ + Returns a list of inventory items. + """ + inventoryItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): InventoryLevel + + """ + General inventory properties for the shop. + """ + inventoryProperties: InventoryProperties! + + """ + Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes. + """ + job( + """ + ID of the job to query. + """ + id: ID! + ): Job + + """ + Returns an inventory Location resource by ID. + """ + location( + """ + The ID of the location to return. If no ID is provided, the primary location of the Shop is returned. + """ + id: ID + ): Location + + """ + Returns a list of active inventory locations. + """ + 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 | + | 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( + """ + 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 | + | 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! + + """ + Returns a `Market` resource by ID. + """ + market( + """ + The ID of the `Market` to return. + """ + id: ID! + ): Market + + """ + Returns the applicable market for a customer based on where they are in the world. + """ + marketByGeography( + """ + The code for the country where the customer is. + """ + countryCode: CountryCode! + ): Market + + """ + A resource that can have localized values for different markets. + """ + marketLocalizableResource( + """ + Find a market localizable resource by ID. + """ + resourceId: ID! + ): MarketLocalizableResource + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResources( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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!]! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketLocalizableResourceConnection! + + """ + 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!] = [] + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + ): MarketingActivity + + """ + Returns a `MarketingEvent` resource by ID. + """ + marketingEvent( + """ + The ID of the `MarketingEvent` to return. + """ + id: ID! + ): MarketingEvent + + """ + A list of marketing events associated with the marketing app. + """ + marketingEvents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The markets configured for the shop. + """ + 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! + + """ + Returns a `Menu` resource by ID. + """ + menu( + """ + The ID of the `Menu` to return. + """ + id: ID! + ): Menu + + """ + The shop's menus. + """ + 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! + + """ + Returns a metafield definition by identifier. + """ + metafieldDefinition( + """ + The ID of the MetafieldDefinition to return. + """ + id: ID! + ): MetafieldDefinition + + """ + Each metafield definition has a type, which defines the type of information that it can store. + This type is enforced across every instance of the resource that owns the metafield definition. + + Refer to the [list of supported metafield types](https://shopify.dev/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! + + """ + List of the `MetafieldStorefrontVisibility` records. + """ + metafieldStorefrontVisibilities( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the visible metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldStorefrontVisibilityConnection! @deprecated(reason: "This query will be removed in 2025-01. Use the `access.storefront` field for nodes inside the `metafieldDefinitions` query instead.\n") + + """ + Returns a `MetafieldStorefrontVisibility` resource by ID. + """ + metafieldStorefrontVisibility( + """ + The ID of the `MetafieldStorefrontVisibility` to return. + """ + id: ID! + ): MetafieldStorefrontVisibility @deprecated(reason: "This query will be removed in 2025-01. Use the `access.storefront` field inside the `metafieldDefinition` query instead.\n") + + """ + Retrieves a metaobject by ID. + """ + metaobject( + """ + The ID of the metaobject to return. + """ + id: ID! + ): Metaobject + + """ + Retrieves a metaobject by handle. + """ + metaobjectByHandle( + """ + The identifier of the metaobject to return. + """ + handle: MetaobjectHandleInput! + ): Metaobject + + """ + Retrieves a metaobject definition by ID. + """ + metaobjectDefinition( + """ + The ID of the metaobject to return. + """ + id: ID! + ): MetaobjectDefinition + + """ + Finds a metaobject definition by type. + """ + metaobjectDefinitionByType( + """ + The type of the metaobject definition to return. + """ + type: String! + ): MetaobjectDefinition + + """ + All metaobject definitions. + """ + 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! + + """ + All metaobjects for the shop. + """ + 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! + + """ + Return a mobile platform application by its ID. + """ + mobilePlatformApplication( + """ + ID of the mobile platform app. + """ + id: ID! + ): MobilePlatformApplication + + """ + List the mobile platform applications. + """ + mobilePlatformApplications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Returns a specific node (any object that implements the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) by ID, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + This field is commonly used for refetching an object. + """ + node( + """ + The ID of the `Node` to return. + """ + id: ID! + ): Node + + """ + Returns the list of nodes (any objects that implement the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) with the given IDs, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + """ + nodes( + """ + The IDs of the Nodes to return. + """ + ids: [ID!]! + ): [Node]! + + """ + The shop's online store channel. + """ + onlineStore: OnlineStore! + + """ + The `order` query retrieves an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/order) by + its ID. This query provides access to comprehensive order information such as + customer details, line items, financial data, and fulfillment status. + + Use the `order` query to retrieve information associated with the following processes: + + - [Order management and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + - [Financial reporting](https://help.shopify.com/manual/finance) + - [Customer purchase history](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports) + and [transaction analysis](https://shopify.dev/docs/apps/launch/billing/view-charges-earnings#transaction-data-through-the-graphql-admin-api) + - [Shipping](https://shopify.dev/docs/apps/build/checkout/delivery-shipping) and [inventory management](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps) + + You can only retrieve the last 60 days worth of orders from a store by + default. If you want to access older orders, then you need to [request access to all + orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). + + For large order datasets, consider using [bulk operations](https://shopify.dev/docs/api/usage/bulk-operations/queries). + Bulk operations handle pagination automatically and allow you to retrieve data + asynchronously without being constrained by API rate limits. + Learn more about [creating orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate) + and [building order management + apps](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + order( + """ + The ID of the `Order` to return. + """ + id: ID! + ): Order + + """ + Returns a payment status by payment reference ID. Used to check the status of a deferred payment. + """ + orderPaymentStatus( + """ + ID of the order for which the payment was initiated. + """ + orderId: ID! + + """ + Unique identifier returned by orderCreatePayment. + """ + paymentReferenceId: String! + ): OrderPaymentStatus + + """ + List of the shop's order saved searches. + """ + 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! + + """ + 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` | + | 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` | + | 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` | + | 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 count of orders for the given shop. 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` | + | 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` | + | 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` | + | 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` | + | 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 + ): Count + + """ + The payment customization. + """ + paymentCustomization( + """ + The ID of the payment customization. + """ + id: ID! + ): PaymentCustomization + + """ + 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! + + """ + The list of payment terms templates eligible for all shops and users. + """ + paymentTermsTemplates( + """ + The payment terms type to filter the payment terms templates list. + """ + paymentTermsType: PaymentTermsType + ): [PaymentTermsTemplate!]! + + """ + The number of pendings orders. Limited to a maximum of 10000. + """ + pendingOrdersCount: Count + + """ + Returns a price list resource by ID. + """ + priceList( + """ + The ID of the `PriceList` to return. + """ + id: ID! + ): 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! + + """ + Returns a `PriceRule` resource by ID. + """ + priceRule( + """ + The ID of the `PriceRule` to return. + """ + id: ID! + ): PriceRule @deprecated(reason: "Use `codeDiscountNode` instead. This will be removed in 2024-10.") + + """ + List of the shop's price rule saved searches. + """ + priceRuleSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 price rule resources that have at least one associated discount code. + """ + priceRules( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | created_at | time | + | discount_type | string | + | ends_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | starts_at | time | + | status | string | + | times_used | integer | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PriceRuleSortKeys = ID + ): PriceRuleConnection! @deprecated(reason: "Use `codeDiscountNodes` instead. This will be removed in 2024-10.") + + """ + The primary market of the shop. + """ + primaryMarket: Market! @deprecated(reason: "Use `backupRegion` instead.") + + """ + Returns a `PrivateMetafield` resource by ID. + """ + privateMetafield( + """ + The ID of the `PrivateMetafield` to return. + """ + id: ID! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Returns a list of private metafields associated to a resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Retrieve the private metafields of a certain resource, specified by the resource ID. + """ + owner: ID! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Retrieves a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) by its ID. + A product is an item that a merchant can sell in their store. + + Use the `product` query when you need to: + + - Access essential product data (for example, title, description, price, images, SEO metadata, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants and product options. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + product( + """ + The ID of the `Product` to return. + """ + id: ID! + ): Product + + """ + Return a product by its 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.") + + """ + Returns the product duplicate job. + """ + productDuplicateJob( + """ + An ID of a product duplicate job to fetch. + """ + id: ID! + ): ProductDuplicateJob! + + """ + Returns a ProductFeed resource by ID. + """ + productFeed( + """ + The ID of the ProductFeed to return. + """ + id: ID! + ): ProductFeed + + """ + The product feeds for the shop. + """ + productFeeds( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Returns a ProductOperation resource by ID. + + This can be used to query the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), using + the ID that was returned + [when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously) + by the + [ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + + The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + + The `product` field provides the details of the created or updated product. + + For the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), the + `userErrors` field provides mutation errors that occurred during the operation. + """ + productOperation( + """ + The ID of the `ProductOperation` to return. + """ + id: ID! + ): ProductOperation + + """ + Retrieves product resource feedback for the currently authenticated app, + providing insights into product data quality, completeness, and optimization + opportunities. This feedback helps apps guide merchants toward better product + listings and improved store performance. + + For example, an SEO app might receive feedback indicating that certain + products lack meta descriptions or have suboptimal titles, enabling the app to + provide specific recommendations for improving search visibility and + conversion rates. + + Use `ProductResourceFeedback` to: + - Display product optimization recommendations to merchants + - Identify data quality issues across product catalogs + - Build product improvement workflows and guided experiences + - Track progress on product listing completeness and quality + - Implement automated product auditing and scoring systems + - Generate reports on catalog health and optimization opportunities + - Provide contextual suggestions within product editing interfaces + + The feedback system evaluates products against various criteria including SEO + best practices, required fields, media quality, and sales channel + requirements. Each feedback item includes specific details about the issue, + suggested improvements, and priority levels. + + Feedback is app-specific and reflects the particular focus of your application + - marketing apps receive different insights than inventory management apps. + The system continuously updates as merchants make changes, providing real-time + guidance for product optimization. + + This resource is particularly valuable for apps that help merchants improve + their product listings, optimize for search engines, or enhance their overall + catalog quality. The feedback enables proactive suggestions rather than + reactive problem-solving. + + Learn more about [product optimization](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + """ + productResourceFeedback( + """ + The product associated with the resource feedback. + """ + id: ID! + ): ProductResourceFeedback + + """ + Returns a list of the shop's product saved searches. + """ + productSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) by its ID. + + A product variant is a specific version of a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariant` query when you need to: + + - Access essential product variant data (for example, title, price, image, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants that are part of a bundle or selling plan. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariant( + """ + The ID of the `ProductVariant` to return. + """ + id: ID! + ): ProductVariant + + """ + 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | published_status | string | Filter by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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` | + | 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | 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 by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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` | + | 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'` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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. + """ + productsCount( + """ + 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` | + | 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` | + | 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | 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 by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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` | + | 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'` | + | 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 + ): Count + + """ + The list of publicly-accessible Admin API versions, including supported + versions, the release candidate, and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """ + Lookup a publication by ID. + """ + publication( + """ + The ID of the Publication to return. + """ + id: ID! + ): Publication + + """ + List of publications. + """ + 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! + + """ + Count of publications. + """ + publicationsCount( + """ + Filter publications by catalog type. + """ + catalogType: CatalogType + ): Count + + """ + Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. + """ + publishedProductsCount( + """ + The ID of the publication that the products are published to. + """ + publicationId: ID! + ): Count + + """ + Retrieves a [refund](https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund) by its ID. + A refund represents a financial record of money returned to a customer from an order. + It provides a comprehensive view of all refunded amounts, transactions, and restocking + instructions associated with returning products or correcting order issues. + + Use the `refund` query to retrieve information associated with the following workflows: + + - Displaying refund details in order management interfaces + - Building customer service tools for reviewing refund history + - Creating reports on refunded amounts and reasons + - Auditing refund transactions and payment gateway records + - Tracking inventory impacts from refunded items + + A refund is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and includes [refund line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem) + that specify which items were refunded. Each refund processes through + [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) + that handle the actual money transfer back to the customer. + """ + refund( + """ + The ID of the Refund to return. + """ + id: ID! + ): Refund + + """ + Retrieves a return by its ID. A return represents the intent of a buyer to ship one or more items from an + order back to a merchant or a third-party fulfillment location. + + Use the `return` query to retrieve information associated with the following workflows: + + - [Managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + - [Processing exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges) + - [Tracking reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders) + + A return is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). + Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), + which indicates the state of the return. + """ + return( + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + of the return to retrieve. + """ + id: ID! + ): Return + + """ + The calculated monetary value to be exchanged due to the return. + """ + returnCalculate( + """ + The input fields for calculating a return. + """ + input: CalculateReturnInput! + ): CalculatedReturn + + """ + Returns a `ReturnableFulfillment` resource by ID. + """ + returnableFulfillment( + """ + The ID of the `ReturnableFulfillment` to return. + """ + id: ID! + ): 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! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ReturnableFulfillmentConnection! + + """ + Lookup a reverse delivery by ID. + """ + reverseDelivery( + """ + The ID of the ReverseDelivery to return. + """ + id: ID! + ): ReverseDelivery + + """ + Lookup a reverse fulfillment order by ID. + """ + reverseFulfillmentOrder( + """ + The ID of the reverse fulfillment order to return. + """ + id: ID! + ): ReverseFulfillmentOrder + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + A list of script tags. + """ + scriptTags( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The Customer Segment. + """ + segment( + """ + Find a segment by ID. + """ + id: ID! + ): Segment + + """ + A list of filter suggestions associated with a segment. A segment is a group + of members (commonly customers) that meet specific criteria. + """ + segmentFilterSuggestions( + """ + 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 + ): 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! + + """ + A list of a shop's segments. + """ + 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. + """ + segmentsCount: Count + + """ + Returns a `SellingPlanGroup` resource by ID. + """ + sellingPlanGroup( + """ + The ID of the `SellingPlanGroup` to return. + """ + id: ID! + ): SellingPlanGroup + + """ + List Selling Plan Groups. + """ + 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. + """ + shopBillingPreferences: ShopBillingPreferences! + + """ + A list of locales available on a shop. + """ + shopLocales( + """ + Return only published locales. + """ + published: Boolean = false + ): [ShopLocale!]! + + """ + 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 the Shopify Functions owned by the querying API client installed on the shop. + """ + 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! + + """ + Shopify Payments account information, including balances and payouts. + """ + shopifyPaymentsAccount: ShopifyPaymentsAccount @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") + + """ + The StaffMember resource, by ID. + """ + staffMember( + """ + The ID of the staff member to return. If no ID is provided, then the staff member making the query (if any) is returned. + """ + id: ID + ): StaffMember + + """ + Standard metafield definitions are intended for specific, common use cases. + Their namespace and keys reflect these use cases and are reserved. + + Refer to all available [`Standard Metafield Definition Templates`](https://shopify.dev/api/admin-graphql/latest/objects/StandardMetafieldDefinitionTemplate). + """ + 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! + + """ + Returns a store credit account resource by ID. + """ + storeCreditAccount( + """ + The ID of the store credit account to return. + """ + id: ID! + ): StoreCreditAccount + + """ + Returns a `SubscriptionBillingAttempt` resource by ID. + """ + subscriptionBillingAttempt( + """ + The ID of the `SubscriptionBillingAttempt` to return. + """ + id: ID! + ): SubscriptionBillingAttempt + + """ + Returns subscription billing attempts on a store. + """ + subscriptionBillingAttempts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The last `n` 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! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Returns a Subscription Contract resource by ID. + """ + subscriptionContract( + """ + The ID of the Subscription Contract to return. + """ + id: ID! + ): SubscriptionContract + + """ + 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 + + """ + 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 + ): SubscriptionContractConnection! + + """ + Returns a Subscription Draft resource by ID. + """ + subscriptionDraft( + """ + The ID of the Subscription Draft to return. + """ + id: ID! + ): SubscriptionDraft + + """ + The Taxonomy resource lets you access the categories, attributes and values of the loaded taxonomy tree. + """ + taxonomy: Taxonomy + + """ + Returns a list of TenderTransactions associated with the shop. + """ + 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! + + """ + A resource that can have localized values for different languages. + """ + translatableResource( + """ + Find a translatable resource by ID. + """ + resourceId: ID! + ): TranslatableResource + + """ + Resources that can have localized values for different languages. + """ + 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! + + """ + Resources that can have localized values for different languages. + """ + 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!]! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): TranslatableResourceConnection! + + """ + Returns a `UrlRedirect` resource by ID. + """ + urlRedirect( + """ + The ID of the `UrlRedirect` to return. + """ + id: ID! + ): UrlRedirect + + """ + Returns a `UrlRedirectImport` resource by ID. + """ + urlRedirectImport( + """ + The ID of the `UrlRedirectImport` to return. + """ + id: ID! + ): UrlRedirectImport + + """ + A list of the shop's URL redirect saved searches. + """ + urlRedirectSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Validation available on the shop. + """ + validation( + """ + The ID of the validation. + """ + id: ID! + ): Validation + + """ + 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! + + """ + Returns a + [web pixel](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by ID. + """ + webPixel( + """ + The ID of the `WebPixel` object to return. + """ + id: ID + ): WebPixel + + """ + Returns a webhook subscription by ID. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscription( + """ + The ID of the `WebhookSubscription` to return. + """ + id: ID! + ): WebhookSubscription + + """ + Retrieves a paginated list of shop-scoped webhook subscriptions configured for + the current app. This query returns webhook subscriptions created via the API + for this shop, not including app-scoped subscriptions configured via TOML files. + + For example, an app dashboard might use this query to display all configured + webhooks, showing which events trigger notifications and their delivery + endpoints for troubleshooting integration issues. + + Use the `webhookSubscriptions` query to: + - Audit all active shop-scoped webhook configurations + - View and manage webhook subscription configurations + - Display subscription details in app dashboards + - Retrieve existing webhook configurations for dynamic integration setups + - Check which subscriptions already exist before creating new ones + + The query returns comprehensive subscription data including event topics, + endpoint configurations, filtering rules, API versions, and metafield + namespace permissions. Each subscription includes creation and modification + timestamps for tracking configuration changes. + + Results support standard GraphQL pagination patterns with cursor-based + navigation, allowing efficient retrieval of large webhook subscription lists. + The response includes detailed endpoint information varying by type - HTTP + callback URLs, EventBridge ARNs, or Pub/Sub project and topic specifications. + + Advanced subscription features like event filtering using Shopify search + syntax, field inclusion rules, and metafield namespace access are fully + exposed, providing complete visibility into webhook configuration. + + Learn more about [webhook subscription queries](https://shopify.dev/docs/apps/build/webhooks/subscribe). + + + 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!] + ): WebhookSubscriptionConnection! + + """ + The count of webhook subscriptions. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + Limited to a maximum of 10000 by default. + """ + webhookSubscriptionsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 { + """ + 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 `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: 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! +} + +""" +An agreement between the merchant and customer to refund all or a portion of the order. +""" +type RefundAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The refund associated with the agreement. + """ + refund: Refund! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundEdge!]! + + """ + A list of nodes that are contained in RefundEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Refund!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `refundCreate` mutation. +""" +type RefundCreatePayload { + """ + The order associated with the created refund. + """ + order: Order + + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a refunded duty. +""" +type RefundDuty { + """ + The amount of a refunded duty in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The duty associated with this refunded duty. + """ + originalDuty: Duty +} + +""" +The input fields required to reimburse duties on a refund. +""" +input RefundDutyInput { + """ + The ID of the duty in the refund. + """ + dutyId: ID! + + """ + The type of refund for this duty. + """ + refundType: RefundDutyRefundType +} + +""" +The type of refund to perform for a particular refund duty. +""" +enum RefundDutyRefundType { + """ + The duty is 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundEdge. + """ + node: Refund! +} + +""" +The input fields to create a refund. +""" +input RefundInput { + """ + The currency that is used to refund the order. This must be the presentment + currency, which is the currency used by the customer. This is a required field + for orders where the currency and presentment currency differ. + """ + currency: CurrencyCode + + """ + 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! + + """ + A list of duties to refund. + """ + refundDuties: [RefundDutyInput!] + + """ + A list of line items to refund. + """ + refundLineItems: [RefundLineItemInput!] + + """ + The input fields that are required to reimburse shipping costs. + """ + shipping: ShippingRefundInput + + """ + A list of transactions involved in the refund. + """ + transactions: [OrderTransactionInput!] +} + +""" +A line item that's included in a refund. +""" +type RefundLineItem { + """ + A globally-unique ID. + """ + id: ID + + """ + The `LineItem` resource associated to the refunded line item. + """ + lineItem: LineItem! + + """ + The inventory restock location. + """ + location: Location + + """ + The price of a refunded line item. + """ + price: Money! @deprecated(reason: "Use `priceSet` instead.") + + """ + The price of a refunded line item in shop and presentment currencies. + """ + priceSet: MoneyBag! + + """ + The quantity of a refunded line item. + """ + quantity: Int! + + """ + The type of restock for the refunded line item. + """ + restockType: RefundLineItemRestockType! + + """ + Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund. + """ + restocked: Boolean! + + """ + The subtotal price of a refunded line item. + """ + subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") + + """ + The subtotal price of a refunded line item in shop and presentment currencies. + """ + subtotalSet: MoneyBag! + + """ + The total tax charged on a refunded line item. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax charged on a refunded line item in shop and presentment currencies. + """ + totalTaxSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundLineItems. +""" +type RefundLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundLineItemEdge!]! + + """ + A list of nodes that are contained in RefundLineItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [RefundLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundLineItem and a cursor during pagination. +""" +type RefundLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundLineItemEdge. + """ + node: RefundLineItem! +} + +""" +The input fields required to reimburse line items on a refund. +""" +input RefundLineItemInput { + """ + The ID of the line item in the refund. + """ + lineItemId: ID! + + """ + The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. + """ + locationId: ID + + """ + 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 { + """ + 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 input fields for the shipping cost to refund. +""" +input RefundShippingInput { + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The `ShippingLine` resource associated to the refunded shipping line item. + """ + shippingLine: ShippingLine! +} + +""" +An auto-generated type for paginating through multiple RefundShippingLines. +""" +type RefundShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundShippingLineEdge!]! + + """ + A list of nodes that are contained in RefundShippingLineEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [RefundShippingLine!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundShippingLine and a cursor during pagination. +""" +type RefundShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundShippingLineEdge. + """ + node: RefundShippingLine! +} + +""" +The input fields for a remote Authorize.net customer payment profile. +""" +input RemoteAuthorizeNetCustomerPaymentProfileInput { + """ + The customerPaymentProfileId value from the Authorize.net API. Starting on 2025, + customer_payment_profile_id will become mandatory for all API versions. + """ + customerPaymentProfileId: String + + """ + The customerProfileId value from the Authorize.net API. + """ + customerProfileId: String! +} + +""" +The input fields for a remote Braintree customer payment profile. +""" +input RemoteBraintreePaymentMethodInput { + """ + The `customer_id` value from the Braintree API. + """ + customerId: String! + + """ + The `payment_method_token` value from the Braintree API. Starting on 2025, + payment_method_token will become mandatory for all API versions. + """ + paymentMethodToken: String +} + +""" +The input fields for a remote stripe payment method. +""" +input RemoteStripePaymentMethodInput { + """ + The customer_id value from the Stripe API. + """ + customerId: String! + + """ + The payment_method_id value from the Stripe API. Starting on 2025, + payment_method_id will become mandatory for all API versions. + """ + paymentMethodId: String +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +resource, with 1 or more actions to take. For example, you could use an alert to +indicate that you're not charging taxes on some product variants. +They can optionally have a specific icon and be dismissed by merchants. +""" +type ResourceAlert { + """ + Buttons in the alert that link to related information. + For example, _Edit variants_. + """ + actions: [ResourceAlertAction!]! + + """ + The secondary text in the alert that includes further information or instructions about how to solve a problem. + """ + content: HTML! + + """ + Unique identifier that appears when an alert is manually closed by the merchant. + Most alerts can't be manually closed. + """ + dismissibleHandle: String + + """ + An icon that's optionally displayed with the alert. + """ + icon: ResourceAlertIcon + + """ + Indication of how important the alert is. + """ + severity: ResourceAlertSeverity! + + """ + The primary text in the alert that includes information or describes the problem. + """ + title: String! +} + +""" +An action associated to a resource alert, such as editing variants. +""" +type ResourceAlertAction { + """ + Whether the action appears as a button or as a link. + """ + primary: Boolean! + + """ + Resource for the action to show. + """ + show: String + + """ + The text for the button in the alert. For example, _Edit variants_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +The available icons for resource alerts. +""" +enum ResourceAlertIcon { + """ + A checkmark inside a circle. + """ + CHECKMARK_CIRCLE + + """ + A lowercase `i` inside a circle. + """ + INFORMATION_CIRCLE +} + +""" +The possible severity levels for a resource alert. +""" +enum ResourceAlertSeverity { + """ + Indicates a 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 { + """ + Feedback from an app about the steps a merchant needs to take to set up the app on their store. + """ + appFeedback: [AppFeedback!]! @deprecated(reason: "Use `details` instead.") + + """ + List of AppFeedback detailing issues regarding a resource. + """ + details: [AppFeedback!]! + + """ + Summary of resource feedback pertaining to the resource. + """ + summary: String! +} + +""" +The input fields for a resource feedback object. +""" +input ResourceFeedbackCreateInput { + """ + The date and time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + If the feedback state is `requires_action`, then you can send a string message + that communicates the action to be taken by the merchant. + The string must be a single message up to 100 characters long and must end with a period. + You need to adhere to the message formatting rules or your requests will fail: + - `[Explanation of the problem]. [Suggested action].` + + **Examples:** + - `[Your app name]` isn't connected. Connect your account to use this sales channel. `[Learn more]` + - `[Your app name]` isn't configured. Agree to the terms and conditions to use this app. `[Learn more]` + Both `Your app name` and `Learn more` (a button which directs merchants to + your app) are automatically populated in the Shopify admin. + """ + messages: [String!] + + """ + The state of the feedback and whether it requires merchant action. + """ + state: ResourceFeedbackState! +} + +""" +The state of the resource feedback. +""" +enum ResourceFeedbackState { + """ + No action required from merchant. + """ + ACCEPTED + + """ + The merchant needs to resolve an issue with the resource. + """ + REQUIRES_ACTION +} + +""" +Represents a merchandising background operation interface. +""" +interface ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Represents the state of this catalog operation. +""" +enum ResourceOperationStatus { + """ + Operation 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 { + """ + The channel the resource publication is published to. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. + If false, then the resource publication is neither published nor scheduled to be published. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + If the product isn't published, then this field returns an epoch timestamp. + """ + publishDate: DateTime! + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublications. +""" +type ResourcePublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationEdge!]! + + """ + A list of nodes that are contained in ResourcePublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublication and a cursor during pagination. +""" +type ResourcePublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationEdge. + """ + node: ResourcePublication! +} + +""" +A resource publication represents information about the publication of a resource. +Unlike `ResourcePublication`, an instance of `ResourcePublicationV2` can't be +unpublished. It must either be published or scheduled to be published. + +See [ResourcePublication](/api/admin-graphql/latest/objects/ResourcePublication) for more context. +""" +type ResourcePublicationV2 { + """ + Whether the resource publication is published. If true, then the resource publication is published to the publication. + If false, then the resource publication is staged to be published to the publication. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + """ + publishDate: DateTime + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublicationV2s. +""" +type ResourcePublicationV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationV2Edge!]! + + """ + A list of nodes that are contained in ResourcePublicationV2Edge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublicationV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination. +""" +type ResourcePublicationV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationV2Edge. + """ + node: ResourcePublicationV2! +} + +""" +A restocking fee is a fee captured as part of a return to cover the costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type RestockingFee implements Fee { + """ + The amount of the restocking fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +The input fields for a restocking fee. +""" +input RestockingFeeInput { + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +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 { + """ + 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 + + """ + 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 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ReturnLineItemTypeConnection! + + """ + The return shipping fees for the return. + """ + returnShippingFees: [ReturnShippingFee!]! + + """ + The list of reverse fulfillment orders for the return. + """ + reverseFulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 status of the return. + """ + status: ReturnStatus! + + """ + A suggested refund for the return. + """ + suggestedRefund( + """ + 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! +} + +""" +An agreement between the merchant and customer for a return. +""" +type ReturnAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The return associated with the agreement. + """ + return: Return! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The ID of the return that's being approved. + """ + id: ID! +} + +""" +Return type for `returnApproveRequest` mutation. +""" +type ReturnApproveRequestPayload { + """ + The approved return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnCancel` mutation. +""" +type ReturnCancelPayload { + """ + The canceled return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnClose` mutation. +""" +type ReturnClosePayload { + """ + The closed return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type for paginating through multiple Returns. +""" +type ReturnConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnEdge!]! + + """ + A list of nodes that are contained in ReturnEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Return!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `returnCreate` mutation. +""" +type ReturnCreatePayload { + """ + The created return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Additional information about why a merchant declined the customer's return request. +""" +type ReturnDecline { + """ + The notification message sent to the customer about their declined return request. + Maximum length: 500 characters. + """ + note: String + + """ + The reason the customer's return request was declined. + """ + reason: ReturnDeclineReason! +} + +""" +The reason why the merchant declined a customer's return request. +""" +enum ReturnDeclineReason { + """ + The return 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 { + """ + The reason why the merchant declined the customer's return request. + """ + declineReason: ReturnDeclineReason! + + """ + The ID of the return that's being declined. + """ + id: ID! +} + +""" +Return type for `returnDeclineRequest` mutation. +""" +type ReturnDeclineRequestPayload { + """ + The declined return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type which holds one Return and a cursor during pagination. +""" +type ReturnEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnEdge. + """ + node: Return! +} + +""" +Possible error codes that can be returned by `ReturnUserError`. +""" +enum ReturnErrorCode { + """ + 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 { + """ + 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! + + """ + 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 +} + +""" +A return line item. +""" +type ReturnLineItem implements Node & ReturnLineItemType { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity 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! + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The total weight of the item. + """ + totalWeight: Weight + + """ + The total line price after all discounts on the line item, including both line + item level discounts and code-based line item discounts, are applied. + """ + withCodeDiscountedTotalPriceSet: MoneyBag! +} + +""" +The input fields for a return line item. +""" +input ReturnLineItemInput { + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """ + 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! + + """ + 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 { + """ + The quantity of the associated return line item to be removed. + """ + quantity: Int! + + """ + The ID of the return line item to remove. + """ + returnLineItemId: ID! +} + +""" +Return type for `returnLineItemRemoveFromReturn` mutation. +""" +type ReturnLineItemRemoveFromReturnPayload { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return line item of any type. +""" +interface ReturnLineItemType implements Node { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity 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! + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! +} + +""" +An auto-generated type for paginating through multiple ReturnLineItemTypes. +""" +type ReturnLineItemTypeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnLineItemTypeEdge!]! + + """ + A list of nodes that are contained in ReturnLineItemTypeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReturnLineItemType!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnLineItemType and a cursor during pagination. +""" +type ReturnLineItemTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnLineItemTypeEdge. + """ + node: ReturnLineItemType! +} + +""" +The reason for returning the return line item. +""" +enum ReturnReason { + """ + 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 +} + +""" +The input fields to refund a return. +""" +input ReturnRefundInput { + """ + 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! + + """ + A list of return line items to refund. + """ + returnRefundLineItems: [ReturnRefundLineItemInput!]! +} + +""" +The input fields for a return refund line item. +""" +input ReturnRefundLineItemInput { + """ + The quantity of the return line item to be refunded. + """ + quantity: Int! + + """ + The ID of the return line item to be refunded. + """ + returnLineItemId: ID! +} + +""" +The input fields to create order transactions when refunding a return. +""" +input ReturnRefundOrderTransactionInput { + """ + The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. + """ + parentId: ID! + + """ + The amount of money for the transaction in the presentment currency of the order. + """ + transactionAmount: MoneyInput! +} + +""" +Return type for `returnRefund` mutation. +""" +type ReturnRefundPayload { + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnReopen` mutation. +""" +type ReturnReopenPayload { + """ + The reopened return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for requesting a return. +""" +input ReturnRequestInput { + """ + The ID of the order that's being returned. + """ + orderId: ID! + + """ + The line items that are being handled in the return. + """ + returnLineItems: [ReturnRequestLineItemInput!]! + + """ + The return shipping fee to capture. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for a return line item. +""" +input ReturnRequestLineItemInput { + """ + 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! + + """ + 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! +} + +""" +Return type for `returnRequest` mutation. +""" +type ReturnRequestPayload { + """ + The requested return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return shipping fee is a fee captured as part of a return to cover the costs of shipping the return. +""" +type ReturnShippingFee implements Fee { + """ + The amount of the return shipping fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +The input fields for a return shipping fee. +""" +input ReturnShippingFeeInput { + """ + The value of the fee as a fixed amount in the presentment currency of the order. + """ + amount: MoneyInput! +} + +""" +The status of a return. +""" +enum ReturnStatus { + """ + The return has been canceled. + """ + CANCELED + + """ + The return has been completed. + """ + CLOSED + + """ + The return 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 { + """ + The error code. + """ + code: ReturnErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A returnable fulfillment, which is an order that has been delivered +and is eligible to be returned to the merchant. +""" +type ReturnableFulfillment implements Node { + """ + The fulfillment that the returnable fulfillment refers to. + """ + fulfillment: Fulfillment! + + """ + The unique ID of the Returnable Fulfillment. + """ + id: ID! + + """ + The list of returnable fulfillment line items. + """ + returnableFulfillmentLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReturnableFulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillment and a cursor during pagination. +""" +type ReturnableFulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentEdge. + """ + node: ReturnableFulfillment! +} + +""" +A returnable fulfillment line item. +""" +type ReturnableFulfillmentLineItem { + """ + The fulfillment line item that can be returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + The quantity available to be returned. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillmentLineItems. +""" +type ReturnableFulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReturnableFulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillmentLineItem and a cursor during pagination. +""" +type ReturnableFulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentLineItemEdge. + """ + node: ReturnableFulfillmentLineItem! +} + +""" +A reverse delivery is a post-fulfillment object that represents a buyer sending a package to a merchant. +For example, a buyer requests a return, and a merchant sends the buyer a shipping label. +The reverse delivery contains the context of the items sent back, how they're being sent back +(for example, a shipping label), and the current state of the delivery (tracking information). +""" +type ReverseDelivery implements Node { + """ + The deliverable associated with the reverse delivery. + """ + deliverable: ReverseDeliveryDeliverable + + """ + The ID of the reverse delivery. + """ + id: ID! + + """ + The reverse delivery line items attached to the reverse delivery. + """ + reverseDeliveryLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReverseDelivery!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `reverseDeliveryCreateWithShipping` mutation. +""" +type ReverseDeliveryCreateWithShippingPayload { + """ + The created reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The delivery method and artifacts associated with a reverse delivery. +""" +union ReverseDeliveryDeliverable = ReverseDeliveryShippingDeliverable + +""" +The input fields to dispose a reverse delivery line item. +""" +input ReverseDeliveryDisposeInput { + """ + The final arrangement for the reverse delivery line item. + """ + dispositionType: ReverseFulfillmentOrderDispositionType! + + """ + The ID of the location where the reverse delivery line item is to be disposed. This is required + when the disposition type is RESTOCKED. + """ + locationId: ID + + """ + The quantity of the reverse delivery line item to dispose. + """ + quantity: Int! + + """ + The ID of the reverse delivery line item. + """ + reverseDeliveryLineItemId: ID! +} + +""" +Return type for `reverseDeliveryDispose` mutation. +""" +type ReverseDeliveryDisposePayload { + """ + The disposed reverse delivery line items. + """ + reverseDeliveryLineItems: [ReverseDeliveryLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type which holds one ReverseDelivery and a cursor during pagination. +""" +type ReverseDeliveryEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryEdge. + """ + node: ReverseDelivery! +} + +""" +The input fields for a reverse label. +""" +input ReverseDeliveryLabelInput { + """ + The URL of the label file. If a label file was uploaded to be attached to the + delivery, then provide the temporary staged URL. + """ + fileUrl: URL! +} + +""" +The return label file information for a reverse delivery. +""" +type ReverseDeliveryLabelV2 { + """ + The date and time when the reverse delivery label was created. + """ + createdAt: DateTime! + + """ + A public link that can be used to download the label image. + """ + publicFileUrl: URL + + """ + The date and time when the reverse delivery label was updated. + """ + updatedAt: DateTime! +} + +""" +The details about a reverse delivery line item. +""" +type ReverseDeliveryLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The expected number of units. + """ + quantity: Int! + + """ + The corresponding reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItem: ReverseFulfillmentOrderLineItem! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveryLineItems. +""" +type ReverseDeliveryLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseDeliveryLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseDeliveryLineItem and a cursor during pagination. +""" +type ReverseDeliveryLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryLineItemEdge. + """ + node: ReverseDeliveryLineItem! +} + +""" +The input fields for a reverse delivery line item. +""" +input ReverseDeliveryLineItemInput { + """ + The quantity of the item to be included in the delivery. + """ + quantity: Int! + + """ + The ID of the related reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! +} + +""" +A reverse shipping deliverable that may include a label and tracking information. +""" +type ReverseDeliveryShippingDeliverable { + """ + The return label attached to the reverse delivery. + """ + label: ReverseDeliveryLabelV2 + + """ + The information to track the reverse delivery. + """ + tracking: ReverseDeliveryTrackingV2 +} + +""" +Return type for `reverseDeliveryShippingUpdate` mutation. +""" +type ReverseDeliveryShippingUpdatePayload { + """ + The updated reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for tracking information about a return delivery. +""" +input ReverseDeliveryTrackingInput { + """ + The tracking number for the label. + """ + number: String + + """ + The tracking URL for the carrier. If the carrier isn't supported by Shopify, + then provide the tracking URL of the delivery. + """ + url: URL +} + +""" +Represents the information used to track a reverse delivery. +""" +type ReverseDeliveryTrackingV2 { + """ + The provider of the tracking information, in a human-readable format for display purposes. + """ + carrierName: String + + """ + The identifier used by the courier to identify the shipment. + """ + number: String + + """ + The URL to track a shipment. + """ + url: URL +} + +""" +A group of one or more items in a return that will be processed at a fulfillment service. +There can be more than one reverse fulfillment order for a return at a given location. +""" +type ReverseFulfillmentOrder implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of reverse fulfillment order line items for the reverse fulfillment order. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! @deprecated(reason: "Order will be nullable in a future version. Older versions will return an error when order is null. This will be removed in 2025-01.") + + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseFulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to dispose a reverse fulfillment order line item. +""" +input ReverseFulfillmentOrderDisposeInput { + """ + The 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 + + """ + The quantity of the reverse fulfillment order line item to dispose. + """ + quantity: Int! + + """ + The ID of the reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! +} + +""" +Return type for `reverseFulfillmentOrderDispose` mutation. +""" +type ReverseFulfillmentOrderDisposePayload { + """ + The disposed reverse fulfillment order line items. + """ + reverseFulfillmentOrderLineItems: [ReverseFulfillmentOrderLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The details of the arrangement of an item. +""" +type ReverseFulfillmentOrderDisposition implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the disposition occurred. + """ + location: Location + + """ + The number of disposed units. + """ + quantity: Int! + + """ + The final arrangement of an item. + """ + type: ReverseFulfillmentOrderDispositionType! +} + +""" +The final arrangement of an item from a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderDispositionType { + """ + An item that was 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderEdge. + """ + node: ReverseFulfillmentOrder! +} + +""" +The details about a reverse fulfillment order line item. +""" +type ReverseFulfillmentOrderLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + The corresponding fulfillment line item for a reverse fulfillment order line item. + """ + fulfillmentLineItem: FulfillmentLineItem! @deprecated(reason: "FulfillmentLineItem will be nullable as of API version 2024-10. Older version will return error when FulfillmentLineItem is null.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The total number of units to be processed. + """ + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrderLineItems. +""" +type ReverseFulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReverseFulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrderLineItem and a cursor during pagination. +""" +type ReverseFulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderLineItemEdge. + """ + node: ReverseFulfillmentOrderLineItem! +} + +""" +The status of a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderStatus { + """ + The reverse fulfillment order has been canceled. + """ + CANCELED + + """ + The reverse fulfillment order has been completed. + """ + CLOSED + + """ + The reverse fulfillment order is in progress. + """ + OPEN +} + +""" +The third-party confirmation of a reverse fulfillment order. +""" +type ReverseFulfillmentOrderThirdPartyConfirmation { + """ + The status of the reverse fulfillment order third-party confirmation. + """ + status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! +} + +""" +The status of a reverse fulfillment order third-party confirmation. +""" +enum ReverseFulfillmentOrderThirdPartyConfirmationStatus { + """ + The reverse fulfillment order was accepted by the fulfillment service. + """ + ACCEPTED + + """ + The reverse fulfillment order cancelation was accepted by the fulfillment service. + """ + CANCEL_ACCEPTED + + """ + The reverse fulfillment order cancelation was rejected by the fulfillment service. + """ + CANCEL_REJECTED + + """ + The reverse fulfillment order is awaiting acceptance by the fulfillment service. + """ + PENDING_ACCEPTANCE + + """ + The reverse fulfillment order is awaiting cancelation by the fulfillment service. + """ + PENDING_CANCELATION + + """ + The reverse fulfillment order was rejected by the fulfillment service. + """ + REJECTED +} + +""" +List of possible values for a RiskAssessment result. +""" +enum RiskAssessmentResult { + """ + Indicates a high likelihood that the order is fraudulent. + """ + HIGH + + """ + Indicates a 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 { + """ + A description of the fact. + """ + description: String! + + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! +} + +""" +List of possible values for a RiskFact sentiment. +""" +enum RiskFactSentiment { + """ + A 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 { + """ + Estimated number of rows contained within this background operation. + """ + count: Int! + + """ + Whether the operation exceeds max number of reportable rows. + """ + exceedsMax: Boolean! +} + +""" +SEO information. +""" +type SEO { + """ + SEO Description. + """ + description: String + + """ + SEO Title. + """ + title: String +} + +""" +The input fields for SEO information. +""" +input SEOInput { + """ + SEO 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 { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The possible order action types for a sale. +""" +enum SaleActionType { + """ + A purchase or charge. + """ + ORDER + + """ + A removal or return. + """ + RETURN + + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the additional fee. + """ + name: String! + + """ + The price of the additional fee. + """ + price: MoneyBag! + + """ + A list of taxes charged on the additional fee. + """ + taxLines: [TaxLine!]! +} + +""" +An auto-generated type for paginating through multiple Sales. +""" +type SaleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SaleEdge!]! + + """ + A list of nodes that are contained in SaleEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Sale!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Sale and a cursor during pagination. +""" +type SaleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SaleEdge. + """ + node: Sale! +} + +""" +The possible line types for a sale record. One of the possible order line types +for a sale is an adjustment. Sales adjustments occur when a refund is issued for +a line item that is either more or less than the total value of the line item. +Examples are restocking fees and goodwill payments. When this happens, Shopify +produces a sales agreement with sale records for each line item that is returned +or refunded and an additional sale record for the adjustment (for example, a +restocking fee). The sales records for the returned or refunded items represent +the reversal of the original line item sale value. The additional adjustment +sale record represents the difference between the original total value of all +line items that were refunded, and the actual amount refunded. +""" +enum SaleLineType { + """ + 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 { + """ + The portion of the total tax amount on the related sale that comes from the associated tax line. + """ + amount: MoneyBag! + + """ + The unique ID for the sale tax. + """ + id: ID! + + """ + The tax line associated with the sale. + """ + taxLine: TaxLine! +} + +""" +A contract between a merchant and a customer to do business. Shopify creates a +sales agreement whenever an order is placed, edited, or refunded. A sales +agreement has one or more sales records, which provide itemized details about +the initial agreement or subsequent changes made to the order. For example, when +a customer places an order, Shopify creates the order, generates a sales +agreement, and records a sale for each line item purchased in the order. A sale +record is specific to a type of order line. Order lines can represent different +things such as a purchased product, a tip added by a customer, shipping costs +collected at checkout, and more. +""" +interface SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SalesAgreementEdge!]! + + """ + A list of nodes that are contained in SalesAgreementEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SalesAgreement!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SalesAgreement and a cursor during pagination. +""" +type SalesAgreementEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SalesAgreementEdge. + """ + node: SalesAgreement! +} + +""" +A saved search is a representation of a search query saved in the admin. +""" +type SavedSearch implements LegacyInteroperability & Node { + """ + The filters of a saved search. + """ + filters: [SearchFilter!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The name of a saved search. + """ + name: String! + + """ + The query string of a saved search. This includes search terms and filters. + """ + query: String! + + """ + The type of resource this saved search is searching in. + """ + resourceType: SearchResultType! + + """ + The search terms of a saved search. + """ + searchTerms: String! +} + +""" +An auto-generated type for paginating through multiple SavedSearches. +""" +type SavedSearchConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SavedSearchEdge!]! + + """ + A list of nodes that are contained in SavedSearchEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SavedSearch!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a saved search. +""" +input SavedSearchCreateInput { + """ + 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 { + """ + The saved search that was created. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to delete a saved search. +""" +input SavedSearchDeleteInput { + """ + ID of the saved search to delete. + """ + id: ID! +} + +""" +Return type for `savedSearchDelete` mutation. +""" +type SavedSearchDeletePayload { + """ + The ID of the saved search that was deleted. + """ + deletedSavedSearchId: ID + + """ + The shop of the saved search that was deleted. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one SavedSearch and a cursor during pagination. +""" +type SavedSearchEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SavedSearchEdge. + """ + node: SavedSearch! +} + +""" +The input fields to update a saved search. +""" +input SavedSearchUpdateInput { + """ + ID of the saved search to update. + """ + id: ID! + + """ + A descriptive name of the saved search. + """ + name: String + + """ + The query string of a saved search. This included search terms and filters. + """ + query: String +} + +""" +Return type for `savedSearchUpdate` mutation. +""" +type SavedSearchUpdatePayload { + """ + The saved search that was updated. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The set of valid sort keys for the ScheduledChange query. +""" +enum ScheduledChangeSortKeys { + """ + Sort by the `expected_at` value. + """ + EXPECTED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + 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 +} + +""" +Script discount applications capture the intentions of a discount that +was created by a Shopify Script for an order's line item or shipping line. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the application as defined by the Script. + """ + description: String! @deprecated(reason: "Use `title` instead.") + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application as defined by the Script. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + +A script tag represents remote JavaScript code that is loaded into the pages of +a shop's storefront or the **Order status** page of checkout. +""" +type ScriptTag implements LegacyInteroperability & Node { + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script will be served as is. + """ + cache: Boolean! + + """ + The date and time when the script tag was created. + """ + createdAt: DateTime! + + """ + The page or pages on the online store that the script should be included. + """ + displayScope: ScriptTagDisplayScope! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL to the remote script. + """ + src: URL! + + """ + The date and time when the script tag was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple ScriptTags. +""" +type ScriptTagConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ScriptTagEdge!]! + + """ + A list of nodes that are contained in ScriptTagEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ScriptTag!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `scriptTagCreate` mutation. +""" +type ScriptTagCreatePayload { + """ + The script tag that was created. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `scriptTagDelete` mutation. +""" +type ScriptTagDeletePayload { + """ + The ID of the deleted script tag. + """ + deletedScriptTagId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The page or pages on the online store where the script should be included. +""" +enum ScriptTagDisplayScope { + """ + Include the script on both the web storefront and the Order status page. + """ + ALL @deprecated(reason: "`ALL` is deprecated. Use `ONLINE_STORE` instead.\n") + + """ + Include the script only on the 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 { + """ + The position 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 { + """ + 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 { + """ + The script tag that was updated. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter in a search query represented by a key value pair. +""" +type SearchFilter { + """ + The key of the search filter. + """ + key: String! + + """ + The value of the search filter. + """ + value: String! +} + +""" +A list of search filters along with their specific options in value and label pair for filtering. +""" +type SearchFilterOptions { + """ + A list of options that can be use to filter product availability. + """ + productAvailability: [FilterOption!]! +} + +""" +Represents an individual result returned from a search. +""" +type SearchResult { + """ + Returns the search result description text. + """ + description: String + + """ + Returns the Image resource presented to accompany a search result. + """ + image: Image + + """ + Returns the resource represented by the search result. + """ + reference: Node! + + """ + Returns the resource title. + """ + title: String! + + """ + Returns the absolute URL to the resource in the search result. + """ + url: URL! +} + +""" +The connection type for SearchResult. +""" +type SearchResultConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SearchResultEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + resultsAfterCount: Int! @deprecated(reason: "The provided information is not accurate.") +} + +""" +An auto-generated type which holds one SearchResult and a cursor during pagination. +""" +type SearchResultEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SearchResultEdge. + """ + node: SearchResult! +} + +""" +Specifies the type of resources to be returned from a search. +""" +enum SearchResultType { + """ + A balance transaction. + """ + BALANCE_TRANSACTION + COLLECTION + CUSTOMER + + """ + A code discount redeem code. + """ + DISCOUNT_REDEEM_CODE + DRAFT_ORDER + + """ + A file. + """ + FILE + + """ + An article. + """ + ONLINE_STORE_ARTICLE + + """ + A blog. + """ + ONLINE_STORE_BLOG + + """ + A page. + """ + ONLINE_STORE_PAGE + ORDER + PRICE_RULE + PRODUCT + + """ + A URL redirect. + """ + URL_REDIRECT +} + +""" +A dynamic collection of customers based on specific criteria. +""" +type Segment implements Node { + """ + The date and time when the segment was added to the store. + """ + creationDate: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date and time when the segment was last updated. + """ + lastEditDate: DateTime! + + """ + The name of the segment. + """ + name: String! + + """ + A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers. + """ + query: String! +} + +""" +A filter that takes a value that's associated with an object. For example, the +`tags` field is associated with the +[`Customer`](/api/admin-graphql/latest/objects/Customer) object. +""" +type SegmentAssociationFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The statistics of a given attribute. +""" +type SegmentAttributeStatistics { + """ + The average of a given attribute. + """ + average: Float! + + """ + The sum of a given attribute. + """ + sum: Float! +} + +""" +A filter with a Boolean value that's been added to a segment query. +""" +type SegmentBooleanFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple Segments. +""" +type SegmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentEdge!]! + + """ + A list of nodes that are contained in SegmentEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Segment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `segmentCreate` mutation. +""" +type SegmentCreatePayload { + """ + The newly created segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter with a date value that's been added to a segment query. +""" +type SegmentDateFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentDelete` mutation. +""" +type SegmentDeletePayload { + """ + ID of the deleted segment. + """ + deletedSegmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Segment and a cursor during pagination. +""" +type SegmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentEdge. + """ + node: Segment! +} + +""" +Categorical filter options for building customer segments using predefined value +sets like countries, subscription statuses, or order frequencies. + +For example, a "Customer Location" enum filter provides options like "United States," "Canada," and "United Kingdom." + +Use this object to: +- Access available categorical filter options +- Understand filter capabilities and constraints +- Build user interfaces for segment creation + +Includes localized display names, indicates whether multiple values can be +selected, and provides technical query names for API operations. +""" +type SegmentEnumFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter that's used to segment customers based on the date that an event +occured. For example, the `product_bought` event filter allows you to segment +customers based on what products they've bought. +""" +type SegmentEventFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The parameters for an event segment filter. + """ + parameters: [SegmentEventFilterParameter!]! + + """ + The query name of the filter. + """ + queryName: String! + + """ + The return value type for an event segment filter. + """ + returnValueType: String! +} + +""" +The parameters for an event segment filter. +""" +type SegmentEventFilterParameter { + """ + Whether the parameter accepts a list of values. + """ + acceptsMultipleValues: Boolean! + + """ + The localized description of the parameter. + """ + localizedDescription: String! + + """ + The localized name of the parameter. + """ + localizedName: String! + + """ + Whether the parameter is optional. + """ + optional: Boolean! + + """ + The type of the parameter. + """ + parameterType: String! + + """ + The query name of the parameter. + """ + queryName: String! +} + +""" +The filters used in segment queries associated with a shop. +""" +interface SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentFilters. +""" +type SegmentFilterConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentFilterEdge!]! + + """ + A list of nodes that are contained in SegmentFilterEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentFilter!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentFilter and a cursor during pagination. +""" +type SegmentFilterEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentFilterEdge. + """ + node: SegmentFilter! +} + +""" +A filter with a double-precision, floating-point value that's been added to a segment query. +""" +type SegmentFloatFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter with an integer that's been added to a segment query. +""" +type SegmentIntegerFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The response type for the `segmentMembership` object. +""" +type SegmentMembership { + """ + A Boolean that indicates whether or not the customer in the query is a member + of the segment, which is identified using the `segmentId`. + """ + isMember: Boolean! + + """ + A `segmentId` that's used for testing membership. + """ + segmentId: ID! +} + +""" +A list of maps that contain `segmentId` IDs and `isMember` Booleans. The maps represent segment memberships. +""" +type SegmentMembershipResponse { + """ + The membership status for the given list of segments. + """ + memberships: [SegmentMembership!]! +} + +""" +A segment and its corresponding saved search. +For example, you can use `SegmentMigration` to retrieve the segment ID that corresponds to a saved search ID. +""" +type SegmentMigration { + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the saved search. + """ + savedSearchId: ID! + + """ + The ID of the segment. + """ + segmentId: ID +} + +""" +An auto-generated type for paginating through multiple SegmentMigrations. +""" +type SegmentMigrationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentMigrationEdge!]! + + """ + A list of nodes that are contained in SegmentMigrationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentMigration!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentMigration and a cursor during pagination. +""" +type SegmentMigrationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentMigrationEdge. + """ + node: SegmentMigration! +} + +""" +The set of valid sort keys for the Segment query. +""" +enum SegmentSortKeys { + """ + Sort by the `creation_date` value. + """ + CREATION_DATE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `last_edit_date` value. + """ + LAST_EDIT_DATE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The statistics of a given segment. +""" +type SegmentStatistics { + """ + The statistics of a given attribute. + """ + attributeStatistics( + """ + The attribute that statistics are retrieved for. + """ + attributeName: String! + ): SegmentAttributeStatistics! +} + +""" +A filter with a string that's been added to a segment query. +""" +type SegmentStringFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentUpdate` mutation. +""" +type SegmentUpdatePayload { + """ + The updated segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A list of suggested values associated with an individual segment. A +segment is a group of members, such as customers, that meet specific +criteria. +""" +type SegmentValue { + """ + The localized version of the value's name. This name is displayed to the merchant. + """ + localizedValue: String! + + """ + The name of the query associated with the suggestion. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentValues. +""" +type SegmentValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentValueEdge!]! + + """ + A list of nodes that are contained in SegmentValueEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentValue!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentValue and a cursor during pagination. +""" +type SegmentValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentValueEdge. + """ + node: SegmentValue! +} + +""" +Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors. +""" +type SelectedOption { + """ + The product option’s name. + """ + name: String! + + """ + The product option’s value object. + """ + optionValue: ProductOptionValue! + + """ + The product option’s value. + """ + value: String! +} + +""" +The input fields for the selected variant option of the combined listing. +""" +input SelectedVariantOptionInput { + """ + The 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! +} + +""" +Represents how a product can be sold and purchased. Selling plans and associated records (selling plan groups +and policies) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing +up these records if you need to restore them later. + +For more information on selling plans, refer to +[*Creating and managing selling plans*](https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans). +""" +type SellingPlan implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """ + A selling plan policy which describes the recurring billing details. + """ + billingPolicy: SellingPlanBillingPolicy! + + """ + The category used to classify the selling plan for reporting purposes. + """ + category: SellingPlanCategory + + """ + The date and time when the selling plan was created. + """ + createdAt: DateTime! + + """ + A selling plan policy which describes the delivery details. + """ + deliveryPolicy: SellingPlanDeliveryPolicy! + + """ + Buyer facing string which describes the selling plan commitment. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + When to reserve inventory for a selling plan. + """ + inventoryPolicy: SellingPlanInventoryPolicy + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + A customer-facing description of the selling plan. + + If your store supports multiple currencies, then don't include + country-specific pricing content, such as "Buy monthly, get 10$ CAD off". This + field won't be converted to reflect different currencies. + """ + name: String! + + """ + The values of all options available on the selling plan. Selling plans are + grouped together in Liquid when they're created by the same app, and have the + same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + Relative position of the selling plan for display. A lower position will be displayed before a higher position. + """ + position: Int + + """ + Selling plan pricing details. + """ + pricingPolicies: [SellingPlanPricingPolicy!]! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Specifies the date when delivery or fulfillment is completed by a merchant for a given time cycle. You can also +define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who +start their subscription inside the cutoff period. + +Some example scenarios where anchors can be useful to implement advanced delivery behavior: +- A merchant starts fulfillment on a specific date every month. +- A merchant wants to bill the 1st of every quarter. +- A customer expects their delivery every Tuesday. + +For more details, see [About Selling Plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors). +""" +type SellingPlanAnchor { + """ + The cutoff day for the anchor. Specifies a buffer period before the anchor date for orders to be included in a + delivery or fulfillment cycle. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + """ + cutoffDay: Int + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int! + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType! +} + +""" +The input fields required to create or update a selling plan anchor. +""" +input SellingPlanAnchorInput { + """ + 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 { + """ + 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 = SellingPlanFixedBillingPolicy | SellingPlanRecurringBillingPolicy + +""" +The input fields that are required to create or update a billing policy type. +""" +input SellingPlanBillingPolicyInput { + """ + The fixed billing policy details. + """ + fixed: SellingPlanFixedBillingPolicyInput + + """ + The recurring billing policy details. + """ + recurring: SellingPlanRecurringBillingPolicyInput +} + +""" +The category of the selling plan. For the `OTHER` category, + you must fill out our [request form](https://docs.google.com/forms/d/e/1FAIpQLSeU18Xmw0Q61V8wdH-dfGafFqIBfRchQKUO8WAF3yJTvgyyZQ/viewform), + where we'll review your request for a new purchase option. +""" +enum SellingPlanCategory { + """ + The selling plan is for anything not in one of the other categories. + """ + OTHER + + """ + The selling plan is for pre-orders. + """ + PRE_ORDER + + """ + The selling plan is for subscriptions. + """ + SUBSCRIPTION + + """ + The selling plan is for try before you buy purchases. + """ + TRY_BEFORE_YOU_BUY +} + +""" +The amount charged at checkout when the full amount isn't charged at checkout. +""" +type SellingPlanCheckoutCharge { + """ + The charge type for the checkout charge. + """ + type: SellingPlanCheckoutChargeType! + + """ + The charge value for the checkout charge. + """ + value: SellingPlanCheckoutChargeValue! +} + +""" +The input fields that are required to create or update a checkout charge. +""" +input SellingPlanCheckoutChargeInput { + """ + The checkout charge type defined by the policy. + """ + type: SellingPlanCheckoutChargeType + + """ + The checkout charge value defined by the policy. + """ + value: SellingPlanCheckoutChargeValueInput +} + +""" +The percentage value of the price used for checkout charge. +""" +type SellingPlanCheckoutChargePercentageValue { + """ + The percentage value of the price used for checkout charge. + """ + percentage: Float! +} + +""" +The checkout charge when the full amount isn't charged at checkout. +""" +enum SellingPlanCheckoutChargeType { + """ + The checkout charge is a percentage of the product or variant price. + """ + PERCENTAGE + + """ + The checkout charge is a fixed price amount. + """ + PRICE +} + +""" +The portion of the price to be charged at checkout. +""" +union SellingPlanCheckoutChargeValue = MoneyV2 | SellingPlanCheckoutChargePercentageValue + +""" +The input fields required to create or update an checkout charge value. +""" +input SellingPlanCheckoutChargeValueInput { + """ + The fixed value for an checkout charge. + """ + fixedValue: Decimal + + """ + The percentage value. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple SellingPlans. +""" +type SellingPlanConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanEdge!]! + + """ + A list of nodes that are contained in SellingPlanEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlan!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver +every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, +pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanDeliveryPolicy = SellingPlanFixedDeliveryPolicy | SellingPlanRecurringDeliveryPolicy + +""" +The input fields that are required to create or update a delivery policy. +""" +input SellingPlanDeliveryPolicyInput { + """ + The fixed delivery policy details. + """ + fixed: SellingPlanFixedDeliveryPolicyInput + + """ + The recurring delivery policy details. + """ + recurring: SellingPlanRecurringDeliveryPolicyInput +} + +""" +An auto-generated type which holds one SellingPlan and a cursor during pagination. +""" +type SellingPlanEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanEdge. + """ + node: SellingPlan! +} + +""" +The fixed selling plan billing policy defines how much of the price of the product will be billed to customer +at checkout. If there is an outstanding balance, it determines when it will be paid. +""" +type SellingPlanFixedBillingPolicy { + """ + The checkout charge when the full amount isn't charged at checkout. + """ + checkoutCharge: SellingPlanCheckoutCharge! + + """ + The exact time when to capture the full payment. + """ + remainingBalanceChargeExactTime: DateTime + + """ + The period after remaining_balance_charge_trigger, before capturing the full payment. Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """ + When to capture payment for amount due. + """ + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger! +} + +""" +The input fields required to create or update a fixed billing policy. +""" +input SellingPlanFixedBillingPolicyInput { + """ + 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 { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + A buffer period for orders to be included in next fulfillment anchor. + """ + cutoff: Int + + """ + The date and time when the fulfillment should trigger. + """ + fulfillmentExactTime: DateTime + + """ + What triggers the fulfillment. The value must be one of ANCHOR, ASAP, EXACT_TIME, or UNKNOWN. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger! + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanFixedDeliveryPolicyIntent! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields required to create or update a fixed delivery policy. +""" +input SellingPlanFixedDeliveryPolicyInput { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + 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 { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behavior of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanFixedDeliveryPolicyPreAnchorBehavior { + """ + Orders placed can be fulfilled / delivered immediately. Orders placed inside a + cutoff can be fulfilled / delivered at the next anchor. + """ + ASAP + + """ + Orders placed can be fulfilled / delivered at the next anchor date. + Orders placed inside a cutoff will skip the next anchor and can be fulfilled / + delivered at the following anchor. + """ + NEXT +} + +""" +Represents the pricing policy of a subscription or deferred purchase option selling plan. +The selling plan fixed pricing policy works with the billing and delivery policy +to determine the final price. Discounts are divided among fulfillments. +For example, a subscription with a $10 discount and two deliveries will have a $5 +discount applied to each delivery. +""" +type SellingPlanFixedPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + The date and time when the fixed selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a fixed selling plan pricing policy. +""" +input SellingPlanFixedPricingPolicyInput { + """ + 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 +} + +""" +Describes what triggers fulfillment. +""" +enum SellingPlanFulfillmentTrigger { + """ + Use the anchor values to calculate fulfillment date. + """ + ANCHOR + + """ + As soon as possible. + """ + ASAP + + """ + At an exact time defined by the fulfillment_exact_time field. + """ + EXACT_TIME + + """ + Unknown. Usually to be determined in the future. + """ + UNKNOWN +} + +""" +Represents a selling method (for example, "Subscribe and save" or "Pre-paid"). Selling plan groups +and associated records (selling plans and policies) are deleted 48 hours after a merchant +uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later. +""" +type SellingPlanGroup implements HasPublishedTranslations & Node { + """ + The ID for app, exposed in Liquid and product JSON. + """ + appId: String + + """ + Whether the given product is directly associated to the selling plan group. + """ + appliesToProduct( + """ + The ID of the product. + """ + productId: ID! + ): Boolean! + + """ + Whether the given product variant is directly associated to the selling plan group. + """ + appliesToProductVariant( + """ + The ID of the product. + """ + productVariantId: ID! + ): Boolean! + + """ + Whether any of the product variants of the given product are associated to the selling plan group. + """ + appliesToProductVariants( + """ + The ID of the product. + """ + productId: ID! + ): Boolean! + + """ + The date and time when the selling plan group was created. + """ + createdAt: DateTime! + + """ + The merchant-facing description of the selling plan group. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The merchant-facing label of the selling plan group. + """ + merchantCode: String! + + """ + The buyer-facing label of the selling plan group. + """ + name: String! + + """ + The values of all options available on the selling plan group. Selling plans + are grouped together in Liquid when they're created by the same app, and have + the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + The relative position of the selling plan group for display. + """ + position: Int + + """ + Product variants associated to the selling plan group. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! + + """ + A count of product variants associated to the selling plan group. + """ + productVariantsCount( + """ + The ID of the product to scope the count to. + """ + productId: ID + ): Count + + """ + Products associated to the selling plan group. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + ): [Translation!]! +} + +""" +Return type for `sellingPlanGroupAddProductVariants` mutation. +""" +type SellingPlanGroupAddProductVariantsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupAddProducts` mutation. +""" +type SellingPlanGroupAddProductsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type for paginating through multiple SellingPlanGroups. +""" +type SellingPlanGroupConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanGroupEdge!]! + + """ + A list of nodes that are contained in SellingPlanGroupEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlanGroup!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `sellingPlanGroupCreate` mutation. +""" +type SellingPlanGroupCreatePayload { + """ + The created selling plan group object. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupDelete` mutation. +""" +type SellingPlanGroupDeletePayload { + """ + The ID of the deleted selling plan group object. + """ + deletedSellingPlanGroupId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. +""" +type SellingPlanGroupEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanGroupEdge. + """ + node: SellingPlanGroup! +} + +""" +The input fields required to create or update a selling plan group. +""" +input SellingPlanGroupInput { + """ + 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!] + + """ + List of selling plans to update. + """ + sellingPlansToUpdate: [SellingPlanInput!] +} + +""" +Return type for `sellingPlanGroupRemoveProductVariants` mutation. +""" +type SellingPlanGroupRemoveProductVariantsPayload { + """ + The removed product variant ids. + """ + removedProductVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupRemoveProducts` mutation. +""" +type SellingPlanGroupRemoveProductsPayload { + """ + The removed product ids. + """ + removedProductIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields for resource association with a Selling Plan Group. +""" +input SellingPlanGroupResourceInput { + """ + The IDs of the Products to add to the Selling Plan Group. + """ + productIds: [ID!] + + """ + The IDs of the Variants to add to the Selling Plan Group. + """ + productVariantIds: [ID!] +} + +""" +The set of valid sort keys for the SellingPlanGroup query. +""" +enum SellingPlanGroupSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by 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 +} + +""" +Return type for `sellingPlanGroupUpdate` mutation. +""" +type SellingPlanGroupUpdatePayload { + """ + The IDs of the deleted Subscription Plans. + """ + deletedSellingPlanIds: [ID!] + + """ + The updated Selling Plan Group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Represents a selling plan group custom error. +""" +type SellingPlanGroupUserError implements DisplayableError { + """ + The error code. + """ + code: SellingPlanGroupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `SellingPlanGroupUserError`. +""" +enum SellingPlanGroupUserErrorCode { + """ + 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 { + """ + 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 + + """ + 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 { + """ + Day interval. + """ + DAY + + """ + Month interval. + """ + MONTH + + """ + Week interval. + """ + WEEK + + """ + Year interval. + """ + YEAR +} + +""" +The selling plan inventory policy. +""" +type SellingPlanInventoryPolicy { + """ + When to reserve inventory for the order. + """ + reserve: SellingPlanReserve! +} + +""" +The input fields required to create or update an inventory policy. +""" +input SellingPlanInventoryPolicyInput { + """ + When to reserve inventory for the order. The value must be ON_FULFILLMENT or ON_SALE. + """ + reserve: SellingPlanReserve +} + +""" +Represents the type of pricing associated to the selling plan (for example, a $10 or 20% discount that is set +for a limited period or that is fixed for the duration of the subscription). Selling plan pricing policies and +associated records (selling plan groups, selling plans, billing policy, and delivery policy) are deleted 48 +hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need +to restore them later. +""" +union SellingPlanPricingPolicy = SellingPlanFixedPricingPolicy | SellingPlanRecurringPricingPolicy + +""" +Represents a selling plan pricing policy adjustment type. +""" +enum SellingPlanPricingPolicyAdjustmentType { + """ + 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 = MoneyV2 | SellingPlanPricingPolicyPercentageValue + +""" +Represents selling plan pricing policy common fields. +""" +interface SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! +} + +""" +The input fields required to create or update a selling plan pricing policy. +""" +input SellingPlanPricingPolicyInput { + """ + 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 { + """ + The percentage value. + """ + percentage: Float! +} + +""" +The input fields required to create or update a pricing policy adjustment value. +""" +input SellingPlanPricingPolicyValueInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The date and time when the selling plan delivery policy was created. + """ + createdAt: DateTime! + + """ + Number of days which represent a buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent! + + """ + The delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between deliveries. + """ + intervalCount: Int! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields to create or update a recurring delivery policy. +""" +input SellingPlanRecurringDeliveryPolicyInput { + """ + The 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 { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanRecurringDeliveryPolicyPreAnchorBehavior { + """ + The orders placed can be fulfilled or delivered immediately. The orders placed + inside a cutoff can be fulfilled or delivered at the next anchor. + """ + ASAP + + """ + The orders placed can be fulfilled or delivered at the next anchor date. + The orders placed inside a cutoff will skip the next anchor and can be fulfilled or + delivered at the following anchor. + """ + NEXT +} + +""" +Represents a recurring selling plan pricing policy. It applies after the fixed +pricing policy. By using the afterCycle parameter, you can specify the cycle +when the recurring pricing policy comes into effect. Recurring pricing policies +are not available for deferred purchase options. +""" +type SellingPlanRecurringPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + Cycle after which this pricing policy applies. + """ + afterCycle: Int + + """ + The date and time when the recurring selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a recurring selling plan pricing policy. +""" +input SellingPlanRecurringPricingPolicyInput { + """ + 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 +} + +""" +When to capture the payment for the remaining amount due. +""" +enum SellingPlanRemainingBalanceChargeTrigger { + """ + 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 + + """ + 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 { + """ + Reserve inventory when order is fulfilled. + """ + ON_FULFILLMENT + + """ + Reserve inventory at time of sale. + """ + ON_SALE +} + +""" +A server pixel stores configuration for streaming customer interactions to an EventBridge or PubSub endpoint. +""" +type ServerPixel implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The current state of this server pixel. + """ + status: ServerPixelStatus + + """ + Address of the EventBridge or PubSub endpoint. + """ + webhookEndpointAddress: String +} + +""" +Return type for `serverPixelCreate` mutation. +""" +type ServerPixelCreatePayload { + """ + The new server pixel. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `serverPixelDelete` mutation. +""" +type ServerPixelDeletePayload { + """ + The ID of the server pixel that was deleted, if one was deleted. + """ + deletedServerPixelId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +The current state of a server pixel. +""" +enum ServerPixelStatus { + """ + This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. + """ + CONNECTED + + """ + This server pixel is disconnected: 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 [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum ShippingDiscountClass { + """ + Combined as a shipping discount. + """ + SHIPPING +} + +""" +Represents the shipping details that the customer chose for their order. +""" +type ShippingLine { + """ + A reference to the carrier service that provided the rate. + Present when the rate was computed by a third-party carrier service. + """ + carrierIdentifier: String + + """ + A reference to the shipping method. + """ + code: String + + """ + 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 pre-tax shipping price without any discounts applied. + """ + originalPrice: MoneyV2! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The pre-tax shipping price without any discounts applied. + """ + originalPriceSet: MoneyBag! + + """ + The phone number at the shipping address. + """ + phone: String + + """ + Returns the price of the shipping line. + """ + price: Money! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The fulfillment service requested for the shipping method. + Present if the shipping method requires processing by a third party fulfillment service. + """ + requestedFulfillmentService: FulfillmentService @deprecated(reason: "requestedFulfillmentService is no longer in use. Order routing does not use the requestedFulfillmentService during order and fulfillment order creation.") + + """ + A unique identifier for the shipping rate. The format can change without notice and isn't meant to be shown to users. + """ + shippingRateHandle: String + + """ + Returns the rate source for the shipping line. + """ + source: String + + """ + The TaxLine objects connected to this shipping line. + """ + taxLines: [TaxLine!]! + + """ + Returns the title of the shipping line. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple ShippingLines. +""" +type ShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShippingLineEdge!]! + + """ + A list of nodes that are contained in ShippingLineEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShippingLine!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShippingLine and a cursor during pagination. +""" +type ShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShippingLineEdge. + """ + node: ShippingLine! +} + +""" +The input fields for specifying the shipping details for the draft order. + +> Note: +> A custom shipping line includes a title and price with `shippingRateHandle` +set to `nil`. A shipping line with a carrier-provided shipping rate (currently +set via the Shopify admin) includes the shipping rate handle. +""" +input ShippingLineInput { + """ + Price of the shipping rate in shop currency. + """ + price: Money @deprecated(reason: "`priceWithCurrency` should be used instead, where currencies can be specified.") + + """ + Price of the shipping rate with currency. If provided, `price` will be ignored. + """ + priceWithCurrency: MoneyInput + + """ + A unique identifier for the shipping rate. + """ + shippingRateHandle: String + + """ + Title of the shipping rate. + """ + title: String +} + +""" +A sale associated with a shipping charge. +""" +type ShippingLineSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + The shipping line item for the associated sale. `shippingLine` is not available if the `SaleActionType` is a return. + """ + shippingLine: ShippingLine + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The shipping method for the delivery. Customers will see applicable shipping methods in the shipping section of checkout. +""" +type ShippingMethod { + """ + A unique code associated with the rate. For example: `expedited_mail` + """ + code: String! + + """ + A description of the rate, which customers will see at checkout. + For example: `Local delivery`, `Free Express Worldwide`, `Includes tracking and insurance`. + """ + label: String! +} + +""" +Return type for `shippingPackageDelete` mutation. +""" +type ShippingPackageDeletePayload { + """ + The ID of the deleted shipping package. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shippingPackageMakeDefault` mutation. +""" +type ShippingPackageMakeDefaultPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Type of a shipping package. +""" +enum ShippingPackageType { + """ + A shipping box. + """ + BOX + + """ + 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 { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A shipping rate is an additional cost added to the cost of the products that were ordered. +""" +type ShippingRate { + """ + Human-readable unique identifier for this shipping rate. + """ + handle: String! + + """ + The cost associated with the shipping rate. + """ + price: MoneyV2! + + """ + The name of the shipping rate. + """ + title: String! +} + +""" +Represents the shipping costs refunded on the Refund. +""" +type ShippingRefund { + """ + The monetary value of the shipping fees to be refunded. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The monetary value of the shipping fees to be refunded in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The maximum amount of shipping fees currently refundable. + """ + maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") + + """ + The maximum amount of shipping fees currently refundable in shop and presentment currencies. + """ + maximumRefundableSet: MoneyBag! + + """ + The monetary value of the tax allocated to shipping fees to be refunded. + """ + tax: Money! @deprecated(reason: "Use `taxSet` instead.") + + """ + The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies. + """ + taxSet: MoneyBag! +} + +""" +The input fields that are required to reimburse shipping costs. +""" +input ShippingRefundInput { + """ + The monetary value of the shipping fees to be reimbursed. + """ + amount: Money + + """ + Whether a full refund is provided. + """ + fullRefund: Boolean +} + +""" +Represents a collection of general settings and information about the shop. +""" +type Shop implements HasMetafields & HasPublishedTranslations & Node { + """ + A list of the shop's active alert messages that appear in the Shopify admin. + """ + alerts: [ShopAlert!]! + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategories: [ProductCategory!]! @deprecated(reason: "Use `allProductCategoriesList` instead.") + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategoriesList: [TaxonomyCategory!]! + + """ + The token required to query the shop's reports or dashboards. + """ + analyticsToken: String! @deprecated(reason: "Not supported anymore.") + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders( + """ + The 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!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.assignedFulfillmentOrders` instead. Details: https:\/\/shopify.dev\/changelog\/moving-the-shop-assignedfulfillmentorders-connection-to-queryroot") + + """ + The list of sales channels not currently installed on the shop. + """ + availableChannelApps( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Return a collection by its handle. + """ + collectionByHandle( + """ + The handle of the collection. + """ + handle: String! + ): Collection @deprecated(reason: "Use `QueryRoot.collectionByHandle` instead. This will be removed in 2025-01.") + + """ + 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! @deprecated(reason: "Use `QueryRoot.collectionSavedSearches` instead. This will be removed in 2025-01.") + + """ + 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `provisionally_published` | | - + `product_publication_status:189769876-approved` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | published_status | string | Filter by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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! @deprecated(reason: "Use `QueryRoot.customerSavedSearches` instead. This will be removed in 2025-01.") + + """ + A list of tags that have been added to customer accounts. + """ + customerTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! + + """ + Customer accounts associated to the shop. + """ + customers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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.") + + """ + 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! @deprecated(reason: "Use `QueryRoot.draftOrderSavedSearches` instead. This will be removed in 2025-01.") + + """ + 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! + + """ + List of saved draft orders on the shop. + """ + 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! @deprecated(reason: "Removed as of 2026-01. Use `QueryRoot.draftOrders` instead.") + + """ + The shop owner's email address. + Shopify will use this email address to communicate with the shop owner. + """ + email: String! + + """ + The presentment currencies enabled for the shop. + """ + enabledPresentmentCurrencies: [CurrencyCode!]! + + """ + The 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 | + | 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.") + + """ + List of a shop's marketing events. + """ + 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! @deprecated(reason: "Use `QueryRoot.marketingEvents` instead. This will be removed in 2025-01.") + + """ + Whether SMS marketing has been enabled on the shop's checkout configuration settings. + """ + marketingSmsConsentEnabledAtCheckout: Boolean! + + """ + The approval signals for a shop to support onboarding to channel apps. + """ + merchantApprovalSignals: MerchantApprovalSignals + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The shop's .myshopify.com domain name. + """ + myshopifyDomain: String! + + """ + The shop's name. + """ + name: String! + + """ + The shop's settings related to navigation. + """ + navigationSettings: [NavigationItem!]! + + """ + The prefix that appears before order numbers. + """ + orderNumberFormatPrefix: String! + + """ + The suffix that appears after order numbers. + """ + orderNumberFormatSuffix: String! + + """ + List of the shop's order saved searches. + """ + 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! @deprecated(reason: "Use `QueryRoot.orderSavedSearches` instead. This will be removed in 2025-01.") + + """ + A list of tags that have been added to orders. + """ + orderTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + Sort type. + """ + sort: ShopTagSort = ALPHABETICAL + ): StringConnection! + + """ + A list of the shop's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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` | + | 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` | + | 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` | + | 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! + + """ + List of the shop's price rule saved searches. + """ + priceRuleSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! @deprecated(reason: "Use `QueryRoot.priceRuleSavedSearches` instead. This will be removed in 2024-10.") + + """ + List of the shop’s price rules. + """ + priceRules( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | created_at | time | + | discount_type | string | + | ends_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | starts_at | time | + | status | string | + | times_used | integer | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PriceRuleSortKeys = ID + ): PriceRuleConnection! @deprecated(reason: "Use `QueryRoot.priceRules` instead. This will be removed in 2024-10.") + + """ + The primary domain of the shop's online store. + """ + primaryDomain: Domain! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + Return a product by its 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 `QueryRoot.productByHandle` instead. This will be removed in 2025-01.") + + """ + 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.") + + """ + 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! @deprecated(reason: "Use `QueryRoot.productSavedSearches` instead. This will be removed in 2025-01.") + + """ + A list of tags that have been added to products. + """ + productTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTags` instead.") + + """ + The list of types added to products. + """ + productTypes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTypes` instead.") + + """ + List of the shop's product variants. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | published_status | string | Filter by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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 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.") + + """ + 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` | + | 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 the publication 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#app-price) + (`Channel.app.id`) and one of the valid values. | - `approved`
- + `rejected`
- `needs_action`
- `awaiting_review`
- + `published`
- `demoted`
- `scheduled`
- + `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` | + | publishable_status | string | Filter by the publishable status of the + resource on a channel, such as the online store. The value is a composite of + either the [channel `app` + ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) + (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) + and one of the valid values. | - `online_store_channel`
- + `published`
- `unpublished`
- `visible`
- `unavailable`
+ - `hidden`
- `intended`
- `visible` | | - + `publishable_status:published`
- + `publishable_status:189769876-visible`
- + `publishable_status:pos-hidden` | + | 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 by the published status of the resource + on a channel, such as the online store. | - `unset`
- `pending`
- + `approved`
- `not approved` | | - `published_status:approved` | + | 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` | + | 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'` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 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 + ): [Translation!]! + + """ + The shop's unit system for weights and measures. + """ + unitSystem: UnitSystem! + + """ + The date and time when the shop was last updated. + """ + updatedAt: DateTime! + + """ + Fetches a list of images uploaded to the shop by their IDs. + """ + uploadedImagesByIds( + """ + The IDs of the uploaded images. + """ + imageIds: [ID!]! + ): [Image!]! @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. This will be removed in 2025-01.") + + """ + The URL of the shop's online store. + """ + url: URL! + + """ + The shop's primary unit of weight for products and shipping. + """ + weightUnit: WeightUnit! +} + +""" +An address for a shop. +""" +type ShopAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company or organization. + """ + company: String + + """ + Whether the address coordinates are valid. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name. + """ + firstName: String @deprecated(reason: "Always null in this context.") + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """ + Whether to include the company in the formatted address. + """ + withCompany: Boolean = true + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name. + """ + lastName: String @deprecated(reason: "Always null in this context.") + + """ + The latitude coordinate of the address. + """ + latitude: Float + + """ + The longitude coordinate of the address. + """ + longitude: Float + + """ + The full name, based on firstName and lastName. + """ + name: String @deprecated(reason: "Always null in this context.") + + """ + A phone number associated with the address. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +setting, with an action to take. For example, you could show an alert to ask the +merchant to enter their billing information to activate Shopify Plus. +""" +type ShopAlert { + """ + The text for the button in the alert that links to related information. For example, _Add credit card_. + """ + action: ShopAlertAction! + + """ + A description of the alert and further information, such as whether the merchant will be charged. + """ + description: String! +} + +""" +An action associated to a shop alert, such as adding a credit card. +""" +type ShopAlertAction { + """ + The text for the button in the alert. For example, _Add credit card_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +Billing preferences for the shop. +""" +type ShopBillingPreferences { + """ + The currency the shop uses to pay for apps and services. + """ + currency: CurrencyCode! +} + +""" +Possible branding of a shop. +Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin. +""" +enum ShopBranding { + """ + Shop has 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 { + DISABLED + OPTIONAL + REQUIRED +} + +""" +Represents the feature set available to the shop. +Most fields specify whether a feature is enabled for a shop, and some fields return information +related to specific features. +""" +type ShopFeatures { + """ + Whether a shop has access to Avalara AvaTax. + """ + avalaraAvatax: Boolean! + + """ + The branding of the shop, which influences its look and feel in the Shopify admin. + """ + branding: ShopBranding! + + """ + Represents the Bundles feature configuration for the shop. + """ + bundles: BundlesFeature! + + """ + Whether a shop's online store can have CAPTCHA protection. + """ + captcha: Boolean! + + """ + Whether a shop's online store can have CAPTCHA protection for domains not managed by Shopify. + """ + captchaExternalDomains: Boolean! @deprecated(reason: "No longer required for external domains") + + """ + Represents the cart transform feature configuration for the shop. + """ + cartTransform: CartTransformFeature! + + """ + Whether the delivery profiles functionality is enabled for this shop. + """ + deliveryProfiles: Boolean! @deprecated(reason: "Delivery profiles are now 100% enabled across Shopify.") + + """ + Whether a shop has access to the Google Analytics dynamic remarketing feature. + """ + dynamicRemarketing: Boolean! + + """ + Whether a shop can be migrated to use Shopify subscriptions. + """ + eligibleForSubscriptionMigration: Boolean! + + """ + Whether a shop is configured properly to sell subscriptions. + """ + eligibleForSubscriptions: Boolean! + + """ + Whether a shop can create gift cards. + """ + giftCards: Boolean! + + """ + Whether a shop displays Harmonized System codes on products. This is used for customs when shipping + internationally. + """ + harmonizedSystemCode: Boolean! + + """ + Whether a shop can enable international domains. + """ + internationalDomains: Boolean! @deprecated(reason: "All shops have international domains through Shopify Markets.") + + """ + Whether a shop can enable international price overrides. + """ + internationalPriceOverrides: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop can enable international price rules. + """ + internationalPriceRules: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop has enabled a legacy subscription gateway to handle older subscriptions. + """ + legacySubscriptionGatewayEnabled: Boolean! + + """ + Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial + or don't have a storefront. + """ + liveView: Boolean! + + """ + Whether a shop has multi-location functionality. + """ + multiLocation: Boolean! @deprecated(reason: "All shops support multi-location inventory. Use `QueryRoot.locations` to determine whether shop has more than one location. This will be removed in 2025-01.\n") + + """ + 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 using Shopify Balance. + """ + usingShopifyBalance: Boolean! +} + +""" +A locale that's been enabled on a shop. +""" +type ShopLocale { + """ + The locale ISO code. + """ + locale: String! + + """ + The market web presences that use the locale. + """ + marketWebPresences: [MarketWebPresence!]! + + """ + The human-readable locale name. + """ + name: String! + + """ + Whether the locale is the default locale for the shop. + """ + primary: Boolean! + + """ + Whether the locale is visible to buyers. + """ + published: Boolean! +} + +""" +Return type for `shopLocaleDisable` mutation. +""" +type ShopLocaleDisablePayload { + """ + ISO code of the locale that was deleted. + """ + locale: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shopLocaleEnable` mutation. +""" +type ShopLocaleEnablePayload { + """ + ISO code of the locale that was enabled. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a shop locale. +""" +input ShopLocaleInput { + """ + 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!] + + """ + Whether the locale is published. Only published locales are visible to the buyer. + """ + published: Boolean +} + +""" +Return type for `shopLocaleUpdate` mutation. +""" +type ShopLocaleUpdatePayload { + """ + The locale that was updated. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Shop Pay Installments payment details related to a transaction. +""" +type ShopPayInstallmentsPaymentDetails implements BasePaymentDetails { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +The billing plan of the shop. +""" +type ShopPlan { + """ + The name of the shop's billing plan. + """ + displayName: String! @deprecated(reason: "Use `publicDisplayName` instead.") + + """ + Whether the shop is a partner development shop for testing purposes. + """ + partnerDevelopment: Boolean! + + """ + Whether the shop has a Shopify Plus subscription. + """ + shopifyPlus: Boolean! +} + +""" +Policy that a merchant has configured for their store, such as their refund or privacy policy. +""" +type ShopPolicy implements HasPublishedTranslations & Node { + """ + The text of the policy. The maximum size is 512kb. + """ + body: HTML! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was created. + """ + createdAt: Date! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The translated title of the policy. For example, Refund Policy or Politique de remboursement. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The shop policy type. + """ + type: ShopPolicyType! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was last modified. + """ + updatedAt: Date! + + """ + The public URL of the policy. + """ + url: URL! +} + +""" +Possible error codes that can be returned by `ShopPolicyUserError`. +""" +enum ShopPolicyErrorCode { + """ + The input value is too big. + """ + TOO_BIG +} + +""" +The input fields required to update a policy. +""" +input ShopPolicyInput { + """ + Policy text, maximum size of 512kb. + """ + body: String! + + """ + The shop policy type. + """ + type: ShopPolicyType! +} + +""" +Available shop policy types. +""" +enum ShopPolicyType { + """ + 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 { + """ + The shop policy that has been updated. + """ + shopPolicy: ShopPolicy + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopPolicyUserError!]! +} + +""" +An error that occurs during the execution of a shop policy mutation. +""" +type ShopPolicyUserError implements DisplayableError { + """ + The error code. + """ + code: ShopPolicyErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `shopResourceFeedbackCreate` mutation. +""" +type ShopResourceFeedbackCreatePayload { + """ + The shop feedback that's created. + """ + feedback: AppFeedback + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopResourceFeedbackCreate`. +""" +type ShopResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopResourceFeedbackCreateUserError`. +""" +enum ShopResourceFeedbackCreateUserErrorCode { + """ + The 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 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 { + """ + Maximum number of locations allowed. + """ + locationLimit: Int! + + """ + Maximum number of product options allowed. + """ + maxProductOptions: Int! + + """ + The maximum number of variants allowed per product. + """ + maxProductVariants: Int! + + """ + Whether the shop has reached the limit of the number of URL redirects it can make for resources. + """ + redirectLimitReached: Boolean! +} + +""" +Possible sort of tags. +""" +enum ShopTagSort { + """ + Alphabetical sort. + """ + ALPHABETICAL + + """ + Popularity sort. + """ + POPULAR +} + +""" +A Shopify Function. +""" +type ShopifyFunction { + """ + The API type of the Shopify Function. + """ + apiType: String! + + """ + The API version of the Shopify Function. + """ + apiVersion: String! + + """ + The app that owns the Shopify Function. + """ + app: App! + + """ + The App Bridge information for the Shopify Function. + """ + appBridge: FunctionsAppBridge! + + """ + The client ID of the app that owns the Shopify Function. + """ + appKey: String! + + """ + The description of the Shopify Function. + """ + description: String + + """ + The ID of the Shopify Function. + """ + id: String! + + """ + The input query of the Shopify Function. + """ + inputQuery: String + + """ + The title of the Shopify Function. + """ + title: String! + + """ + If the Shopify Function uses the creation UI in the Admin. + """ + useCreationUi: Boolean! +} + +""" +An auto-generated type for paginating through multiple ShopifyFunctions. +""" +type ShopifyFunctionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyFunctionEdge!]! + + """ + A list of nodes that are contained in ShopifyFunctionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShopifyFunction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyFunction and a cursor during pagination. +""" +type ShopifyFunctionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyFunctionEdge. + """ + node: ShopifyFunction! +} + +""" +Balance and payout information for a +[Shopify Payments](https://help.shopify.com/manual/payments/shopify-payments/getting-paid-with-shopify-payments) +account. Balance includes all balances for the currencies supported by the shop. +You can also query for a list of payouts, where each payout includes the corresponding currencyCode field. +""" +type ShopifyPaymentsAccount implements Node @accessRestricted(reason: "Requires the `read_shopify_payments` or `read_shopify_payments_accounts` approval 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The fraud settings of the Shopify Payments account. + """ + fraudSettings: ShopifyPaymentsFraudSettings! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The notifications settings for the account. + """ + notificationSettings: ShopifyPaymentsNotificationSettings! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 permitted documents for identity verification. + """ + permittedVerificationDocuments: [ShopifyPaymentsVerificationDocument!]! + + """ + The verifications necessary for this account. + """ + verifications: [ShopifyPaymentsVerification!]! +} + +""" +The adjustment order object. +""" +type ShopifyPaymentsAdjustmentOrder { + """ + The amount of the adjustment order. + """ + amount: MoneyV2! + + """ + The link to the adjustment order. + """ + link: URL! + + """ + The name of the adjustment order. + """ + name: String! + + """ + The ID of the order transaction. + """ + orderTransactionId: BigInt! +} + +""" +The order associated to the balance transaction. +""" +type ShopifyPaymentsAssociatedOrder { + """ + The ID of the associated order. + """ + id: ID! + + """ + The name of the associated order. + """ + name: String! +} + +""" +A transaction that contributes to a Shopify Payments account balance. +""" +type ShopifyPaymentsBalanceTransaction implements Node { + """ + The reason for the adjustment that's associated with the transaction. + If the source_type isn't an adjustment, the value will be null. + """ + adjustmentReason: String + + """ + The adjustment orders associated to the transaction. + """ + adjustmentsOrders: [ShopifyPaymentsAdjustmentOrder!]! + + """ + The amount contributing to the balance transaction. + """ + amount: MoneyV2! + + """ + The associated order for the balance transaction. + """ + associatedOrder: ShopifyPaymentsAssociatedOrder + + """ + Payout assoicated with the transaction. + """ + associatedPayout: ShopifyPaymentsBalanceTransactionAssociatedPayout! + + """ + The fee amount contributing to the balance transaction. + """ + fee: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The net amount contributing to the merchant's balance. + """ + net: MoneyV2! + + """ + The ID of the resource leading to the transaction. + """ + sourceId: BigInt + + """ + The id of the + [Order Transaction](https://shopify.dev/docs/admin-api/rest/reference/orders/transaction) + + that resulted in this balance transaction. + """ + sourceOrderTransactionId: BigInt + + """ + The source type of the balance transaction. + """ + sourceType: ShopifyPaymentsSourceType + + """ + Wether the tranaction was created in test mode. + """ + test: Boolean! + + """ + The date and time when the balance transaction was processed. + """ + transactionDate: DateTime! + + """ + The type of transaction. + """ + type: ShopifyPaymentsTransactionType! +} + +""" +The payout associated with a balance transaction. +""" +type ShopifyPaymentsBalanceTransactionAssociatedPayout { + """ + The ID of the payout associated with the balance transaction. + """ + id: ID + + """ + The status of the payout associated with the balance transaction. + """ + status: ShopifyPaymentsBalanceTransactionPayoutStatus +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBalanceTransactions. +""" +type ShopifyPaymentsBalanceTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBalanceTransactionEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBalanceTransactionEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsBalanceTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBalanceTransaction and a cursor during pagination. +""" +type ShopifyPaymentsBalanceTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBalanceTransactionEdge. + """ + node: ShopifyPaymentsBalanceTransaction! +} + +""" +The payout status of the balance transaction. +""" +enum ShopifyPaymentsBalanceTransactionPayoutStatus { + """ + The 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 { + """ + The account number of the bank account. + """ + accountNumber: String! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 routing number of the bank account. + """ + routingNumber: String! + + """ + The status of the bank account. + """ + status: ShopifyPaymentsBankAccountStatus! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. +""" +type ShopifyPaymentsBankAccountConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBankAccountEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBankAccountEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsBankAccount!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination. +""" +type ShopifyPaymentsBankAccountEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBankAccountEdge. + """ + node: ShopifyPaymentsBankAccount! +} + +""" +The bank account status. +""" +enum ShopifyPaymentsBankAccountStatus { + """ + A 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 charge descriptors for a payments account. +""" +interface ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +The charge descriptors for a payments account. +""" +type ShopifyPaymentsDefaultChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. +""" +type ShopifyPaymentsDispute implements LegacyInteroperability & Node { + """ + The total amount disputed by the cardholder. + """ + amount: MoneyV2! + + """ + The deadline for evidence submission. + """ + evidenceDueBy: Date + + """ + The date when evidence was sent. Returns null if evidence hasn't yet been sent. + """ + evidenceSentOn: Date + + """ + The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. + """ + finalizedOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date when this dispute was initiated. + """ + initiatedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The order that contains the charge that's under dispute. + """ + order: Order + + """ + The reason of the dispute. + """ + reasonDetails: ShopifyPaymentsDisputeReasonDetails! + + """ + The current state of the dispute. + """ + status: DisputeStatus! + + """ + Indicates if this dispute is still in the inquiry phase or has turned into a chargeback. + """ + type: DisputeType! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsDisputes. +""" +type ShopifyPaymentsDisputeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsDisputeEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsDisputeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsDispute!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination. +""" +type ShopifyPaymentsDisputeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsDisputeEdge. + """ + node: ShopifyPaymentsDispute! +} + +""" +The evidence associated with the dispute. +""" +type ShopifyPaymentsDisputeEvidence implements Node { + """ + The activity logs associated with the dispute evidence. + """ + accessActivityLog: String + + """ + The billing address that's provided by the customer. + """ + billingAddress: MailingAddress + + """ + The cancellation policy disclosure associated with the dispute evidence. + """ + cancellationPolicyDisclosure: String + + """ + The cancellation policy file associated with the dispute evidence. + """ + cancellationPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The cancellation rebuttal associated with the dispute evidence. + """ + cancellationRebuttal: String + + """ + The customer communication file associated with the dispute evidence. + """ + customerCommunicationFile: ShopifyPaymentsDisputeFileUpload + + """ + The customer's email address. + """ + customerEmailAddress: String + + """ + The customer's first name. + """ + customerFirstName: String + + """ + The customer's last name. + """ + customerLastName: String + + """ + The customer purchase ip for this dispute evidence. + """ + customerPurchaseIp: String + + """ + The dispute associated with the evidence. + """ + dispute: ShopifyPaymentsDispute! + + """ + The file uploads associated with the dispute evidence. + """ + disputeFileUploads: [ShopifyPaymentsDisputeFileUpload!]! + + """ + The fulfillments associated with the dispute evidence. + """ + fulfillments: [ShopifyPaymentsDisputeFulfillment!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The product description for this dispute evidence. + """ + productDescription: String + + """ + The refund policy disclosure associated with the dispute evidence. + """ + refundPolicyDisclosure: String + + """ + The refund policy file associated with the dispute evidence. + """ + refundPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The refund refusal explanation associated with dispute evidence. + """ + refundRefusalExplanation: String + + """ + The service documentation file associated with the dispute evidence. + """ + serviceDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + The mailing address for shipping that's provided by the customer. + """ + shippingAddress: MailingAddress + + """ + The shipping documentation file associated with the dispute evidence. + """ + shippingDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + Whether the dispute evidence is submitted. + """ + submitted: Boolean! + + """ + The uncategorized file associated with the dispute evidence. + """ + uncategorizedFile: ShopifyPaymentsDisputeFileUpload + + """ + The uncategorized text for the dispute evidence. + """ + uncategorizedText: String +} + +""" +The possible dispute evidence file types. +""" +enum ShopifyPaymentsDisputeEvidenceFileType { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Whether to delete this file upload. + """ + destroy: Boolean = false + + """ + The ID of the file upload to be updated. + """ + id: ID! +} + +""" +The fulfillment associated with dispute evidence. +""" +type ShopifyPaymentsDisputeFulfillment implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The shipping carrier for this fulfillment. + """ + shippingCarrier: String + + """ + The shipping date for this fulfillment. + """ + shippingDate: Date + + """ + The shipping tracking number for this fulfillment. + """ + shippingTrackingNumber: String +} + +""" +The reason for the dispute provided by the cardholder's bank. +""" +enum ShopifyPaymentsDisputeReason { + """ + The 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 { + """ + The raw code provided by the payment network. + """ + networkReasonCode: String + + """ + The reason for the dispute provided by the cardholder's banks. + """ + reason: ShopifyPaymentsDisputeReason! +} + +""" +Presents all Shopify Payments information related to an extended authorization. +""" +type ShopifyPaymentsExtendedAuthorization { + """ + The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment. + """ + extendedAuthorizationExpiresAt: DateTime! + + """ + The time after which capture will incur an additional fee. + """ + standardAuthorizationExpiresAt: DateTime! +} + +""" +The fraud settings of a payments account. +""" +type ShopifyPaymentsFraudSettings { + """ + Decline a charge if there's an AVS failure. + """ + declineChargeOnAvsFailure: Boolean! + + """ + Decline a charge if there's an CVC failure. + """ + declineChargeOnCvcFailure: Boolean! +} + +""" +The charge descriptors for a Japanese payments account. +""" +type ShopifyPaymentsJpChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The charge statement descriptor in kana. + """ + kana: String + + """ + The charge statement descriptor in kanji. + """ + kanji: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +The notification settings for the account. +""" +type ShopifyPaymentsNotificationSettings { + """ + Receive email notifications when new payouts are sent or payouts fail. + """ + payouts: Boolean! +} + +""" +Payouts represent the movement of money between a merchant's Shopify +Payments balance and their bank account. +""" +type ShopifyPaymentsPayout implements LegacyInteroperability & Node { + """ + The bank account for the payout. + """ + bankAccount: ShopifyPaymentsBankAccount @deprecated(reason: "Use `destinationAccount` instead.") + + """ + The total amount and currency of the payout. + """ + gross: MoneyV2! @deprecated(reason: "Use `net` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The exact time when the payout was issued. The payout only contains + balance transactions that were available at this time. + """ + issuedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The total amount and currency of the payout. + """ + net: MoneyV2! + + """ + The transfer status of the payout. + """ + status: ShopifyPaymentsPayoutStatus! + + """ + The summary of the payout. + """ + summary: ShopifyPaymentsPayoutSummary! + + """ + The direction of the payout. + """ + transactionType: ShopifyPaymentsPayoutTransactionType! +} + +""" +Return type for `shopifyPaymentsPayoutAlternateCurrencyCreate` mutation. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreatePayload { + """ + The resulting alternate currency payout created. + """ + payout: ShopifyPaymentsToolingProviderPayout + + """ + Whether the alternate currency payout was created successfully. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopifyPaymentsPayoutAlternateCurrencyCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopifyPaymentsPayoutAlternateCurrencyCreate`. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopifyPaymentsPayoutAlternateCurrencyCreateUserError`. +""" +enum ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsPayoutEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsPayoutEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShopifyPaymentsPayout!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination. +""" +type ShopifyPaymentsPayoutEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsPayoutEdge. + """ + node: ShopifyPaymentsPayout! +} + +""" +The interval at which payouts are sent to the connected bank account. +""" +enum ShopifyPaymentsPayoutInterval { + """ + Each business day. + """ + DAILY + + """ + 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 { + """ + The interval at which payouts are sent to the connected bank account. + """ + interval: ShopifyPaymentsPayoutInterval! + + """ + The day of the month funds will be paid out. + + The value can be any day of the month from the 1st to the 31st. + If the payment interval is set to monthly, this value will be used. + Payouts scheduled between 29-31st of the month are sent on the last day of shorter months. + """ + monthlyAnchor: Int + + """ + The day of the week funds will be paid out. + + The value can be any weekday from Monday to Friday. + If the payment interval is set to weekly, this value will be used. + """ + weeklyAnchor: DayOfTheWeek +} + +""" +The transfer status of the payout. +""" +enum ShopifyPaymentsPayoutStatus { + """ + The payout has been 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 { + """ + Total fees for all adjustments including disputes. + """ + adjustmentsFee: MoneyV2! + + """ + Total gross amount for all adjustments including disputes. + """ + adjustmentsGross: MoneyV2! + + """ + Total fees for all charges. + """ + chargesFee: MoneyV2! + + """ + Total gross amount for all charges. + """ + chargesGross: MoneyV2! + + """ + Total fees for all refunds. + """ + refundsFee: MoneyV2! + + """ + Total gross amount for all refunds. + """ + refundsFeeGross: MoneyV2! + + """ + Total fees for all reserved funds. + """ + reservedFundsFee: MoneyV2! + + """ + Total gross amount for all reserved funds. + """ + reservedFundsGross: MoneyV2! + + """ + Total fees for all retried payouts. + """ + retriedPayoutsFee: MoneyV2! + + """ + Total gross amount for all retried payouts. + """ + retriedPayoutsGross: MoneyV2! +} + +""" +The possible transaction types for a payout. +""" +enum ShopifyPaymentsPayoutTransactionType { + """ + The payout is a deposit. + """ + DEPOSIT + + """ + The payout is a withdrawal. + """ + WITHDRAWAL +} + +""" +Presents all Shopify Payments specific information related to an order refund. +""" +type ShopifyPaymentsRefundSet { + """ + The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. + """ + acquirerReferenceNumber: String +} + +""" +The possible source types for a balance transaction. +""" +enum ShopifyPaymentsSourceType { + """ + The adjustment 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 +} + +""" +Relevant reference information for an alternate currency payout. +""" +type ShopifyPaymentsToolingProviderPayout { + """ + The balance amount the alternate currency payout was created for. + """ + amount: MoneyV2! + + """ + A timestamp for the arrival of the alternate currency payout. + """ + arrivalDate: DateTime + + """ + A timestamp for the creation of the alternate currency payout. + """ + createdAt: DateTime + + """ + The currency alternate currency payout was created in. + """ + currency: String! + + """ + The remote ID for the alternate currency payout. + """ + remoteId: String! +} + +""" +Presents all Shopify Payments specific information related to an order transaction. +""" +type ShopifyPaymentsTransactionSet { + """ + Contains all fields related to an extended authorization. + """ + extendedAuthorizationSet: ShopifyPaymentsExtendedAuthorization + + """ + Contains all fields related to a refund. + """ + refundSet: ShopifyPaymentsRefundSet +} + +""" +The possible types of transactions. +""" +enum ShopifyPaymentsTransactionType { + """ + The ach_bank_failure_debit_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_FEE + + """ + The ach_bank_failure_debit_reversal_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_REVERSAL_FEE + + """ + The 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 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 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 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 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 promotion_credit transaction type. + """ + PROMOTION_CREDIT + + """ + The promotion_credit_reversal transaction type. + """ + PROMOTION_CREDIT_REVERSAL + + """ + 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 +} + +""" +Each subject (individual) of an account has a verification object giving + information about the verification state. +""" +type ShopifyPaymentsVerification implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The status of the verification. + """ + status: ShopifyPaymentsVerificationStatus! + + """ + The subject/individual who has to be verified. + """ + subject: ShopifyPaymentsVerificationSubject! +} + +""" +A document which can be used to verify an individual. +""" +type ShopifyPaymentsVerificationDocument { + """ + True if the back side of the document is required. + """ + backRequired: Boolean! + + """ + True if the front side of the document is required. + """ + frontRequired: Boolean! + + """ + The type of the document which can be used for verification. + """ + type: ShopifyPaymentsVerificationDocumentType! +} + +""" +The types of possible verification documents. +""" +enum ShopifyPaymentsVerificationDocumentType { + """ + The subject's driver's license. + """ + DRIVERS_LICENSE + + """ + A government's identification document of the subject. + """ + GOVERNMENT_IDENTIFICATION + + """ + The subject's passport. + """ + PASSPORT +} + +""" +The status of a verification. +""" +enum ShopifyPaymentsVerificationStatus { + """ + The verification request has been submitted but a response has not yet been given. + """ + PENDING + + """ + The verification has not yet been verified. + """ + UNVERIFIED + + """ + The verification has been verified. + """ + VERIFIED +} + +""" +The verification subject represents an individual that has to be verified. +""" +type ShopifyPaymentsVerificationSubject { + """ + The family name of the individual to verify. + """ + familyName: String! + + """ + The given name of the individual to verify. + """ + givenName: String! +} + +""" +The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect. +""" +enum ShopifyProtectEligibilityStatus { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Represents the data about a staff member's Shopify account. Merchants can use +staff member data to get more information about the staff members in their store. +""" +type StaffMember implements Node { + """ + 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 staff member's initials, if available. + """ + initials: [String!] + + """ + Whether the staff member is the shop owner. + """ + isShopOwner: Boolean! + + """ + The staff member's last name. + """ + lastName: String + + """ + The staff member's preferred locale. Locale values use the format `language` + or `language-COUNTRY`, where `language` is a two-letter language code, and + `COUNTRY` is a two-letter country code. For example: `en` or `en-US` + """ + locale: String! + + """ + The staff member's full name. + """ + name: String! + + """ + The staff member's phone number. + """ + phone: String + + """ + The data used to customize the Shopify admin experience for the staff member. + """ + privateData: StaffMemberPrivateData! +} + +""" +An auto-generated type for paginating through multiple StaffMembers. +""" +type StaffMemberConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StaffMemberEdge!]! + + """ + A list of nodes that are contained in StaffMemberEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [StaffMember!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the fallback avatar image for a staff member. This is used only if the staff member has no avatar image. +""" +enum StaffMemberDefaultImage { + """ + Returns a default avatar image for the staff member. + """ + DEFAULT + + """ + Returns a 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of StaffMemberEdge. + """ + node: StaffMember! +} + +""" +Represents access permissions for a staff member. +""" +enum StaffMemberPermission { + """ + The staff member can manage and install apps and channels. + """ + APPLICATIONS + + """ + The staff member can manage and install sales channels. + """ + CHANNELS + + """ + The staff member can create and edit customers. + """ + CREATE_AND_EDIT_CUSTOMERS + + """ + The staff member can create and edit gift cards. + """ + CREATE_AND_EDIT_GIFT_CARDS + + """ + The staff member can view customers. + """ + CUSTOMERS + + """ + The staff member can view the Shopify Home page, which includes sales information and other shop data. + """ + DASHBOARD + + """ + The staff member can deactivate gift cards. + """ + DEACTIVATE_GIFT_CARDS + + """ + The staff member can delete customers. + """ + DELETE_CUSTOMERS + + """ + The staff member can view, buy, and manage domains. + """ + DOMAINS + + """ + The staff member can create, update, and delete draft orders. + """ + DRAFT_ORDERS + + """ + The staff member can update orders. + """ + EDIT_ORDERS + + """ + The staff member can erase customer private data. + """ + ERASE_CUSTOMER_DATA + + """ + The staff member can export customers. + """ + EXPORT_CUSTOMERS + + """ + The staff member can export gift cards. + """ + EXPORT_GIFT_CARDS + + """ + The staff has the same permissions as the [store owner](https://shopify.dev/en/manual/your-account/staff-accounts/staff-permissions#store-owner-permissions) + with some exceptions, such as modifying the account billing or deleting staff accounts. + """ + FULL @deprecated(reason: "Use the list of the staff member's explicit permissions returned in the `StaffMember.permissions.userPermissions` field instead of `full` permission.") + + """ + The staff member can view, create, issue, and export gift cards to a CSV file. + """ + GIFT_CARDS + + """ + The staff member can view and modify links and navigation menus. + """ + LINKS + + """ + The staff member can create, update, and delete locations where inventory is stocked or managed. + """ + LOCATIONS + + """ + The staff member can view and create discount codes and automatic discounts, and export discounts to a CSV file. + """ + MARKETING + + """ + The staff member can view, create, and automate marketing campaigns. + """ + MARKETING_SECTION + + """ + The staff member can merge customers. + """ + MERGE_CUSTOMERS + + """ + The staff member can view, create, update, delete, and cancel orders, and + receive order notifications. The staff member can still create draft orders + without this permission. + """ + ORDERS + + """ + The staff member can view the Overview and Live view pages, which include + sales information, and other shop and sales channels data. + """ + OVERVIEWS + + """ + The staff member can view, create, update, publish, and delete blog posts and pages. + """ + PAGES + + """ + The staff member can pay for an order by using a vaulted card. + """ + PAY_ORDERS_BY_VAULTED_CARD + + """ + The staff member can view the preferences and configuration of a shop. + """ + PREFERENCES + + """ + The staff member can view, create, import, and update products, collections, and inventory. + """ + PRODUCTS + + """ + The staff member can view and create all reports, which includes sales information and other shop data. + """ + REPORTS + + """ + The staff member can request customer private data. + """ + REQUEST_CUSTOMER_DATA + + """ + The staff member can view, update, and publish themes. + """ + THEMES + + """ + The staff member can view and create translations. + """ + TRANSLATIONS @deprecated(reason: "Unused.") +} + +""" +Represents the data used to customize the Shopify admin experience for a logged-in staff member. +""" +type StaffMemberPrivateData { + """ + The URL to the staff member's account settings page. + """ + accountSettingsUrl: URL! + + """ + The date and time when the staff member was created. + """ + createdAt: DateTime! + + """ + Access permissions for the staff member. + """ + permissions: [StaffMemberPermission!]! @deprecated(reason: "There's no alternative field to use instead.") +} + +""" +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 { + """ + 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 { + """ + 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 { + """ + The POST HTTP method. + """ + POST + + """ + The PUT HTTP method. + """ + PUT +} + +""" +The input fields for generating staged upload targets. +""" +input StagedUploadInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + The staged upload targets that were generated. + """ + stagedTargets: [StagedMediaUploadTarget!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `standardMetafieldDefinitionEnable` mutation. +""" +type StandardMetafieldDefinitionEnablePayload { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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! +} + +""" +Return type for `standardMetaobjectDefinitionEnable` mutation. +""" +type StandardMetaobjectDefinitionEnablePayload { + """ + The metaobject definition that was enabled using the standard template. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +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 { + """ + The product taxonomy node associated with the standardized product type. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +Provides the fields and values to use when adding a standard product type to a +product. The [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) +contains the full list of available values. +""" +input StandardizedProductTypeInput { + """ + The ID of the node in the Shopify taxonomy that represents the product type. + """ + productTaxonomyNodeId: ID! +} + +""" +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 { + """ + 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! + + """ + 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` | + | 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 { + """ + 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 { + """ + The amount to credit the store credit account. + """ + creditAmount: MoneyInput! + + """ + The date and time when the credit expires. + """ + expiresAt: DateTime +} + +""" +Return type for `storeCreditAccountCredit` mutation. +""" +type StoreCreditAccountCreditPayload { + """ + 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 { + """ + 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 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 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 { + """ + 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 { + """ + 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 { + """ + The amount to debit the store credit account. + """ + debitAmount: MoneyInput! +} + +""" +Return type for `storeCreditAccountDebit` mutation. +""" +type StoreCreditAccountDebitPayload { + """ + 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 { + """ + 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! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A debit transaction which decreases the store credit account balance. +""" +type StoreCreditAccountDebitTransaction implements Node & StoreCreditAccountTransaction { + """ + 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! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +An error that occurs during the execution of `StoreCreditAccountDebit`. +""" +type StoreCreditAccountDebitUserError implements DisplayableError { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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! +} + +""" +Interface for a store credit account transaction. +""" +interface StoreCreditAccountTransaction { + """ + 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! +} + +""" +An auto-generated type for paginating through multiple StoreCreditAccountTransactions. +""" +type StoreCreditAccountTransactionConnection { + """ + 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 { + """ + The position 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! +} + +""" +A token that's used to delegate unauthenticated access scopes to clients that need to access +the unauthenticated [Storefront API](https://shopify.dev/docs/api/storefront). + +An app can have a maximum of 100 active storefront access +tokens for each shop. + +[Get started with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started). +""" +type StorefrontAccessToken implements Node { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the storefront access token to delete. + """ + id: ID! +} + +""" +Return type for `storefrontAccessTokenDelete` mutation. +""" +type StorefrontAccessTokenDeletePayload { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StringEdge!]! + + """ + An object that’s used 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! +} + +""" +Represents an applied code discount. +""" +type SubscriptionAppliedCodeDiscount { + """ + 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 { + """ + 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 { + """ + 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. A successful billing attempt +will create an order. +""" +type SubscriptionBillingAttempt implements Node { + """ + 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 `processingError.code` instead to get the errorCode") + + """ + A message describing a payment error during processing. + """ + errorMessage: String @deprecated(reason: "Use `processingError.message` instead to get the errorMessage") + + """ + 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 + + """ + The result of this billing attempt if completed successfully. + """ + order: Order + + """ + 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 + + """ + Whether the billing attempt is still processing. + """ + ready: Boolean! + + """ + The subscription contract. + """ + subscriptionContract: SubscriptionContract! +} + +""" +An auto-generated type for paginating through multiple SubscriptionBillingAttempts. +""" +type SubscriptionBillingAttemptConnection { + """ + 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 { + """ + 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 { + """ + The position 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! +} + +""" +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 { + """ + The amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + There was an error during the authentication. + """ + AUTHENTICATION_ERROR + + """ + Payment method was canceled by buyer. + """ + BUYER_CANCELED_PAYMENT_METHOD + + """ + Card number was incorrect. + """ + CARD_NUMBER_INCORRECT + + """ + Customer is invalid. + """ + CUSTOMER_INVALID + + """ + Customer was not found. + """ + CUSTOMER_NOT_FOUND + + """ + 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 + + """ + Insufficient funds. + """ + INSUFFICIENT_FUNDS + + """ + Not enough inventory found. + """ + INSUFFICIENT_INVENTORY + + """ + The billing agreement ID or the transaction ID for the customer's payment method is invalid. + """ + INVALID_CUSTOMER_BILLING_AGREEMENT + + """ + Payment method is invalid. Please update or create a new payment method. + """ + INVALID_PAYMENT_METHOD + + """ + 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 + + """ + 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 provider is not enabled. + """ + PAYMENT_PROVIDER_IS_NOT_ENABLED + + """ + Paypal Error General. + """ + PAYPAL_ERROR_GENERAL + + """ + Purchase Type is not supported. + """ + PURCHASE_TYPE_NOT_SUPPORTED + + """ + Gateway is in test mode and attempted to bill a live payment method. + """ + TEST_MODE + + """ + Transient error, try again later. + """ + TRANSIENT_ERROR + + """ + There was an unexpected error during the billing attempt. + """ + UNEXPECTED_ERROR +} + +""" +The input fields required to complete a subscription billing attempt. +""" +input SubscriptionBillingAttemptInput { + """ + 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 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 set of valid sort keys for the SubscriptionBillingAttempts query. +""" +enum SubscriptionBillingAttemptsSortKeys { + """ + 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 subscription billing cycle. +""" +type SubscriptionBillingCycle { + """ + 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 { + """ + 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 { + """ + The billing cycle is billed. + """ + BILLED + + """ + The billing cycle hasn't been billed. + """ + UNBILLED +} + +""" +Return type for `subscriptionBillingCycleBulkCharge` mutation. +""" +type SubscriptionBillingCycleBulkChargePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the subscription contract associated with the billing cycle. + """ + contractId: ID! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Returns a billing cycle by date. + """ + date: DateTime + + """ + Returns a billing cycle by index. + """ + index: Int +} + +""" +Return type for `subscriptionBillingCycleSkip` mutation. +""" +type SubscriptionBillingCycleSkipPayload { + """ + 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 { + """ + 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionBillingCycleUnskip` mutation. +""" +type SubscriptionBillingCycleUnskipPayload { + """ + 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 { + """ + 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +The possible errors for a subscription billing cycle. +""" +type SubscriptionBillingCycleUserError implements DisplayableError { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Sort by the `cycle_index` value. + """ + CYCLE_INDEX + + """ + 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 +} + +""" +Select subscription billing cycles to be targeted. +""" +enum SubscriptionBillingCyclesTargetSelection { + """ + Target all current and upcoming subscription billing cycles. + """ + ALL +} + +""" +Represents a Subscription Billing Policy. +""" +type SubscriptionBillingPolicy { + """ + 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 { + """ + 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 +} + +""" +Represents a Subscription Contract. +""" +type SubscriptionContract implements Node & SubscriptionContractBase { + """ + 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 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 { + """ + 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 { + """ + 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! + + """ + 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! +} + +""" +Return type for `subscriptionContractAtomicCreate` mutation. +""" +type SubscriptionContractAtomicCreatePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! + + """ + The next billing date for the subscription contract. + """ + nextBillingDate: DateTime! +} + +""" +Return type for `subscriptionContractCreate` mutation. +""" +type SubscriptionContractCreatePayload { + """ + 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 { + """ + The position 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionContractExpire` mutation. +""" +type SubscriptionContractExpirePayload { + """ + 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 { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +The possible status values of the last payment on a subscription contract. +""" +enum SubscriptionContractLastPaymentStatus { + """ + Failed subscription billing attempt. + """ + FAILED + + """ + Successful subscription billing attempt. + """ + SUCCEEDED +} + +""" +Return type for `subscriptionContractPause` mutation. +""" +type SubscriptionContractPausePayload { + """ + 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 { + """ + The price of the product. + """ + currentPrice: Decimal + + """ + The ID of the product variant the subscription line refers to. + """ + productVariantId: ID +} + +""" +Return type for `subscriptionContractProductChange` mutation. +""" +type SubscriptionContractProductChangePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The error code. + """ + code: SubscriptionContractErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents a Subscription Line Pricing Cycle Adjustment. +""" +type SubscriptionCyclePriceAdjustment { + """ + 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 = 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 { + """ + 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 { + """ + The address to deliver to. + """ + address: SubscriptionMailingAddress! + + """ + 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 { + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The details of the pickup method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOptionInput +} + +""" +Represents the selected pickup option on a subscription contract. +""" +type SubscriptionDeliveryMethodPickupOption { + """ + 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 { + """ + 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! + + """ + 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 { + """ + The address to ship to. + """ + address: SubscriptionMailingAddress! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The carrier service ID of the shipping option. + """ + carrierServiceId: ID + + """ + 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 = SubscriptionLocalDeliveryOption | SubscriptionPickupOption | SubscriptionShippingOption + +""" +The result of the query to fetch delivery options for the subscription contract. +""" +union SubscriptionDeliveryOptionResult = SubscriptionDeliveryOptionResultFailure | SubscriptionDeliveryOptionResultSuccess + +""" +A failure to find the available delivery options for a subscription contract. +""" +type SubscriptionDeliveryOptionResultFailure { + """ + The reason for the failure. + """ + message: String +} + +""" +The delivery option for a subscription contract. +""" +type SubscriptionDeliveryOptionResultSuccess { + """ + The available delivery options. + """ + deliveryOptions: [SubscriptionDeliveryOption!]! +} + +""" +Represents a Subscription Delivery Policy. +""" +type SubscriptionDeliveryPolicy { + """ + 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 { + """ + 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 = SubscriptionAppliedCodeDiscount | SubscriptionManualDiscount + +""" +Represents what a particular discount reduces from a line price. +""" +type SubscriptionDiscountAllocation { + """ + Allocation amount. + """ + amount: MoneyV2! + + """ + Discount that created the allocation. + """ + discount: SubscriptionDiscount! +} + +""" +An auto-generated type for paginating through multiple SubscriptionDiscounts. +""" +type SubscriptionDiscountConnection { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + The percentage value of the discount. + """ + percentage: Int! +} + +""" +The reason a discount on a subscription draft was rejected. +""" +enum SubscriptionDiscountRejectionReason { + """ + 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 = 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + The current status of the subscription contract. + """ + status: SubscriptionContractSubscriptionStatus +} + +""" +Return type for `subscriptionDraftLineAdd` mutation. +""" +type SubscriptionDraftLineAddPayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Represents a Subscription Line. +""" +type SubscriptionLine { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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! + + """ + The quantity of the product. + """ + quantity: Int! + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + + Defaults to using the selling plan's current name when not specified. + """ + sellingPlanName: String +} + +""" +The input fields required to update a subscription line on a contract. +""" +input SubscriptionLineUpdateInput { + """ + 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 + + """ + The quantity of the product. + """ + quantity: Int + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + """ + sellingPlanName: String +} + +""" +A local delivery option for a subscription contract. +""" +type SubscriptionLocalDeliveryOption { + """ + 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! +} + +""" +Represents a Mailing Address on a Subscription. +""" +type SubscriptionMailingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + The last name of the customer. + """ + lastName: String + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Custom subscription discount. +""" +type SubscriptionManualDiscount { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the lines to add to the subscription discount. + """ + add: [ID!] + + """ + The ID of the lines to remove from the subscription discount. + """ + remove: [ID!] +} + +""" +The input fields for the discount value and its distribution. +""" +input SubscriptionManualDiscountValueInput { + """ + 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 +} + +""" +A pickup option to deliver a subscription contract. +""" +type SubscriptionPickupOption { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 = SubscriptionShippingOptionResultFailure | SubscriptionShippingOptionResultSuccess + +""" +Failure determining available shipping options for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultFailure { + """ + Failure reason. + """ + message: String +} + +""" +A shipping option for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultSuccess { + """ + Available shipping options. + """ + shippingOptions: [SubscriptionShippingOption!]! +} + +""" +A suggested transaction. Suggested transaction are usually used in the context of refunds +and exchanges. +""" +type SuggestedOrderTransaction { + """ + 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 +} + +""" +Specifies the kind of the suggested order transaction. +""" +enum SuggestedOrderTransactionKind { + """ + A suggested refund transaction for an order. + """ + SUGGESTED_REFUND +} + +""" +Represents a refund suggested by Shopify based on the items being reimbursed. +You can then use the suggested refund object to generate an actual refund. +""" +type SuggestedRefund { + """ + 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! + + """ + 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 order transactions. + """ + suggestedTransactions: [SuggestedOrderTransaction!]! + + """ + 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.") +} + +""" +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 { + """ + 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 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 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! +} + +""" +Return type for `tagsAdd` mutation. +""" +type TagsAddPayload { + """ + 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 { + """ + 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 { + """ + State of the tax app configuration. + """ + state: TaxPartnerState! +} + +""" +Return type for `taxAppConfigure` mutation. +""" +type TaxAppConfigurePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Represents a single tax applied to the associated line item. +""" +type TaxLine { + """ + Whether the channel that submitted the tax line is liable for remitting. A + value of null indicates unknown liability for this tax line. + """ + 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 name of the tax. + """ + title: String! +} + +""" +State of the tax app configuration. +""" +enum TaxPartnerState { + """ + 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 +} + +""" +The Taxonomy resource lets you access the categories, attributes and values of a taxonomy tree. +""" +type Taxonomy { + """ + Returns the categories of the product taxonomy based on the arguments provided. + If a `search` argument is provided, then all categories that match the search query globally are returned. + If a `children_of` argument is provided, then all children of the specified category are returned. + If a `siblings_of` argument is provided, then all siblings of the specified category are returned. + If a `decendents_of` argument is provided, then all descendents of the specified category are returned. + If no arguments are provided, then all the top-level categories of the taxonomy are returned. + """ + 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 + + """ + The ID of the category associated with the descendant categories to return. + """ + descendantsOf: ID + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The 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 + ): TaxonomyCategoryConnection! +} + +""" +A Shopify product taxonomy attribute. +""" +type TaxonomyAttribute implements Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The details of a specific product category within the [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). +""" +type TaxonomyCategory implements Node { + """ + 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 = TaxonomyAttribute | TaxonomyChoiceListAttribute | TaxonomyMeasurementAttribute + +""" +An auto-generated type for paginating through multiple TaxonomyCategoryAttributes. +""" +type TaxonomyCategoryAttributeConnection { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + The amount and currency of the tender transaction. + """ + amount: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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 { + """ + 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 { + """ + 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 = TenderTransactionCreditCardDetails + +""" +An auto-generated type which holds one TenderTransaction and a cursor during pagination. +""" +type TenderTransactionEdge { + """ + The position 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! +} + +""" +A sale associated with a tip. +""" +type TipSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line item for the associated sale. + """ + lineItem: LineItem! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +Transaction fee related to an order transaction. +""" +type TransactionFee implements Node { + """ + 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `expires_at` value. + """ + EXPIRES_AT +} + +""" +Return type for `transactionVoid` mutation. +""" +type TransactionVoidPayload { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Translatable content of a resource's field. +""" +type TranslatableContent { + """ + 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 that has translatable fields. +""" +type TranslatableResource { + """ + GID of the resource. + """ + resourceId: ID! + + """ + Translatable content. + """ + translatableContent: [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 + + """ + Filters by outdated translations. + """ + outdated: Boolean + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple TranslatableResources. +""" +type TranslatableResourceConnection { + """ + 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 { + """ + The position 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 { + """ + A product collection. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. + """ + COLLECTION + + """ + The delivery method definition. For example, "Standard", or "Expedited". Translatable fields: `name`. + """ + 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 + + """ + A Metafield. Translatable fields: `value`. + """ + METAFIELD + + """ + A Metaobject. Translatable fields are determined by the Metaobject type. + """ + METAOBJECT + + """ + An online store article. Translatable fields: `title`, `body_html`, + `summary_html`, `handle`, `meta_title`, `meta_description`. + """ + ONLINE_STORE_ARTICLE + + """ + An online store blog. Translatable fields: `title`, `handle`, `meta_title`, `meta_description`. + """ + ONLINE_STORE_BLOG + + """ + A category of links. Translatable fields: `title`. + """ + ONLINE_STORE_MENU + + """ + An online store page. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. + """ + ONLINE_STORE_PAGE + + """ + An online store theme. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME + + """ + A packing slip template. Translatable fields: `body`. + """ + PACKING_SLIP_TEMPLATE + + """ + 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 +} + +""" +Translation of a field of a resource. +""" +type Translation { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Systems of weights and measures. +""" +enum UnitSystem { + """ + 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 { + """ + 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 { + """ + 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 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! + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The unit price of the unverified return line item. + """ + unitPrice: MoneyV2! +} + +""" +The input fields required to update a media object. +""" +input UpdateMediaInput { + """ + The alt text associated to the media. + """ + alt: String + + """ + Specifies the media to update. + """ + id: ID! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Invalid search string. + """ + INVALID_SEARCH_ARGUMENT +} + +""" +An auto-generated type for paginating through multiple UrlRedirects. +""" +type UrlRedirectConnection { + """ + 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 { + """ + The created redirect. + """ + urlRedirect: UrlRedirect + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectUserError!]! +} + +""" +Return type for `urlRedirectDelete` mutation. +""" +type UrlRedirectDeletePayload { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The error code. + """ + code: UrlRedirectErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents an error in the input of a mutation. +""" +type UserError implements DisplayableError { + """ + 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 checkout server side validation installed on the shop. +""" +type Validation implements HasMetafieldDefinitions & HasMetafields & Node { + """ + 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, the app-reserved namespace will be used. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + Returns a private metafield by namespace and key that belongs to the resource. + """ + privateMetafield( + """ + The key for the private metafield. + """ + key: String! + + """ + The namespace for the private metafield. + """ + namespace: String! + ): PrivateMetafield @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + List of private metafields that belong to the resource. + """ + privateMetafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 the private metafields by namespace. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PrivateMetafieldConnection! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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 { + """ + 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 { + """ + 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 ID representing the extension to install. + """ + functionId: String! + + """ + Additional metafields to associate to the validation. + """ + metafields: [MetafieldInput!] = [] + + """ + The title of the validation. + """ + title: String +} + +""" +Return type for `validationCreate` mutation. +""" +type ValidationCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ValidationUserError!]! + + """ + The created validation. + """ + validation: Validation +} + +""" +Return type for `validationDelete` mutation. +""" +type ValidationDeletePayload { + """ + 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 { + """ + The position 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 { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The input fields required to update a validation. +""" +input ValidationUpdateInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 { + """ + Specifies the product option value by ID. + """ + id: ID + + """ + Specifies the product option value by name. + """ + name: String + + """ + Specifies the product option by ID. + """ + optionId: ID + + """ + Specifies the product option by name. + """ + optionName: String +} + +""" +Represents a credit card payment instrument. +""" +type VaultCreditCard { + """ + 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! +} + +""" +Represents a paypal billing agreement payment instrument. +""" +type VaultPaypalBillingAgreement { + """ + Whether the paypal billing agreement is inactive. + """ + inactive: Boolean! + + """ + The paypal account name. + """ + name: String! + + """ + The paypal account email address. + """ + paypalAccountEmail: String! +} + +""" +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 { + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsWebPixelUserError!]! + + """ + The updated web pixel settings. + """ + webPixel: WebPixel +} + +""" +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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 namespaces for private metafields that should be included in the webhook subscription. + """ + privateMetafieldNamespaces: [String!]! @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") + + """ + 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! +} + +""" +An auto-generated type for paginating through multiple WebhookSubscriptions. +""" +type WebhookSubscriptionConnection { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 = WebhookEventBridgeEndpoint | WebhookHttpEndpoint | WebhookPubSubEndpoint + +""" +The supported formats for webhook subscriptions. +""" +enum WebhookSubscriptionFormat { + JSON + XML +} + +""" +The input fields for a webhook subscription. +""" +input WebhookSubscriptionInput { + """ + 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!] + + """ + The list of namespaces for private metafields that should be included in the webhook subscription. + """ + privateMetafieldNamespaces: [String!] @deprecated(reason: "Metafields created using a reserved namespace are private by default. See our guide for\n[migrating private metafields](https:\/\/shopify.dev\/docs\/apps\/custom-data\/metafields\/migrate-private-metafields).\nThis will be removed in 2025-01.\n") +} + +""" +The set of valid sort keys for the WebhookSubscription query. +""" +enum WebhookSubscriptionSortKeys { + """ + 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 +} + +""" +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 { + """ + 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_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 + + """ + 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 + + """ + 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/update` events. Occurs whenever a checkout is updated. Requires the `read_orders` scope. + """ + CHECKOUTS_UPDATE + + """ + 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 whenever products are added or removed from + the collection. Occurs once if multiple products are added or removed from a + collection at the same time. 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/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_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_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 `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 `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_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/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/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 `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 `locales/create` events. Occurs whenever a shop locale is created Requires the `read_locales` scope. + """ + LOCALES_CREATE + + """ + 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 `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 `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/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/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_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 + + """ + 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/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 + + """ + 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 `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 `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 { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +A weight, which includes a numeric value and a unit of measurement. +""" +type Weight { + """ + 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 { + """ + 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 { + """ + 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/data/admin_schema_2026-01_public.graphql b/data/admin_schema_2026-01_public.graphql new file mode 100644 index 00000000..e3514bc5 --- /dev/null +++ b/data/admin_schema_2026-01_public.graphql @@ -0,0 +1,126609 @@ +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 { + """ + The URL for the buyer to recover their checkout. + """ + abandonedCheckoutUrl: URL! + + """ + The billing address provided by the buyer. + Null if the user did not provide a billing address. + """ + billingAddress: MailingAddress + + """ + The date and time when the buyer completed the checkout. + Null if the checkout has not 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 did not 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + The parent line item of the current line item. + """ + parent: AbandonedCheckoutLineItem! +} + +""" +The set of valid sort keys for the AbandonedCheckout query. +""" +enum AbandonedCheckoutSortKeys { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Unable to find an Abandonment for the provided ID. + """ + ABANDONMENT_NOT_FOUND +} + +""" +Return type for `abandonmentUpdateActivitiesDeliveryStatuses` mutation. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesPayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! +} + +""" +A sale associated with an order price adjustment. +""" +type AdjustmentSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + 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 { + """ + 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 { + """ + Whether all items are eligible for the discount. This value always returns `true`. + """ + allItems: Boolean! +} + +""" +The Android mobile platform application. +""" +type AndroidApplication { + """ + 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 { + """ + 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 { + """ + 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! + + """ + 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 is not 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! + + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + The position 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 { + """ + The position 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 { + """ + The application associated to the feedback. + """ + app: App! + + """ + 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 { + """ + 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! + + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + PRIVATE + PUBLIC +} + +""" +The set of valid sort keys for the AppInstallation query. +""" +enum AppInstallationSortKeys { + """ + 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 { + """ + 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 { + """ + 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 = AppRecurringPricing | AppUsagePricing + +""" +The frequency at which the shop is billed for an app subscription. +""" +enum AppPricingInterval { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents the billing types of revenue attribution. +""" +enum AppRevenueAttributionType { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The percentage value of a discount. + """ + percentage: Float! +} + +""" +The value of the discount. +""" +union AppSubscriptionDiscountValue = AppSubscriptionDiscountAmount | AppSubscriptionDiscountPercentage + +""" +The input fields to specify the value discounted every billing interval. +""" +input AppSubscriptionDiscountValueInput { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + The pricing model for the app subscription. + """ + plan: AppPlanInput! +} + +""" +Return type for `appSubscriptionLineItemUpdate` mutation. +""" +type AppSubscriptionLineItemUpdatePayload { + """ + 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 { + """ + 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The status of the app subscription. +""" +enum AppSubscriptionStatus { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The Apple mobile platform application. +""" +type AppleApplication { + """ + 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 { + """ + 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 + + """ + 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 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 + ): [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 { + """ + The author's full name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple ArticleAuthors. +""" +type ArticleAuthorConnection { + """ + 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 { + """ + The position 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 { + """ + The title of the blog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Articles. +""" +type ArticleConnection { + """ + 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 { + """ + The name of the author of the article. + """ + author: AuthorInput! + + """ + The ID of the blog containing the article. + """ + blogId: ID + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + Sort alphabetically.. + """ + ALPHABETICAL + + """ + Sort by popularity, starting with the most popular tag. + """ + POPULAR +} + +""" +The input fields to update an article. +""" +input ArticleUpdateInput { + """ + The name of the author of the article. + """ + author: AuthorInput + + """ + The ID of the blog containing the article. + """ + blogId: ID + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Key or name of the attribute. + """ + key: String! + + """ + Value of the attribute. + """ + value: String! +} + +""" +The intended audience for the order status page. +""" +enum Audience { + """ + 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 { + """ + The author's full name. + """ + name: String + + """ + The ID of a staff member's account. + """ + userId: ID +} + +""" +Automatic discount applications capture the intentions of a discount that was automatically applied. +""" +type AutomaticDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The 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 { + """ + 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 { + """ + The channel definitions for channels installed on a shop. + """ + channelDefinitions: [ChannelDefinition!]! + + """ + The name of the channel. + """ + channelName: String! +} + +""" +The input fields for updating a backup region with exactly one required option. +""" +input BackupRegionUpdateInput { + """ + A country code for the backup region. + """ + countryCode: CountryCode! +} + +""" +Return type for `backupRegionUpdate` mutation. +""" +type BackupRegionUpdatePayload { + """ + 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 { + """ + 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 +} + +""" +The set of valid sort keys for the BalanceTransaction query. +""" +enum BalanceTransactionSortKeys { + """ + 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 { + """ + 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 { + """ + A company account holder. + """ + COMPANY + + """ + An individual account holder. + """ + INDIVIDUAL +} + +""" +The type of bank account. +""" +enum BankAccountType { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + Billing attempt rate limit exceeded - try later. + """ + THROTTLED + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED +} + +""" +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 { + """ + 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 + + """ + 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! + + """ + 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 + ): [Translation!]! + + """ + The date and time when the blog was update. + """ + updatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple Blogs. +""" +type BlogConnection { + """ + 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 { + """ + 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 { + """ + The blog that was created. + """ + blog: Blog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogCreateUserError!]! +} + +""" +An error that occurs during the execution of `BlogCreate`. +""" +type BlogCreateUserError implements DisplayableError { + """ + The error code. + """ + code: BlogCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogCreateUserError`. +""" +enum BlogCreateUserErrorCode { + """ + The input value 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 { + """ + The ID of the deleted blog. + """ + deletedBlogId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogDeleteUserError!]! +} + +""" +An error that occurs during the execution of `BlogDelete`. +""" +type BlogDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: BlogDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogDeleteUserError`. +""" +enum BlogDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Blog and a cursor during pagination. +""" +type BlogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of BlogEdge. + """ + node: Blog! +} + +""" +RSS feed provider details for blog syndication. This object contains the +location and path information for external feed services that were previously +integrated with the blog. + +The `BlogFeed` object maintains the feed URL and path to ensure existing feed subscriptions continue working. + +Use the `BlogFeed` object to: +- Access RSS feed provider configuration +- Retrieve feed location and path information +- Maintain existing feed syndication settings + +> Note: +> This is a legacy feature. New integrations with external feed services are not supported. +""" +type BlogFeed { + """ + Blog feed provider url. + """ + location: URL! + + """ + Blog feed provider path. + """ + path: String! +} + +""" +The set of valid sort keys for the Blog query. +""" +enum BlogSortKeys { + """ + Sort by the `handle` value. + """ + HANDLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +The input fields to update a blog. +""" +input BlogUpdateInput { + """ + 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 { + """ + The blog that was updated. + """ + blog: Blog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BlogUpdateUserError!]! +} + +""" +An error that occurs during the execution of `BlogUpdate`. +""" +type BlogUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: BlogUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BlogUpdateUserError`. +""" +enum BlogUpdateUserErrorCode { + """ + The 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 +} + +""" +Possible error codes that can be returned by `BulkMutationUserError`. +""" +enum BulkMutationErrorCode { + """ + 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 { + """ + The error code. + """ + code: BulkMutationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An asynchronous operation that exports large datasets or imports data in bulk. +Create bulk operations using [bulkOperationRunQuery](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunQuery) +to export data or [bulkOperationRunMutation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkOperationRunMutation) +to import data. + +After creation, check the [`status`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.status) +field to track progress. When completed, the [`url`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.url) +field contains a link to download results in [JSONL](http://jsonlines.org/) format. The [`objectCount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.objectCount) +field shows the running total of processed objects, while [`rootObjectCount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.rootObjectCount) +tracks only root-level objects in nested queries. + +If an operation fails but retrieves partial data, then the [`partialDataUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation#field-BulkOperation.fields.partialDataUrl) +field provides access to incomplete results. + +> Note: `url` and `partialDataUrl` values expire after seven days. + +Learn more about +[exporting](https://shopify.dev/docs/api/usage/bulk-operations/queries) and +[importing](https://shopify.dev/docs/api/usage/bulk-operations/imports) data in bulk. +""" +type BulkOperation implements Node { + """ + When the bulk operation was successfully completed. + """ + completedAt: DateTime + + """ + When the bulk operation was created. + """ + createdAt: DateTime! + + """ + Error code for failed operations. + """ + errorCode: BulkOperationErrorCode + + """ + File size in bytes of the file in the `url` field. + """ + fileSize: UnsignedInt64 + + """ + A globally-unique ID. + """ + id: ID! + + """ + A running count of all the objects processed. + For example, when fetching all the products and their variants, this field counts both products and variants. + This field can be used to track operation progress. + """ + objectCount: UnsignedInt64! + + """ + The URL that points to the partial or incomplete response data (in + [JSONL](http://jsonlines.org/) format) that was returned by a failed operation. + The URL expires 7 days after the operation fails. Returns `null` when there's no data available. + """ + partialDataUrl: URL + + """ + GraphQL query document specified in `bulkOperationRunQuery`. + """ + query: String! + + """ + A running count of all the objects that are processed at the root of the query. + For example, when fetching all the products and their variants, this field only counts products. + This field can be used to track operation progress. + """ + rootObjectCount: UnsignedInt64! + + """ + Status of the bulk operation. + """ + status: BulkOperationStatus! + + """ + The bulk operation's type. + """ + type: BulkOperationType! + + """ + The URL that points to the response data in [JSONL](http://jsonlines.org/) format. + The URL expires 7 days after the operation completes. + """ + url: URL +} + +""" +Return type for `bulkOperationCancel` mutation. +""" +type BulkOperationCancelPayload { + """ + The bulk operation to be canceled. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple BulkOperations. +""" +type BulkOperationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [BulkOperationEdge!]! + + """ + A list of nodes that are contained in BulkOperationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [BulkOperation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one BulkOperation and a cursor during pagination. +""" +type BulkOperationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of BulkOperationEdge. + """ + node: BulkOperation! +} + +""" +Error codes for failed bulk operations. +""" +enum BulkOperationErrorCode { + """ + The provided operation `query` returned access denied due to missing + [access scopes](https://shopify.dev/api/usage/access-scopes). + Review the requested object permissions and execute the query as a normal non-bulk GraphQL request to see more details. + """ + ACCESS_DENIED + + """ + The operation resulted in partial or incomplete data due to internal server errors during execution. + These errors might be intermittent, so you can try performing the same query again. + """ + INTERNAL_SERVER_ERROR + + """ + The operation resulted in partial or incomplete data due to query timeouts during execution. + In some cases, timeouts can be avoided by modifying your `query` to select fewer fields. + """ + TIMEOUT +} + +""" +Return type for `bulkOperationRunMutation` mutation. +""" +type BulkOperationRunMutationPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkMutationUserError!]! +} + +""" +Return type for `bulkOperationRunQuery` mutation. +""" +type BulkOperationRunQueryPayload { + """ + The newly created bulk operation. + """ + bulkOperation: BulkOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkOperationUserError!]! +} + +""" +The valid values for the status of a bulk operation. +""" +enum BulkOperationStatus { + """ + The bulk operation has been canceled. + """ + CANCELED + + """ + Cancelation has been initiated on the bulk operation. There may be a short delay from when a cancelation + starts until the operation is actually canceled. + """ + CANCELING + + """ + The bulk operation has successfully completed. + """ + COMPLETED + + """ + The bulk operation has been created. + """ + CREATED + + """ + The bulk operation URL has expired. + """ + EXPIRED + + """ + The bulk operation has failed. For information on why the operation failed, use + [BulkOperation.errorCode](https://shopify.dev/api/admin-graphql/latest/enums/bulkoperationerrorcode). + """ + FAILED + + """ + The bulk operation is runnning. + """ + RUNNING +} + +""" +The valid values for the bulk operation's type. +""" +enum BulkOperationType { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Sort by the `completed_at` value. + """ + COMPLETED_AT + + """ + Sort by the `created_at` value. + """ + CREATED_AT +} + +""" +Return type for `bulkProductResourceFeedbackCreate` mutation. +""" +type BulkProductResourceFeedbackCreatePayload { + """ + The feedback that's created. + """ + feedback: [ProductResourceFeedback!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkProductResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `BulkProductResourceFeedbackCreate`. +""" +type BulkProductResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: BulkProductResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `BulkProductResourceFeedbackCreateUserError`. +""" +enum BulkProductResourceFeedbackCreateUserErrorCode { + """ + The 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 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 { + """ + 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 +} + +""" +Represents the Bundles feature configuration for the shop. +""" +type BundlesFeature { + """ + Whether a shop is configured properly to sell bundles. + """ + eligibleForBundles: Boolean! + + """ + The reason why a shop is not eligible for bundles. + """ + ineligibilityReason: String + + """ + Whether a shop has any fixed bundle products or has a cartTransform function installed. + """ + sellsBundles: Boolean! +} + +""" +Possible error codes that can be returned by `BusinessCustomerUserError`. +""" +enum BusinessCustomerErrorCode { + """ + 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 { + """ + The error code. + """ + code: BusinessCustomerErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A legal entity through which a merchant operates. Each business entity contains its own [`BusinessEntityAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntityAddress), +company information, and can be associated with its own [`ShopifyPaymentsAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsAccount). +[`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) +objects can be assigned to a business entity to determine payment processing and +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) attribution. + +Every shop must have one primary business entity. Additional entities enable +international operations by establishing legal presence in multiple countries. + +Learn more about [managing multiple legal entities](https://shopify.dev/docs/apps/build/markets/multiple-entities). +""" +type BusinessEntity implements Node { + """ + The address of the merchant's Business Entity. + """ + address: BusinessEntityAddress! + + """ + Whether the Business Entity is archived from the shop. + """ + archived: Boolean! + + """ + The name of the company associated with the merchant's Business Entity. + """ + companyName: String + + """ + The display name of the merchant's Business Entity. + """ + displayName: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether it's the merchant's primary Business Entity. + """ + primary: Boolean! + + """ + Returns the Shopify Payments account information for the shop. Includes + current balances across all currencies, payout schedules, and bank account + configurations. + + The account includes [`ShopifyPaymentsBalanceTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction) + records showing charges, refunds, and adjustments that affect your balance. Also includes [`ShopifyPaymentsDispute`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsDispute) records and [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) + history between the account and connected [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount) + configurations. + """ + shopifyPaymentsAccount: ShopifyPaymentsAccount @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") +} + +""" +Represents the address of a merchant's Business Entity. +""" +type BusinessEntityAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The country code of the merchant's Business Entity. + """ + countryCode: CountryCode! + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Settings describing the behavior of checkout for a B2B buyer. +""" +type BuyerExperienceConfiguration { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean! + + """ + The portion required to be paid at checkout. + """ + deposit: DepositConfiguration + + """ + Whether to allow customers to use editable shipping addresses. + """ + editableShippingAddress: Boolean! + + """ + Whether a buyer must pay at checkout or they can also choose to pay + later using net terms. + """ + payNowOnly: Boolean! @deprecated(reason: "Please use `checkoutToDraft`(must be false) and `paymentTermsTemplate`(must be nil) to derive this instead.") + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplate: PaymentTermsTemplate +} + +""" +The input fields specifying the behavior of checkout for a B2B buyer. +""" +input BuyerExperienceConfigurationInput { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean + + """ + 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 +} + +""" +The input fields for a buyer signal. +""" +input BuyerSignalInput { + """ + The country code of the buyer. + """ + countryCode: CountryCode! +} + +""" +The input fields for exchange line items on a calculated return. +""" +input CalculateExchangeLineItemInput { + """ + The 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 +} + +""" +The input fields to calculate return amounts associated with an order. +""" +input CalculateReturnInput { + """ + The exchange line items to add to the order. + """ + exchangeLineItems: [CalculateExchangeLineItemInput!] = [] + + """ + The ID of the order that will be returned. + """ + orderId: ID! + + """ + The line items from the order to include in the return. + """ + returnLineItems: [CalculateReturnLineItemInput!] = [] + + """ + The return shipping fee associated with the return. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for return line items on a calculated return. +""" +input CalculateReturnLineItemInput { + """ + The ID of the fulfillment line item to be returned. + """ + fulfillmentLineItemId: ID! + + """ + The 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 { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An amount discounting the line that has been allocated by an associated discount application. +""" +type CalculatedDiscountAllocation { + """ + The money amount that's allocated by the discount application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount that the allocated amount originated from. + """ + discountApplication: CalculatedDiscountApplication! +} + +""" +A [discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/discountapplication) involved in order editing that might be newly added or have new changes applied. +""" +interface CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An auto-generated type for paginating through multiple CalculatedDiscountApplications. +""" +type CalculatedDiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedDiscountApplicationEdge!]! + + """ + A list of nodes that are contained in CalculatedDiscountApplicationEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [CalculatedDiscountApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedDiscountApplication and a cursor during pagination. +""" +type CalculatedDiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedDiscountApplicationEdge. + """ + node: CalculatedDiscountApplication! +} + +""" +A discount code that is applied to an order that is being edited. +""" +type CalculatedDiscountCodeApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +Calculated pricing, taxes, and discounts for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder). +Includes the complete financial breakdown with line items, discounts, shipping +costs, tax calculations, and totals in both shop and presentment currencies. + +Available [`ShippingRate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingRate) options are included when a valid shipping address and line items are present. + +> Note: +> Returns alerts and warnings when issues occur during calculation, such as +insufficient inventory or incompatible discounts. +""" +type CalculatedDraftOrder { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + The list of alerts raised while calculating. + """ + alerts: [ResourceAlert!]! + + """ + Whether all variant prices have been overridden. + """ + allVariantPricesOverridden: Boolean! + + """ + Whether any variant prices have been overridden. + """ + anyVariantPricesOverridden: Boolean! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The available shipping rates. + Requires a customer with a valid shipping address and at least one line item. + """ + availableShippingRates: [ShippingRate!]! + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The list of the line items in the calculated draft order. + """ + lineItems: [CalculatedDraftOrderLineItem!]! + + """ + A subtotal of the line items and corresponding discounts, + excluding shipping charges, shipping discounts, taxes, or order discounts. + """ + lineItemsSubtotalPrice: MoneyBag! + + """ + The name of the selected market. + """ + marketName: String! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The selected country code that determines the pricing. + """ + marketRegionCountryCode: CountryCode! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The subtotal, in shop currency, of the line items and their discounts, + excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The calculated line item for a draft order. +""" +type CalculatedDraftOrderLineItem { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The bundle components of the draft order line item. + """ + bundleComponents: [CalculatedDraftOrderLineItem!]! @deprecated(reason: "Use `components` instead.") + + """ + The components of the draft order line item. + """ + components: [CalculatedDraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """ + The total price with discounts applied. + """ + discountedTotal: MoneyV2! + + """ + The total price with discounts applied. + """ + discountedTotalSet: MoneyBag! + + """ + The unit price with discounts applied. + """ + discountedUnitPrice: MoneyV2! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + The unit price with discounts applied. + """ + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The image associated with the draft order line item. + """ + image: Image + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The name of the product. + """ + name: String! + + """ + The total price, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: MoneyV2! + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """ + The line item price without any discounts applied. + """ + originalUnitPrice: MoneyV2! + + """ + The price without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The original custom line item input price. + """ + originalUnitPriceWithCurrency: MoneyV2 + + """ + The price override for the line item. + """ + priceOverride: MoneyV2 + + """ + The product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total value of the discount. + """ + totalDiscount: MoneyV2! + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +A calculated exchange line item. +""" +type CalculatedExchangeLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + The unit price of the exchange line item after discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID + + """ + The original unit price of the exchange line item before discounts. + """ + originalUnitPriceSet: MoneyBag! + + """ + The quantity being exchanged. + """ + quantity: Int! + + """ + The calculated subtotal set of the exchange line item, including discounts. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the exchange line item. + """ + totalTaxSet: MoneyBag! + + """ + The variant being exchanged. + """ + variant: ProductVariant +} + +""" +A line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedLineItem { + """ + The discounts that have been allocated onto the line item by discount applications. + """ + calculatedDiscountAllocations: [CalculatedDiscountAllocation!]! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! @deprecated(reason: "Use `calculatedDiscountAllocations` instead.") + + """ + The price of a single quantity of the line item with line item discounts + applied, in shop and presentment currencies. Discounts applied to the entire + order aren't included in this price. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The total number of items that can be edited. + """ + editableQuantity: Int! + + """ + The editable quantity prior to any changes made in the current edit. + """ + editableQuantityBeforeChanges: Int! + + """ + The total price of editable lines in shop and presentment currencies. + """ + editableSubtotalSet: MoneyBag! + + """ + Whether the calculated line item has a staged discount. + """ + hasStagedLineItemDiscount: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image object associated to the line item's variant. + """ + image: Image + + """ + The variant unit price in shop and presentment currencies, without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The total number of items. + """ + quantity: Int! + + """ + Whether the line item can be restocked or not. + """ + restockable: Boolean! + + """ + Whether the changes on the line item will result in a restock. + """ + restocking: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + A list of changes that affect this line item. + """ + stagedChanges: [OrderStagedChange!]! + + """ + The title of the product. + """ + title: String! + + """ + The total price of uneditable lines in shop and presentment currencies. + """ + uneditableSubtotalSet: MoneyBag! + + """ + The product variant associated with this line item. The value is null for custom line items and items where + the variant has been deleted. + """ + variant: ProductVariant + + """ + The title of the variant. + """ + variantTitle: String +} + +""" +An auto-generated type for paginating through multiple CalculatedLineItems. +""" +type CalculatedLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CalculatedLineItemEdge!]! + + """ + A list of nodes that are contained in CalculatedLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CalculatedLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CalculatedLineItem and a cursor during pagination. +""" +type CalculatedLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CalculatedLineItemEdge. + """ + node: CalculatedLineItem! +} + +""" +Represents a discount that was manually created for an order that is being edited. +""" +type CalculatedManualDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +An order during an active edit session with all proposed changes applied but not +yet committed. When you begin editing an order with the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) +mutation, the system creates a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) +that shows how the +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) will +look after your changes. The calculated order tracks the original order state +and all staged modifications (added or removed +[`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) +objects, quantity adjustments, discount changes, and [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine) +updates). Use the calculated order to preview the financial impact of edits +before committing them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + +Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). +""" +type CalculatedOrder implements Node { + """ + Returns only the new discount applications being added to the order in the current edit. + """ + addedDiscountApplications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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!]! + + """ + Total price of the order less the total amount received from the customer in shop and presentment currencies. + """ + totalOutstandingSet: MoneyBag! + + """ + Total amount of the order (includes taxes and discounts) in shop and presentment currencies. + """ + totalPriceSet: MoneyBag! +} + +""" +The calculated costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type CalculatedRestockingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +A calculated return. +""" +type CalculatedReturn { + """ + A list of calculated exchange line items. + """ + exchangeLineItems: [CalculatedExchangeLineItem!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of calculated return line items. + """ + returnLineItems: [CalculatedReturnLineItem!]! + + """ + The calculated return shipping fee. + """ + returnShippingFee: CalculatedReturnShippingFee +} + +""" +A calculated return fee. +""" +interface CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A calculated return line item. +""" +type CalculatedReturnLineItem { + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The restocking fee of the return line item. + """ + restockingFee: CalculatedRestockingFee + + """ + The subtotal of the return line item before order discounts. + """ + subtotalBeforeOrderDiscountsSet: MoneyBag! + + """ + The subtotal of the return line item. + """ + subtotalSet: MoneyBag! + + """ + The total tax of the return line item. + """ + totalTaxSet: MoneyBag! +} + +""" +The calculated cost of the return shipping. +""" +type CalculatedReturnShippingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +A discount created by a Shopify script for an order that is being edited. +""" +type CalculatedScriptDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The level at which the discount was applied. + """ + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +A shipping line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedShippingLine { + """ + A globally-unique ID. + """ + id: ID + + """ + The price of the shipping line when sold and before applying discounts. This + field includes taxes if `Order.taxesIncluded` is true. Otherwise, this field + doesn't include taxes for the shipping line. + """ + price: MoneyBag! + + """ + The staged status of the shipping line. + """ + stagedStatus: CalculatedShippingLineStagedStatus! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Represents the staged status of a CalculatedShippingLine on a CalculatedOrder. +""" +enum CalculatedShippingLineStagedStatus { + """ + The shipping line 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 { + """ + The response code from the address verification system (AVS). The code is always a single letter. + """ + avsResultCode: String + + """ + The issuer identification number (IIN), formerly known as bank identification + number (BIN) of the customer's credit card. This is made up of the first few + digits of the credit card number. + """ + bin: String + + """ + The name of the company that issued the customer's credit card. + """ + company: String + + """ + The response code from the credit card company indicating whether the customer + entered the card security code, or card verification value, correctly. The + code is a single letter or empty string. + """ + cvvResultCode: String + + """ + The month in which the used credit card expires. + """ + expirationMonth: Int + + """ + The year in which the used credit card expires. + """ + expirationYear: Int + + """ + The holder of the credit card. + """ + name: String + + """ + The customer's credit card number, with most of the leading digits redacted. + """ + number: String + + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String + + """ + Digital wallet used for the payment. + """ + wallet: DigitalWallet +} + +""" +Return type for `carrierServiceCreate` mutation. +""" +type CarrierServiceCreatePayload { + """ + The created carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceCreateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceCreate`. +""" +type CarrierServiceCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceCreateUserError`. +""" +enum CarrierServiceCreateUserErrorCode { + """ + Carrier service creation failed. + """ + CARRIER_SERVICE_CREATE_FAILED +} + +""" +Return type for `carrierServiceDelete` mutation. +""" +type CarrierServiceDeletePayload { + """ + The ID of the deleted carrier service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceDelete`. +""" +type CarrierServiceDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceDeleteUserError`. +""" +enum CarrierServiceDeleteUserErrorCode { + """ + Carrier service deletion failed. + """ + CARRIER_SERVICE_DELETE_FAILED +} + +""" +The set of valid sort keys for the CarrierService query. +""" +enum CarrierServiceSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `carrierServiceUpdate` mutation. +""" +type CarrierServiceUpdatePayload { + """ + The updated carrier service. + """ + carrierService: DeliveryCarrierService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CarrierServiceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CarrierServiceUpdate`. +""" +type CarrierServiceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CarrierServiceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceUpdateUserError`. +""" +enum CarrierServiceUpdateUserErrorCode { + """ + Carrier service update failed. + """ + CARRIER_SERVICE_UPDATE_FAILED +} + +""" +A deployed cart transformation function that actively modifies how products +appear and behave in customer carts. Cart transforms enable sophisticated +merchandising strategies by programmatically merging, expanding, or updating +cart line items based on custom business logic. + +Use the `CartTransform` object to: +- Monitor active bundling and cart modification logic +- Track transform function deployment status and configuration +- Manage error handling behavior for cart processing failures +- Coordinate multiple transforms when running complex merchandising strategies +- Analyze transform performance and customer interaction patterns + +Each cart transform links to a specific [Shopify +Function](https://shopify.dev/docs/apps/build/functions) that contains the +actual cart modification logic. The `blockOnFailure` setting determines whether +cart processing should halt when the transform encounters errors, or whether it +should allow customers to proceed with unmodified carts. This flexibility +ensures merchants can balance feature richness with checkout reliability. + +Transform functions operate during cart updates, product additions, and checkout +initiation, providing multiple touchpoints to enhance the shopping experience. +They integrate seamlessly with existing cart APIs while extending functionality +beyond standard product catalog capabilities. + +The function ID connects to your deployed function code, while the configuration +settings control how the transform behaves in different scenarios. Multiple +transforms can work together, processing cart modifications in sequence to +support complex merchandising workflows. + +Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle), +and about the [Cart Transform Function +API](https://shopify.dev/docs/api/functions/latest/cart-transform). +""" +type CartTransform implements HasMetafields & Node { + """ + Whether a run failure will block cart and checkout operations. + """ + blockOnFailure: Boolean! + + """ + The ID for the Cart Transform function. + """ + functionId: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! +} + +""" +An auto-generated type for paginating through multiple CartTransforms. +""" +type CartTransformConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CartTransformEdge!]! + + """ + A list of nodes that are contained in CartTransformEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CartTransform!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `cartTransformCreate` mutation. +""" +type CartTransformCreatePayload { + """ + The newly created cart transform function. + """ + cartTransform: CartTransform + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformCreateUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformCreate`. +""" +type CartTransformCreateUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformCreateUserError`. +""" +enum CartTransformCreateUserErrorCode { + """ + 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 { + """ + The globally-unique ID for the deleted cart transform. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CartTransformDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CartTransformDelete`. +""" +type CartTransformDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CartTransformDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformDeleteUserError`. +""" +enum CartTransformDeleteUserErrorCode { + """ + Could not find cart transform for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +An auto-generated type which holds one CartTransform and a cursor during pagination. +""" +type CartTransformEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CartTransformEdge. + """ + node: CartTransform! +} + +""" +Controls which cart transformation operations apps can perform in your store. +This lets you define exactly what types of cart modifications are allowed based +on your checkout setup and business needs. + +The eligible operations determine what cart transform functions can accomplish, +providing a clear boundary for app capabilities within the store's ecosystem. + +Learn more about [cart transform operations](https://shopify.dev/docs/api/functions/latest/cart-transform#multiple-operations). +""" +type CartTransformEligibleOperations { + """ + The shop is eligible for expand operations. + """ + expandOperation: Boolean! + + """ + The shop is eligible for merge operations. + """ + mergeOperation: Boolean! + + """ + The shop is eligible for update operations. + """ + updateOperation: Boolean! +} + +""" +Provides access to the cart transform feature configuration for the merchant's +store. This wrapper object indicates whether cart transformation capabilities +are enabled and what operations are available. + +For example, when checking if your app can deploy customized bundle features, +you would query this object to confirm cart transforms are supported and review +the eligible operations. + +The feature configuration helps apps determine compatibility before attempting to create transform functions. + +Learn more about [cart transformation](https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransform). +""" +type CartTransformFeature { + """ + The cart transform operations eligible for the shop. + """ + eligibleOperations: CartTransformEligibleOperations! +} + +""" +The rounding adjustment applied to total payment or refund received for an Order involving cash payments. +""" +type CashRoundingAdjustment { + """ + The rounding adjustment that can be applied to totalReceived for an Order + involving cash payments in shop and presentment currencies. Could be a + positive or negative value. Value is 0 if there's no rounding, or for non-cash payments. + """ + paymentSet: MoneyBag! + + """ + The rounding adjustment that can be applied to totalRefunded for an Order + involving cash payments in shop and presentment currencies. Could be a + positive or negative value. Value is 0 if there's no rounding, or for non-cash refunds. + """ + refundSet: MoneyBag! +} + +""" +Tracks an adjustment to the cash in a cash tracking session for a point of sale device over the course of a shift. +""" +type CashTrackingAdjustment implements Node { + """ + The amount of cash being added or removed. + """ + cash: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The note entered when the adjustment was made. + """ + note: String + + """ + The staff member who made the adjustment. + """ + staffMember: StaffMember! + + """ + The time when the adjustment was made. + """ + time: DateTime! +} + +""" +An auto-generated type for paginating through multiple CashTrackingAdjustments. +""" +type CashTrackingAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingAdjustmentEdge!]! + + """ + A list of nodes that are contained in CashTrackingAdjustmentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CashTrackingAdjustment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingAdjustment and a cursor during pagination. +""" +type CashTrackingAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingAdjustmentEdge. + """ + node: CashTrackingAdjustment! +} + +""" +Tracks the balance in a cash drawer for a point of sale device over the course of a shift. +""" +type CashTrackingSession implements Node { + """ + The adjustments made to the cash drawer during this session. + """ + adjustments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingSessionEdge!]! + + """ + A list of nodes that are contained in CashTrackingSessionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CashTrackingSession!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingSession and a cursor during pagination. +""" +type CashTrackingSessionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CashTrackingSessionEdge. + """ + node: CashTrackingSession! +} + +""" +The set of valid sort keys for the CashTrackingSessionTransactions query. +""" +enum CashTrackingSessionTransactionsSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `processed_at` value. + """ + PROCESSED_AT +} + +""" +The set of valid sort keys for the CashTrackingSessions query. +""" +enum CashTrackingSessionsSortKeys { + """ + Sort by the `closing_time_asc` value. + """ + CLOSING_TIME_ASC + + """ + Sort by the `closing_time_desc` value. + """ + CLOSING_TIME_DESC + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `opening_time_asc` value. + """ + OPENING_TIME_ASC + + """ + Sort by the `opening_time_desc` value. + """ + OPENING_TIME_DESC + + """ + Sort by the `total_discrepancy_asc` value. + """ + TOTAL_DISCREPANCY_ASC + + """ + Sort by the `total_discrepancy_desc` value. + """ + TOTAL_DISCREPANCY_DESC +} + +""" +A list of products with publishing and pricing information. +A catalog can be associated with a specific context, such as a +[`Market`](https://shopify.dev/api/admin-graphql/current/objects/market), [`CompanyLocation`](https://shopify.dev/api/admin-graphql/current/objects/companylocation), +or [`App`](https://shopify.dev/api/admin-graphql/current/objects/app). + +Catalogs can optionally include a publication to control product visibility and +a price list to customize pricing. When a publication isn't associated with a +catalog, product availability is determined by the sales channel. +""" +interface Catalog implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Catalogs. +""" +type CatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CatalogEdge!]! + + """ + A list of nodes that are contained in CatalogEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Catalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for the context in which the catalog's publishing and pricing rules apply. +""" +input CatalogContextInput { + """ + The IDs of the company locations to associate to the catalog. + """ + companyLocationIds: [ID!] + + """ + The IDs of the markets to associate to the catalog. + """ + marketIds: [ID!] +} + +""" +Return type for `catalogContextUpdate` mutation. +""" +type CatalogContextUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +The input fields required to create a catalog. +""" +input CatalogCreateInput { + """ + The context associated with the catalog. + """ + context: CatalogContextInput! + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. Only include this if + you need to control which products are visible in the catalog. When omitted, + product availability is determined by the sales channel. + """ + publicationId: ID + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +Return type for `catalogCreate` mutation. +""" +type CatalogCreatePayload { + """ + The newly created catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +A catalog csv operation represents a CSV file import. +""" +type CatalogCsvOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Return type for `catalogDelete` mutation. +""" +type CatalogDeletePayload { + """ + The ID of the deleted catalog. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +An auto-generated type which holds one Catalog and a cursor during pagination. +""" +type CatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CatalogEdge. + """ + node: Catalog! +} + +""" +The set of valid sort keys for the Catalog query. +""" +enum CatalogSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `type` value. + """ + TYPE +} + +""" +The state of a catalog. +""" +enum CatalogStatus { + """ + The catalog is active. + """ + ACTIVE + + """ + The catalog is archived. + """ + ARCHIVED + + """ + The catalog is in draft. + """ + DRAFT +} + +""" +The associated catalog's type. +""" +enum CatalogType { + """ + 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 { + """ + The context associated with the catalog. + """ + context: CatalogContextInput + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID + + """ + The ID of the publication to associate to the catalog. + """ + publicationId: ID + + """ + The status of the catalog. + """ + status: CatalogStatus + + """ + The name of the catalog. + """ + title: String +} + +""" +Return type for `catalogUpdate` mutation. +""" +type CatalogUpdatePayload { + """ + The updated catalog. + """ + catalog: Catalog + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CatalogUserError!]! +} + +""" +Defines errors encountered while managing a catalog. +""" +type CatalogUserError implements DisplayableError { + """ + The error code. + """ + code: CatalogUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CatalogUserError`. +""" +enum CatalogUserErrorCode { + """ + An app catalog cannot be assigned to a price list. + """ + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + 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 + + """ + 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 +} + +""" +An authenticated link to an external platform that supports syndication and +optionally order ingestion, such as Facebook, Pinterest, an online store, or +Point of Sale (POS). + +Each channel provides access to its underlying +[`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App), +published products and collections, and [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) +settings, as well as what features of the platform it supports such as [scheduled publishing](https://shopify.dev/docs/apps/build/sales-channels/scheduled-product-publishing). +Use channels to manage where catalog items appear, track publication status +across platforms, and control +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +visibility for different customer touchpoints. +""" +type Channel implements Node { + """ + The underlying app used by the channel. + """ + app: App! + + """ + The list of collection publications. Each record represents information about the publication of a collection. + """ + collectionPublicationsV3( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + The unique identifier for the channel. + """ + handle: String! + + """ + Whether the collection is available to the channel. + """ + hasCollection( + """ + The collection ID to check. + """ + id: ID! + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the channel. + """ + name: String! + + """ + The menu items for the channel, which also appear as submenu items in the left navigation sidebar in the Shopify admin. + """ + navigationItems: [NavigationItem!]! @deprecated(reason: "Use [AppInstallation.navigationItems](\n https:\/\/shopify.dev\/api\/admin-graphql\/current\/objects\/AppInstallation#field-appinstallation-navigationitems) instead.") + + """ + Home page for the channel. + """ + overviewPath: URL @deprecated(reason: "Use [AppInstallation.launchUrl](\n https:\/\/shopify.dev\/api\/admin-graphql\/current\/objects\/AppInstallation#field-appinstallation-launchurl) instead.") + + """ + The product publications for the products published to the channel. + """ + productPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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` | + | 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 + + """ + Whether the channel supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Channels. +""" +type ChannelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ChannelEdge!]! + + """ + A list of nodes that are contained in ChannelEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Channel!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A specific selling surface within a [sales +channel](https://shopify.dev/docs/apps/build/sales-channels) platform. A channel +definition identifies where products can be sold. Definitions can represent +entire platforms (like Facebook or TikTok) or specific sales channels within +those platforms, such as Instagram Shops, Instagram Shopping, or TikTok Live. + +Each definition includes the parent +[`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) +name and subchannel name to indicate the selling surface hierarchy. 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 { + """ + Name of the channel that this sub channel belongs to. + """ + channelName: String! + + """ + Unique string used as a public identifier for the channel definition. + """ + handle: String! + + """ + The unique ID for the channel definition. + """ + id: ID! + + """ + Whether this channel definition represents a marketplace. + """ + isMarketplace: Boolean! + + """ + Name of the sub channel (e.g. Online Store, Instagram Shopping, TikTok Live). + """ + subChannelName: String! + + """ + Icon displayed when showing the channel in admin. + """ + svgIcon: String @deprecated(reason: "Use App.icon instead") +} + +""" +An auto-generated type which holds one Channel and a cursor during pagination. +""" +type ChannelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ChannelEdge. + """ + node: Channel! +} + +""" +Identifies the [sales +channel](https://shopify.dev/docs/apps/build/sales-channels) and +[`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) from which +an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +originated. Provides attribution details such as the specific platform (Facebook +Marketplace, Instagram Shopping) or marketplace where the order was placed. + +Links to the app that manages the channel and optional [`ChannelDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelDefinition) +details that specify the exact sub-channel or selling surface. +""" +type ChannelInformation implements Node { + """ + The app associated with the channel. + """ + app: App! + + """ + The channel definition associated with the channel. + """ + channelDefinition: ChannelDefinition + + """ + The unique ID for the channel. + """ + channelId: ID! + + """ + The publishing destination display name or channel name. + """ + displayName: String + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Creates a unified visual identity for your checkout that keeps customers engaged +and reinforces your brand throughout the purchase process. This comprehensive +branding system lets you control every visual aspect of checkout, from colors +and fonts to layouts and imagery, so your checkout feels like a natural +extension of your store. + +For example, a luxury fashion retailer can configure their checkout with custom +color palettes, premium typography, rounded corners for a softer feel, and +branded imagery that matches their main website aesthetic. + +Use the `Branding` object to: +- Configure comprehensive checkout visual identity +- Coordinate color schemes across all checkout elements +- Apply consistent typography and spacing standards +- Manage background imagery and layout customizations +- Control visibility of various checkout components + +The branding configuration includes design system foundations like color roles, +typography scales, and spacing units, plus specific customizations for sections, +dividers, and interactive elements. This allows merchants to create cohesive +checkout experiences that reinforce their brand identity while maintaining +usability standards. + +Different color schemes can be defined for various contexts, ensuring optimal +contrast and accessibility across different checkout states and customer preferences. +""" +type CheckoutBranding { + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizations + + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystem +} + +""" +The container background style. +""" +enum CheckoutBrandingBackground { + """ + The Base background style. + """ + BASE + + """ + The Subdued background style. + """ + SUBDUED + + """ + The Transparent background style. + """ + TRANSPARENT +} + +""" +Possible values for the background style. +""" +enum CheckoutBrandingBackgroundStyle { + """ + The None background style. + """ + NONE + + """ + The Solid background style. + """ + SOLID +} + +""" +Possible values for the border. +""" +enum CheckoutBrandingBorder { + """ + The Block End border. + """ + BLOCK_END + + """ + The Full border. + """ + FULL + + """ + The None border. + """ + NONE +} + +""" +The container border style. +""" +enum CheckoutBrandingBorderStyle { + """ + The Base border style. + """ + BASE + + """ + The Dashed border style. + """ + DASHED + + """ + The Dotted border style. + """ + DOTTED +} + +""" +The container border width. +""" +enum CheckoutBrandingBorderWidth { + """ + The Base border width. + """ + BASE + + """ + The Large border width. + """ + LARGE + + """ + The Large 100 border width. + """ + LARGE_100 + + """ + The Large 200 border width. + """ + LARGE_200 +} + +""" +The buttons customizations. +""" +type CheckoutBrandingButton { + """ + The background style used for buttons. + """ + background: CheckoutBrandingBackgroundStyle + + """ + The block padding used for buttons. + """ + blockPadding: CheckoutBrandingSpacing + + """ + The border used for buttons. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The inline padding used for buttons. + """ + inlinePadding: CheckoutBrandingSpacing + + """ + The typography used for buttons. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +Defines the color palette specifically for button elements within checkout +branding, including hover states. These color roles ensure buttons maintain +proper contrast and visual hierarchy throughout the checkout experience. + +For example, a sports brand might configure bright accent colors for primary +action buttons, with darker hover states and contrasting text colors that +maintain accessibility standards. + +Use the `ButtonColorRoles` object to: +- Define button color schemes for different states +- Ensure proper contrast for accessibility compliance +- Coordinate button colors with overall brand palette + +Button color roles include background, border, text, icon, accent (for focused +states), and decorative elements, plus specific hover state colors that provide +clear interactive feedback to customers. +""" +type CheckoutBrandingButtonColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The colors of the button on hover. + """ + hover: CheckoutBrandingColorRoles + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields to set colors for buttons. +""" +input CheckoutBrandingButtonColorRolesInput { + """ + The color of 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 { + """ + 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 { + """ + An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. +""" +input CheckoutBrandingBuyerJourneyInput { + """ + The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Controls the visibility of cart links displayed during checkout. These links +allow customers to return to their cart or continue shopping. + +For example, an electronics store might hide cart links during final checkout +steps to reduce distractions, or show them prominently to encourage customers to +add accessories before completing their purchase. + +The `CartLink` object provides visibility settings to control when and how these +navigation elements appear based on the merchant's checkout flow strategy. +""" +type CheckoutBrandingCartLink { + """ + Whether the cart link is visible at checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Possible values for the cart link content type for the header. +""" +enum CheckoutBrandingCartLinkContentType { + """ + The checkout header content type icon value. + """ + ICON + + """ + The checkout header content type image value. + """ + IMAGE + + """ + The checkout header content type text value. + """ + TEXT +} + +""" +The input fields for updating the cart link customizations at checkout. +""" +input CheckoutBrandingCartLinkInput { + """ + The input to update the visibility of cart links in checkout. This hides the + cart icon on one-page and the cart link in the breadcrumbs/buyer journey on + three-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Defines the visual styling for checkbox elements throughout the checkout +interface, focusing on corner radius customization. This allows merchants to +align checkbox appearance with their overall design aesthetic. + +For example, a modern minimalist brand might prefer sharp, square checkboxes +while a friendly consumer brand could opt for rounded corners to create a +softer, more approachable feel. + +The corner radius setting ensures checkboxes integrate seamlessly with the +overall checkout design language and brand identity. +""" +type CheckoutBrandingCheckbox { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields used to update the checkboxes customizations. +""" +input CheckoutBrandingCheckboxInput { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +Controls spacing customization for the grouped variant of choice list components in checkout forms. + +The `ChoiceList` object contains settings specifically for the 'group' variant +styling through the [`ChoiceListGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceListGroup) +field, which determines the spacing between choice options. +""" +type CheckoutBrandingChoiceList { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroup +} + +""" +Controls the spacing between options in the 'group' variant of [`ChoiceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceList) components. + +This setting adjusts the vertical spacing between choice options to improve +readability and visual organization. The spacing value helps create clear +separation between options, making it easier for customers to scan and select +from available choices. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingChoiceListGroup { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to update the settings that apply to the 'group' variant of ChoiceList. +""" +input CheckoutBrandingChoiceListGroupInput { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to use to update the choice list customizations. +""" +input CheckoutBrandingChoiceListInput { + """ + The settings that apply to the 'group' variant of ChoiceList. + """ + group: CheckoutBrandingChoiceListGroupInput +} + +""" +Defines the global color roles for checkout branding. These semantic colors +maintain consistency across all checkout elements and provide the foundation for +the checkout's visual design system. + +Use global colors to: +- Set brand colors for primary actions and buttons +- Define accent colors for links and interactive elements +- Configure semantic colors for success, warning, and error states +- Apply decorative colors for visual highlights + +For example, a merchant might set their brand blue for primary buttons, green +for success messages, amber for warnings, and red for critical errors, creating +a consistent color language throughout checkout. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingColorGlobal { + """ + A color used for interaction, like links and focus states. + """ + accent: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, for example **Pay now**, and secondary buttons, for example **Buy again**. + """ + brand: String + + """ + A semantic color used for components that communicate critical content. For + example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String + + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires + attention. For example, something that might be wrong, but not blocking. + """ + warning: String +} + +""" +The input fields to customize the overall look and feel of the checkout. +""" +input CheckoutBrandingColorGlobalInput { + """ + A 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 group of colors used together on a surface. +""" +type CheckoutBrandingColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields for a group of colors used together on a surface. +""" +input CheckoutBrandingColorRolesInput { + """ + The color of 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 { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRoles + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRoles + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRoles + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRoles +} + +""" +The input fields for a base set of color customizations that's applied to an area of Checkout, from which +every component pulls its colors. +""" +input CheckoutBrandingColorSchemeInput { + """ + The main colors of a scheme. Used for the surface background, text, links, and more. + """ + base: CheckoutBrandingColorRolesInput + + """ + The colors of form controls, such as the [`TextField`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/textfield) and [`ChoiceList`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/forms/choicelist) components. + """ + control: CheckoutBrandingControlColorRolesInput + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutBrandingButtonColorRolesInput + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutBrandingButtonColorRolesInput +} + +""" +The possible color schemes. +""" +enum CheckoutBrandingColorSchemeSelection { + """ + The 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 TRANSPARENT color scheme selection. + """ + TRANSPARENT +} + +""" +The color schemes. +""" +type CheckoutBrandingColorSchemes { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorScheme + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorScheme +} + +""" +The input fields for the color schemes. +""" +input CheckoutBrandingColorSchemesInput { + """ + The primary scheme. By default, it’s used for the main area of the interface. + """ + scheme1: CheckoutBrandingColorSchemeInput + + """ + The secondary scheme. By default, it’s used for secondary areas, like Checkout’s Order Summary. + """ + scheme2: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme3: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme4: CheckoutBrandingColorSchemeInput +} + +""" +The possible colors. +""" +enum CheckoutBrandingColorSelection { + """ + Transparent color selection. + """ + TRANSPARENT +} + +""" +The color settings for global colors and color schemes. +""" +type CheckoutBrandingColors { + """ + A group of global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobal + + """ + A set of color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemes +} + +""" +The input fields used to update the color settings for global colors and color schemes. +""" +input CheckoutBrandingColorsInput { + """ + The input to update global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobalInput + + """ + The input to define color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemesInput +} + +""" +The container's divider customizations. +""" +type CheckoutBrandingContainerDivider { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update a container's divider customizations. +""" +input CheckoutBrandingContainerDividerInput { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The content container customizations. +""" +type CheckoutBrandingContent { + """ + The content container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider +} + +""" +The input fields used to update the content container customizations. +""" +input CheckoutBrandingContentInput { + """ + Divider style and visibility on the content container. + """ + divider: CheckoutBrandingContainerDividerInput +} + +""" +The form controls customizations. +""" +type CheckoutBrandingControl { + """ + The border used for form controls. + """ + border: CheckoutBrandingSimpleBorder + + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls + inherit colors from their scheme settings (for example, the main section + inherits from `design_system.colors.schemes.scheme1.control` by default). Note + that usage of the `customizations.control.color` setting to customize the form + control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """ + The corner radius used for form controls. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The label position used for form controls. + """ + labelPosition: CheckoutBrandingLabelPosition +} + +""" +Colors for form controls. +""" +type CheckoutBrandingControlColorRoles { + """ + The color of accented objects (links and focused state). + """ + accent: String + + """ + The color of the background. + """ + background: String + + """ + The color of borders. + """ + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """ + The color of icons. + """ + icon: String + + """ + The colors of selected controls. + """ + selected: CheckoutBrandingColorRoles + + """ + The color of text. + """ + text: String +} + +""" +The input fields to define colors for form controls. +""" +input CheckoutBrandingControlColorRolesInput { + """ + The color of 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 { + """ + 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 { + """ + 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 { + """ + The value in pixels for base corner radii. Example: 5. + """ + base: Int + + """ + The value in pixels for large corner radii. Example: 10. + """ + large: Int + + """ + The value in pixels for small corner radii. Example: 3. + """ + small: Int +} + +""" +The input fields used to update the corner radius variables. +""" +input CheckoutBrandingCornerRadiusVariablesInput { + """ + The value in pixels for 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 { + """ + Globally unique ID reference to the custom font file. + """ + genericFileId: ID + + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields required to update a custom font group. +""" +input CheckoutBrandingCustomFontGroupInput { + """ + The base font. + """ + base: CheckoutBrandingCustomFontInput! + + """ + The bold font. + """ + bold: CheckoutBrandingCustomFontInput! + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +""" +The input fields required to update a font. +""" +input CheckoutBrandingCustomFontInput { + """ + A globally-unique ID for a font file uploaded via the Files api. + Allowed font types are .woff and .woff2. + """ + genericFileId: ID! + + """ + 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 { + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourney + + """ + The checkout cart link customizations. For example, by setting the visibility + field to `HIDDEN`, you can hide the cart icon in the header for one-page + checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLink + + """ + The checkboxes customizations. + """ + checkbox: CheckoutBrandingCheckbox + + """ + The choice list customizations. + """ + choiceList: CheckoutBrandingChoiceList + + """ + The content container customizations. + """ + content: CheckoutBrandingContent + + """ + The form controls customizations. + """ + control: CheckoutBrandingControl + + """ + The customizations for the page, content, main, and order summary dividers. + For example, by setting the borderStyle to `DOTTED`, you can make these + dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyle + + """ + The express checkout customizations. + """ + expressCheckout: CheckoutBrandingExpressCheckout + + """ + The favicon image. + """ + favicon: CheckoutBrandingImage + + """ + The footer customizations. + """ + footer: CheckoutBrandingFooter + + """ + The global customizations. + """ + global: CheckoutBrandingGlobal + + """ + The header customizations. + """ + header: CheckoutBrandingHeader + + """ + The Heading Level 1 customizations. + """ + headingLevel1: CheckoutBrandingHeadingLevel + + """ + The Heading Level 2 customizations. + """ + headingLevel2: CheckoutBrandingHeadingLevel + + """ + The Heading Level 3 customizations. + """ + headingLevel3: CheckoutBrandingHeadingLevel + + """ + The main area customizations. + """ + main: CheckoutBrandingMain + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnail + + """ + The order summary customizations. + """ + orderSummary: CheckoutBrandingOrderSummary + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutBrandingButton + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutBrandingButton + + """ + The selects customizations. + """ + select: CheckoutBrandingSelect + + """ + The text fields customizations. + """ + textField: CheckoutBrandingTextField +} + +""" +The input fields used to update the components customizations. +""" +input CheckoutBrandingCustomizationsInput { + """ + The 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 { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColors + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariables + + """ + The typography. + """ + typography: CheckoutBrandingTypography +} + +""" +The input fields used to update the design system. +""" +input CheckoutBrandingDesignSystemInput { + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColorsInput + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariablesInput + + """ + The typography. + """ + typography: CheckoutBrandingTypographyInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutBrandingDividerStyle { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The input fields used to update the page, content, main and order summary dividers customizations. +""" +input CheckoutBrandingDividerStyleInput { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The Express Checkout customizations. +""" +type CheckoutBrandingExpressCheckout { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButton +} + +""" +The Express Checkout button customizations. +""" +type CheckoutBrandingExpressCheckoutButton { + """ + The corner radius used for the Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the express checkout customizations. +""" +input CheckoutBrandingExpressCheckoutButtonInput { + """ + The corner radius used for Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the Express Checkout customizations. +""" +input CheckoutBrandingExpressCheckoutInput { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButtonInput +} + +""" +A font. +""" +interface CheckoutBrandingFont { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +A font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +type CheckoutBrandingFontGroup { + """ + The base font. + """ + base: CheckoutBrandingFont + + """ + The bold font. + """ + bold: CheckoutBrandingFont + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy + + """ + The font group name. + """ + name: String +} + +""" +The input fields used to update a font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +input CheckoutBrandingFontGroupInput { + """ + A 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 { + """ + 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 { + """ + The base font size. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. + """ + ratio: Float +} + +""" +The input fields used to update the font size. +""" +input CheckoutBrandingFontSizeInput { + """ + The base font size. Its value should be between 12.0 and 18.0. + """ + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. Its value should be between 1.0 and 1.4. + """ + ratio: Float +} + +""" +A container for the footer section customizations. +""" +type CheckoutBrandingFooter { + """ + The footer alignment. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The selected color scheme of the footer container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The footer content settings. + """ + content: CheckoutBrandingFooterContent + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The footer position. + """ + position: CheckoutBrandingFooterPosition +} + +""" +Possible values for the footer alignment. +""" +enum CheckoutBrandingFooterAlignment { + """ + The checkout footer alignment Center value. + """ + CENTER + + """ + The checkout footer alignment End value. + """ + END + + """ + The checkout footer alignment Start value. + """ + START +} + +""" +The footer content customizations. +""" +type CheckoutBrandingFooterContent { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for footer content customizations. +""" +input CheckoutBrandingFooterContentInput { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields when mutating the checkout footer settings. +""" +input CheckoutBrandingFooterInput { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + 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 { + """ + The End footer position. + """ + END + + """ + The Inline footer position. + """ + INLINE +} + +""" +The global customizations. +""" +type CheckoutBrandingGlobal { + """ + The global corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobal +} + +""" +Possible choices to override corner radius customizations on all applicable objects. Note that this selection +can only be used to set the override to `NONE` (0px). + +For more customizations options, set the [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) +selection on specific objects while leaving the global corner radius unset. +""" +enum CheckoutBrandingGlobalCornerRadius { + """ + Set the global corner radius override to 0px (square corners). + """ + NONE +} + +""" +The input fields used to update the global customizations. +""" +input CheckoutBrandingGlobalInput { + """ + Select a global corner radius setting that overrides all other [corner radii](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """ + The global typography customizations. + """ + typography: CheckoutBrandingTypographyStyleGlobalInput +} + +""" +The header customizations. +""" +type CheckoutBrandingHeader { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The background image of the header. + """ + banner: CheckoutBrandingImage + + """ + The cart link customizations for 1-page checkout. This field allows to + customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLink + + """ + The selected color scheme of the header container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutBrandingLogo + + """ + The padding of the header container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutBrandingHeaderPosition +} + +""" +The possible header alignments. +""" +enum CheckoutBrandingHeaderAlignment { + """ + Center alignment. + """ + CENTER + + """ + End alignment. + """ + END + + """ + Start alignment. + """ + START +} + +""" +The header cart link customizations. +""" +type CheckoutBrandingHeaderCartLink { + """ + The content type for the header back to cart link in 1-page checkout. Setting + this to image will render the custom image provided using the image field on + the header cart_link object. If no image is provided, the default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The image that's used for the header back to cart link in 1-page checkout when the content type is set to image. + """ + image: Image +} + +""" +The input fields for header cart link customizations. +""" +input CheckoutBrandingHeaderCartLinkInput { + """ + The input for the content type for the header back to cart link in 1-page + checkout. Setting this to image will render the custom image provided using + the image field on the header cart_link object. If no image is provided, the + default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The input for the image that's used for the header back to cart link in 1-page + checkout when the content type is set to image. + """ + image: CheckoutBrandingImageInput +} + +""" +The input fields used to update the header customizations. +""" +input CheckoutBrandingHeaderInput { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The 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 { + """ + Inline position. + """ + INLINE + + """ + Secondary inline position. + """ + INLINE_SECONDARY + + """ + Start position. + """ + START +} + +""" +The heading level customizations. +""" +type CheckoutBrandingHeadingLevel { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields for heading level customizations. +""" +input CheckoutBrandingHeadingLevelInput { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +A checkout branding image. +""" +type CheckoutBrandingImage { + """ + The image details. + """ + image: Image +} + +""" +The input fields used to update a checkout branding image uploaded via the Files API. +""" +input CheckoutBrandingImageInput { + """ + A globally-unique ID. + """ + mediaImageId: ID +} + +""" +The input fields used to upsert the checkout branding settings. +""" +input CheckoutBrandingInput { + """ + The 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 { + """ + The Inside label position. + """ + INSIDE + + """ + The Outside label position. + """ + OUTSIDE +} + +""" +The store logo customizations. +""" +type CheckoutBrandingLogo { + """ + The logo image. + """ + image: Image + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields used to update the logo customizations. +""" +input CheckoutBrandingLogoInput { + """ + The logo image (must not be of SVG format). + """ + image: CheckoutBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The main container customizations. +""" +type CheckoutBrandingMain { + """ + The background image of the main container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the main container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The main container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the main sections. + """ + section: CheckoutBrandingMainSection +} + +""" +The input fields used to update the main container customizations. +""" +input CheckoutBrandingMainInput { + """ + The 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 { + """ + The background style of the main sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the main sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the main sections customizations. +""" +input CheckoutBrandingMainSectionInput { + """ + The 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 { + """ + The settings for the merchandise thumbnail badge. + """ + badge: CheckoutBrandingMerchandiseThumbnailBadge + + """ + The border used for merchandise thumbnails. + """ + border: CheckoutBrandingSimpleBorder + + """ + The corner radius used for merchandise thumbnails. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutBrandingObjectFit +} + +""" +The merchandise thumbnail badges customizations. +""" +type CheckoutBrandingMerchandiseThumbnailBadge { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The merchandise thumbnail badge background. +""" +enum CheckoutBrandingMerchandiseThumbnailBadgeBackground { + """ + The Accent background. + """ + ACCENT + + """ + The Base background. + """ + BASE +} + +""" +The input fields used to update the merchandise thumbnail badges customizations. +""" +input CheckoutBrandingMerchandiseThumbnailBadgeInput { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The input fields used to update the merchandise thumbnails customizations. +""" +input CheckoutBrandingMerchandiseThumbnailInput { + """ + The 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 { + """ + The Contain value for fit. The image is scaled to maintain its aspect ratio + while fitting within the containing box. The entire image is made to fill the + box, while preserving its aspect ratio, so the image will be "letterboxed" if + its aspect ratio does not match the aspect ratio of the box. This is the default value. + """ + CONTAIN + + """ + The Cover value for fit. The image is sized to maintain its aspect ratio while + filling the entire containing box. If the image’s aspect ratio does not match + the aspect ratio of the containing box, then the object will be clipped to fit. + """ + COVER +} + +""" +The order summary customizations. +""" +type CheckoutBrandingOrderSummary { + """ + The background image of the order summary container. + """ + backgroundImage: CheckoutBrandingImage + + """ + The selected color scheme of the order summary container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The order summary container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider + + """ + The settings for the order summary sections. + """ + section: CheckoutBrandingOrderSummarySection +} + +""" +The input fields used to update the order summary container customizations. +""" +input CheckoutBrandingOrderSummaryInput { + """ + The 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 { + """ + The background style of the order summary sections. + """ + background: CheckoutBrandingBackground + + """ + The border for the order summary sections. + """ + border: CheckoutBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The selected color scheme of the order summary sections. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutBrandingCornerRadius + + """ + The padding of the order summary sections. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the order summary sections customizations. +""" +input CheckoutBrandingOrderSummarySectionInput { + """ + The 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 { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the selects customizations. +""" +input CheckoutBrandingSelectInput { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The container shadow. +""" +enum CheckoutBrandingShadow { + """ + The 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 { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields used to update a Shopify font group. +""" +input CheckoutBrandingShopifyFontGroupInput { + """ + 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 { + """ + The Full simple border. + """ + FULL + + """ + The None simple border. + """ + NONE +} + +""" +Possible values for the spacing. +""" +enum CheckoutBrandingSpacing { + """ + 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 { + """ + 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 { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields used to update the text fields customizations. +""" +input CheckoutBrandingTextFieldInput { + """ + The border used for text fields. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for text fields. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The typography settings used for checkout-related text. Use these settings to customize the +font family and size for primary and secondary text elements. + +Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for further information on typography customization. +""" +type CheckoutBrandingTypography { + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroup + + """ + A font group used for heading components by default. + """ + secondary: CheckoutBrandingFontGroup + + """ + The font size design system (base size in pixels and scaling between different sizes). + """ + size: CheckoutBrandingFontSize +} + +""" +The font selection. +""" +enum CheckoutBrandingTypographyFont { + """ + The primary font. + """ + PRIMARY + + """ + The secondary font. + """ + SECONDARY +} + +""" +The input fields used to update the typography. Refer to the [typography +tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information on how to set these fields. +""" +input CheckoutBrandingTypographyInput { + """ + 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 { + """ + 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 { + """ + All letters are is lower case. + """ + LOWER + + """ + No letter casing applied. + """ + NONE + + """ + Capitalize the first letter of each word. + """ + TITLE + + """ + All letters are uppercase. + """ + UPPER +} + +""" +Possible choices for the font size. + +Note that the value in pixels of these settings can be customized with the +[typography size](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingFontSizeInput) +object. Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information. +""" +enum CheckoutBrandingTypographySize { + """ + The 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 { + """ + The font. + """ + font: CheckoutBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutBrandingTypographyWeight +} + +""" +The global typography customizations. +""" +type CheckoutBrandingTypographyStyleGlobal { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the global typography customizations. +""" +input CheckoutBrandingTypographyStyleGlobalInput { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the typography customizations. +""" +input CheckoutBrandingTypographyStyleInput { + """ + 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 { + """ + The base weight. + """ + BASE + + """ + The bold weight. + """ + BOLD +} + +""" +Return type for `checkoutBrandingUpsert` mutation. +""" +type CheckoutBrandingUpsertPayload { + """ + Returns the new checkout branding settings. + """ + checkoutBranding: CheckoutBranding + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CheckoutBrandingUpsertUserError!]! +} + +""" +An error that occurs during the execution of `CheckoutBrandingUpsert`. +""" +type CheckoutBrandingUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: CheckoutBrandingUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CheckoutBrandingUpsertUserError`. +""" +enum CheckoutBrandingUpsertUserErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +Possible visibility states. +""" +enum CheckoutBrandingVisibility { + """ + The Hidden visibility setting. + """ + HIDDEN + + """ + The Visible visibility setting. + """ + VISIBLE +} + +""" +A checkout profile defines the branding settings and the UI extensions for a +store's checkout. A checkout profile could be published or draft. A store might +have at most one published checkout profile, which is used to render their live +checkout. The store could also have multiple draft profiles that were created, +previewed, and published using the admin checkout editor. +""" +type CheckoutProfile implements Node { + """ + The date and time when the checkout profile was created. + """ + createdAt: DateTime! + + """ + The date and time when the checkout profile was last edited. + """ + editedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the checkout profile is published or not. + """ + isPublished: Boolean! + + """ + The profile name. + """ + name: String! + + """ + Whether the checkout profile Thank You Page and Order Status Page are actively using extensibility or not. + """ + typOspPagesActive: Boolean! + + """ + The date and time when the checkout profile was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CheckoutProfiles. +""" +type CheckoutProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CheckoutProfileEdge!]! + + """ + A list of nodes that are contained in CheckoutProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CheckoutProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CheckoutProfile and a cursor during pagination. +""" +type CheckoutProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CheckoutProfileEdge. + """ + node: CheckoutProfile! +} + +""" +The set of valid sort keys for the CheckoutProfile query. +""" +enum CheckoutProfileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `edited_at` value. + """ + EDITED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `is_published` value. + """ + IS_PUBLISHED + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields for adding products to the Combined Listing. +""" +input ChildProductRelationInput { + """ + The ID of the child product. + """ + childProductId: ID! + + """ + The parent option values. + """ + selectedParentOptionValues: [SelectedVariantOptionInput!]! +} + +""" +The set of valid sort keys for the CodeDiscount query. +""" +enum CodeDiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The `Collection` object represents a group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that merchants can organize to make their stores easier to browse and help customers find related products. +Collections serve as the primary way to categorize and display products across +[online stores](https://shopify.dev/docs/apps/build/online-store), +[sales channels](https://shopify.dev/docs/apps/build/sales-channels), and marketing campaigns. + +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 { + """ + Collection duplicate operations involving this collection, either as a source + (copying products from this collection to another) or a target (copying + products to this collection from another). + """ + activeOperations: CollectionOperations! + + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + A single-line, text-only description of the collection, stripped of any HTML + tags and formatting that were included in the description. + """ + description( + """ + Truncates a string after the given length. + """ + truncateAt: Int + ): String! + + """ + The description of the collection, including any HTML tags and formatting. + This content is typically displayed to customers, such as on an online store, + depending on the theme. + """ + descriptionHtml: HTML! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): 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 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 number of products in the collection. + """ + productsCount: Count + + """ + 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + The channels where the collection is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + 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 + ): [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.") + + """ + 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! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the collection was last modified. + """ + updatedAt: DateTime! +} + +""" +Return type for `collectionAddProducts` mutation. +""" +type CollectionAddProductsPayload { + """ + The updated collection. Returns `null` if an error is raised. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionAddProductsV2` mutation. +""" +type CollectionAddProductsV2Payload { + """ + The asynchronous job adding the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionAddProductsV2UserError!]! +} + +""" +An error that occurs during the execution of `CollectionAddProductsV2`. +""" +type CollectionAddProductsV2UserError implements DisplayableError { + """ + The error code. + """ + code: CollectionAddProductsV2UserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionAddProductsV2UserError`. +""" +enum CollectionAddProductsV2UserErrorCode { + """ + Can't manually add products to a smart collection. + """ + CANT_ADD_TO_SMART_COLLECTION + + """ + Collection doesn't exist. + """ + COLLECTION_DOES_NOT_EXIST +} + +""" +An auto-generated type for paginating through multiple Collections. +""" +type CollectionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionEdge!]! + + """ + A list of nodes that are contained in CollectionEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Collection!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `collectionCreate` mutation. +""" +type CollectionCreatePayload { + """ + The collection that has been created. + """ + collection: Collection + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the collection to delete. +""" +input CollectionDeleteInput { + """ + The ID of the collection to be deleted. + """ + id: ID! +} + +""" +Return type for `collectionDelete` mutation. +""" +type CollectionDeletePayload { + """ + The ID of the collection that was deleted. Returns `null` if the collection doesn't exist. + """ + deletedCollectionId: ID + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for duplicating a collection. +""" +input CollectionDuplicateInput { + """ + The ID of the collection to be duplicated. + """ + collectionId: ID! + + """ + 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 { + """ + Whether the collection is the source that products are being duplicated from, + or the target collection that products are being duplicated onto. + """ + collectionRole: CollectionDuplicateOperationRole! + + """ + The background job performing the duplication. + """ + job: Job! +} + +""" +The role a collection plays in a duplication operation. +""" +enum CollectionDuplicateOperationRole { + """ + Products are being duplicated from this collection. + """ + SOURCE + + """ + Products are being duplicated onto this collection. + """ + TARGET +} + +""" +Return type for `collectionDuplicate` mutation. +""" +type CollectionDuplicatePayload { + """ + The newly created duplicate collection. Will contain all data if duplication completed synchronously. + If async processing is required, the collection will be created but products will be added in the background + and can be tracked via the job field or the collection's active_operations field. + """ + collection: Collection + + """ + The background job copying manually included products onto the target + collection. Only returned if async processing is required, otherwise products + will be copied synchronously when the collection is created. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionDuplicateUserError!]! +} + +""" +Errors related to collection duplication. +""" +type CollectionDuplicateUserError implements DisplayableError { + """ + The error code. + """ + code: CollectionDuplicateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionDuplicateUserError`. +""" +enum CollectionDuplicateUserErrorCode { + """ + The collection was not found. Please check the collection ID and try again. + """ + COLLECTION_NOT_FOUND +} + +""" +An auto-generated type which holds one Collection and a cursor during pagination. +""" +type CollectionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionEdge. + """ + node: Collection! +} + +""" +The input fields for identifying a collection. +""" +input CollectionIdentifierInput @oneOf { + """ + The [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 { + """ + The description of the collection, in HTML format. + """ + descriptionHtml: String + + """ + A unique human-friendly string for the collection. Automatically generated from the collection's title. + """ + handle: String + + """ + Specifies the collection to update or create a new collection if absent. Required for updating a collection. + """ + id: ID + + """ + The image associated with the collection. + """ + image: ImageInput + + """ + The metafields to associate with the collection. + """ + metafields: [MetafieldInput!] + + """ + Initial list of collection products. Only valid with `collectionCreate` and without rules. + """ + products: [ID!] + + """ + 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 { + """ + Collection duplicate operations. + """ + duplicate: [CollectionDuplicateOperation!]! +} + +""" +Represents the publication status and settings for a collection across different +sales channels. This tracks where collections are published, when they were +published, and any channel-specific configuration. + +For example, a "Holiday Gifts" collection might be published to the online store +and Facebook Shop but not to the POS channel, with different publication dates +for each channel based on marketing strategy. + +Use `CollectionPublication` to: +- Track collection visibility across multiple sales channels +- Manage channel-specific collection settings and availability +- Monitor publication history and timing for collections +- Control where collections appear in customer-facing channels +- Implement channel-specific collection management workflows + +Each publication record includes the channel information, publication status, +and timing details. This enables merchants to control collection visibility +strategically across their sales channels. + +Collections can have different publication settings per channel, allowing for +targeted marketing and inventory management. For instance, wholesale collections +might only be published to B2B channels while retail collections appear in +consumer-facing channels. + +The publication system integrates with Shopify's broader channel management, +ensuring collections appear consistently across the merchant's sales ecosystem +while respecting channel-specific rules and permissions. + +Learn more about [sales channel management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). +""" +type CollectionPublication { + """ + The channel where the collection will be published. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + The collection to be published on the publication. + """ + collection: Collection! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The publication where the collection will be published. + """ + publication: Publication! + + """ + The date that the publication was or is going to be published. + """ + publishDate: DateTime! +} + +""" +An auto-generated type for paginating through multiple CollectionPublications. +""" +type CollectionPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionPublicationEdge!]! + + """ + A list of nodes that are contained in CollectionPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CollectionPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CollectionPublication and a cursor during pagination. +""" +type CollectionPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CollectionPublicationEdge. + """ + node: CollectionPublication! +} + +""" +The input fields for publications to which a collection will be published. +""" +input CollectionPublicationInput { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + The ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + The ID of the publication. + """ + publicationId: ID +} + +""" +The input fields for specifying a collection to publish and the sales channels to publish it to. +""" +input CollectionPublishInput { + """ + The channels where the collection will be published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! +} + +""" +Return type for `collectionPublish` mutation. +""" +type CollectionPublishPayload { + """ + The published collection. + """ + collection: Collection + + """ + The channels where the collection has been published. + """ + collectionPublications: [CollectionPublication!] + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionRemoveProducts` mutation. +""" +type CollectionRemoveProductsPayload { + """ + The asynchronous job removing the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionReorderProducts` mutation. +""" +type CollectionReorderProductsPayload { + """ + The asynchronous job reordering the products. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CollectionReorderProductsUserError!]! +} + +""" +Errors related to order customer removal. +""" +type CollectionReorderProductsUserError implements DisplayableError { + """ + The error code. + """ + code: CollectionReorderProductsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CollectionReorderProductsUserError`. +""" +enum CollectionReorderProductsUserErrorCode { + """ + 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 { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The value that the operator is applied to. For example, `Hats`. + """ + condition: String! + + """ + The value that the operator is applied to. + """ + conditionObject: CollectionRuleConditionObject + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! +} + +""" +Specifies the taxonomy category to used for the condition. +""" +type CollectionRuleCategoryCondition { + """ + The taxonomy category used as condition. + """ + value: TaxonomyCategory! +} + +""" +Specifies the attribute of a product being used to populate the smart collection. +""" +enum CollectionRuleColumn { + """ + 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 = 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 { + """ + Allowed relations of the rule. + """ + allowedRelations: [CollectionRuleRelation!]! + + """ + Most commonly used relation for this rule. + """ + defaultRelation: CollectionRuleRelation! + + """ + Additional attributes defining the rule. + """ + ruleObject: CollectionRuleConditionsRuleObject + + """ + Type of the rule. + """ + ruleType: CollectionRuleColumn! +} + +""" +Specifies object with additional rule attributes. +""" +union CollectionRuleConditionsRuleObject = CollectionRuleMetafieldCondition + +""" +The input fields for a rule to associate with a collection. +""" +input CollectionRuleInput { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """ + The 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 { + """ + The metafield definition associated with the condition. + """ + metafieldDefinition: MetafieldDefinition! +} + +""" +Specifies the condition for a Product Category field. +""" +type CollectionRuleProductCategoryCondition { + """ + The value of the condition. + """ + value: ProductTaxonomyNode! +} + +""" +Specifies the relationship between the `column` and the `condition`. +""" +enum CollectionRuleRelation { + """ + The attribute contains the condition. + """ + CONTAINS + + """ + The attribute ends with the condition. + """ + ENDS_WITH + + """ + The attribute is equal to the condition. + """ + EQUALS + + """ + The attribute is greater than the condition. + """ + GREATER_THAN + + """ + The attribute is not set (equal to `null`). + """ + IS_NOT_SET + + """ + The attribute is set (not equal to `null`). + """ + IS_SET + + """ + The attribute is less than the condition. + """ + LESS_THAN + + """ + The attribute does not contain the condition. + """ + NOT_CONTAINS + + """ + The attribute does not equal the condition. + """ + NOT_EQUALS + + """ + The attribute starts with the condition. + """ + STARTS_WITH +} + +""" +The set of rules that are used to determine which products are included in the collection. +""" +type CollectionRuleSet { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRule!]! +} + +""" +The input fields for a rule set of the collection. +""" +input CollectionRuleSetInput { + """ + Whether products must match any or all of the rules to be included in the collection. + If true, then products must match at least one of the rules to be included in the collection. + If false, then products must match all of the rules to be included in the collection. + """ + appliedDisjunctively: Boolean! + + """ + The rules used to assign products to the collection. + """ + rules: [CollectionRuleInput!] +} + +""" +Specifies the condition for a text field. +""" +type CollectionRuleTextCondition { + """ + The value of the condition. + """ + value: String! +} + +""" +The set of valid sort keys for the Collection query. +""" +enum CollectionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Specifies the sort order for the products in the collection. +""" +enum CollectionSortOrder { + """ + Alphabetically, in ascending order (A - Z). + """ + ALPHA_ASC + + """ + Alphabetically, in descending order (Z - A). + """ + ALPHA_DESC + + """ + By best-selling products. + """ + BEST_SELLING + + """ + By date created, in ascending order (oldest - newest). + """ + CREATED + + """ + By date created, in descending order (newest - oldest). + """ + CREATED_DESC + + """ + In the order set manually by the merchant. + """ + MANUAL + + """ + By price, in ascending order (lowest - highest). + """ + PRICE_ASC + + """ + By price, in descending order (highest - lowest). + """ + PRICE_DESC +} + +""" +The input fields for specifying the collection to unpublish and the sales channels to remove it from. +""" +input CollectionUnpublishInput { + """ + The channels where the collection is published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! +} + +""" +Return type for `collectionUnpublish` mutation. +""" +type CollectionUnpublishPayload { + """ + The collection that has been unpublished. + """ + collection: Collection + + """ + The shop associated with the collection. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `collectionUpdate` mutation. +""" +type CollectionUpdatePayload { + """ + The updated collection. + """ + collection: Collection + + """ + The asynchronous job updating the products based on the new rule set. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a hexadecimal representation of a color. + +For example, "#6A8D48". +""" +scalar Color + +""" +The data type of a column. +""" +enum ColumnDataType { + """ + Represents an array of values. + """ + ARRAY + + """ + Represents a boolean value. + """ + BOOLEAN + + """ + 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 duration in seconds. + """ + SECOND_DURATION + + """ + Represents a second-level timestamp value. + """ + SECOND_TIMESTAMP + + """ + Represents a string value. + """ + STRING + + """ + 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 { + """ + 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 { + """ + The parent variant. + """ + parentVariant: ProductVariant! + + """ + The child product. + """ + product: Product! +} + +""" +An auto-generated type for paginating through multiple CombinedListingChildren. +""" +type CombinedListingChildConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CombinedListingChildEdge!]! + + """ + A list of nodes that are contained in CombinedListingChildEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CombinedListingChild!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CombinedListingChild and a cursor during pagination. +""" +type CombinedListingChildEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CombinedListingChildEdge. + """ + node: CombinedListingChild! +} + +""" +Return type for `combinedListingUpdate` mutation. +""" +type CombinedListingUpdatePayload { + """ + The parent product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CombinedListingUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CombinedListingUpdate`. +""" +type CombinedListingUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CombinedListingUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CombinedListingUpdateUserError`. +""" +enum CombinedListingUpdateUserErrorCode { + """ + Unable to add duplicated products. + """ + CANNOT_HAVE_DUPLICATED_PRODUCTS + + """ + Unable to add a product that is a parent. + """ + CANNOT_HAVE_PARENT_AS_CHILD + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The comment that was approved. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentApproveUserError!]! +} + +""" +An error that occurs during the execution of `CommentApprove`. +""" +type CommentApproveUserError implements DisplayableError { + """ + The error code. + """ + code: CommentApproveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentApproveUserError`. +""" +enum CommentApproveUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The author of a comment on a blog article, containing the commenter's name and +email address. This information helps merchants moderate comments and +potentially engage with their community. + +For example, when reviewing pending comments, merchants can see the commenter's +name and email to help with moderation decisions or to enable follow-up +communication if needed. + +Use the `CommentAuthor` object to: +- Display comment attribution +- Support comment moderation workflows +- Enable merchant-to-reader communication +""" +type CommentAuthor { + """ + The author's email. + """ + email: String! + + """ + The author’s name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple Comments. +""" +type CommentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CommentEdge!]! + + """ + A list of nodes that are contained in CommentEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Comment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `commentDelete` mutation. +""" +type CommentDeletePayload { + """ + The ID of the comment that was deleted. + """ + deletedCommentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CommentDelete`. +""" +type CommentDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: CommentDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentDeleteUserError`. +""" +enum CommentDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Comment and a cursor during pagination. +""" +type CommentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CommentEdge. + """ + node: Comment! +} + +""" +A comment that staff members add to the timeline of +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer), +[`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company), [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation), or [`PriceRule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceRule) +objects. Staff use comments to document internal notes, communicate with team +members, and track important information about these types. + +The comment includes information like the [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) +who authored it, when it was created, and whether it's editable or deletable. +Comments can have file attachments and reference related objects like +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +objects through embeds. +""" +type CommentEvent implements Event & Node { + """ + The action that occured. + """ + action: String! + + """ + The name of the app that created the event. + """ + appTitle: String + + """ + The attachments associated with the comment event. + """ + attachments: [CommentEventAttachment!]! + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The name of the user that authored the comment event. + """ + author: StaffMember! + + """ + Whether the comment event can be deleted. If true, then the comment event can be deleted. + """ + canDelete: Boolean! + + """ + Whether the comment event can be edited. If true, then the comment event can be edited. + """ + canEdit: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + Whether the comment event has been edited. If true, then the comment event has been edited. + """ + edited: Boolean! + + """ + The object reference associated with the comment event. For example, a product or discount). + """ + embed: CommentEventEmbed + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! + + """ + The raw body of the comment event. + """ + rawMessage: String! + + """ + The parent subject to which the comment event belongs. + """ + subject: CommentEventSubject +} + +""" +A file attachment associated to a comment event. +""" +type CommentEventAttachment { + """ + The file extension of the comment event attachment, indicating the file format. + """ + fileExtension: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image attached to the comment event. + """ + image( + """ + 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 = Customer | DraftOrder | InventoryTransfer | Order | Product | ProductVariant + +""" +The subject line of a comment event. +""" +interface CommentEventSubject { + """ + Whether the timeline subject has a timeline comment. If true, then a timeline comment exists. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Return type for `commentNotSpam` mutation. +""" +type CommentNotSpamPayload { + """ + The comment that was marked as not spam. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentNotSpamUserError!]! +} + +""" +An error that occurs during the execution of `CommentNotSpam`. +""" +type CommentNotSpamUserError implements DisplayableError { + """ + The error code. + """ + code: CommentNotSpamUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentNotSpamUserError`. +""" +enum CommentNotSpamUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Possible comment policies for a blog. +""" +enum CommentPolicy { + """ + Readers can post comments to blog articles without moderation. + """ + AUTO_PUBLISHED + + """ + Readers cannot post comments to blog articles. + """ + CLOSED + + """ + Readers can post comments to blog articles, but comments must be moderated before they appear. + """ + MODERATED +} + +""" +The set of valid sort keys for the Comment query. +""" +enum CommentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Return type for `commentSpam` mutation. +""" +type CommentSpamPayload { + """ + The comment that was marked as spam. + """ + comment: Comment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CommentSpamUserError!]! +} + +""" +An error that occurs during the execution of `CommentSpam`. +""" +type CommentSpamUserError implements DisplayableError { + """ + The error code. + """ + code: CommentSpamUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CommentSpamUserError`. +""" +enum CommentSpamUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The status of a comment. +""" +enum CommentStatus { + """ + The comment is 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 { + """ + A list of IDs of the deleted companies. + """ + deletedCompanyIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A business entity that purchases from the shop as part of B2B commerce. +Companies organize multiple locations and contacts who can place orders on +behalf of the organization. [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) +objects can have custom pricing through [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) and [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) +configurations. +""" +type Company implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Navigable & Node { + """ + The number of contacts that belong to the company. + """ + contactCount: Int! @deprecated(reason: "Use `contactsCount` instead.") + + """ + The list of roles for the company contacts. + """ + contactRoles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = ID + ): OrderConnection! + + """ + The total number of orders placed for this company, across all its locations. + """ + ordersCount: Count + + """ + The total amount spent by this company, across all its locations. + """ + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + """ + updatedAt: DateTime! +} + +""" +Represents a billing or shipping address for a company location. +""" +type CompanyAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String! + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company. + """ + companyName: String! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company address was created. + """ + createdAt: DateTime! + + """ + The first name of the recipient. + """ + firstName: String + + """ + The formatted version of the address. + """ + formattedAddress( + """ + Whether to include the company name in the formatted address. + """ + withCompanyName: Boolean = true + + """ + Whether to include the recipient's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the recipient. + """ + lastName: String + + """ + A unique phone number for the customer. + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The identity of the recipient e.g. 'Receiving Department'. + """ + recipient: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company address was last updated. + """ + updatedAt: DateTime! + + """ + The zip or postal code of the address. + """ + zip: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + zoneCode: String +} + +""" +Return type for `companyAddressDelete` mutation. +""" +type CompanyAddressDeletePayload { + """ + The ID of the deleted address. + """ + deletedAddressId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields to create or update the address of a company location. +""" +input CompanyAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The 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 { + """ + The address is a billing address. + """ + BILLING + + """ + The address is a shipping address. + """ + SHIPPING +} + +""" +Return type for `companyAssignCustomerAsContact` mutation. +""" +type CompanyAssignCustomerAsContactPayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyAssignMainContact` mutation. +""" +type CompanyAssignMainContactPayload { + """ + The company for which the main contact is assigned. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple Companies. +""" +type CompanyConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyEdge!]! + + """ + A list of nodes that are contained in CompanyEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Company!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A person who acts on behalf of a +[`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) +to make B2B purchases. Company contacts are associated with +[`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) +accounts and can place orders on behalf of their company. + +Each contact can be assigned to one or more [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) +objects with specific roles that determine their permissions and access to +catalogs, pricing, and payment terms configured for those locations. +""" +type CompanyContact implements Node { + """ + The company to which the contact belongs. + """ + company: Company! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company contact was created at Shopify. + """ + createdAt: DateTime! + + """ + The customer associated to this contact. + """ + customer: Customer! + + """ + The list of draft orders for the company contact. + """ + draftOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The company contact role assignment. + """ + companyContactRoleAssignment: CompanyContactRoleAssignment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactAssignRoles` mutation. +""" +type CompanyContactAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple CompanyContacts. +""" +type CompanyContactConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactEdge!]! + + """ + A list of nodes that are contained in CompanyContactEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContact!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyContactCreate` mutation. +""" +type CompanyContactCreatePayload { + """ + The created company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactDelete` mutation. +""" +type CompanyContactDeletePayload { + """ + The ID of the deleted company contact. + """ + deletedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyContact and a cursor during pagination. +""" +type CompanyContactEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactEdge. + """ + node: CompanyContact! +} + +""" +The input fields for company contact attributes when creating or updating a company contact. +""" +input CompanyContactInput { + """ + The 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 { + """ + The ID of the removed company contact. + """ + removedCompanyContactId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRole` mutation. +""" +type CompanyContactRevokeRolePayload { + """ + The role assignment that was revoked. + """ + revokedCompanyContactRoleAssignmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactRevokeRoles` mutation. +""" +type CompanyContactRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company contact. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The role for a [company contact](https://shopify.dev/api/admin-graphql/latest/objects/companycontact). +""" +type CompanyContactRole implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of a role. + For example, `admin` or `buyer`. + """ + name: String! + + """ + A note for the role. + """ + note: String +} + +""" +The input fields for the role and location to assign to a company contact. +""" +input CompanyContactRoleAssign { + """ + The role ID. + """ + companyContactRoleId: ID! + + """ + The location. + """ + companyLocationId: ID! +} + +""" +The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. +""" +type CompanyContactRoleAssignment implements Node { + """ + The company this role assignment belongs to. + """ + company: Company! + + """ + The company contact for whom this role is assigned. + """ + companyContact: CompanyContact! + + """ + The company location to which the role is assigned. + """ + companyLocation: CompanyLocation! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The role that's assigned to the company contact. + """ + role: CompanyContactRole! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoleAssignments. +""" +type CompanyContactRoleAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleAssignmentEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [CompanyContactRoleAssignment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination. +""" +type CompanyContactRoleAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleAssignmentEdge. + """ + node: CompanyContactRoleAssignment! +} + +""" +The set of valid sort keys for the CompanyContactRoleAssignment query. +""" +enum CompanyContactRoleAssignmentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location_name` value. + """ + LOCATION_NAME + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoles. +""" +type CompanyContactRoleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContactRole!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRole and a cursor during pagination. +""" +type CompanyContactRoleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyContactRoleEdge. + """ + node: CompanyContactRole! +} + +""" +The set of valid sort keys for the CompanyContactRole query. +""" +enum CompanyContactRoleSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyContactSendWelcomeEmail` mutation. +""" +type CompanyContactSendWelcomeEmailPayload { + """ + The company contact to whom a welcome email was sent. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the CompanyContact query. +""" +enum CompanyContactSortKeys { + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `name_email` value. + """ + NAME_EMAIL + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyContactUpdate` mutation. +""" +type CompanyContactUpdatePayload { + """ + The updated company contact. + """ + companyContact: CompanyContact + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyContactsDelete` mutation. +""" +type CompanyContactsDeletePayload { + """ + The list of IDs of the deleted company contacts. + """ + deletedCompanyContactIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields and values for creating a company and its associated resources. +""" +input CompanyCreateInput { + """ + The attributes for the company. + """ + company: CompanyInput! + + """ + The attributes for the company contact. + """ + companyContact: CompanyContactInput + + """ + The attributes for the company location. + """ + companyLocation: CompanyLocationInput +} + +""" +Return type for `companyCreate` mutation. +""" +type CompanyCreatePayload { + """ + The created company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyDelete` mutation. +""" +type CompanyDeletePayload { + """ + The ID of the deleted company. + """ + deletedCompanyId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one Company and a cursor during pagination. +""" +type CompanyEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyEdge. + """ + node: Company! +} + +""" +The input fields for company attributes when creating or updating a company. +""" +input CompanyInput { + """ + The 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 { + """ + 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 merchant added a timeline comment to the company location. + """ + hasTimelineComment: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the company location is assigned a specific catalog. + """ + inCatalog( + """ + The ID of the catalog. + """ + catalogId: ID! + ): Boolean! + + """ + The preferred locale of the company location. + """ + locale: String + + """ + The market that includes the location's shipping address. If the shipping + address is empty, then the value is the shop's primary market. + """ + market: Market! @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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 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 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 { + """ + The list of updated addresses on the company location. + """ + addresses: [CompanyAddress!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignRoles` mutation. +""" +type CompanyLocationAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignStaffMembers` mutation. +""" +type CompanyLocationAssignStaffMembersPayload { + """ + The list of created staff member assignments. + """ + companyLocationStaffMemberAssignments: [CompanyLocationStaffMemberAssignment!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationAssignTaxExemptions` mutation. +""" +type CompanyLocationAssignTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A list of products with publishing and pricing information associated with company locations. + +Company location catalogs can include an optional publication to control product +visibility and a price list to customize pricing. When a publication isn't +associated with the catalog, product availability is determined by the sales channel. +""" +type CompanyLocationCatalog implements Catalog & Node { + """ + The company locations associated with the catalog. + """ + companyLocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationEdge!]! + + """ + A list of nodes that are contained in CompanyLocationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyLocation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `companyLocationCreate` mutation. +""" +type CompanyLocationCreatePayload { + """ + The created company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationCreateTaxRegistration` mutation. +""" +type CompanyLocationCreateTaxRegistrationPayload { + """ + The company location with the created tax registration. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationDelete` mutation. +""" +type CompanyLocationDeletePayload { + """ + The ID of the deleted company location. + """ + deletedCompanyLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyLocation and a cursor during pagination. +""" +type CompanyLocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyLocationEdge. + """ + node: CompanyLocation! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationInput { + """ + The 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 { + """ + The list of IDs of the deleted staff member assignment. + """ + deletedCompanyLocationStaffMemberAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeRoles` mutation. +""" +type CompanyLocationRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company location. + """ + revokedRoleAssignmentIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxExemptions` mutation. +""" +type CompanyLocationRevokeTaxExemptionsPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyLocationRevokeTaxRegistration` mutation. +""" +type CompanyLocationRevokeTaxRegistrationPayload { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for the role and contact to assign on a location. +""" +input CompanyLocationRoleAssign { + """ + The company contact ID.. + """ + companyContactId: ID! + + """ + The role ID. + """ + companyContactRoleId: ID! +} + +""" +The set of valid sort keys for the CompanyLocation query. +""" +enum CompanyLocationSortKeys { + """ + Sort by the `company_and_location_name` value. + """ + COMPANY_AND_LOCATION_NAME + + """ + Sort by the `company_id` value. + """ + COMPANY_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +A representation of store's staff member who is assigned to a [company +location](https://shopify.dev/api/admin-graphql/latest/objects/CompanyLocation) +of the shop. The staff member's actions will be limited to objects associated +with the assigned company location. +""" +type CompanyLocationStaffMemberAssignment implements Node { + """ + The company location the staff member is assigned to. + """ + companyLocation: CompanyLocation! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Represents the data of a staff member who's assigned to a company location. + """ + staffMember: StaffMember! +} + +""" +An auto-generated type for paginating through multiple CompanyLocationStaffMemberAssignments. +""" +type CompanyLocationStaffMemberAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationStaffMemberAssignmentEdge!]! + + """ + A list of nodes that are contained in + CompanyLocationStaffMemberAssignmentEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyLocationStaffMemberAssignment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyLocationStaffMemberAssignment and a cursor during pagination. +""" +type CompanyLocationStaffMemberAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CompanyLocationStaffMemberAssignmentEdge. + """ + node: CompanyLocationStaffMemberAssignment! +} + +""" +The set of valid sort keys for the CompanyLocationStaffMemberAssignment query. +""" +enum CompanyLocationStaffMemberAssignmentSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Represents the tax settings for a company location. +""" +type CompanyLocationTaxSettings { + """ + Whether the location is exempt from taxes. + """ + taxExempt: Boolean! + + """ + The list of tax exemptions applied to the location. + """ + taxExemptions: [TaxExemption!]! + + """ + The tax registration ID for the company location. + """ + taxRegistrationId: String +} + +""" +Return type for `companyLocationTaxSettingsUpdate` mutation. +""" +type CompanyLocationTaxSettingsUpdatePayload { + """ + The company location with the updated tax settings. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationUpdateInput { + """ + The 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 { + """ + The updated company location. + """ + companyLocation: CompanyLocation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +A condition checking the company location a visitor is purchasing for. +""" +type CompanyLocationsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The company locations that comprise the market. + """ + companyLocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + A list of IDs of the deleted company locations. + """ + deletedCompanyLocationIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyRevokeMainContact` mutation. +""" +type CompanyRevokeMainContactPayload { + """ + The company from which the main contact is revoked. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +The set of valid sort keys for the Company query. +""" +enum CompanySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `order_count` value. + """ + ORDER_COUNT + + """ + Sort by the `since_date` value. + """ + SINCE_DATE + + """ + Sort by the `total_spent` value. + """ + TOTAL_SPENT + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `companyUpdate` mutation. +""" +type CompanyUpdatePayload { + """ + The updated company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +An option on the bundle parent product that is consolidated from multiple different components. +""" +type ComponentizedProductsBundleConsolidatedOption { + """ + The name of the consolidated option. + """ + name: String! + + """ + The selections of the consolidated option. + """ + selections: [ComponentizedProductsBundleConsolidatedOptionSelection!]! +} + +""" +An option selection for a bundle consolidated option. +""" +type ComponentizedProductsBundleConsolidatedOptionSelection { + """ + The component values that are included in the consolidated option selection. + """ + components: [ComponentizedProductsBundleConsolidatedOptionSelectionComponent!]! + + """ + The value of the consolidated option on the bundle parent. + """ + value: String! +} + +""" +A component that's included in a bundle consolidated option selection. +""" +type ComponentizedProductsBundleConsolidatedOptionSelectionComponent { + """ + The ID of the component's option that's included in this consolidated option selection. + """ + optionId: ID! + + """ + The value of the component's option value that's included in this consolidated option selection. + """ + value: String! +} + +""" +A consent policy describes the level of consent that the merchant requires from the user before actually +collecting and processing the data. +""" +type ConsentPolicy implements Node { + """ + Whether consent is required for the region. + """ + consentRequired: Boolean + + """ + The `ISO 3166` country code for which the policy applies. + """ + countryCode: PrivacyCountryCode + + """ + Whether data sale opt-out is required for the region. + """ + dataSaleOptOutRequired: Boolean + + """ + The global ID of the consent policy. IDs prefixed with `SD-` are system default policies. + """ + id: ID! + + """ + The `ISO 3166` region code for which the policy applies. + """ + regionCode: String + + """ + The global ID of the shop that owns the policy. + """ + shopId: ID! +} + +""" +The errors encountered while performing mutations on consent policies. +""" +type ConsentPolicyError implements DisplayableError { + """ + The error code. + """ + code: ConsentPolicyErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ConsentPolicyError`. +""" +enum ConsentPolicyErrorCode { + """ + Country code is required. + """ + COUNTRY_CODE_REQUIRED + + """ + Region code 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 { + """ + 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 { + """ + The `ISO 3166` country code for which the policy applies. + """ + countryCode: PrivacyCountryCode + + """ + The `ISO 3166` region code for which the policy applies. + """ + regionCode: String +} + +""" +Return type for `consentPolicyUpdate` mutation. +""" +type ConsentPolicyUpdatePayload { + """ + All updated and created consent policies. The consent policies that haven't + been modified as part of the mutation aren't returned. + """ + updatedPolicies: [ConsentPolicy!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ConsentPolicyError!]! +} + +""" +The input fields for the context data that determines the pricing of a variant. Refer to [Product](https://shopify.dev/docs/api/admin-graphql/latest/queries/product?example=Get+the+price+range+for+a+product+for+buyers+from+Canada)for +more information on how to use this input object. +""" +input ContextualPricingContext { + """ + The CompanyLocation ID used to fetch company location specific prices. + """ + companyLocationId: ID + + """ + The country code used to fetch country-specific prices. + """ + country: CountryCode + + """ + The Location ID used to fetch location specific prices. + """ + locationId: ID +} + +""" +The context data that determines the publication status of a product. +""" +input ContextualPublicationContext { + """ + The company location ID used to fetch company-specific publication. + """ + companyLocationId: ID + + """ + 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 +} + +""" +A shop's banner settings. +""" +type CookieBanner implements HasPublishedTranslations { + """ + Indicates if the banner is auto managed. + """ + autoManaged: Boolean! + + """ + Indicates if the banner is enabled. + """ + enabled: Boolean! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +A numeric count with precision information indicating whether the count is exact or an estimate. +""" +type Count { + """ + The count of elements. + """ + count: Int! + + """ + The count's precision, or the exactness of the value. + """ + precision: CountPrecision! +} + +""" +The precision of the value returned by a count field. +""" +enum CountPrecision { + """ + The count is 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 { + """ + 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 { + """ + 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 { + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. + """ + countryCode: CountryCode! + + """ + The country-specific harmonized system code. These are usually longer than 6 digits. + """ + harmonizedSystemCode: String! +} + +""" +An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes. +""" +type CountryHarmonizedSystemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CountryHarmonizedSystemCodeEdge!]! + + """ + A list of nodes that are contained in CountryHarmonizedSystemCodeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CountryHarmonizedSystemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination. +""" +type CountryHarmonizedSystemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CountryHarmonizedSystemCodeEdge. + """ + node: CountryHarmonizedSystemCode! +} + +""" +The input fields required to specify a harmonized system code. +""" +input CountryHarmonizedSystemCodeInput { + """ + 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 { + """ + 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 { + """ + Keep the bottom of the image. + """ + BOTTOM + + """ + Keep the center of the image. + """ + CENTER + + """ + Keep the left of the image. + """ + LEFT + + """ + Keep the right of the image. + """ + RIGHT + + """ + Keep the top of the image. + """ + TOP +} + +""" +The currency codes that represent the world currencies throughout the Admin API. Currency codes include +[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes, +digital currency codes. +""" +enum CurrencyCode { + """ + United 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 { + """ + The adjustment amount in both shop and presentment currencies. + """ + adjustment: MoneyV2! + + """ + The final amount in both shop and presentment currencies after the adjustment. + """ + finalAmountSet: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The original amount in both shop and presentment currencies before the adjustment. + """ + originalAmountSet: MoneyV2! +} + +""" +Currency formats configured for the merchant. These formats are available to use within Liquid. +""" +type CurrencyFormats { + """ + Money without currency in HTML. + """ + moneyFormat: FormattedString! + + """ + Money without currency in emails. + """ + moneyInEmailsFormat: String! + + """ + Money with currency in HTML. + """ + moneyWithCurrencyFormat: FormattedString! + + """ + Money with currency in emails. + """ + moneyWithCurrencyInEmailsFormat: String! +} + +""" +A setting for a presentment currency. +""" +type CurrencySetting { + """ + The currency's ISO code. + """ + currencyCode: CurrencyCode! + + """ + The full name of the currency. + """ + currencyName: String! + + """ + Whether the currency is enabled or not. An enabled currency setting is visible + to buyers and allows orders to be generated with that currency as presentment. + """ + enabled: Boolean! + + """ + The manual rate, if enabled, that applies to this currency when converting + from shop currency. This rate is specific to the associated market's currency setting. + """ + manualRate: Decimal + + """ + The date and time when the active exchange rate for the currency was last + modified. It can be the automatic rate's creation date, or the manual rate's + last updated at date if active. + """ + rateUpdatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple CurrencySettings. +""" +type CurrencySettingConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CurrencySettingEdge!]! + + """ + A list of nodes that are contained in CurrencySettingEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CurrencySetting!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CurrencySetting and a cursor during pagination. +""" +type CurrencySettingEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CurrencySettingEdge. + """ + node: CurrencySetting! +} + +""" +The input fields for a custom shipping package used to pack shipment. +""" +input CustomShippingPackageInput { + """ + 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 +} + +""" +Information about a customer of the shop, such as the customer's contact +details, purchase history, and marketing preferences. + +Tracks the customer's total spending through the [`amountSpent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-amountSpent) +field and provides access to associated data such as payment methods and +subscription contracts. + +> Caution: +> Only use this data if it's required for your app's functionality. Shopify will +restrict [access to scopes](https://shopify.dev/api/usage/access-scopes) for +apps that don't have a legitimate use for the associated data. +""" +type Customer implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & HasStoreCreditAccounts & LegacyInteroperability & Node { + """ + A list of addresses associated with the customer. Limited to 250 addresses. + Use `addressesV2` for paginated access to all addresses. + """ + addresses( + """ + Truncate the array result to this size. + """ + first: Int + ): [MailingAddress!]! @deprecated(reason: "Limited to 250 addresses. Use `addressesV2` for paginated access to all addresses.") + + """ + The addresses associated with the customer. + """ + addressesV2( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + The customer's email address. + """ + email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") + + """ + The current email marketing state for the customer. + If the customer doesn't have an email address, then this property is `null`. + """ + emailMarketingConsent: CustomerEmailMarketingConsentState @deprecated(reason: "Use `defaultEmailAddress.marketingState`, `defaultEmailAddress.marketingOptInLevel`, `defaultEmailAddress.marketingUpdatedAt`, and `defaultEmailAddress.sourceLocation` instead.") + + """ + A list of events associated with the customer. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Whether the merchant has added timeline comments about the customer on the customer's page. + """ + hasTimelineComment: Boolean! @deprecated(reason: "To query for comments on the timeline, use the `events` connection and a 'query' argument containing `verb:comment`, or look for a 'CommentEvent' in the `__typename` of `events`.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the customer. + """ + image( + """ + Image width and height (1 - 2048 pixels). + """ + size: Int @deprecated(reason: "Use `maxWidth` or `maxHeight` on `Image.transformedSrc` instead.") + ): Image! + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's last order. + """ + lastOrder: Order + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The amount of time since the customer was first added to the store. + + Example: 'about 12 years'. + """ + lifetimeDuration: String! + + """ + The customer's locale. + """ + locale: String! + + """ + The market that includes the customer’s default address. + """ + market: Market @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + Whether the customer can be merged with another customer. + """ + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! + + """ + 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` | + | 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 + ): CustomerPaymentMethodConnection! + + """ + The customer's phone number. + """ + phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") + + """ + Possible subscriber states of a customer defined by their subscription contracts. + """ + productSubscriberStatus: CustomerProductSubscriberStatus! + + """ + The current SMS marketing state for the customer's phone number. + + If the customer does not have a phone number, then this property is `null`. + """ + smsMarketingConsent: CustomerSmsMarketingConsentState @deprecated(reason: "Use `defaultPhoneNumber.marketingState`, `defaultPhoneNumber.marketingOptInLevel`, `defaultPhoneNumber.marketingUpdatedAt`, `defaultPhoneNumber.marketingCollectedFrom`, and `defaultPhoneNumber.sourceLocation` instead.") + + """ + The state of the customer's account with the shop. + + Please note that this only meaningful when Classic Customer Accounts is active. + """ + state: CustomerState! + + """ + The statistics for a given customer. + """ + statistics: CustomerStatistics! + + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 URL to unsubscribe the customer from the mailing list. + """ + unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") + + """ + The date and time when the customer was last updated. + """ + updatedAt: DateTime! + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly and + belongs to an existing domain. This doesn't guarantee that + the email address actually exists. + """ + validEmailAddress: Boolean! @deprecated(reason: "Use `defaultEmailAddress.validFormat` instead.") + + """ + Whether the customer has verified their email address. Defaults to `true` if + the customer is created through the Shopify admin or API. + """ + verifiedEmail: Boolean! +} + +""" +An app extension page for the customer account navigation menu. +""" +type CustomerAccountAppExtensionPage implements CustomerAccountPage & Navigable & Node { + """ + The UUID of the app extension. + """ + appExtensionUuid: String + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +A native page for the customer account navigation menu. +""" +type CustomerAccountNativePage implements CustomerAccountPage & Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The type of customer account native page. + """ + pageType: CustomerAccountNativePagePageType! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +The type of customer account native page. +""" +enum CustomerAccountNativePagePageType { + """ + An orders page type. + """ + NATIVE_ORDERS + + """ + A 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 { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A unique, human-friendly string for the customer account page. + """ + handle: String! + + """ + The unique ID for the customer account page. + """ + id: ID! + + """ + The title of the customer account page. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple CustomerAccountPages. +""" +type CustomerAccountPageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerAccountPageEdge!]! + + """ + A list of nodes that are contained in CustomerAccountPageEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerAccountPage!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerAccountPage and a cursor during pagination. +""" +type CustomerAccountPageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerAccountPageEdge. + """ + node: CustomerAccountPage! +} + +""" +Information about the shop's customer account-related settings. Includes the +[customer account version](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2#field-CustomerAccountsV2.fields.customerAccountsVersion) +which indicates whether the merchant is using new customer accounts or legacy +customer accounts, along with other account configuration such as login requirements. +""" +type CustomerAccountsV2 { + """ + Indicates which version of customer accounts the merchant is using in online store and checkout. + """ + customerAccountsVersion: CustomerAccountsVersion! + + """ + Login links are shown in online store and checkout. + """ + loginLinksVisibleOnStorefrontAndCheckout: Boolean! + + """ + Customers are required to log in to their account before checkout. + """ + loginRequiredAtCheckout: Boolean! + + """ + The root url for the customer accounts pages. + """ + url: URL +} + +""" +The login redirection target for customer accounts. +""" +enum CustomerAccountsVersion { + """ + The customer is redirected to the classic customer accounts login page. + """ + CLASSIC + + """ + The customer is redirected to the new customer accounts login page. + """ + NEW_CUSTOMER_ACCOUNTS +} + +""" +Return type for `customerAddTaxExemptions` mutation. +""" +type CustomerAddTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressCreate` mutation. +""" +type CustomerAddressCreatePayload { + """ + The created address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressDelete` mutation. +""" +type CustomerAddressDeletePayload { + """ + The ID of the address deleted from the customer. + """ + deletedAddressId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressUpdate` mutation. +""" +type CustomerAddressUpdatePayload { + """ + The updated address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerCancelDataErasureUserError`. +""" +enum CustomerCancelDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to cancel customer data erasure. + """ + FAILED_TO_CANCEL + + """ + Customer's data is not scheduled for erasure. + """ + NOT_BEING_ERASED + + """ + Only the original requester can cancel this data erasure. + """ + UNAUTHORIZED_CANCELLATION +} + +""" +Return type for `customerCancelDataErasure` mutation. +""" +type CustomerCancelDataErasurePayload { + """ + The ID of the customer whose pending data erasure has been cancelled. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerCancelDataErasureUserError!]! +} + +""" +An error that occurs when cancelling a customer data erasure request. +""" +type CustomerCancelDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerCancelDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An auto-generated type for paginating through multiple Customers. +""" +type CustomerConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerEdge!]! + + """ + A list of nodes that are contained in CustomerEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Customer!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The source that collected the customer's consent to receive marketing materials. +""" +enum CustomerConsentCollectedFrom { + """ + The customer consent was collected outside of Shopify. + """ + OTHER + + """ + The customer consent was collected by Shopify. + """ + SHOPIFY +} + +""" +Return type for `customerCreate` mutation. +""" +type CustomerCreatePayload { + """ + The created customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a card instrument for customer payment method. +""" +type CustomerCreditCard { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + The brand of the card. + """ + brand: String! + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + The card's BIN number. + """ + firstDigits: String + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! + + """ + The source of the card if coming from a wallet such as Apple Pay. + """ + source: String + + """ + The last 4 digits of the Device Account Number. + """ + virtualLastDigits: String +} + +""" +The billing address of a credit card payment instrument. +""" +type CustomerCreditCardBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The first name in the billing address. + """ + firstName: String + + """ + The last name in the billing address. + """ + lastName: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields to delete a customer. +""" +input CustomerDeleteInput { + """ + The ID of the customer to delete. + """ + id: ID! +} + +""" +Return type for `customerDelete` mutation. +""" +type CustomerDeletePayload { + """ + The ID of the deleted customer. + """ + deletedCustomerId: ID + + """ + The shop of the deleted customer. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Customer and a cursor during pagination. +""" +type CustomerEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerEdge. + """ + node: Customer! +} + +""" +A customer's email address with marketing consent. This includes the email +address, marketing subscription status, and opt-in level according to [M3AAWG best practices guidelines](https://www.m3aawg.org/news/updated-m3aawg-best-practices-for-senders-urge-opt-in-only-mailings-address-sender-transparency). + +It also provides the timestamp of when customers last updated marketing consent +and URLs for unsubscribing from marketing emails or opting in or out of email +open tracking. The [`sourceLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-CustomerEmailAddress.fields.sourceLocation) +field indicates where the customer consented to receive marketing material. +""" +type CustomerEmailAddress { + """ + The customer's default email address. + """ + emailAddress: String! + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + received when the marketing consent was updated. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + Whether the customer has subscribed to email marketing. + """ + marketingState: CustomerEmailAddressMarketingState! + + """ + The URL to unsubscribe a member from all mailing lists. + """ + marketingUnsubscribeUrl: URL! + + """ + The date and time at which the marketing consent was updated. + + No date is provided if the email address never updated its marketing consent. + """ + marketingUpdatedAt: DateTime + + """ + Whether the customer has opted in to having their opened emails tracked. + """ + openTrackingLevel: CustomerEmailAddressOpenTrackingLevel! + + """ + The URL that can be used to opt a customer in or out of email open tracking. + """ + openTrackingUrl: URL! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly. This doesn't guarantee that the email address + actually exists. + """ + validFormat: Boolean! +} + +""" +Possible marketing states for the customer’s email address. +""" +enum CustomerEmailAddressMarketingState { + """ + The customer’s email address marketing state is invalid. + """ + INVALID + + """ + The customer is not subscribed to email marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to email marketing. + """ + PENDING + + """ + The customer is subscribed to email marketing. + """ + SUBSCRIBED + + """ + The customer is not subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +The different levels related to whether a customer has opted in to having their opened emails tracked. +""" +enum CustomerEmailAddressOpenTrackingLevel { + """ + The customer has 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 { + """ + 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 +} + +""" +The record of when a customer consented to receive marketing material by email. +""" +type CustomerEmailMarketingConsentState { + """ + The date and time at which the customer consented to receive marketing material by email. + The customer's consent state reflects the consent record with the most recent `consent_updated_at` date. + If no date is provided, then the date and time at which the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + that the customer gave when they consented to receive marketing material by email. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The current email marketing state for the customer. + """ + marketingState: CustomerEmailMarketingState! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location +} + +""" +The input fields for the email consent information to update for a given customer ID. +""" +input CustomerEmailMarketingConsentUpdateInput { + """ + The ID of the customer for which to update the email marketing consent + information. The customer must have a unique email address associated to the + record. If not, add the email address using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by email. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput! +} + +""" +Return type for `customerEmailMarketingConsentUpdate` mutation. +""" +type CustomerEmailMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerEmailMarketingConsentUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CustomerEmailMarketingConsentUpdate`. +""" +type CustomerEmailMarketingConsentUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerEmailMarketingConsentUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerEmailMarketingConsentUpdateUserError`. +""" +enum CustomerEmailMarketingConsentUpdateUserErrorCode { + """ + The input value 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 { + """ + 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 { + """ + The generated account activation URL. + """ + accountActivationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for identifying a customer. +""" +input CustomerIdentifierInput @oneOf { + """ + The [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 { + """ + 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 + + """ + 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 { + """ + The position of the current order within the customer's order history. + """ + customerOrderIndex: Int! + + """ + The amount of days between first session and order creation date. First + session represents first session since the last order, or first session within + the 30 day attribution window, if more than 30 days has passed since the last order. + """ + daysToConversion: Int! + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit! + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + Events preceding a customer order, such as shop sessions. + """ + moments: [CustomerMoment!]! +} + +""" +A [`CustomerJourney`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerJourney) through the online store leading up to an +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). +Tracks session data, attribution sources, and the timeline from first visit to +purchase conversion. + +The summary includes the customer's position in their order history, days +between first visit and order creation, and details about their first and last +sessions. Use the [`moments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerJourneySummary#field-moments) +connection to access the complete timeline of customer interactions before the purchase. +""" +type CustomerJourneySummary { + """ + The position of the current order within the customer's order history. Test orders aren't included. + """ + customerOrderIndex: Int + + """ + The number of days between the first session and the order creation date. The + first session represents the first session since the last order, or the first + session within the 30 day attribution window, if more than 30 days have passed + since the last order. + """ + daysToConversion: Int + + """ + The customer's first session going into the shop. + """ + firstVisit: CustomerVisit + + """ + The last session before an order is made. + """ + lastVisit: CustomerVisit + + """ + The events preceding a customer's order, such as shop sessions. + """ + moments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + The total number of customer moments associated with this order. Returns null + if the order is still in the process of being attributed. + """ + momentsCount: Count + + """ + Whether the attributed sessions for the order have been created yet. + """ + ready: Boolean! +} + +""" +The possible values for the marketing subscription opt-in level enabled at the +time the customer consented to receive marketing information. + +The levels are defined by [the M3AAWG best practices guideline + document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf). +""" +enum CustomerMarketingOptInLevel { + """ + After providing their information, the customer receives 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the customer whose default address will be kept. + """ + customerIdOfDefaultAddressToKeep: ID + + """ + The ID of the customer whose email will be kept. + """ + customerIdOfEmailToKeep: ID + + """ + The ID of the customer whose first name will be kept. + """ + customerIdOfFirstNameToKeep: ID + + """ + The ID of the customer whose last name will be kept. + """ + customerIdOfLastNameToKeep: ID + + """ + The ID of the customer whose phone number will be kept. + """ + customerIdOfPhoneNumberToKeep: ID + + """ + The note to keep. + """ + note: String + + """ + The tags to keep. + """ + tags: [String!] +} + +""" +Return type for `customerMerge` mutation. +""" +type CustomerMergePayload { + """ + The asynchronous job for merging the customers. + """ + job: Job + + """ + The ID of the customer 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 { + """ + 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 { + """ + The default address of a customer. + """ + defaultAddress: MailingAddress + + """ + The email state of a customer. + """ + email: CustomerEmailAddress + + """ + The first name of a customer. + """ + firstName: String + + """ + The last name of a customer. + """ + lastName: String + + """ + The phone number state of a customer. + """ + phoneNumber: CustomerPhoneNumber +} + +""" +The blocking fields of a customer merge preview. These fields will block customer merge unless edited. +""" +type CustomerMergePreviewBlockingFields { + """ + The merged note resulting from a customer merge. The merged note is over the + 5000 character limit and will block customer merge. + """ + note: String + + """ + The merged tags resulting from a customer merge. The merged tags are over the 250 limit and will block customer merge. + """ + tags: [String!]! +} + +""" +The fields that will be kept as part of a customer merge preview. +""" +type CustomerMergePreviewDefaultFields { + """ + The merged addresses resulting from a customer merge. + """ + addresses( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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 + + """ + The first name resulting from a customer merge. + """ + firstName: String + + """ + The total number of merged gift cards. + """ + giftCardCount: UnsignedInt64! + + """ + The merged gift cards resulting from a customer merge. + """ + giftCards( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The error code. + """ + code: CustomerMergeErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +An object that represents whether a customer can be merged with another customer. +""" +type CustomerMergeable { + """ + The list of fields preventing the customer from being merged. + """ + errorFields: [CustomerMergeErrorFieldType!]! + + """ + Whether the customer can be merged with another customer. + """ + isMergeable: Boolean! + + """ + The merge request if one is currently in progress. + """ + mergeInProgress: CustomerMergeRequest + + """ + The reason why the customer can't be merged with another customer. + """ + reason: String +} + +""" +Represents a session preceding an order, often used for building a timeline of events leading to an order. +""" +interface CustomerMoment { + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CustomerMoments. +""" +type CustomerMomentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerMomentEdge!]! + + """ + A list of nodes that are contained in CustomerMomentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerMoment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerMoment and a cursor during pagination. +""" +type CustomerMomentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerMomentEdge. + """ + node: CustomerMoment! +} + +""" +All possible instruments for CustomerPaymentMethods. +""" +union CustomerPaymentInstrument = BankAccount | CustomerCreditCard | CustomerPaypalBillingAgreement | CustomerShopPayAgreement + +""" +The billing address of a payment instrument. +""" +type CustomerPaymentInstrumentBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """ + The name of the buyer of the address. + """ + name: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +A customer's saved payment method. Stores the payment instrument details and billing information for recurring charges. + +The payment method supports types included in the [`CustomerPaymentInstrument`](https://shopify.dev/docs/api/admin-graphql/latest/unions/CustomerPaymentInstrument) union. +""" +type CustomerPaymentMethod implements Node { + """ + The customer to whom the payment method belongs. + """ + customer: Customer + + """ + The ID of this payment method. + """ + id: ID! + + """ + The instrument for this payment method. + """ + instrument: CustomerPaymentInstrument + + """ + The mandates associated with the payment method. + """ + mandates( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerPaymentMethodEdge!]! + + """ + A list of nodes that are contained in CustomerPaymentMethodEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerPaymentMethod!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `customerPaymentMethodCreateFromDuplicationData` mutation. +""" +type CustomerPaymentMethodCreateFromDuplicationDataPayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodCreateFromDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodCreateFromDuplicationData`. +""" +type CustomerPaymentMethodCreateFromDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodCreateFromDuplicationDataUserError`. +""" +enum CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode { + """ + 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 { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodCreditCardUpdate` mutation. +""" +type CustomerPaymentMethodCreditCardUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination. +""" +type CustomerPaymentMethodEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerPaymentMethodEdge. + """ + node: CustomerPaymentMethod! +} + +""" +Return type for `customerPaymentMethodGetDuplicationData` mutation. +""" +type CustomerPaymentMethodGetDuplicationDataPayload { + """ + The encrypted data from the payment method to be duplicated. + """ + encryptedDuplicationData: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetDuplicationData`. +""" +type CustomerPaymentMethodGetDuplicationDataUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetDuplicationDataUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetDuplicationDataUserError`. +""" +enum CustomerPaymentMethodGetDuplicationDataUserErrorCode { + """ + 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 { + """ + The URL to redirect the customer to update the payment method. + """ + updatePaymentMethodUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodGetUpdateUrlUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetUpdateUrl`. +""" +type CustomerPaymentMethodGetUpdateUrlUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodGetUpdateUrlUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetUpdateUrlUserError`. +""" +enum CustomerPaymentMethodGetUpdateUrlUserErrorCode { + """ + 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 { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementUpdate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementUpdatePayload { + """ + The customer payment method. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodRemoteCreate` mutation. +""" +type CustomerPaymentMethodRemoteCreatePayload { + """ + The customer payment method. Note that the returned payment method may + initially be in an incomplete state. Developers should poll this payment + method using the customerPaymentMethod query until all required payment + details have been processed. + """ + customerPaymentMethod: CustomerPaymentMethod + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerPaymentMethodRemoteUserError!]! +} + +""" +The input fields for a remote gateway payment method, only one remote reference permitted. +""" +input CustomerPaymentMethodRemoteInput { + """ + The input fields for a remote authorize net customer profile. + """ + authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput + + """ + The input fields for a remote Braintree customer profile. + """ + braintreePaymentMethod: RemoteBraintreePaymentMethodInput + + """ + 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 { + """ + 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 { + """ + Authorize.net is not enabled for subscriptions. + """ + AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + 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 { + """ + 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 { + """ + The ID of the revoked customer payment method. + """ + revokedCustomerPaymentMethodId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerPaymentMethodSendUpdateEmail` mutation. +""" +type CustomerPaymentMethodSendUpdateEmailPayload { + """ + The customer to whom an update payment method email was sent. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to +indicate validation failures, such as invalid field values or business logic +violations, that prevent the operation from completing. +""" +type CustomerPaymentMethodUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerPaymentMethodUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodUserError`. +""" +enum CustomerPaymentMethodUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Represents a PayPal instrument for customer payment method. +""" +type CustomerPaypalBillingAgreement { + """ + The billing address of this payment method. + """ + billingAddress: CustomerPaymentInstrumentBillingAddress + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean! + + """ + Whether the payment method can be revoked.The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The customers's PayPal account email address. + """ + paypalAccountEmail: String +} + +""" +A phone number. +""" +type CustomerPhoneNumber { + """ + The source from which the SMS marketing information for the customer was collected. + """ + marketingCollectedFrom: CustomerConsentCollectedFrom + + """ + 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! + + """ + 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 { + """ + 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 { + """ + The customer has at least one active subscription contract. + """ + ACTIVE + + """ + The customer's last subscription contract was cancelled and there are no other active or paused + subscription contracts. + """ + CANCELLED + + """ + The customer's last subscription contract expired and there are no other active or paused + subscription contracts. + """ + EXPIRED + + """ + The customer's last subscription contract failed and there are no other active or paused + subscription contracts. + """ + FAILED + + """ + The customer has never had a subscription contract. + """ + NEVER_SUBSCRIBED + + """ + The customer has at least one paused subscription contract and there are no other active + subscription contracts. + """ + PAUSED +} + +""" +Return type for `customerRemoveTaxExemptions` mutation. +""" +type CustomerRemoveTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerReplaceTaxExemptions` mutation. +""" +type CustomerReplaceTaxExemptionsPayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerRequestDataErasureUserError`. +""" +enum CustomerRequestDataErasureErrorCode { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to request customer data erasure. + """ + FAILED_TO_REQUEST +} + +""" +Return type for `customerRequestDataErasure` mutation. +""" +type CustomerRequestDataErasurePayload { + """ + The ID of the customer that will be erased. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerRequestDataErasureUserError!]! +} + +""" +An error that occurs when requesting a customer data erasure. +""" +type CustomerRequestDataErasureUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerRequestDataErasureErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The RFM (Recency, Frequency, Monetary) group for a customer. +""" +enum CustomerRfmGroup { + """ + Customers with 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 { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The member of a segment. +""" +type CustomerSegmentMember implements HasMetafields { + """ + The total amount of money that the member has spent on orders. + """ + amountSpent: MoneyV2 + + """ + The member's default address. + """ + defaultAddress: MailingAddress + + """ + The member's default email address. + """ + defaultEmailAddress: CustomerEmailAddress + + """ + The member's default phone number. + """ + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the member, which is based on the values of the `first_name` + and `last_name` fields. If the member's first name and last name aren't + available, then the customer's email address is used. If the customer's email + address isn't available, then the customer's phone number is used. + """ + displayName: String! + + """ + The member's first name. + """ + firstName: String + + """ + The member’s ID. + """ + id: ID! + + """ + The member's last name. + """ + lastName: String + + """ + The ID of the member's most recent order. + """ + lastOrderId: ID + + """ + Whether the customer can be merged with another customer. + """ + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! + + """ + A note about the member. + """ + note: String + + """ + The total number of orders that the member has made. + """ + numberOfOrders: UnsignedInt64 +} + +""" +The connection type for the `CustomerSegmentMembers` object. +""" +type CustomerSegmentMemberConnection { + """ + A list of edges. + """ + edges: [CustomerSegmentMemberEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + The statistics for a given segment. + """ + statistics: SegmentStatistics! + + """ + The total number of members in a given segment. + """ + totalCount: Int! +} + +""" +An auto-generated type which holds one CustomerSegmentMember and a cursor during pagination. +""" +type CustomerSegmentMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerSegmentMemberEdge. + """ + node: CustomerSegmentMember! +} + +""" +A job to determine a list of members, such as customers, that are associated with an individual segment. +""" +type CustomerSegmentMembersQuery implements JobResult & Node { + """ + The current total number of members in a given segment. + """ + currentCount: Int! + + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Return type for `customerSegmentMembersQueryCreate` mutation. +""" +type CustomerSegmentMembersQueryCreatePayload { + """ + The newly created customer segment members query. + """ + customerSegmentMembersQuery: CustomerSegmentMembersQuery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSegmentMembersQueryUserError!]! +} + +""" +The input fields and values for creating a customer segment members query. +""" +input CustomerSegmentMembersQueryInput { + """ + The 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 + + """ + Sort the list by a given key. + """ + sortKey: String +} + +""" +Represents a customer segment members query custom error. +""" +type CustomerSegmentMembersQueryUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSegmentMembersQueryUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSegmentMembersQueryUserError`. +""" +enum CustomerSegmentMembersQueryUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `customerSendAccountInviteEmail` mutation. +""" +type CustomerSendAccountInviteEmailPayload { + """ + The customer to whom an account invite email was sent. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSendAccountInviteEmailUserError!]! +} + +""" +Defines errors for customerSendAccountInviteEmail mutation. +""" +type CustomerSendAccountInviteEmailUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSendAccountInviteEmailUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSendAccountInviteEmailUserError`. +""" +enum CustomerSendAccountInviteEmailUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields required to identify a customer. +""" +input CustomerSetIdentifiers @oneOf { + """ + 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 { + """ + The addresses for a customer. + """ + addresses: [MailingAddressInput!] + + """ + The unique email address of the customer. + """ + email: String + + """ + The customer's first name. + """ + firstName: String + + """ + Specifies the customer to update. If absent, a new customer is created. + """ + id: ID @deprecated(reason: "To update a customer use `identifier` argument instead.") + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's locale. + """ + locale: String + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number for the customer. + """ + phone: String + + """ + A list of tags to associate with the customer. Can be an array or a + comma-separated list. Example values: `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"` + + Updating `tags` overwrites any existing tags that were previously added to the + customer. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + Whether the customer is exempt from paying taxes on their order. + """ + taxExempt: Boolean + + """ + The list of tax exemptions to apply to the customer. + """ + taxExemptions: [TaxExemption!] +} + +""" +Return type for `customerSet` mutation. +""" +type CustomerSetPayload { + """ + The created or updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSetUserError!]! +} + +""" +Defines errors for CustomerSet mutation. +""" +type CustomerSetUserError implements DisplayableError { + """ + The error code. + """ + code: CustomerSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSetUserError`. +""" +enum CustomerSetUserErrorCode { + """ + The input value is 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 { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + Whether the card is about to expire. + """ + expiresSoon: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + Whether the Shop Pay billing agreement is inactive. + """ + inactive: Boolean! + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """ + The last 4 digits of the card. + """ + lastDigits: String! + + """ + The masked card number with only the last 4 digits displayed. + """ + maskedNumber: String! + + """ + The name of the card holder. + """ + name: String! +} + +""" +An error that occurs during execution of an SMS marketing consent mutation. +""" +type CustomerSmsMarketingConsentError implements DisplayableError { + """ + The error code. + """ + code: CustomerSmsMarketingConsentErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSmsMarketingConsentError`. +""" +enum CustomerSmsMarketingConsentErrorCode { + """ + The input value 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 { + """ + 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 +} + +""" +The record of when a customer consented to receive marketing material by SMS. + +The customer's consent state reflects the record with the most recent date when consent was updated. +""" +type CustomerSmsMarketingConsentState { + """ + The source from which the SMS marketing information for the customer was collected. + """ + consentCollectedFrom: CustomerConsentCollectedFrom + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel! + + """ + The current SMS marketing state for the customer. + """ + marketingState: CustomerSmsMarketingState! + + """ + The location where the customer consented to receive marketing material by SMS. + """ + sourceLocation: Location +} + +""" +The input fields for updating SMS marketing consent information for a given customer ID. +""" +input CustomerSmsMarketingConsentUpdateInput { + """ + The ID of the customer to update the SMS marketing consent information for. + The customer must have a unique phone number associated to the record. If not, + add the phone number using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by SMS. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput! +} + +""" +Return type for `customerSmsMarketingConsentUpdate` mutation. +""" +type CustomerSmsMarketingConsentUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerSmsMarketingConsentError!]! +} + +""" +The valid SMS marketing states for a customer’s phone number. +""" +enum CustomerSmsMarketingState { + """ + The customer hasn't subscribed to SMS marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to SMS marketing. + """ + PENDING + + """ + The customer'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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `location` value. + """ + LOCATION + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid values for the state of a customer's account with a shop. +""" +enum CustomerState { + """ + The customer declined the email invite to create an account. + """ + DECLINED + + """ + The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. + """ + DISABLED + + """ + The customer has created an account. + """ + ENABLED + + """ + The customer has received an email invite to create an account. + """ + INVITED +} + +""" +A customer's computed statistics. +""" +type CustomerStatistics { + """ + The predicted spend tier of a customer with a shop. + """ + predictedSpendTier: CustomerPredictedSpendTier + + """ + The RFM (Recency, Frequency, Monetary) group of the customer. + """ + rfmGroup: CustomerRfmGroup +} + +""" +Return type for `customerUpdateDefaultAddress` mutation. +""" +type CustomerUpdateDefaultAddressPayload { + """ + The customer whose address was updated. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerUpdate` mutation. +""" +type CustomerUpdatePayload { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A customer's session on the online store. Tracks how the +[`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) +arrived at the store, including the landing page, referral source, and any +associated marketing campaigns. + +The visit captures attribution data such as [`UTMParameters`](https://shopify.dev/docs/api/admin-graphql/latest/objects/UTMParameters), +referral codes, and the [`MarketingEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketingEvent) +that drove the session. This information helps merchants understand which +marketing efforts successfully bring customers to their store. +""" +type CustomerVisit implements CustomerMoment & Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + URL of the first page the customer landed on for the session. + """ + landingPage: URL + + """ + Landing page information with URL linked in HTML. For example, the first page + the customer visited was store.myshopify.com/products/1. + """ + landingPageHtml: HTML + + """ + Represent actions taken by an app, on behalf of a merchant, + to market Shopify resources such as products, collections, and discounts. + """ + marketingEvent: MarketingEvent + + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! + + """ + Marketing referral code from the link that the customer clicked to visit the store. + Supports the following URL attributes: _ref_, _source_, or _r_. + For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2. + """ + referralCode: String + + """ + Referral information with URLs linked in HTML. + """ + referralInfoHtml: FormattedString! + + """ + Webpage where the customer clicked a link that sent them to the online store. + For example, _https://randomblog.com/page1_ or _android-app://com.google.android.gm_. + """ + referrerUrl: URL + + """ + Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, + a website domain, QR code, or unknown. + """ + source: String! + + """ + Describes the source explicitly for first or last session. + """ + sourceDescription: String + + """ + Type of marketing tactic. + """ + sourceType: MarketingTactic + + """ + A set of UTM parameters gathered from the URL parameters of the referrer. + """ + utmParameters: UTMParameters +} + +""" +This type returns the information about the product and product variant from a customer visit. +""" +type CustomerVisitProductInfo { + """ + The product information. If `null`, then the product was deleted from the store. + """ + product: Product + + """ + The quantity of the product that the customer requested. + """ + quantity: Int! + + """ + The product variant information, if the product variant exists. + """ + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple CustomerVisitProductInfos. +""" +type CustomerVisitProductInfoConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerVisitProductInfoEdge!]! + + """ + A list of nodes that are contained in CustomerVisitProductInfoEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CustomerVisitProductInfo!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CustomerVisitProductInfo and a cursor during pagination. +""" +type CustomerVisitProductInfoEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of CustomerVisitProductInfoEdge. + """ + node: CustomerVisitProductInfo! +} + +""" +A shop's data sale opt out page. +""" +type DataSaleOptOutPage { + """ + If the data sale opt out page is auto managed. + """ + autoManaged: Boolean! +} + +""" +Return type for `dataSaleOptOut` mutation. +""" +type DataSaleOptOutPayload { + """ + The ID of the customer whose email address has been opted out of data sale. + """ + customerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DataSaleOptOutUserError!]! +} + +""" +An error that occurs during the execution of `DataSaleOptOut`. +""" +type DataSaleOptOutUserError implements DisplayableError { + """ + The error code. + """ + code: DataSaleOptOutUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DataSaleOptOutUserError`. +""" +enum DataSaleOptOutUserErrorCode { + """ + Data sale opt out failed. + """ + FAILED +} + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string. +For example, September 7, 2019 is represented as `"2019-07-16"`. +""" +scalar Date + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. +For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is +represented as `"2019-09-07T15:50:00Z`". +""" +scalar DateTime + +""" +Days of the week from Monday to Sunday. +""" +enum DayOfTheWeek { + """ + 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 { + """ + The list of permissions associated with the token. + """ + accessScopes: [String!]! + + """ + The issued delegate access token. + """ + accessToken: String! + + """ + The date and time when the delegate access token was created. + """ + createdAt: DateTime! +} + +""" +Return type for `delegateAccessTokenCreate` mutation. +""" +type DelegateAccessTokenCreatePayload { + """ + The delegate access token. + """ + delegateAccessToken: DelegateAccessToken + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenCreateUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenCreate`. +""" +type DelegateAccessTokenCreateUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenCreateUserError`. +""" +enum DelegateAccessTokenCreateUserErrorCode { + """ + The 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 { + """ + The user's shop. + """ + shop: Shop! + + """ + The status of the delegate access token destroy operation. Returns true if successful. + """ + status: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DelegateAccessTokenDestroyUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenDestroy`. +""" +type DelegateAccessTokenDestroyUserError implements DisplayableError { + """ + The error code. + """ + code: DelegateAccessTokenDestroyUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenDestroyUserError`. +""" +enum DelegateAccessTokenDestroyUserErrorCode { + """ + 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 { + """ + The list of scopes that will be delegated to the new access token. + """ + delegateAccessScope: [String!]! + + """ + The amount of time, in seconds, after which the delegate access token is no longer valid. + """ + expiresIn: Int +} + +""" +Deletion events chronicle the destruction of resources (e.g. products and collections). +Once deleted, the deletion event is the only trace of the original's existence, +as the resource itself has been removed and can no longer be accessed. +""" +type DeletionEvent { + """ + The date and time when the deletion event for the related resource was generated. + """ + occurredAt: DateTime! + + """ + The ID of the resource that was deleted. + """ + subjectId: ID! + + """ + The type of resource that was deleted. + """ + subjectType: DeletionEventSubjectType! +} + +""" +An auto-generated type for paginating through multiple DeletionEvents. +""" +type DeletionEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeletionEventEdge!]! + + """ + A list of nodes that are contained in DeletionEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeletionEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeletionEvent and a cursor during pagination. +""" +type DeletionEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeletionEventEdge. + """ + node: DeletionEvent! +} + +""" +The set of valid sort keys for the DeletionEvent query. +""" +enum DeletionEventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The supported subject types of deletion events. +""" +enum DeletionEventSubjectType { + COLLECTION + PRODUCT +} + +""" +A shipping service and a list of countries that the service is available for. +""" +type DeliveryAvailableService { + """ + The countries the service provider ships to. + """ + countries: DeliveryCountryCodesOrRestOfWorld! + + """ + The name of the service. + """ + name: String! +} + +""" +Represents a branded promise presented to buyers. +""" +type DeliveryBrandedPromise { + """ + The handle of the branded promise. For example: `shop_promise`. + """ + handle: String! + + """ + The name of the branded promise. For example: `Shop Promise`. + """ + name: String! +} + +""" +A carrier service (also known as a carrier calculated service or shipping +service) provides real-time shipping rates to Shopify. Some common carrier +services include Canada Post, FedEx, UPS, and USPS. The term **carrier** is +often used interchangeably with the terms **shipping company** and **rate provider**. + +Using the CarrierService resource, you can add a carrier service to a shop and +then provide a list of applicable shipping rates at checkout. You can even use +the cart data to adjust shipping rates and offer shipping discounts based on +what is in the customer's cart. + +## Requirements for accessing the CarrierService resource +To access the CarrierService resource, add the `write_shipping` permission to +your app's requested scopes. For more information, see [API access +scopes](https://shopify.dev/docs/admin-api/access-scopes). + +Your app's request to create a carrier service will fail unless the store +installing your carrier service meets one of the following requirements: +* It's on the Advanced Shopify plan or higher. +* It's on the Shopify plan with yearly billing, or the carrier service feature +has been added to the store for a monthly fee. For more information, contact +[Shopify Support](https://help.shopify.com/questions). +* It's a development store. + +> Note: +> If a store changes its Shopify plan, then the store's association with a +carrier service is deactivated if the store no long meets one of the +requirements above. + +## Providing shipping rates to Shopify +When adding a carrier service to a store, you need to provide a POST endpoint +rooted in the `callbackUrl` property where Shopify can retrieve applicable +shipping rates. The callback URL should be a public endpoint that expects these +requests from Shopify. + +### Example shipping rate request sent to a carrier service + +```json +{ + "rate": { + "origin": { + "country": "CA", + "postal_code": "K2P1L4", + "province": "ON", + "city": "Ottawa", + "name": null, + "address1": "150 Elgin St.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": "Jamie D's Emporium" + }, + "destination": { + "country": "CA", + "postal_code": "K1M1M4", + "province": "ON", + "city": "Ottawa", + "name": "Bob Norman", + "address1": "24 Sussex Dr.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": null + }, + "items": [{ + "name": "Short Sleeve T-Shirt", + "sku": "", + "quantity": 1, + "grams": 1000, + "price": 1999, + "vendor": "Jamie D's Emporium", + "requires_shipping": true, + "taxable": true, + "fulfillment_service": "manual", + "properties": null, + "product_id": 48447225880, + "variant_id": 258644705304 + }], + "currency": "USD", + "locale": "en", + "order_totals": { + "subtotal_price": "1999", + "total_price": "2199", + "discount_amount": "150" + }, + "customer": { + "id": 207119551, + "tags": ["VIP", "wholesale"] + } + } +} +``` + +### Example response +```json +{ + "rates": [ + { + "service_name": "canadapost-overnight", + "service_code": "ON", + "total_price": "1295", + "description": "This is the fastest option by far", + "currency": "CAD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-2dayground", + "service_code": "2D", + "total_price": "2934", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400" + }, + { + "service_name": "fedex-priorityovernight", + "service_code": "1D", + "total_price": "3587", + "currency": "USD", + "min_delivery_date": "2013-04-12 14:48:45 -0400", + "max_delivery_date": "2013-04-12 14:48:45 -0400", + "metafields": [ + { + "key": "tracking_url", + "value": "abc123", + "namespace": "carrier_service_metadata", + "type": "single_line_text_field" + } + ] + } + ] +} +``` + +The `address3`, `fax`, `address_type`, and `company_name` fields are returned by +specific [ActiveShipping](https://github.com/Shopify/active_shipping) providers. +For API-created carrier services, you should use only the following shipping +address fields: +* `address1` +* `address2` +* `city` +* `zip` +* `province` +* `country` + +Other values remain as `null` and are not sent to the callback URL. + +### Response fields + +When Shopify requests shipping rates using your callback URL, the response +object `rates` must be a JSON array of objects with the following fields. +Required fields must be included in the response for the carrier service +integration to work properly. + +| Field | Required | Description + + | +| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `service_name` | Yes | The name of the rate, which customers see +at checkout. For example: `Expedited Mail`. + | +| `description` | Yes | A description of the rate, which +customers see at checkout. For example: `Includes tracking and insurance`. + | +| `service_code` | Yes | A unique code associated with the rate +that must be consistent across requests. For example: `expedited_mail`. + | +| `currency` | Yes | The currency of the shipping rate. + + | +| `total_price` | Yes | The total price expressed in subunits. If +the currency doesn't use subunits, then the value must be multiplied by 100. For +example: `"total_price": 500` for 5.00 CAD, `"total_price": 100000` for 1000 JPY. | +| `phone_required` | No | Whether the customer must provide a phone +number at checkout. + | +| `min_delivery_date` | No | The earliest delivery date for the +displayed rate. + | +| `max_delivery_date` | No | The latest delivery date for the +displayed rate to still be valid. + | +| `metafields` | No | An array of metafield objects to attach +custom metadata to the shipping rate. + | + +### Special conditions + +* To indicate that this carrier service cannot handle this shipping request, +return an empty array and any successful (20x) HTTP code. +* To force backup rates instead, return a 40x or 50x HTTP code with any content. +A good choice is the regular 404 Not Found code. +* Redirects (30x codes) will only be followed for the same domain as the +original callback URL. Attempting to redirect to a different domain will trigger backup rates. +* There is no retry mechanism. The response must be successful on the first try, +within the time budget listed below. Timeouts or errors will trigger backup rates. +* The `service_code` must be stable and consistent across requests for the same +shipping option. It should not contain dynamic values like session IDs, +timestamps, or request-specific identifiers. Use metafields for passing dynamic +or session-specific data. + +## Response Timeouts + +The read timeout for rate requests are dynamic, based on the number of requests +per minute (RPM). These limits are applied to each shop-app pair. The timeout +values are as follows. + +| RPM Range | Timeout | +| ------------- | ---------- | +| Under 1500 | 10s | +| 1500 to 3000 | 5s | +| Over 3000 | 3s | + +> Note: +> These values are upper limits and should not be interpretted as a goal to +develop towards. Shopify is constantly evaluating the performance of the +platform and working towards improving resilience as well as app capabilities. +As such, these numbers may be adjusted outside of our normal versioning timelines. + +## Server-side caching of requests +Shopify provides server-side caching to reduce the number of requests it makes. +Any shipping rate request that identically matches the following fields will be +retrieved from Shopify's cache of the initial response: +* variant IDs +* default shipping box weight and dimensions +* variant quantities +* carrier service ID +* origin address +* destination address +* item weights and signatures + +If any of these fields differ, or if the cache has expired since the original +request, then new shipping rates are requested. The cache expires 15 minutes +after rates are successfully returned. If an error occurs, then the cache +expires after 30 seconds. +""" +type DeliveryCarrierService implements Node { + """ + Whether the carrier service is active. + """ + active: Boolean! + + """ + The list of services offered for given destinations. + """ + availableServicesForCountries( + """ + The country codes of the destinations. + """ + countryCodes: [CountryCode!] + + """ + The locations of the possible origins. + """ + origins: [ID!] + + """ + Whether to use 'Rest of World' as the destination. + """ + restOfWorld: Boolean! + ): [DeliveryAvailableService!]! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. + """ + callbackUrl: URL + + """ + The properly formatted name of the shipping service provider, ready to display. + """ + formattedName: String + + """ + The logo of the service provider. + """ + icon: Image! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the shipping service provider. + """ + name: String + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! +} + +""" +Links a [`DeliveryCarrierService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCarrierService) with the associated shop +[locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) +where it can calculate shipping rates. Each pairing indicates the locations that +can use a specific carrier service for real-time rate calculations during checkout. + +The carrier service provides the shipping rate calculation logic, while the +locations represent physical or virtual fulfillment points that can ship orders +using that service. +""" +type DeliveryCarrierServiceAndLocations { + """ + The carrier service. + """ + carrierService: DeliveryCarrierService! + + """ + The list of locations that support this carrier service. + """ + locations: [Location!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCarrierServices. +""" +type DeliveryCarrierServiceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCarrierServiceEdge!]! + + """ + A list of nodes that are contained in DeliveryCarrierServiceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryCarrierService!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a carrier service. +""" +input DeliveryCarrierServiceCreateInput { + """ + 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 { + """ + The position 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 { + """ + 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! + + """ + 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 { + """ + The value (weight or price) that the condition field is compared to. + """ + conditionCriteria: DeliveryConditionCriteria! + + """ + The field to compare the criterion value against, using the operator. + """ + field: DeliveryConditionField! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The operator to compare the field and criterion value. + """ + operator: DeliveryConditionOperator! +} + +""" +The value (weight or price) that the condition field is compared to. +""" +union DeliveryConditionCriteria = MoneyV2 | Weight + +""" +The field type that the condition will be applied to. +""" +enum DeliveryConditionField { + """ + The condition will check against the total 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 { + """ + The condition will check whether the field is greater than or equal to the criterion. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The condition will check if the field is less than or equal to the criterion. + """ + LESS_THAN_OR_EQUAL_TO +} + +""" +A country that is used to define a shipping zone. +""" +type DeliveryCountry implements Node { + """ + A two-letter country code in ISO 3166-1 alpha-2 standard. + It also includes a flag indicating whether the country should be + a part of the 'Rest Of World' shipping zone. + """ + code: DeliveryCountryCodeOrRestOfWorld! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the country. + """ + name: String! + + """ + The list of regions associated with this country. + """ + provinces: [DeliveryProvince!]! + + """ + The translated name of the country. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The country details and the associated shipping zone. +""" +type DeliveryCountryAndZone { + """ + The country details. + """ + country: DeliveryCountry! + + """ + The name of the shipping zone. + """ + zone: String! +} + +""" +The country code and whether the country is a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodeOrRestOfWorld { + """ + The country code in the ISO 3166-1 alpha-2 format. + """ + countryCode: CountryCode + + """ + Whether the country is a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The list of country codes and information whether the countries +are a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodesOrRestOfWorld { + """ + List of applicable country codes in the ISO 3166-1 alpha-2 format. + """ + countryCodes: [CountryCode!]! + + """ + Whether the countries are a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean! +} + +""" +The input fields to specify a country. +""" +input DeliveryCountryInput { + """ + The country code of the country in the ISO 3166-1 alpha-2 format. + """ + code: CountryCode + + """ + 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 { + """ + 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 Shopify Function implementing the delivery customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the delivery customization. + """ + title: String! +} + +""" +Return type for `deliveryCustomizationActivation` mutation. +""" +type DeliveryCustomizationActivationPayload { + """ + The IDs of the updated delivery customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCustomizations. +""" +type DeliveryCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCustomizationEdge!]! + + """ + A list of nodes that are contained in DeliveryCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryCustomizationCreate` mutation. +""" +type DeliveryCustomizationCreatePayload { + """ + Returns the created delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Return type for `deliveryCustomizationDelete` mutation. +""" +type DeliveryCustomizationDeletePayload { + """ + Returns the deleted delivery customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type which holds one DeliveryCustomization and a cursor during pagination. +""" +type DeliveryCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryCustomizationEdge. + """ + node: DeliveryCustomization! +} + +""" +An error that occurs during the execution of a delivery customization mutation. +""" +type DeliveryCustomizationError implements DisplayableError { + """ + The error code. + """ + code: DeliveryCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryCustomizationError`. +""" +enum DeliveryCustomizationErrorCode { + """ + 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 { + """ + 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 { + """ + Returns the updated delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Whether the shop is blocked from converting to full multi-location delivery +profiles mode. If the shop is blocked, then the blocking reasons are also returned. +""" +type DeliveryLegacyModeBlocked { + """ + Whether the shop can convert to full multi-location delivery profiles mode. + """ + blocked: Boolean! + + """ + The reasons why the shop is blocked from converting to full multi-location delivery profiles mode. + """ + reasons: [DeliveryLegacyModeBlockedReason!] +} + +""" +Reasons the shop is blocked from converting to full multi-location delivery profiles mode. +""" +enum DeliveryLegacyModeBlockedReason { + """ + Multi-Location mode is disabled. The shop can't convert to full multi-location delivery profiles mode. + """ + MULTI_LOCATION_DISABLED @deprecated(reason: "All shops are now using multi-location mode.") + + """ + There are no locations for this store that can fulfill online orders. + """ + NO_LOCATIONS_FULFILLING_ONLINE_ORDERS +} + +""" +Local pickup settings associated with a location. +""" +type DeliveryLocalPickupSettings { + """ + Additional instructions or information related to the local pickup. + """ + instructions: String! + + """ + The estimated pickup time to show customers at checkout. + """ + pickupTime: DeliveryLocalPickupTime! +} + +""" +Possible pickup time values that a location enabled for local pickup can have. +""" +enum DeliveryLocalPickupTime { + """ + 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 { + """ + 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: Count +} + +""" +Links a location group with a zone and the associated method definitions. +""" +type DeliveryLocationGroupZone { + """ + The number of method definitions for the zone. + """ + methodDefinitionCounts: DeliveryMethodDefinitionCounts! + + """ + The method definitions associated to a zone and location group. + """ + methodDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryLocationGroupZoneEdge!]! + + """ + A list of nodes that are contained in DeliveryLocationGroupZoneEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryLocationGroupZone!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination. +""" +type DeliveryLocationGroupZoneEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryLocationGroupZoneEdge. + """ + node: DeliveryLocationGroupZone! +} + +""" +The input fields for a delivery zone associated to a location group and profile. +""" +input DeliveryLocationGroupZoneInput { + """ + A list of countries to associate with the zone. + """ + countries: [DeliveryCountryInput!] + + """ + A globally-unique ID of the zone. + """ + id: ID + + """ + 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 { + """ + The instructions for the local pickup. + """ + instructions: String + + """ + The ID of the location associated with the location setting. + """ + locationId: ID! + + """ + 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 { + """ + The error code. + """ + code: DeliveryLocationLocalPickupSettingsErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryLocationLocalPickupSettingsError`. +""" +enum DeliveryLocationLocalPickupSettingsErrorCode { + """ + Provided locationId is not for an active location belonging to this store. + """ + ACTIVE_LOCATION_NOT_FOUND + + """ + Custom pickup time is not allowed for local pickup settings. + """ + CUSTOM_PICKUP_TIME_NOT_ALLOWED + + """ + An error occurred while changing the local pickup settings. + """ + GENERIC_ERROR +} + +""" +Information about the delivery method selected for a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder). +Includes the method type, expected delivery timeframe, and any additional +information needed for delivery. + +The delivery method stores details from checkout such as the carrier, branded +promises like Shop Promise, and the delivery option name shown to the buyer. +Additional information like delivery instructions or contact phone numbers helps fulfill +the [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) correctly. +""" +type DeliveryMethod implements Node { + """ + The Additional information to consider when performing the delivery. + """ + additionalInformation: DeliveryMethodAdditionalInformation + + """ + The branded promise that was presented to the buyer during checkout. For example: Shop Promise. + """ + brandedPromise: DeliveryBrandedPromise + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + maxDeliveryDateTime: DateTime + + """ + The type of the delivery method. + """ + methodType: DeliveryMethodType! + + """ + The earliest delivery date and time when the fulfillment is expected to arrive at the buyer's location. + """ + minDeliveryDateTime: DateTime + + """ + The name of the delivery option that was presented to the buyer during checkout. + """ + presentedName: String + + """ + A reference to the shipping method. + """ + serviceCode: String + + """ + Source reference is promise provider specific data associated with delivery promise. + """ + sourceReference: String +} + +""" +Additional information included on a delivery method that will help during the delivery process. +""" +type DeliveryMethodAdditionalInformation { + """ + The delivery instructions to follow when performing the delivery. + """ + instructions: String + + """ + The phone number to contact when performing the delivery. + """ + phone: String +} + +""" +A method definition contains the delivery rate and the conditions that must be met for the method to be +applied. +""" +type DeliveryMethodDefinition implements Node { + """ + Whether this method definition is active. + """ + active: Boolean! + + """ + The description of the method definition. Only available on shipping rates that are custom. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The method conditions that must pass for this method definition to be applied to an order. + """ + methodConditions: [DeliveryCondition!]! + + """ + The name of the method definition. + """ + name: String! + + """ + The provided rate for this method definition, from a rate definition or participant. + """ + rateProvider: DeliveryRateProvider! +} + +""" +An auto-generated type for paginating through multiple DeliveryMethodDefinitions. +""" +type DeliveryMethodDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryMethodDefinitionEdge!]! + + """ + A list of nodes that are contained in DeliveryMethodDefinitionEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryMethodDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The number of method definitions for a zone, separated into merchant-owned and participant definitions. +""" +type DeliveryMethodDefinitionCounts { + """ + The number of participant method definitions for the specified zone. + """ + participantDefinitionsCount: Int! + + """ + The number of merchant-defined method definitions for the specified zone. + """ + rateDefinitionsCount: Int! +} + +""" +An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination. +""" +type DeliveryMethodDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryMethodDefinitionEdge. + """ + node: DeliveryMethodDefinition! +} + +""" +The input fields for a method definition. +""" +input DeliveryMethodDefinitionInput { + """ + Whether to use this method definition during rate calculation. + """ + active: Boolean + + """ + A list of conditions to update on the method definition. + """ + conditionsToUpdate: [DeliveryUpdateConditionInput!] + + """ + The description of the method definition. + """ + description: String + + """ + A globally-unique ID of the method definition. Use only when updating a method definition. + """ + id: ID + + """ + The name of the method definition. + """ + name: String + + """ + 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 weight conditions on the method definition. + """ + weightConditionsToCreate: [DeliveryWeightConditionInput!] +} + +""" +The different types of method definitions to filter by. +""" +enum DeliveryMethodDefinitionType { + """ + A static merchant-defined rate. + """ + MERCHANT + + """ + A dynamic participant rate. + """ + PARTICIPANT +} + +""" +Possible method types that a delivery method can have. +""" +enum DeliveryMethodType { + """ + The order is 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 +} + +""" +A participant defines carrier-calculated rates for shipping services +with a possible merchant-defined fixed fee or a percentage-of-rate fee. +""" +type DeliveryParticipant implements Node { + """ + Whether to display new shipping services automatically to the customer when the service becomes available. + """ + adaptToNewServicesFlag: Boolean! + + """ + The carrier used for this participant. + """ + carrierService: DeliveryCarrierService! + + """ + The merchant-defined fixed fee for this participant. + """ + fixedFee: MoneyV2 + + """ + A globally-unique ID. + """ + id: ID! + + """ + The carrier-specific services offered by the participant, and whether each service is active. + """ + participantServices: [DeliveryParticipantService!]! + + """ + The merchant-defined percentage-of-rate fee for this participant. + """ + percentageOfRateFee: Float! +} + +""" +The input fields for a participant. +""" +input DeliveryParticipantInput { + """ + 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 + + """ + The fixed feed that's defined by the merchant for this participant. + """ + fixedFee: MoneyInput + + """ + The ID of the participant. + """ + id: ID + + """ + 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 { + """ + 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 { + """ + Whether the service is active. + """ + active: Boolean! + + """ + The name of the service. + """ + name: String! +} + +""" +The input fields for a price-based condition of a delivery method definition. +""" +input DeliveryPriceConditionInput { + """ + The monetary value to compare the price of an order to. + """ + criteria: MoneyInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +How many product variants are in a profile. This count is capped at 500. +""" +type DeliveryProductVariantsCount { + """ + Whether the count has reached the cap of 500. + """ + capped: Boolean! + + """ + The product variant count. + """ + count: Int! +} + +""" +A shipping profile that defines shipping rates for specific +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) objects and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +objects. Delivery profiles determine which products can ship from which +[`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) +objects to which zones, and at what rates. + +Profiles can associate with [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) +objects to provide custom shipping rules for subscriptions, such as free +shipping or restricted delivery zones. The default profile applies to all +products that aren't assigned to other profiles. + +Learn more about [building delivery profiles](https://shopify.dev/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). +""" +type DeliveryProfile implements Node { + """ + The number of active shipping rates for the profile. + """ + activeMethodDefinitionsCount: Int! + + """ + Whether this is the default profile. + """ + default: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether this shop has enabled legacy compatibility mode for delivery profiles. + """ + legacyMode: Boolean! @deprecated(reason: "Legacy mode profiles are no longer supported. This will be removed in 2026-04.") + + """ + The number of locations without rates defined. + """ + locationsWithoutRatesCount: Int! + + """ + The name of the delivery profile. + """ + name: String! + + """ + The number of active origin locations for the profile. + """ + originLocationCount: Int! + + """ + How many product variants are in this profile. + """ + productVariantsCount: Count + + """ + How many product variants are in this profile. + """ + productVariantsCountV2: DeliveryProductVariantsCount! @deprecated(reason: "Use `productVariantsCount` instead.") + + """ + The products and variants associated with this profile. + """ + profileItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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: ProfileItemSortKeys = ID @deprecated(reason: "Profile item sorting is no longer supported.") + ): DeliveryProfileItemConnection! + + """ + The location groups and associated zones using this profile. + """ + profileLocationGroups( + """ + Filter the location groups of the profile by location group ID. + """ + locationGroupId: ID + ): [DeliveryProfileLocationGroup!]! + + """ + Selling plan groups associated with the specified delivery profile. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `deliveryProfileCreate` mutation. +""" +type DeliveryProfileCreatePayload { + """ + The delivery profile that was created. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DeliveryProfile and a cursor during pagination. +""" +type DeliveryProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileEdge. + """ + node: DeliveryProfile! +} + +""" +The input fields for a delivery profile. +""" +input DeliveryProfileInput { + """ + The list of condition IDs to delete. + """ + conditionsToDelete: [ID!] + + """ + 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!] + + """ + 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!] + + """ + 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!] + + """ + The list of selling plan groups to be dissociated with the delivery profile. + """ + sellingPlanGroupsToDissociate: [ID!] + + """ + The list of product variant IDs to be associated with the delivery profile. + """ + variantsToAssociate: [ID!] + + """ + The list of product variant IDs to be dissociated from the delivery profile. + The dissociated product variants are moved back to the default delivery profile. + """ + variantsToDissociate: [ID!] + + """ + The list of zone IDs to delete. + """ + zonesToDelete: [ID!] +} + +""" +A product and the subset of associated variants that are part of this delivery profile. +""" +type DeliveryProfileItem implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + A product associated with this profile. + """ + product: Product! + + """ + The product variants associated with this delivery profile. + """ + variants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 = ID @deprecated(reason: "Profile item variant sorting is no longer supported.") + ): ProductVariantConnection! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfileItems. +""" +type DeliveryProfileItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileItemEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfileItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination. +""" +type DeliveryProfileItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryProfileItemEdge. + """ + node: DeliveryProfileItem! +} + +""" +Links a location group with zones. Both are associated to a delivery profile. +""" +type DeliveryProfileLocationGroup { + """ + The countries already selected in any zone for the specified location group. + """ + countriesInAnyZone: [DeliveryCountryAndZone!]! + + """ + The collection of locations that make up the specified location group. + """ + locationGroup: DeliveryLocationGroup! + + """ + The applicable zones associated to the specified location group. + """ + locationGroupZones( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The globally-unique ID of the delivery profile location group. + """ + id: ID + + """ + The list of location IDs to be moved to this location group. + """ + locations: [ID!] + + """ + The list of location IDs to be added to this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToAdd: [ID!] + + """ + The list of location IDs to be removed from this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToRemove: [ID!] + + """ + The list of location group zones to create. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToCreate: [DeliveryLocationGroupZoneInput!] + + """ + The list of location group zones to update. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToUpdate: [DeliveryLocationGroupZoneInput!] +} + +""" +Return type for `deliveryProfileRemove` mutation. +""" +type DeliveryProfileRemovePayload { + """ + The delivery profile deletion job triggered by the mutation. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryProfileUpdate` mutation. +""" +type DeliveryProfileUpdatePayload { + """ + The delivery profile that was updated. + """ + profile: DeliveryProfile + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Returns enabled delivery promise participants. +""" +type DeliveryPromiseParticipant implements Node { + """ + The ID of the promise participant. + """ + id: ID! + + """ + The resource that the participant is attached to. + """ + owner: DeliveryPromiseParticipantOwner + + """ + The owner type of the participant. + """ + ownerType: DeliveryPromiseParticipantOwnerType! +} + +""" +An auto-generated type for paginating through multiple DeliveryPromiseParticipants. +""" +type DeliveryPromiseParticipantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryPromiseParticipantEdge!]! + + """ + A list of nodes that are contained in DeliveryPromiseParticipantEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryPromiseParticipant!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryPromiseParticipant and a cursor during pagination. +""" +type DeliveryPromiseParticipantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DeliveryPromiseParticipantEdge. + """ + node: DeliveryPromiseParticipant! +} + +""" +The object that the participant references. +""" +union DeliveryPromiseParticipantOwner = ProductVariant + +""" +The type of object that the participant is attached to. +""" +enum DeliveryPromiseParticipantOwnerType { + """ + A product variant. + """ + PRODUCTVARIANT +} + +""" +Return type for `deliveryPromiseParticipantsUpdate` mutation. +""" +type DeliveryPromiseParticipantsUpdatePayload { + """ + The promise participants that were added. + """ + promiseParticipants: [DeliveryPromiseParticipant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A delivery promise provider. Currently restricted to select approved delivery promise partners. +""" +type DeliveryPromiseProvider implements Node { + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean! + + """ + The number of seconds to add to the current time as a buffer when looking up + delivery promises. Represents how long the shop requires before releasing an + order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location associated with this delivery promise provider. + """ + location: Location! + + """ + The time zone to be used for interpreting day of week and cutoff times in + delivery schedules when looking up delivery promises. + """ + timeZone: String! +} + +""" +Return type for `deliveryPromiseProviderUpsert` mutation. +""" +type DeliveryPromiseProviderUpsertPayload { + """ + The created or updated delivery promise provider. + """ + deliveryPromiseProvider: DeliveryPromiseProvider + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryPromiseProviderUpsertUserError!]! +} + +""" +An error that occurs during the execution of `DeliveryPromiseProviderUpsert`. +""" +type DeliveryPromiseProviderUpsertUserError implements DisplayableError { + """ + The error code. + """ + code: DeliveryPromiseProviderUpsertUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryPromiseProviderUpsertUserError`. +""" +enum DeliveryPromiseProviderUpsertUserErrorCode { + """ + The 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 { + """ + Whether delivery dates is enabled. + """ + deliveryDatesEnabled: Boolean! + + """ + The number of business days required for processing the order before the + package is handed off to the carrier. Expressed as an ISO8601 duration. + """ + processingTime: String +} + +""" +A region that is used to define a shipping zone. +""" +type DeliveryProvince implements Node { + """ + The code of the region. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The full name of the region. + """ + name: String! + + """ + The translated name of the region. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +""" +The input fields to specify a region. +""" +input DeliveryProvinceInput { + """ + The code of the region. + """ + code: String! +} + +""" +The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). +""" +type DeliveryRateDefinition implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The price of this rate. + """ + price: MoneyV2! +} + +""" +The input fields for a rate definition. +""" +input DeliveryRateDefinitionInput { + """ + A globally-unique ID of the rate definition. + """ + id: ID + + """ + The price of the rate definition. + """ + price: MoneyInput! +} + +""" +A rate provided by a merchant-defined rate or a participant. +""" +union DeliveryRateProvider = DeliveryParticipant | DeliveryRateDefinition + +""" +The `DeliverySetting` object enables you to manage shop-wide shipping settings. +""" +type DeliverySetting { + """ + Whether the shop is blocked from converting to full multi-location delivery + profiles mode. If the shop is blocked, then the blocking reasons are also + returned. Note: this field is effectively deprecated and will be removed in a + future version of the API. + """ + legacyModeBlocked: DeliveryLegacyModeBlocked! + + """ + Enables legacy compatability mode for the multi-location delivery profiles + feature. Note: this field is effectively deprecated and will be removed in a + future version of the API. + """ + legacyModeProfiles: Boolean! +} + +""" +The input fields for shop-level delivery settings. +""" +input DeliverySettingInput { + """ + Whether legacy compatability mode is enabled for the multi-location delivery + profiles feature. Note: this field is effectively deprecated and will be + removed in a future version of the API. + """ + legacyModeProfiles: Boolean +} + +""" +Return type for `deliverySettingUpdate` mutation. +""" +type DeliverySettingUpdatePayload { + """ + The updated delivery shop level settings. + """ + setting: DeliverySetting + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryShippingOriginAssign` mutation. +""" +type DeliveryShippingOriginAssignPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for updating the condition of a delivery method definition. +""" +input DeliveryUpdateConditionInput { + """ + 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! + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +The input fields for a weight-based condition of a delivery method definition. +""" +input DeliveryWeightConditionInput { + """ + The weight value to compare the weight of an order to. + """ + criteria: WeightInput + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +A zone is a group of countries that have the same shipping rates. Customers can +order products from a store only if they choose a shipping destination that's +included in one of the store's zones. +""" +type DeliveryZone implements Node { + """ + The list of countries within the zone. + """ + countries: [DeliveryCountry!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the zone. + """ + name: String! +} + +""" +Configuration of the deposit. +""" +union DepositConfiguration = DepositPercentage + +""" +The input fields configuring the deposit for a B2B buyer. +""" +input DepositInput { + """ + The percentage of the order total that should be paid as a deposit. Must be between 1 and 99, inclusive. + """ + percentage: Float! +} + +""" +A percentage deposit. +""" +type DepositPercentage { + """ + The percentage value of the deposit. + """ + percentage: Float! +} + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet { + """ + 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 = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping | DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +The actual amount discounted on a line item or shipping line. While [`DiscountApplication`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DiscountApplication) +captures the discount's intentions and rules, The `DiscountAllocation` object +shows the final calculated discount amount applied to each line. + +The allocation includes the discounted amount in both shop and presentment +currencies, with a reference to the originating discount application. +""" +type DiscountAllocation { + """ + The money amount that's allocated to a line based on the associated discount application. + """ + allocatedAmount: MoneyV2! @deprecated(reason: "Use `allocatedAmountSet` instead.") + + """ + The money amount that's allocated to a line based on the associated discount + application in shop and presentment currencies. + """ + allocatedAmountSet: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: DiscountApplication! +} + +""" +An auto-generated type for paginating through multiple DiscountAllocations. +""" +type DiscountAllocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAllocationEdge!]! + + """ + A list of nodes that are contained in DiscountAllocationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAllocation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAllocation and a cursor during pagination. +""" +type DiscountAllocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAllocationEdge. + """ + node: DiscountAllocation! +} + +""" +The fixed amount value of a discount, and whether the amount is applied to each +entitled item or spread evenly across the entitled items. +""" +type DiscountAmount { + """ + The value of the discount. + """ + amount: MoneyV2! + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean! +} + +""" +The input fields for the value of the discount and how it is applied. +""" +input DiscountAmountInput { + """ + The value of the discount. + """ + amount: Decimal + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +interface DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The method by which the discount's value is allocated onto its entitled lines. +""" +enum DiscountApplicationAllocationMethod { + """ + The value is spread across all entitled lines. + """ + ACROSS + + """ + The value is applied onto every entitled line. + """ + EACH + + """ + The value is specifically applied onto a particular line. + """ + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. +""" +type DiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountApplicationEdge!]! + + """ + A list of nodes that are contained in DiscountApplicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. +""" +type DiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountApplicationEdge. + """ + node: DiscountApplication! +} + +""" +The level at which the discount's value is applied. +""" +enum DiscountApplicationLevel { + """ + The discount is applied at the 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 { + """ + The discount is allocated onto all the lines. + """ + ALL + + """ + The discount is allocated onto only the lines that it's entitled for. + """ + ENTITLED + + """ + The discount is allocated onto explicitly chosen lines. + """ + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +""" +enum DiscountApplicationTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The types of automatic discounts applied in the cart and at checkout when an order meets specific criteria. + +Includes [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) for custom logic using the [Discount Function +API](https://shopify.dev/docs/api/functions/latest/discount), [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) +for percentage or fixed amount reductions, [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) +for Buy X Get Y promotions, and [`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) +for delivery incentives. +""" +union DiscountAutomatic = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping + +""" +Return type for `discountAutomaticActivate` mutation. +""" +type DiscountAutomaticActivatePayload { + """ + The activated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticApp` object stores information about automatic discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountAutomaticApp`when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountCodeApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeApp) +object has similar functionality to the `DiscountAutomaticApp` object, with the exception that `DiscountCodeApp` +stores information about discount codes that are managed by an app using Shopify Functions. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + Whether the discount applies on one-time purchases. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + for the discount. + """ + discountId: ID! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The [error history](https://shopify.dev/docs/apps/build/functions/monitoring-and-errors) + for the latest version of the discount type that the app provides. + """ + errorHistory: FunctionsErrorHistory + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticAppCreate` mutation. +""" +type DiscountAutomaticAppCreatePayload { + """ + The automatic discount that the app manages. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an automatic discount +that's managed by an app. + +Use these input fields when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountAutomaticAppInput { + """ + 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 = false + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticAppUpdate` mutation. +""" +type DiscountAutomaticAppUpdatePayload { + """ + The updated automatic discount that the app provides. + """ + automaticAppDiscount: DiscountAutomaticApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are automatically applied on a cart and at checkout. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountAutomaticBasic` object stores information about automatic amount off discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic) +object has similar functionality to the `DiscountAutomaticBasic` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBasic { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") +} + +""" +Return type for `discountAutomaticBasicCreate` mutation. +""" +type DiscountAutomaticBasicCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an +[amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's automatically applied on a cart and at checkout. + +During creation the required fields are: + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountAutomaticBasicInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticBasicUpdate` mutation. +""" +type DiscountAutomaticBasicUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticBulkDelete` mutation. +""" +type DiscountAutomaticBulkDeletePayload { + """ + The asynchronous job removing the automatic discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are automatically applied on a cart and at checkout. BXGY discounts incentivize customers by offering +them additional items at a discounted price or for free when they purchase a specified quantity of items. + +The `DiscountAutomaticBxgy` object stores information about automatic BXGY discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy) +object has similar functionality to the `DiscountAutomaticBxgy` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBxgy implements HasEvents & Node { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuys! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The number of times that the discount has been used. + """ + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountAutomaticBxgyCreate` mutation. +""" +type DiscountAutomaticBxgyCreatePayload { + """ + The automatic discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's automatically applied on a cart and at checkout. + +When creating, required fields are: + - `customerBuys` + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountAutomaticBxgyInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + 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 { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomatics. +""" +type DiscountAutomaticConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomatic!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `discountAutomaticDeactivate` mutation. +""" +type DiscountAutomaticDeactivatePayload { + """ + The deactivated automatic discount. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountAutomaticDelete` mutation. +""" +type DiscountAutomaticDeletePayload { + """ + The ID of the automatic discount that was deleted. + """ + deletedAutomaticDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type which holds one DiscountAutomatic and a cursor during pagination. +""" +type DiscountAutomaticEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticEdge. + """ + node: DiscountAutomatic! +} + +""" +The `DiscountAutomaticFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are automatically applied on a cart and at checkout. Free shipping discounts are promotional deals that +merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountAutomaticFreeShipping` object stores information about automatic free shipping discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping) +object has similar functionality to the `DiscountAutomaticFreeShipping` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """ + The context defining which buyers can use the discount. + """ + context: DiscountContext! + + """ + The date and time when the discount was created. + """ + createdAt: DateTime! + + """ + The countries that qualify for the discount. + You can define + [a list of countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountries) + or specify [all countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountryAll) + to be eligible for the discount. + """ + destinationSelection: DiscountShippingDestinationSelection! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: ShippingDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The classes of the discount. + """ + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `discountAutomaticFreeShippingCreate` mutation. +""" +type DiscountAutomaticFreeShippingCreatePayload { + """ + The automatic free shipping discount that was created. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's automatically applied on a cart and at checkout. + +When creating, required fields are: +- `startsAt` +- `title` +""" +input DiscountAutomaticFreeShippingInput { + """ + 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 + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticFreeShippingUpdate` mutation. +""" +type DiscountAutomaticFreeShippingUpdatePayload { + """ + The automatic discount that was updated. + """ + automaticDiscountNode: DiscountAutomaticNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticNode` object enables you to manage [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts) +that are applied when an order meets specific criteria. You can create amount +off, free shipping, or buy X get Y automatic discounts. For example, you can +offer customers a free shipping discount that applies when conditions are met. +Or you can offer customers a buy X get Y discount that's automatically applied +when customers spend a specified amount of money, or a specified quantity of products. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountAutomaticNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied automatically when an order meets specific criteria. + Learn more about [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscount: DiscountAutomatic! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomaticNodes. +""" +type DiscountAutomaticNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticNodeEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticNodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomaticNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAutomaticNode and a cursor during pagination. +""" +type DiscountAutomaticNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountAutomaticNodeEdge. + """ + node: DiscountAutomaticNode! +} + +""" +All buyers are eligible for the discount. +""" +enum DiscountBuyerSelection { + """ + All buyers are eligible for the discount. + """ + ALL +} + +""" +Indicates that a discount applies to all buyers without restrictions, enabling +universal promotions that reach every customer. This selection removes +buyer-specific limitations from discount eligibility. + +For example, a flash sale or grand opening promotion would target all buyers to maximize participation and store visibility. + +Learn more about [discount targeting](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountBuyerSelectionAll { + """ + All buyers are eligible for the discount. + """ + all: DiscountBuyerSelection! +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum DiscountClass { + """ + The discount is combined with 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 = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +Return type for `discountCodeActivate` mutation. +""" +type DiscountCodeActivatePayload { + """ + The activated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeApp` object stores information about code discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountCodeApp` when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) +object has similar functionality to the `DiscountCodeApp` object, with the exception that `DiscountAutomaticApp` +stores information about automatic discounts that are managed by an app using Shopify Functions. +""" +type DiscountCodeApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies to subscriptions items. + """ + appliesOnSubscription: Boolean! + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeAppCreate` mutation. +""" +type DiscountCodeAppCreatePayload { + """ + The discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a code discount, where the discount +type is provided by an app extension that uses [Shopify +Functions](https://shopify.dev/docs/apps/build/functions). + +Use these input fields when you need advanced or custom discount capabilities +that aren't supported by [Shopify's native discount +types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountCodeAppInput { + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean = true + + """ + Whether the discount applies to subscriptions items. + """ + appliesOnSubscription: Boolean = false + + """ + 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). + """ + 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 + + """ + 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 { + """ + The updated discount that the app provides. + """ + codeAppDiscount: DiscountCodeApp + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Discount code applications capture the intentions of a discount code at +the time that it is applied onto an order. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type DiscountCodeApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The `DiscountCodeBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountCodeBasic` object stores information about amount off code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) +object has similar functionality to the `DiscountCodeBasic` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBasic { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeBasicCreate` mutation. +""" +type DiscountCodeBasicCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's applied on a cart and at checkout when a customer enters a code. Amount +off discounts can be a percentage off or a fixed amount off. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountCodeBasicInput { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + 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 { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkActivate` mutation. +""" +type DiscountCodeBulkActivatePayload { + """ + The asynchronous job that activates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDeactivate` mutation. +""" +type DiscountCodeBulkDeactivatePayload { + """ + The asynchronous job that deactivates the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeBulkDelete` mutation. +""" +type DiscountCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discounts. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers +by offering them additional items at a discounted price or for free when they purchase a specified quantity +of items. + +The `DiscountCodeBxgy` object stores information about BXGY code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) +object has similar functionality to the `DiscountCodeBxgy` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBxgy { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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!]! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +""" +Return type for `discountCodeBxgyCreate` mutation. +""" +type DiscountCodeBxgyCreatePayload { + """ + The code discount that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that's applied on a cart and at checkout when a customer enters a code. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `customerBuys` + - `customerGets` + - `startsAt` + - `title` +""" +input DiscountCodeBxgyInput { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The 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 + + """ + 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 { + """ + The code discount that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDeactivate` mutation. +""" +type DiscountCodeDeactivatePayload { + """ + The deactivated code discount. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountCodeDelete` mutation. +""" +type DiscountCodeDeletePayload { + """ + The ID of the code discount that was deleted. + """ + deletedCodeDiscountId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are +promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountCodeFreeShipping` object stores information about free shipping code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The +[`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) +object has similar functionality to the `DiscountCodeFreeShipping` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + A list codes that customers can use to redeem the discount. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """ + The total sales from orders where the discount was used. + """ + totalSales: MoneyV2 + + """ + The date and time when the discount was updated. + """ + updatedAt: DateTime! + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeFreeShippingCreate` mutation. +""" +type DiscountCodeFreeShippingCreatePayload { + """ + The discount code that was created. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's applied on a cart and at checkout when a customer enters a code. + +When creating, required fields are: + - `code` + - `context` (or deprecated `customerSelection`) + - `startsAt` + - `title` +""" +input DiscountCodeFreeShippingInput { + """ + 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 + + """ + 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 { + """ + The discount code that was updated. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeNode` object enables you to manage [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) +that are applied when customers enter a code at checkout. For example, you can +offer discounts where customers have to enter a code to redeem an amount off +discount on products, variants, or collections in a store. Or, you can offer +discounts where customers have to enter a code to get free shipping. Merchants +can create and share discount codes individually with customers. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountCodeNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + The underlying code discount object. + """ + codeDiscount: DiscountCode! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! +} + +""" +An auto-generated type for paginating through multiple DiscountCodeNodes. +""" +type DiscountCodeNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountCodeNodeEdge!]! + + """ + A list of nodes that are contained in DiscountCodeNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountCodeNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountCodeNode and a cursor during pagination. +""" +type DiscountCodeNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountCodeNodeEdge. + """ + node: DiscountCodeNode! +} + +""" +Return type for `discountCodeRedeemCodeBulkDelete` mutation. +""" +type DiscountCodeRedeemCodeBulkDeletePayload { + """ + The asynchronous job that deletes the discount codes. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The set of valid sort keys for the DiscountCode query. +""" +enum DiscountCodeSortKeys { + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A list of collections that the discount can have as a prerequisite or a list of +collections to which the discount can be applied. +""" +type DiscountCollections { + """ + The list of collections that the discount can have as a prerequisite or the + list of collections to which the discount can be applied. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + Specifies list of collection ids to add. + """ + add: [ID!] + + """ + Specifies list of collection ids to remove. + """ + remove: [ID!] +} + +""" +The [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that you can use in combination with +[Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +type DiscountCombinesWith { + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean! + + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean! + + """ + Whether the discount combines with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean! +} + +""" +The input fields to determine which discount classes the discount can combine with. +""" +input DiscountCombinesWithInput { + """ + Whether the discount combines with the + [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 + + """ + Whether the discount combines + with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean = false +} + +""" +The type used to define which buyers can use the discount. +""" +union DiscountContext = DiscountBuyerSelectionAll | DiscountCustomerSegments | DiscountCustomers + +""" +The input fields for the buyers who can use this discount. +""" +input DiscountContextInput @oneOf { + """ + All buyers are eligible for this discount. + """ + all: DiscountBuyerSelection + + """ + The list of customer 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 +} + +""" +Defines the geographic scope where a shipping discount can be applied based on +customer shipping destinations. This configuration determines which countries +are eligible for the promotional offer. + +For example, a "Free Shipping to EU" promotion would specify European Union +countries, while a domestic-only sale might target just the store's home country. + +The object includes both specific country selections and an option to include +all remaining countries not explicitly listed, providing flexible geographic +targeting for international merchants. +""" +type DiscountCountries { + """ + The codes for the countries where the discount can be applied. + """ + countries: [CountryCode!]! + + """ + Whether the discount is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The input fields for a list of countries to add or remove from the free shipping discount. +""" +input DiscountCountriesInput { + """ + The country codes to add to the list of countries where the discount applies. + """ + add: [CountryCode!] + + """ + 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 { + """ + Whether the discount can be applied to all countries as shipping destination. This value is always `true`. + """ + allCountries: Boolean! +} + +""" +Creates the broadest possible discount reach by targeting all customers, +regardless of their purchase history or segment membership. This gives merchants +maximum flexibility to run store-wide promotions without worrying about customer +eligibility restrictions. + +For example, a flash sale or grand opening promotion would target all customers +to maximize participation and store visibility. + +Learn more about [customer targeting](https://help.shopify.com/manual/discounts/). +""" +type DiscountCustomerAll { + """ + Whether the discount can be applied by all customers. This value is always `true`. + """ + allCustomers: Boolean! +} + +""" +The prerequisite items and prerequisite value that a customer must have on the order for the discount to be applicable. +""" +type DiscountCustomerBuys { + """ + If the discount is applicable when a customer buys a one-time purchase. + """ + isOneTimePurchase: Boolean! + + """ + If the discount is applicable when a customer buys a subscription purchase. + """ + isSubscription: Boolean! + + """ + The items required for the discount to be applicable. + """ + items: DiscountItems! + + """ + The prerequisite value. + """ + value: DiscountCustomerBuysValue! +} + +""" +The input fields for prerequisite items and quantity for the discount. +""" +input DiscountCustomerBuysInput { + """ + 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 = DiscountPurchaseAmount | DiscountQuantity + +""" +The input fields for prerequisite quantity or minimum purchase amount required for the discount. +""" +input DiscountCustomerBuysValueInput { + """ + 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 { + """ + 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 { + """ + 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 = DiscountAmount | DiscountOnQuantity | DiscountPercentage + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountCustomerGetsValueInput { + """ + 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 { + """ + The list of customer segments who are eligible for the discount. + """ + segments: [Segment!]! +} + +""" +The input fields for which customer segments to add to or remove from the discount. +""" +input DiscountCustomerSegmentsInput { + """ + A list of customer segments to add to the current list of customer segments. + """ + add: [ID!] + + """ + A list of customer segments to remove from the current list of customer segments. + """ + remove: [ID!] +} + +""" +The type used for targeting a set of customers who are eligible for the +discount. For example, the discount might be available to all customers or it +might only be available to a specific set of customers. You can define the set +of customers by targeting a list of customer segments, or by targeting a list of +specific customers. +""" +union DiscountCustomerSelection = DiscountCustomerAll | DiscountCustomerSegments | DiscountCustomers + +""" +The input fields for the customers who can use this discount. +""" +input DiscountCustomerSelectionInput { + """ + Whether all customers can use this discount. + """ + all: Boolean + + """ + The list of customer 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 +} + +""" +Defines customer targeting for discounts through specific individual customers. +This object allows merchants to create exclusive discounts that are only +available to explicitly selected customers. + +For example, a VIP customer appreciation discount might target specific +high-value customers by individually selecting them, or a beta program discount +could be offered to selected early adopters. + +Use `DiscountCustomers` to: +- Target specific individual customers for exclusive promotions +- Create personalized discount experiences for selected customers +- Offer special discounts to VIP or loyal customers +- Provide exclusive access to promotions for specific individuals + +This targeting method requires you to add each customer who should be eligible +for the discount. For broader targeting based on customer attributes or segments, use [`DiscountCustomerSegments`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCustomerSegments) instead. + +Learn more about creating customer-specific discounts using [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) and [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate). +""" +type DiscountCustomers { + """ + The list of individual customers eligible for the discount. + """ + customers: [Customer!]! +} + +""" +The input fields for which customers to add to or remove from the discount. +""" +input DiscountCustomersInput { + """ + A list of customers to add to the current list of customers who can use the discount. + """ + add: [ID!] + + """ + A list of customers to remove from the current list of customers who can use the discount. + """ + remove: [ID!] +} + +""" +The type of discount that will be applied. Currently, only a percentage discount is supported. +""" +union DiscountEffect = DiscountAmount | DiscountPercentage + +""" +The input fields for how the discount will be applied. Currently, only percentage off is supported. +""" +input DiscountEffectInput { + """ + The 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 { + """ + 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 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 + + """ + 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 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 = 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 { + """ + 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 +} + +""" +Specifies the minimum item quantity required for discount eligibility, helping +merchants create volume-based promotions that encourage larger purchases. This +threshold applies to qualifying items in the customer's cart. + +For example, a "Buy 3, Get 10% Off" promotion would set the minimum quantity to 3 items. + +Learn more about [discount requirements](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountMinimumQuantity { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64! +} + +""" +The input fields for the minimum quantity required for the discount. +""" +input DiscountMinimumQuantityInput { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64 +} + +""" +The type of minimum requirement that must be met for the discount to be applied. +For example, a customer must spend a minimum subtotal to be eligible for the +discount. Alternatively, a customer must purchase a minimum quantity of items to +be eligible for the discount. +""" +union DiscountMinimumRequirement = DiscountMinimumQuantity | DiscountMinimumSubtotal + +""" +The input fields for the minimum quantity or subtotal required for a discount. +""" +input DiscountMinimumRequirementInput { + """ + The minimum required quantity. + """ + quantity: DiscountMinimumQuantityInput + + """ + The minimum required subtotal. + """ + subtotal: DiscountMinimumSubtotalInput +} + +""" +The minimum subtotal required for the discount to apply. +""" +type DiscountMinimumSubtotal { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: MoneyV2! +} + +""" +The input fields for the minimum subtotal required for a discount. +""" +input DiscountMinimumSubtotalInput { + """ + The minimum subtotal that's required for the discount to be applied. + """ + greaterThanOrEqualToSubtotal: Decimal +} + +""" +The `DiscountNode` object enables you to manage +[discounts](https://help.shopify.com/manual/discounts), which are applied at +checkout or on a cart. + + +Discounts are a way for merchants to promote sales and special offers, or as +customer loyalty rewards. Discounts can apply to [orders, products, or +shipping](https://shopify.dev/docs/apps/build/discounts#discount-classes), and +can be either automatic or code-based. For example, you can offer customers a +buy X get Y discount that's automatically applied when purchases meet specific +criteria. Or, you can offer discounts where customers have to enter a code to +redeem an amount off discount on products, variants, or collections in a store. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related mutations, limitations, and considerations. +""" +type DiscountNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied at checkout or on cart. + + + Discounts can be [automatic or code-based](https://shopify.dev/docs/apps/build/discounts#discount-methods). + """ + discount: Discount! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! +} + +""" +An auto-generated type for paginating through multiple DiscountNodes. +""" +type DiscountNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountNodeEdge!]! + + """ + A list of nodes that are contained in DiscountNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountNode and a cursor during pagination. +""" +type DiscountNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountNodeEdge. + """ + node: DiscountNode! +} + +""" +Defines quantity-based discount rules that specify how many items are eligible +for a discount effect. This object enables bulk purchase incentives and tiered +pricing strategies. + +For example, a "Buy 4 candles, get 2 candles 50% off (mix and match)" promotion +would specify a quantity threshold of 2 items that will receive a percentage +discount effect, encouraging customers to purchase more items to unlock savings. + +The configuration combines quantity requirements with discount effects, allowing +merchants to create sophisticated pricing rules that reward larger purchases and +increase average order values. +""" +type DiscountOnQuantity { + """ + The discount's effect on qualifying items. + """ + effect: DiscountEffect! + + """ + The number of items being discounted. The customer must have at least this + many items of specified products or product variants in their order to be + eligible for the discount. + """ + quantity: DiscountQuantity! +} + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountOnQuantityInput { + """ + The 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 { + """ + The percentage value of the discount. + """ + percentage: Float! +} + +""" +A list of products and product variants that the discount can have as a +prerequisite or a list of products and product variants to which the discount +can be applied. +""" +type DiscountProducts { + """ + The list of product variants that the discount can have as a prerequisite or + the list of product variants to which the discount can be applied. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The IDs of the product variants to add as prerequisites or as eligible items for a discount. + """ + productVariantsToAdd: [ID!] + + """ + The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + """ + productVariantsToRemove: [ID!] + + """ + The IDs of the products to add as prerequisites or as eligible items for a discount. + """ + productsToAdd: [ID!] + + """ + The IDs of the products to remove as prerequisites or as eligible items for a discount. + """ + productsToRemove: [ID!] +} + +""" +A purchase amount in the context of a discount. This object can be used to +define the minimum purchase amount required for a discount to be applicable. +""" +type DiscountPurchaseAmount { + """ + The purchase amount in decimal format. + """ + amount: Decimal! +} + +""" +Defines a quantity threshold for discount eligibility or application. This +simple object specifies the number of items required to trigger or calculate +discount benefits. + +For example, a "Buy 3, Get 1 Free" promotion would use DiscountQuantity to +define the minimum purchase quantity of 3 items, or a bulk discount might +specify quantity tiers like 10+ items for wholesale pricing. + +The quantity value determines how discounts interact with cart contents, whether +setting minimum purchase requirements or defining quantity-based discount calculations. +""" +type DiscountQuantity { + """ + The quantity of items. + """ + quantity: UnsignedInt64! +} + +""" +A code that a customer can use at checkout to receive a discount. For example, a +customer can use the redeem code 'SUMMER20' at checkout to receive a 20% +discount on their entire order. +""" +type DiscountRedeemCode { + """ + The number of times that the discount redeem code has been used. This value is + updated asynchronously and can be different than the actual usage count. + """ + asyncUsageCount: Int! + + """ + The code that a customer can use at checkout to receive a discount. + """ + code: String! + + """ + The application that created the discount redeem code. + """ + createdBy: App + + """ + A globally-unique ID of the discount redeem code. + """ + id: ID! +} + +""" +Return type for `discountRedeemCodeBulkAdd` mutation. +""" +type DiscountRedeemCodeBulkAddPayload { + """ + The ID of bulk operation that creates multiple unique discount codes. + You can use the + [`discountRedeemCodeBulkCreation` query](https://shopify.dev/api/admin-graphql/latest/queries/discountRedeemCodeBulkCreation) + to track the status of the bulk operation. + """ + bulkCreation: DiscountRedeemCodeBulkCreation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +The properties and status of a bulk discount redeem code creation operation. +""" +type DiscountRedeemCodeBulkCreation implements Node { + """ + The result of each code creation operation associated with the bulk creation + operation including any errors that might have occurred during the operation. + """ + codes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The code to use in the discount redeem code creation operation. + """ + code: String! + + """ + The successfully created discount redeem code. + + If the discount redeem code couldn't be created, then this field is `null``. + """ + discountRedeemCode: DiscountRedeemCode + + """ + A list of errors that occurred during the creation operation of the discount redeem code. + """ + errors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodeBulkCreationCodes. +""" +type DiscountRedeemCodeBulkCreationCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeBulkCreationCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeBulkCreationCodeEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [DiscountRedeemCodeBulkCreationCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCodeBulkCreationCode and a cursor during pagination. +""" +type DiscountRedeemCodeBulkCreationCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeBulkCreationCodeEdge. + """ + node: DiscountRedeemCodeBulkCreationCode! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodes. +""" +type DiscountRedeemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountRedeemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCode and a cursor during pagination. +""" +type DiscountRedeemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DiscountRedeemCodeEdge. + """ + node: DiscountRedeemCode! +} + +""" +The input fields for the redeem code to attach to a discount. +""" +input DiscountRedeemCodeInput { + """ + The code that a customer can use at checkout to receive the associated discount. + """ + code: String! +} + +""" +A shareable URL for a discount code. +""" +type DiscountShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: DiscountShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable discount URL lands. +""" +enum DiscountShareableUrlTargetType { + """ + The URL lands on a 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 = DiscountCountries | DiscountCountryAll + +""" +The input fields for the destinations where the free shipping discount will be applied. +""" +input DiscountShippingDestinationSelectionInput { + """ + Whether the discount code applies to all countries. + """ + all: Boolean = false + + """ + A list of countries where the discount code will apply. + """ + countries: DiscountCountriesInput +} + +""" +The set of valid sort keys for the Discount query. +""" +enum DiscountSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `ends_at` value. + """ + ENDS_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `starts_at` value. + """ + STARTS_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The status of the discount that describes its availability, +expiration, or pending activation. +""" +enum DiscountStatus { + """ + The discount is currently available for use. + """ + ACTIVE + + """ + The discount has reached its end date and is no longer valid. + """ + EXPIRED + + """ + The discount is set to become active at a future date. + """ + SCHEDULED +} + +""" +The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. +""" +enum DiscountTargetType { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The type of the subscription discount. +""" +enum DiscountType { + """ + 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 { + """ + The error code. + """ + code: DiscountErrorCode + + """ + Extra information about this error. + """ + extraInfo: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Represents an error in the input of a mutation. +""" +interface DisplayableError { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `disputeEvidenceUpdate` mutation. +""" +type DisputeEvidenceUpdatePayload { + """ + The updated dispute evidence. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DisputeEvidenceUpdateUserError!]! +} + +""" +An error that occurs during the execution of `DisputeEvidenceUpdate`. +""" +type DisputeEvidenceUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: DisputeEvidenceUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `DisputeEvidenceUpdateUserError`. +""" +enum DisputeEvidenceUpdateUserErrorCode { + """ + Dispute evidence could not be found. + """ + DISPUTE_EVIDENCE_NOT_FOUND + + """ + Evidence already accepted. + """ + EVIDENCE_ALREADY_ACCEPTED + + """ + Evidence past due date. + """ + EVIDENCE_PAST_DUE_DATE + + """ + Combined files size is too large. + """ + FILES_SIZE_EXCEEDED_LIMIT + + """ + File upload failed. Please try again. + """ + FILE_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + Individual file size is too large. + """ + TOO_LARGE +} + +""" +The possible statuses of a dispute. +""" +enum DisputeStatus { + 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 + UNDER_REVIEW + WON +} + +""" +The possible types for a dispute. +""" +enum DisputeType { + """ + The dispute has turned into a chargeback. + """ + CHARGEBACK + + """ + The dispute is in the inquiry phase. + """ + INQUIRY +} + +""" +A distance, which includes a numeric value and a unit of measurement. +""" +type Distance { + """ + The unit of measurement for `value`. + """ + unit: DistanceUnit! + + """ + The distance value using the unit system specified with `unit`. + """ + value: Float! +} + +""" +Units of measurement for distance. +""" +enum DistanceUnit { + """ + Metric system unit of distance. + """ + KILOMETERS + + """ + Imperial system unit of distance. + """ + MILES +} + +""" +A unique string that represents the address of a Shopify store on the Internet. +""" +type Domain implements Node { + """ + The host name of the domain. For example, `example.com`. + """ + host: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The localization of the domain, if the domain doesn't redirect. + """ + localization: DomainLocalization + + """ + The web presence of the domain. + """ + marketWebPresence: MarketWebPresence + + """ + Whether SSL is enabled. + """ + sslEnabled: Boolean! + + """ + The URL of the domain (for example, `https://example.com`). + """ + url: URL! +} + +""" +The country and language settings assigned to a domain. +""" +type DomainLocalization { + """ + The ISO codes for the domain’s alternate locales. For example, `["en"]`. + """ + alternateLocales: [String!]! + + """ + The ISO code for the country assigned to the domain. For example, `"CA"` or "*" for a domain set to "Rest of world". + """ + country: String + + """ + The ISO code for the domain’s default locale. For example, `"en"`. + """ + defaultLocale: String! +} + +""" +An order that a merchant creates on behalf of a customer. Draft orders are +useful for merchants that need to do the following tasks: + +- Create new orders for sales made by phone, in person, by chat, or elsewhere. +When a merchant accepts payment for a draft order, an order is created. +- Send invoices to customers to pay with a secure checkout link. +- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory. +- Re-create orders manually from active sales channels. +- Sell products at discount or wholesale rates. +- Take pre-orders. + +For draft orders in multiple currencies `presentment_money` is the source of +truth for what a customer is going to be charged and `shop_money` is an estimate +of what the merchant might receive in their shop currency. + +**Caution:** Only use this data if it's required for your app's functionality. +Shopify will restrict [access to +scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a +legitimate use for the associated data. + +Draft orders created on or after April 1, 2025 will be automatically purged after one year of inactivity. +""" +type DraftOrder implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLocalizedFields & HasMetafields & LegacyInteroperability & Navigable & Node { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + Whether all variant prices have been overridden. + """ + allVariantPricesOverridden: Boolean! + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean! + + """ + Whether any variant prices have been overridden. + """ + anyVariantPricesOverridden: Boolean! + + """ + The custom order-level discount applied. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The billing address of the customer. + """ + billingAddress: MailingAddress + + """ + Whether the billing address matches the shipping address. + """ + billingAddressMatchesShippingAddress: Boolean! + + """ + The date and time when the draft order was converted to a new order, + and had it's status changed to **Completed**. + """ + completedAt: DateTime + + """ + The date and time when the draft order was created in Shopify. + """ + createdAt: DateTime! + + """ + The shop currency used for calculation. + """ + currencyCode: CurrencyCode! + + """ + The custom information added to the draft order on behalf of the customer. + """ + customAttributes: [Attribute!]! + + """ + The customer who will be sent an invoice. + """ + customer: Customer + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The email address of the customer, which is used to send notifications. + """ + email: String + + """ + The list of events associated with the draft order. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 identifier for the draft order, which is unique within the store. For example, _#D1223_. + """ + name: String! + + """ + The text from an optional note attached to the draft order. + """ + note2: String + + """ + The order that was created from the draft order. + """ + order: Order + + """ + The associated payment terms for this draft order. + """ + paymentTerms: PaymentTerms + + """ + The assigned phone number. + """ + phone: String + + """ + The list of platform discounts applied. + """ + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """ + The purchase order number. + """ + poNumber: String + + """ + The payment currency used for calculation. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The purchasing entity. + """ + purchasingEntity: PurchasingEntity + + """ + Whether the draft order is ready and can be completed. + Draft orders might have asynchronous operations that can take time to finish. + """ + ready: Boolean! + + """ + The time after which inventory will automatically be restocked. + """ + reserveInventoryUntil: DateTime + + """ + The shipping address of the customer. + """ + shippingAddress: MailingAddress + + """ + The line item containing the shipping information and costs. + """ + shippingLine: ShippingLine + + """ + The status of the draft order. + """ + status: DraftOrderStatus! + + """ + The subtotal, in shop currency, of the line items and their discounts, + excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The comma separated list of tags associated with the draft order. + Updating `tags` overwrites any existing tags that were previously added to the draft order. + To add new tags without overwriting existing tags, use the + [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation. + """ + tags: [String!]! + + """ + Whether the draft order is tax exempt. + """ + taxExempt: Boolean! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """ + Whether the line item prices include taxes. + """ + taxesIncluded: Boolean! + + """ + Total discounts. + """ + totalDiscountsSet: MoneyBag! + + """ + Total price of line items, excluding discounts. + """ + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price, includes taxes, shipping charges, and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """ + The total shipping price in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping price. + """ + totalShippingPriceSet: MoneyBag! + + """ + The total tax in shop currency. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax. + """ + totalTaxSet: MoneyBag! + + """ + The total weight in grams of the draft order. + """ + totalWeight: UnsignedInt64! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The date and time when the draft order was last changed. + The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01. + """ + updatedAt: DateTime! + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean! + + """ + The list of warnings raised while calculating. + """ + warnings: [DraftOrderWarning!]! +} + +""" +The order-level discount applied to a draft order. +""" +type DraftOrderAppliedDiscount { + """ + Amount of the order-level discount that's applied to the draft order in shop currency. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + amountSet: MoneyBag! + + """ + Amount of money discounted. + """ + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """ + Description of the order-level discount. + """ + description: String! + + """ + Name of the order-level discount. + """ + title: String + + """ + The order level discount amount. If `valueType` is `"percentage"`, + then `value` is the percentage discount. + """ + value: Float! + + """ + Type of the order-level discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The input fields for applying an order-level discount to a draft order. +""" +input DraftOrderAppliedDiscountInput { + """ + The applied amount of the discount in your shop currency. + """ + amount: Money @deprecated(reason: "Please use `amountWithCurrency` instead.") + + """ + The applied amount of the discount in the specified currency. + """ + amountWithCurrency: MoneyInput + + """ + Reason for the discount. + """ + description: String + + """ + Title of the discount. + """ + title: String + + """ + The value of the discount. + If the type of the discount is fixed amount, then this is a fixed amount in your shop currency. + If the type is percentage, then this is the percentage. + """ + value: Float! + + """ + The type of discount. + """ + valueType: DraftOrderAppliedDiscountType! +} + +""" +The valid discount types that can be applied to a draft order. +""" +enum DraftOrderAppliedDiscountType { + """ + A fixed amount in the store's currency. + """ + FIXED_AMOUNT + + """ + A percentage of the order subtotal. + """ + PERCENTAGE +} + +""" +The available delivery options for a draft order. +""" +type DraftOrderAvailableDeliveryOptions { + """ + The available local delivery rates for the draft order. Requires a customer + with a valid shipping address and at least one line item. + """ + availableLocalDeliveryRates: [DraftOrderShippingRate!]! + + """ + The available local pickup options for the draft order. Requires at least one line item. + """ + availableLocalPickupOptions: [PickupInStoreLocation!]! + + """ + The available shipping rates for the draft order. Requires a customer with a + valid shipping address and at least one line item. + """ + availableShippingRates: [DraftOrderShippingRate!]! + + """ + Returns information about pagination of local pickup options. + """ + pageInfo: PageInfo! +} + +""" +The input fields used to determine available delivery options for a draft order. +""" +input DraftOrderAvailableDeliveryOptionsInput { + """ + 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 { + """ + The asynchronous job for adding tags to the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkDelete` mutation. +""" +type DraftOrderBulkDeletePayload { + """ + The asynchronous job for deleting the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderBulkRemoveTags` mutation. +""" +type DraftOrderBulkRemoveTagsPayload { + """ + The asynchronous job for removing tags from the draft orders. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a bundle was added to a draft order. +""" +type DraftOrderBundleAddedWarning implements DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +Return type for `draftOrderCalculate` mutation. +""" +type DraftOrderCalculatePayload { + """ + The calculated properties for a draft order. + """ + calculatedDraftOrder: CalculatedDraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderComplete` mutation. +""" +type DraftOrderCompletePayload { + """ + The completed draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple DraftOrders. +""" +type DraftOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderEdge!]! + + """ + A list of nodes that are contained in DraftOrderEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `draftOrderCreateFromOrder` mutation. +""" +type DraftOrderCreateFromOrderPayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreate` mutation. +""" +type DraftOrderCreatePayload { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to specify the draft order to delete by its ID. +""" +input DraftOrderDeleteInput { + """ + The ID of the draft order to delete. + """ + id: ID! +} + +""" +Return type for `draftOrderDelete` mutation. +""" +type DraftOrderDeletePayload { + """ + The ID of the deleted draft order. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a discount cannot be applied to a draft order. +""" +type DraftOrderDiscountNotAppliedWarning implements DraftOrderWarning { + """ + The code of the discount that can't be applied. + """ + discountCode: String + + """ + The title of the discount that can't be applied. + """ + discountTitle: String + + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! + + """ + The price rule that can't be applied. + """ + priceRule: PriceRule +} + +""" +Return type for `draftOrderDuplicate` mutation. +""" +type DraftOrderDuplicatePayload { + """ + The newly duplicated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DraftOrder and a cursor during pagination. +""" +type DraftOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderEdge. + """ + node: DraftOrder! +} + +""" +The input fields used to create or update a draft order. +""" +input DraftOrderInput { + """ + 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.") + + """ + 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 + + """ + 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 +} + +""" +Return type for `draftOrderInvoicePreview` mutation. +""" +type DraftOrderInvoicePreviewPayload { + """ + The draft order invoice email rendered as HTML to allow previewing. + """ + previewHtml: HTML + + """ + The subject preview for the draft order invoice email. + """ + previewSubject: HTML + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderInvoiceSend` mutation. +""" +type DraftOrderInvoiceSendPayload { + """ + The draft order an invoice email is sent for. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A line item in a draft order. Line items are either [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +objects or custom items created manually with specific pricing and attributes. + +Each line item includes [quantity](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.quantity), [pricing](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.originalUnitPrice), [discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.discountedTotal), [tax information](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.taxLines), and [custom attributes](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem#field-DraftOrderLineItem.fields.customAttributes). +For [bundle products](https://shopify.dev/docs/apps/build/products/bundles), the +line item includes components that define the individual products within the bundle. +""" +type DraftOrderLineItem implements Node { + """ + The custom applied discount. + """ + appliedDiscount: DraftOrderAppliedDiscount + + """ + The `discountedTotal` divided by `quantity`, + equal to the average value of the line item price per unit after discounts are applied. + This value doesn't include discounts applied to the entire draft order. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The list of bundle components if applicable. + """ + bundleComponents: [DraftOrderLineItem!]! @deprecated(reason: "Use `components` instead.") + + """ + The components of the draft order line item. + """ + components: [DraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """ + The line item price, in shop currency, after discounts are applied. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total price with discounts applied. + """ + discountedTotalSet: MoneyBag! + + """ + The `discountedTotal` divided by `quantity`, equal to the value of the discount per unit in the shop currency. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + The unit price with discounts applied. + """ + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + The weight of the line item in grams. + """ + grams: Int @deprecated(reason: "Use `weight` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image of the product variant. + """ + image( + """ + 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 name of the product. + """ + name: String! + + """ + The total price, in shop currency, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop currency, without any discounts applied. + """ + originalUnitPrice: Money! @deprecated(reason: "Use `originalUnitPriceWithCurrency` instead.") + + """ + The price without any discounts applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The original custom line item input price. + """ + originalUnitPriceWithCurrency: MoneyV2 + + """ + The price override for the line item. + """ + priceOverride: MoneyV2 + + """ + The product for the line item. + """ + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + A list of tax lines. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The total discount applied in shop currency. + """ + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """ + The total discount amount. + """ + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """ + The product variant for the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String + + """ + The weight unit and value. + """ + weight: Weight +} + +""" +The input fields representing the components of a line item. +""" +input DraftOrderLineItemComponentInput { + """ + The 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 +} + +""" +An auto-generated type for paginating through multiple DraftOrderLineItems. +""" +type DraftOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderLineItemEdge!]! + + """ + A list of nodes that are contained in DraftOrderLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DraftOrderLineItem and a cursor during pagination. +""" +type DraftOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of DraftOrderLineItemEdge. + """ + node: DraftOrderLineItem! +} + +""" +The input fields for a line item included in a draft order. +""" +input DraftOrderLineItemInput { + """ + The custom discount to be applied. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + 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 + + """ + The weight unit and value inputs for custom line items only. + This field is ignored when `variantId` is provided. + """ + weight: WeightInput +} + +""" +A warning indicating that the market region country code is not supported with Markets. +""" +type DraftOrderMarketRegionCountryCodeNotSupportedWarning implements DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The platform discounts applied to the draft order. +""" +type DraftOrderPlatformDiscount { + """ + Price reduction allocations across the draft order's lines. + """ + allocations: [DraftOrderPlatformDiscountAllocation!]! + + """ + Whether the discount is an automatic discount. + """ + automaticDiscount: Boolean! + + """ + Whether the discount is a buy x get y discount. + """ + bxgyDiscount: Boolean! + + """ + If a code-based discount, the code used to add the discount. + """ + code: String + + """ + The discount class. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The discount classes. + """ + discountClasses: [DiscountClass!]! + + """ + The discount node for the platform discount. + """ + discountNode: DiscountNode + + """ + The ID of the discount. + """ + id: ID + + """ + Whether the discount is line, order or shipping level. + """ + presentationLevel: String! + + """ + The short summary of the discount. + """ + shortSummary: String! + + """ + The summary of the discount. + """ + summary: String! + + """ + The name of the discount. + """ + title: String! + + """ + The discount total amount in shop currency. + """ + totalAmount: MoneyV2! + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + totalAmountPriceSet: MoneyBag! +} + +""" +Price reduction allocations across the draft order's lines. +""" +type DraftOrderPlatformDiscountAllocation { + """ + The ID of the allocation. + """ + id: ID + + """ + The quantity of the target being discounted. + """ + quantity: Int + + """ + Amount of the discount allocated to the target. + """ + reductionAmount: MoneyV2! + + """ + Amount of the discount allocated to the target in both shop currency and presentment currency. + """ + reductionAmountSet: MoneyBag! + + """ + The element of the draft being discounted. + """ + target: DraftOrderPlatformDiscountAllocationTarget +} + +""" +The element of the draft being discounted. +""" +union DraftOrderPlatformDiscountAllocationTarget = CalculatedDraftOrderLineItem | DraftOrderLineItem | ShippingLine + +""" +A shipping rate is an additional cost added to the cost of the products that were ordered. +""" +type DraftOrderShippingRate { + """ + The code of the shipping rate. + """ + code: String! + + """ + Unique identifier for this shipping rate. + """ + handle: String! + + """ + The cost associated with the shipping rate. + """ + price: MoneyV2! + + """ + The source of the shipping rate. + """ + source: String! + + """ + The name of the shipping rate. + """ + title: String! +} + +""" +The set of valid sort keys for the DraftOrder query. +""" +enum DraftOrderSortKeys { + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `number` value. + """ + NUMBER + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `total_price` value. + """ + TOTAL_PRICE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The valid statuses for a draft order. +""" +enum DraftOrderStatus { + """ + The draft order has been paid. + """ + COMPLETED + + """ + An invoice for the draft order has been sent to the customer. + """ + INVOICE_SENT + + """ + The draft order is open. It has not been paid, and an invoice hasn't been sent. + """ + OPEN +} + +""" +Represents a draft order tag. +""" +type DraftOrderTag implements Node { + """ + Handle of draft order tag. + """ + handle: String! + + """ + ID of draft order tag. + """ + id: ID! + + """ + Title of draft order tag. + """ + title: String! +} + +""" +Return type for `draftOrderUpdate` mutation. +""" +type DraftOrderUpdatePayload { + """ + The updated draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning that is displayed to the merchant when a change is made to a draft order. +""" +interface DraftOrderWarning { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The duty details for a line item. +""" +type Duty implements Node { + """ + The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty. + """ + countryCodeOfOrigin: CountryCode + + """ + The harmonized system code of the item used in calculating the duty. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The amount of the duty. + """ + price: MoneyBag! + + """ + A list of taxes charged on the duty. + """ + taxLines: [TaxLine!]! +} + +""" +A sale associated with a duty charge. +""" +type DutySale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The duty for the associated sale. + """ + duty: Duty! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The attribute editable information. +""" +type EditableProperty { + """ + Whether the attribute is locked for editing. + """ + locked: Boolean! + + """ + The reason the attribute is locked for editing. + """ + reason: FormattedString +} + +""" +The input fields for an email. +""" +input EmailInput { + """ + Specifies 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 shop's entitlements. +""" +type EntitlementsType { + """ + Represents the markets for the shop. + """ + markets: MarketsType! +} + +""" +An error that occurs during the execution of a server pixel mutation. +""" +type ErrorsServerPixelUserError implements DisplayableError { + """ + The error code. + """ + code: ErrorsServerPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsServerPixelUserError`. +""" +enum ErrorsServerPixelUserErrorCode { + """ + A server pixel 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 { + """ + The error code. + """ + code: ErrorsWebPixelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsWebPixelUserError`. +""" +enum ErrorsWebPixelUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The 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 { + """ + The action that occured. + """ + action: String! + + """ + The name of the app that created the event. + """ + appTitle: String + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! +} + +""" +Return type for `eventBridgeServerPixelUpdate` mutation. +""" +type EventBridgeServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `eventBridgeWebhookSubscriptionCreate` mutation. +""" +type EventBridgeWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +The input fields for an EventBridge webhook subscription. +""" +input EventBridgeWebhookSubscriptionInput { + """ + The 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!] +} + +""" +Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. +""" +type EventBridgeWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An auto-generated type for paginating through multiple Events. +""" +type EventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [EventEdge!]! + + """ + A list of nodes that are contained in EventEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Event!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Event and a cursor during pagination. +""" +type EventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of EventEdge. + """ + node: Event! +} + +""" +The set of valid sort keys for the Event query. +""" +enum EventSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The type of the resource that generated the event. +""" +enum EventSubjectType { + """ + A 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The order line item for the exchange. If the exchange line has been processed + multiple times, this will be the first associated line item and won't reflect + all processed values. + """ + lineItem: LineItem @deprecated(reason: "Use `lineItems` instead.") + + """ + The order line items for the exchange. + """ + lineItems: [LineItem!] + + """ + The quantity of the exchange item that can be processed. + """ + processableQuantity: Int! + + """ + The quantity of the exchange item that have been processed. + """ + processedQuantity: Int! + + """ + The number of units ordered, including refunded and removed units. + """ + quantity: Int! + + """ + The quantity of the exchange item that haven't been processed. + """ + unprocessedQuantity: Int! + + """ + The ID of the variant at time of return creation. + """ + variantId: ID +} + +""" +The input fields for an applied discount on a calculated exchange line item. +""" +input ExchangeLineItemAppliedDiscountInput { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount or a percentage. + """ + value: ExchangeLineItemAppliedDiscountValueInput! +} + +""" +The input value for an applied discount on a calculated exchange line item. +Can either specify the value as a fixed amount or a percentage. +""" +input ExchangeLineItemAppliedDiscountValueInput @oneOf { + """ + The value of the discount as a fixed amount. + """ + amount: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple ExchangeLineItems. +""" +type ExchangeLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeLineItemEdge!]! + + """ + A list of nodes that are contained in ExchangeLineItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeLineItem and a cursor during pagination. +""" +type ExchangeLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeLineItemEdge. + """ + node: ExchangeLineItem! +} + +""" +The input fields for new line items to be added to the order as part of an exchange. +""" +input ExchangeLineItemInput { + """ + The 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 +} + +""" +The input fields for removing an exchange line item from a return. +""" +input ExchangeLineItemRemoveFromReturnInput { + """ + The ID of the exchange line item to remove. + """ + exchangeLineItemId: ID! + + """ + The quantity of the associated exchange line item to be removed. + """ + quantity: Int! +} + +""" +An exchange where existing items on an order are returned and new items are added to the order. +""" +type ExchangeV2 implements Node { + """ + The details of the new items in the exchange. + """ + additions: ExchangeV2Additions! + + """ + The date and time when the exchange was completed. + """ + completedAt: DateTime + + """ + The date and time when the exchange was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the exchange happened. + """ + location: Location + + """ + Mirrored from Admin Exchanges. + """ + mirrored: Boolean! + + """ + The text of an optional note that a shop owner can attach to the exchange. + """ + note: String + + """ + The refunds processed during the exchange. + """ + refunds: [Refund!]! + + """ + The details of the returned items in the exchange. + """ + returns: ExchangeV2Returns! + + """ + The staff member associated with the exchange. + """ + staffMember: StaffMember + + """ + The amount of money that was paid or refunded as part of the exchange. + """ + totalAmountProcessedSet: MoneyBag! + + """ + The difference in values of the items that were exchanged. + """ + totalPriceSet: MoneyBag! + + """ + The order transactions related to the exchange. + """ + transactions: [OrderTransaction!]! +} + +""" +New items associated to the exchange. +""" +type ExchangeV2Additions { + """ + The list of new items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The subtotal of the items being added, including discounts. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being added. + """ + taxLines: [TaxLine!]! + + """ + The total price of the items being added, including discounts and taxes. + """ + totalPriceSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple ExchangeV2s. +""" +type ExchangeV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeV2Edge!]! + + """ + A list of nodes that are contained in ExchangeV2Edge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeV2 and a cursor during pagination. +""" +type ExchangeV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ExchangeV2Edge. + """ + node: ExchangeV2! +} + +""" +Contains information about an item in the exchange. +""" +type ExchangeV2LineItem { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The total line price, in shop and presentment currencies, after discounts are applied. + """ + discountedTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit after line item discounts are applied. + """ + discountedUnitPriceSet: MoneyBag! + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """ + Indiciates if this line item is a gift card. + """ + giftCard: Boolean! + + """ + The gift cards associated with the line item. + """ + giftCards: [GiftCard!]! + + """ + Whether the line item represents the purchase of a gift card. + """ + isGiftCard: Boolean! + + """ + The line item associated with this object. + """ + lineItem: LineItem + + """ + The name of the product. + """ + name: String! + + """ + The total price, in shop and presentment currencies, before discounts are applied. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit before line item discounts are applied. + """ + originalUnitPriceSet: MoneyBag! + + """ + The number of products that were purchased. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The SKU number of the product variant. + """ + sku: String + + """ + The TaxLine object connected to this line item. + """ + taxLines: [TaxLine!]! + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """ + The product variant of the line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who created the product variant. + """ + vendor: String +} + +""" +Return items associated to the exchange. +""" +type ExchangeV2Returns { + """ + The list of return items for the exchange. + """ + lineItems: [ExchangeV2LineItem!]! + + """ + The amount of the order-level discount for the items and shipping being + returned, which doesn't contain any line item discounts. + """ + orderDiscountAmountSet: MoneyBag! + + """ + The amount of money to be refunded for shipping. + """ + shippingRefundAmountSet: MoneyBag! + + """ + The subtotal of the items being returned. + """ + subtotalPriceSet: MoneyBag! + + """ + The summary of all taxes of the items being returned. + """ + taxLines: [TaxLine!]! + + """ + The amount of money to be refunded for tip. + """ + tipRefundAmountSet: MoneyBag! + + """ + The total value of the items being returned. + """ + totalPriceSet: MoneyBag! +} + +""" +Represents a video hosted outside of Shopify. +""" +type ExternalVideo implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + The embed URL of the video for the respective host. + """ + embedUrl: URL! + + """ + The URL. + """ + embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The host of the external video. + """ + host: MediaHost! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The origin URL of the video on the respective host. + """ + originUrl: URL! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Requirements that must be met before an app can be installed. +""" +type FailedRequirement { + """ + Action to be taken to resolve a failed requirement, including URL link. + """ + action: NavigationItem + + """ + A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app + encounters when trying to make use of their Shop and its resources. + """ + message: String! +} + +""" +A additional cost, charged by the merchant, on an order. Examples include return shipping fees and restocking fees. +""" +interface Fee { + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +A sale associated with a fee. +""" +type FeeSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The fee associated with the sale. It can be null if the fee was deleted. + """ + fee: Fee + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +A file interface. +""" +interface File { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fileAcknowledgeUpdateFailed` mutation. +""" +type FileAcknowledgeUpdateFailedPayload { + """ + The updated file(s). + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type for paginating through multiple Files. +""" +type FileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FileEdge!]! + + """ + A list of nodes that are contained in FileEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [File!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a file object. +""" +enum FileContentType { + """ + 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 { + """ + 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 { + """ + Append a UUID if filename is already in use. + """ + APPEND_UUID + + """ + Raise an error if filename is already in use. + """ + RAISE_ERROR + + """ + Replace the existing file if filename is already in use. + """ + REPLACE +} + +""" +Return type for `fileCreate` mutation. +""" +type FileCreatePayload { + """ + The newly created files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Return type for `fileDelete` mutation. +""" +type FileDeletePayload { + """ + The IDs of the deleted files. + """ + deletedFileIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type which holds one File and a cursor during pagination. +""" +type FileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FileEdge. + """ + node: File! +} + +""" +A file error. This typically occurs when there is an issue with the file itself causing it to fail validation. +Check the file before attempting to upload again. +""" +type FileError { + """ + Code representing the type of error. + """ + code: FileErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +The error types for a file. +""" +enum FileErrorCode { + """ + File 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 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 { + """ + 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 + + """ + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String +} + +""" +The set of valid sort keys for the File query. +""" +enum FileSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `filename` value. + """ + FILENAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `original_upload_size` value. + """ + ORIGINAL_UPLOAD_SIZE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The possible statuses for a file object. +""" +enum FileStatus { + """ + File 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 { + """ + 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! + + """ + 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!] + + """ + The IDs of the references to remove from the file. Currently only accepts product IDs. + """ + referencesToRemove: [ID!] +} + +""" +Return type for `fileUpdate` mutation. +""" +type FileUpdatePayload { + """ + The list of updated files. + """ + files: [File!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FilesUserError!]! +} + +""" +Possible error codes that can be returned by `FilesUserError`. +""" +enum FilesErrorCode { + """ + The 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 + + """ + 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 { + """ + The error code. + """ + code: FilesErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A filter option is one possible value in a search filter. +""" +type FilterOption { + """ + The filter option's label for display purposes. + """ + label: String! + + """ + The filter option's value. + """ + value: String! +} + +""" +Current user's access policy for a finance app. +""" +type FinanceAppAccessPolicy { + """ + Current shop staff's access within the app. + """ + access: [BankingFinanceAppAccess!]! +} + +""" +Shopify Payments account information shared with embedded finance applications. +""" +type FinanceKycInformation { + """ + The legal entity business address. + """ + businessAddress: ShopifyPaymentsAddressBasic + + """ + The legal entity business type. + """ + businessType: ShopifyPaymentsBusinessType + + """ + Business industry. + """ + industry: ShopifyPaymentsMerchantCategoryCode + + """ + Returns the business legal name. + """ + legalName: String + + """ + The shop owner information for financial KYC purposes. + """ + shopOwner: FinancialKycShopOwner! + + """ + Tax identification information. + """ + taxIdentification: ShopifyPaymentsTaxIdentification +} + +""" +Represents the shop owner information for financial KYC purposes. +""" +type FinancialKycShopOwner { + """ + The email of the shop owner. + """ + email: String! + + """ + The first name of the shop owner. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the shop owner. + """ + lastName: String + + """ + The phone number of the shop owner. + """ + phone: String +} + +""" +An amount that's allocated to a line item based on an associated discount application. +""" +type FinancialSummaryDiscountAllocation { + """ + The money amount that's allocated per unit on the associated line based on the + discount application in shop and presentment currencies. If the allocated + amount for the line cannot be evenly divided by the quantity, then this amount + will be an approximate amount, avoiding fractional pennies. For example, if + the associated line had a quantity of 3 with a discount of 4 cents, then the + discount distribution would be [0.01, 0.01, 0.02]. This field returns the + highest number of the distribution. In this example, this would be 0.02. + """ + approximateAllocatedAmountPerItem: MoneyBag! + + """ + The discount application that the allocated amount originated from. + """ + discountApplication: FinancialSummaryDiscountApplication! +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. +""" +type FinancialSummaryDiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! +} + +""" +Return type for `flowGenerateSignature` mutation. +""" +type FlowGenerateSignaturePayload { + """ + The payload used to generate the signature. + """ + payload: String + + """ + The generated signature. + """ + signature: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `flowTriggerReceive` mutation. +""" +type FlowTriggerReceivePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A string containing a strict subset of HTML code. Non-allowed tags will be stripped out. +Allowed tags: +* `a` (allowed attributes: `href`, `target`) +* `b` +* `br` +* `em` +* `i` +* `strong` +* `u` +Use [HTML](https://shopify.dev/api/admin-graphql/latest/scalars/HTML) instead if you need to +include other HTML tags. + +Example value: `"Your current domain is example.myshopify.com."` +""" +scalar FormattedString + +""" +A shipment of one or more items from an +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). Tracks which +[`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) +objects ship, their quantities, and the shipment's tracking information. + +Includes tracking details such as the carrier, tracking numbers, and URLs. The +fulfillment connects to both the original order and any associated [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects. [`FulfillmentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) +objects record milestones throughout the shipment lifecycle, from creation +through delivery. + +Multiple fulfillments can exist for a single order when items either ship separately or from different locations. +""" +type Fulfillment implements LegacyInteroperability & Node { + """ + The date and time when the fulfillment was created. + """ + createdAt: DateTime! + + """ + The date that this fulfillment was delivered. + """ + deliveredAt: DateTime + + """ + Human readable display status for this fulfillment. + """ + displayStatus: FulfillmentDisplayStatus + + """ + The estimated date that this fulfillment will arrive. + """ + estimatedDeliveryAt: DateTime + + """ + The history of events associated with this fulfillment. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The canceled fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Fulfillments. +""" +type FulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEdge!]! + + """ + A list of nodes that are contained in FulfillmentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Fulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A fulfillment constraint rule. +""" +type FulfillmentConstraintRule implements HasMetafields & Node { + """ + Delivery method types that the function is associated with. + """ + deliveryMethodTypes: [DeliveryMethodType!]! + + """ + The ID for the fulfillment constraint function. + """ + function: ShopifyFunction! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! +} + +""" +Return type for `fulfillmentConstraintRuleCreate` mutation. +""" +type FulfillmentConstraintRuleCreatePayload { + """ + The newly created fulfillment constraint rule. + """ + fulfillmentConstraintRule: FulfillmentConstraintRule + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleCreateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleCreate`. +""" +type FulfillmentConstraintRuleCreateUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleCreateUserError`. +""" +enum FulfillmentConstraintRuleCreateUserErrorCode { + """ + 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 { + """ + Whether or not the fulfillment constraint rule was successfully deleted. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleDeleteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleDelete`. +""" +type FulfillmentConstraintRuleDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleDeleteUserError`. +""" +enum FulfillmentConstraintRuleDeleteUserErrorCode { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentConstraintRuleUpdate` mutation. +""" +type FulfillmentConstraintRuleUpdatePayload { + """ + The updated fulfillment constraint rule. + """ + fulfillmentConstraintRule: FulfillmentConstraintRule + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentConstraintRuleUpdateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleUpdate`. +""" +type FulfillmentConstraintRuleUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentConstraintRuleUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleUpdateUserError`. +""" +enum FulfillmentConstraintRuleUpdateUserErrorCode { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentCreate` mutation. +""" +type FulfillmentCreatePayload { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentCreateV2` mutation. +""" +type FulfillmentCreateV2Payload { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The display status of a fulfillment. +""" +enum FulfillmentDisplayStatus { + """ + Displayed as **Attempted delivery**. + """ + ATTEMPTED_DELIVERY + + """ + Displayed as **Canceled**. + """ + CANCELED + + """ + Displayed as **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 **Submitted**. + """ + SUBMITTED +} + +""" +An auto-generated type which holds one Fulfillment and a cursor during pagination. +""" +type FulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEdge. + """ + node: Fulfillment! +} + +""" +A tracking event that records the status and location of a fulfillment at a +specific point in time. Each event captures details such as the [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.status) +(for example, in transit, out for delivery, delivered) and any [messages](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent#field-FulfillmentEvent.fields.message) +associated with the event. + +Fulfillment events provide a chronological history of a package's journey from +shipment to delivery. They include timestamps, geographic coordinates, and +estimated delivery dates to track fulfillment progress. +""" +type FulfillmentEvent implements Node { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The date and time when the fulfillment event was created. + """ + createdAt: DateTime! + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The time at which this fulfillment event happened. + """ + happenedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The latitude where this fulfillment event occurred. + """ + latitude: Float + + """ + The longitude where this fulfillment event occurred. + """ + longitude: Float + + """ + A message associated with this fulfillment event. + """ + message: String + + """ + The province where this fulfillment event occurred. + """ + province: String + + """ + The status of this fulfillment event. + """ + status: FulfillmentEventStatus! + + """ + The zip code of the location where this fulfillment event occurred. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple FulfillmentEvents. +""" +type FulfillmentEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEventEdge!]! + + """ + A list of nodes that are contained in FulfillmentEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `fulfillmentEventCreate` mutation. +""" +type FulfillmentEventCreatePayload { + """ + The created fulfillment event. + """ + fulfillmentEvent: FulfillmentEvent + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one FulfillmentEvent and a cursor during pagination. +""" +type FulfillmentEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentEventEdge. + """ + node: FulfillmentEvent! +} + +""" +The input fields used to create a fulfillment event. +""" +input FulfillmentEventInput { + """ + The street address where this fulfillment event occurred. + """ + address1: String + + """ + The city where this fulfillment event occurred. + """ + city: String + + """ + The country where this fulfillment event occurred. + """ + country: String + + """ + The estimated delivery date and time of the fulfillment. + """ + estimatedDeliveryAt: DateTime + + """ + The ID for the fulfillment that's associated with this fulfillment event. + """ + fulfillmentId: ID! + + """ + 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 { + """ + Sort by the `happened_at` value. + """ + HAPPENED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The status that describes a fulfillment or delivery event. +""" +enum FulfillmentEventStatus { + """ + A delivery was attempted. + """ + ATTEMPTED_DELIVERY + + """ + 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 is ready to be picked up. + """ + READY_FOR_PICKUP +} + +""" +A fulfillment hold currently applied on a fulfillment order. +""" +type FulfillmentHold implements Node { + """ + The localized reason for the fulfillment hold for display purposes. + """ + displayReason: String! + + """ + An identifier an app can use to reference one of many holds it applied to a fulfillment order. + This field must be unique among the holds that a single app applies to a single fulfillment order. + """ + handle: String + + """ + The app that created the fulfillment hold. + """ + heldByApp: App + + """ + A boolean value that indicates whether the requesting app created the fulfillment hold. + """ + heldByRequestingApp: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The reason for the fulfillment hold. + """ + reason: FulfillmentHoldReason! + + """ + Additional information about the fulfillment hold reason. + """ + reasonNotes: String +} + +""" +The reason for a fulfillment hold. +""" +enum FulfillmentHoldReason { + """ + The fulfillment hold is applied because payment is pending. + """ + AWAITING_PAYMENT + + """ + The fulfillment hold is applied because of 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 { + """ + 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 { + """ + The total price after discounts are applied. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total price after discounts are applied in shop and presentment + currencies. This value doesn't include order-level discounts. + """ + discountedTotalSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The associated order's line item. + """ + lineItem: LineItem! + + """ + The total price before discounts are applied. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price before discounts are applied in shop and presentment currencies. + """ + originalTotalSet: MoneyBag! + + """ + Number of line items in the fulfillment. + """ + quantity: Int +} + +""" +An auto-generated type for paginating through multiple FulfillmentLineItems. +""" +type FulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. +""" +type FulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentLineItemEdge. + """ + node: FulfillmentLineItem! +} + +""" +The FulfillmentOrder object represents either an item or a group of items in an +[Order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +that are expected to be fulfilled from the same location. +There can be more than one fulfillment order for an +[order](https://shopify.dev/api/admin-graphql/latest/objects/Order) +at a given location. + +{{ '/api/reference/fulfillment_order_relationships.png' | image }} + +Fulfillment orders represent the work which is intended to be done in relation to an order. +When fulfillment has started for one or more line items, a +[Fulfillment](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment) +is created by a merchant or third party to represent the ongoing or completed work of fulfillment. + +[See below for more details on creating fulfillments](#the-lifecycle-of-a-fulfillment-order-at-a-location-which-is-managed-by-a-fulfillment-service). + +> Note: +> Shopify creates fulfillment orders automatically when an order is created. +> It is not possible to manually create fulfillment orders. +> +> [See below for more details on the lifecycle of a fulfillment order](#the-lifecycle-of-a-fulfillment-order). + +## Retrieving fulfillment orders + +### Fulfillment orders from an order + +All fulfillment orders related to a given order can be retrieved with the +[Order.fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/objects/Order#connection-order-fulfillmentorders) +connection. + +[API access scopes](#api-access-scopes) +govern which fulfillments orders are returned to clients. +An API client will only receive a subset of the fulfillment orders which belong to an order +if they don't have the necessary access scopes to view all of the fulfillment orders. + +### Fulfillment orders assigned to the app for fulfillment + +Fulfillment service apps can retrieve the fulfillment orders which have been assigned to their locations with the +[assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) +connection. +Use the `assignmentStatus` argument to control whether all assigned fulfillment orders +should be returned or only those where a merchant has sent a +[fulfillment request](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderMerchantRequest) +and it has yet to be responded to. + +The API client must be granted the `read_assigned_fulfillment_orders` access scope to access +the assigned fulfillment orders. + +### All fulfillment orders + +Apps can retrieve all fulfillment orders with the +[fulfillmentOrders](https://shopify.dev/api/admin-graphql/latest/queries/fulfillmentOrders) +query. This query returns all assigned, merchant-managed, and third-party fulfillment orders on the shop, +which are accessible to the app according to the +[fulfillment order access scopes](#api-access-scopes) it was granted with. + +## The lifecycle of a fulfillment order + +### Fulfillment Order Creation + +After an order is created, a background worker performs the order routing process which determines +which locations will be responsible for fulfilling the purchased items. +Once the order routing process is complete, one or more fulfillment orders will be created +and assigned to these locations. It is not possible to manually create fulfillment orders. + +Once a fulfillment order has been created, it will have one of two different lifecycles depending on +the type of location which the fulfillment order is assigned to. + +### The lifecycle of a fulfillment order at a merchant managed location + +Fulfillment orders are completed by creating +[fulfillments](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment). +Fulfillments represents the work done. + +For digital products a merchant or an order management app would create a fulfilment once the digital asset +has been provisioned. +For example, in the case of a digital gift card, a merchant would to do this once +the gift card has been activated - before the email has been shipped. + +On the other hand, for a traditional shipped order, +a merchant or an order management app would create a fulfillment after picking and packing the items relating +to a fulfillment order, but before the courier has collected the goods. + +[Learn about managing fulfillment orders as an order management app](https://shopify.dev/apps/fulfillment/order-management-apps/manage-fulfillments). + +### The lifecycle of a fulfillment order at a location which is managed by a fulfillment service + +For fulfillment orders which are assigned to a location that is managed by a fulfillment service, +a merchant or an Order Management App can +[send a fulfillment request](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitFulfillmentRequest) +to the fulfillment service which operates the location to request that they fulfill the associated items. +A fulfillment service has the option to +[accept](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderAcceptFulfillmentRequest) +or [reject](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderRejectFulfillmentRequest) +this fulfillment request. + +Once the fulfillment service has accepted the request, the request can no longer be cancelled by the merchant +or order management app and instead a +[cancellation request must be submitted](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitCancellationRequest) +to the fulfillment service. + +Once a fulfillment service accepts a fulfillment request, +then after they are ready to pack items and send them for delivery, they create fulfillments with the +[fulfillmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentCreate) +mutation. +They can provide tracking information right away or create fulfillments without it and then +update the tracking information for fulfillments with the +[fulfillmentTrackingInfoUpdate](https://shopify.dev/api/admin-graphql/unstable/mutations/fulfillmentTrackingInfoUpdate) +mutation. + +[Learn about managing fulfillment orders as a fulfillment service](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments). + +## API access scopes + +Fulfillment orders are governed by the following API access scopes: + +* The `read_merchant_managed_fulfillment_orders` and + `write_merchant_managed_fulfillment_orders` access scopes + grant access to fulfillment orders assigned to merchant-managed locations. +* The `read_assigned_fulfillment_orders` and `write_assigned_fulfillment_orders` + access scopes are intended for fulfillment services. + These scopes grant access to fulfillment orders assigned to locations that are being managed + by fulfillment services. +* The `read_third_party_fulfillment_orders` and `write_third_party_fulfillment_orders` + access scopes grant access to fulfillment orders + assigned to locations managed by other fulfillment services. + +### Fulfillment service app access scopes + +Usually, **fulfillment services** have the `write_assigned_fulfillment_orders` access scope +and don't have the `*_third_party_fulfillment_orders` +or `*_merchant_managed_fulfillment_orders` access scopes. +The app will only have access to the fulfillment orders assigned to their location +(or multiple locations if the app registers multiple fulfillment services on the shop). +The app will not have access to fulfillment orders assigned to merchant-managed locations +or locations owned by other fulfillment service apps. + +### Order management app access scopes + +**Order management apps** will usually request `write_merchant_managed_fulfillment_orders` and +`write_third_party_fulfillment_orders` access scopes. This will allow them to manage all fulfillment orders +on behalf of a merchant. + +If an app combines the functions of an order management app and a fulfillment service, +then the app should request all +access scopes to manage all assigned and all unassigned fulfillment orders. + +## Notifications about fulfillment orders + +Fulfillment services are required to +[register](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) +a self-hosted callback URL which has a number of uses. One of these uses is that this callback URL will be notified +whenever a merchant submits a fulfillment or cancellation request. + +Both merchants and apps can +[subscribe](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#webhooks) +to the +[fulfillment order webhooks](https://shopify.dev/api/admin-graphql/latest/enums/WebhookSubscriptionTopic#value-fulfillmentorderscancellationrequestaccepted) +to be notified whenever fulfillment order related domain events occur. + +[Learn about fulfillment workflows](https://shopify.dev/apps/fulfillment). +""" +type FulfillmentOrder implements Node { + """ + The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen. + + The fulfillment order's assigned location might change in the following cases: + + - The fulfillment order has been entirely moved to a new location. For example, the [fulfillmentOrderMove]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove + ) mutation has been called, and you see the original fulfillment order in the [movedFulfillmentOrder]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove#field-fulfillmentordermovepayload-movedfulfillmentorder + ) field within the mutation's response. + - Work on the fulfillment order hasn't yet begun, which means that the fulfillment order has the + [OPEN](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-open), + [SCHEDULED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-scheduled), or + [ON_HOLD](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-onhold) + status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin). + """ + assignedLocation: FulfillmentOrderAssignedLocation! + + """ + ID of the channel that created the order. + """ + channelId: ID + + """ + Date and time when the fulfillment order was created. + """ + createdAt: DateTime! + + """ + Delivery method of this fulfillment order. + """ + deliveryMethod: DeliveryMethod + + """ + The destination where the items should be sent. + """ + destination: FulfillmentOrderDestination + + """ + The date and time at which the fulfillment order will be fulfillable. When + this date and time is reached, the scheduled fulfillment order is + automatically transitioned to open. For example, the `fulfill_at` date for a + subscription order might be the 1st of each month, a pre-order `fulfill_at` + date would be `nil`, and a standard order `fulfill_at` date would be the order creation date. + """ + fulfillAt: DateTime + + """ + The latest date and time by which all items in the fulfillment order need to be fulfilled. + """ + fulfillBy: DateTime + + """ + The fulfillment holds applied on the fulfillment order. + """ + fulfillmentHolds: [FulfillmentHold!]! + + """ + Fulfillment orders eligible for merging with the given fulfillment order. + """ + fulfillmentOrdersForMerge( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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!] = [] + + """ + Specific Location ids to check for the movability for a fulfillment order. + """ + locationIds: [ID!] + + """ + 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 request status of the fulfillment order. + """ + requestStatus: FulfillmentOrderRequestStatus! + + """ + The status of the fulfillment order. + """ + status: FulfillmentOrderStatus! + + """ + The actions that can be performed on this fulfillment order. + """ + supportedActions: [FulfillmentOrderSupportedAction!]! + + """ + The date and time when the fulfillment order was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `fulfillmentOrderAcceptCancellationRequest` mutation. +""" +type FulfillmentOrderAcceptCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderAcceptFulfillmentRequest` mutation. +""" +type FulfillmentOrderAcceptFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was accepted. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The actions that can be taken on a fulfillment order. +""" +enum FulfillmentOrderAction { + """ + 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 + + """ + 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 { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The two-letter country code of the location. + """ + countryCode: CountryCode! + + """ + The location where the fulfillment is expected to happen. This value might be different from + `FulfillmentOrderAssignedLocation` if the location's attributes were updated + after the fulfillment order was taken into work of canceled. + """ + location: Location + + """ + The name of the location. + """ + name: String! + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +The assigment status to be used to filter fulfillment orders. +""" +enum FulfillmentOrderAssignmentStatus { + """ + Fulfillment orders for which the merchant has requested cancellation of + the previously accepted fulfillment request. + """ + CANCELLATION_REQUESTED + + """ + Fulfillment orders for which the merchant'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 +} + +""" +Return type for `fulfillmentOrderCancel` mutation. +""" +type FulfillmentOrderCancelPayload { + """ + The fulfillment order that was marked as canceled. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was created to replace the canceled fulfillment order. + """ + replacementFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderClose` mutation. +""" +type FulfillmentOrderClosePayload { + """ + The fulfillment order that was marked as incomplete. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrders. +""" +type FulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the destination where the items should be sent upon fulfillment. +""" +type FulfillmentOrderDestination implements Node { + """ + The first line of the address of the destination. + """ + address1: String + + """ + The second line of the address of the destination. + """ + address2: String + + """ + The city of the destination. + """ + city: String + + """ + The company of the destination. + """ + company: String + + """ + The two-letter country code of the destination. + """ + countryCode: CountryCode + + """ + The email of the customer at the destination. + """ + email: String + + """ + The first name of the customer at the destination. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer at the destination. + """ + lastName: String + + """ + The location designated for the pick-up of the fulfillment order. + """ + location: Location + + """ + The phone number of the customer at the destination. + """ + phone: String + + """ + The province of the destination. + """ + province: String + + """ + The ZIP code of the destination. + """ + zip: String +} + +""" +An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. +""" +type FulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderEdge. + """ + node: FulfillmentOrder! +} + +""" +The input fields for the fulfillment hold applied on the fulfillment order. +""" +input FulfillmentOrderHoldInput { + """ + 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 { + """ + The fulfillment hold created for the fulfillment order. Null if no hold was created. + """ + fulfillmentHold: FulfillmentHold + + """ + The fulfillment order on which a fulfillment hold was applied. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The remaining fulfillment order containing the line items to which the hold wasn't applied, + if specific line items were specified to be placed on hold. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderHold`. +""" +type FulfillmentOrderHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderHoldUserError`. +""" +enum FulfillmentOrderHoldUserErrorCode { + """ + The fulfillment order 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 { + """ + The method of duties payment. Example values: `DDP`, `DAP`. + """ + incoterm: String! +} + +""" +Associates an order line item with the quantities that require fulfillment as +part of a fulfillment order. Each Fulfillment Order Line Item object tracks the +total quantity to fulfill and the remaining quantity yet to be fulfilled, along +with details about the line item being fulfilled and pricing information. + +The line item provides additional fulfillment data including whether the item +requires shipping. Financial summaries show pricing details with discounts +applied, while warning messages alert merchants to any issues that might affect fulfillment. +""" +type FulfillmentOrderLineItem implements Node { + """ + The financial summary for the Fulfillment Order's Line Items. + """ + financialSummaries: [FulfillmentOrderLineItemFinancialSummary!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image: Image + + """ + The ID of the inventory item. + """ + inventoryItemId: ID + + """ + The associated order line item. + """ + lineItem: LineItem! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! @deprecated(reason: "Use `financialSummaries` instead.") + + """ + The title of the product. + """ + productTitle: String! + + """ + The number of units remaining to be fulfilled. + """ + remainingQuantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + The variant SKU number. + """ + sku: String + + """ + The total number of units to be fulfilled. + """ + totalQuantity: Int! + + """ + The product variant associated to the fulfillment order line item. + """ + variant: ProductVariant + + """ + The name of the variant. + """ + variantTitle: String + + """ + The name of the vendor who made the variant. + """ + vendor: String + + """ + Warning messages for a fulfillment order line item. + """ + warnings: [FulfillmentOrderLineItemWarning!]! + + """ + The weight of a line item unit. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderLineItems. +""" +type FulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [FulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLineItem and a cursor during pagination. +""" +type FulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLineItemEdge. + """ + node: FulfillmentOrderLineItem! +} + +""" +The financial details of a fulfillment order line item. +""" +type FulfillmentOrderLineItemFinancialSummary { + """ + The approximate split price of a line item unit, in shop and presentment + currencies. This value doesn't include discounts applied to the entire + order.For the full picture of applied discounts, see discountAllocations. + """ + approximateDiscountedUnitPriceSet: MoneyBag! + + """ + The discounts that have been allocated onto the line item by discount applications, not including order edits and refunds. + """ + discountAllocations: [FinancialSummaryDiscountAllocation!]! + + """ + The variant unit price without discounts applied, in shop and presentment currencies. + """ + originalUnitPriceSet: MoneyBag! + + """ + Number of line items that this financial summary applies to. + """ + quantity: Int! +} + +""" +The input fields used to include the quantity of the fulfillment order line item that should be fulfilled. +""" +input FulfillmentOrderLineItemInput { + """ + The ID of the fulfillment order line item. + """ + id: ID! + + """ + The quantity of the fulfillment order line item. + """ + quantity: Int! +} + +""" +A fulfillment order line item warning. For example, a warning about why a fulfillment request was rejected. +""" +type FulfillmentOrderLineItemWarning { + """ + The description of warning. + """ + description: String + + """ + The title of warning. + """ + title: String +} + +""" +The input fields used to include the line items of a specified fulfillment order that should be fulfilled. +""" +input FulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be fulfilled. + If left blank, all line items of the fulfillment order will be fulfilled. + Accepts a maximum of 512 line items. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +The input fields for marking fulfillment order line items as ready for pickup. +""" +input FulfillmentOrderLineItemsPreparedForPickupInput { + """ + The fulfillment orders associated with the line items which are ready to be picked up by a customer. + """ + lineItemsByFulfillmentOrder: [PreparedFulfillmentOrderLineItemsInput!]! +} + +""" +Return type for `fulfillmentOrderLineItemsPreparedForPickup` mutation. +""" +type FulfillmentOrderLineItemsPreparedForPickupPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderLineItemsPreparedForPickupUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderLineItemsPreparedForPickup`. +""" +type FulfillmentOrderLineItemsPreparedForPickupUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderLineItemsPreparedForPickupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderLineItemsPreparedForPickupUserError`. +""" +enum FulfillmentOrderLineItemsPreparedForPickupUserErrorCode { + """ + 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 { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLocationForMoveEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLocationForMoveEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderLocationForMove!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination. +""" +type FulfillmentOrderLocationForMoveEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderLocationForMoveEdge. + """ + node: FulfillmentOrderLocationForMove! +} + +""" +A request made by the merchant or an order management app to a fulfillment service +for a fulfillment order. +""" +type FulfillmentOrderMerchantRequest implements Node { + """ + The fulfillment order associated with the merchant request. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The kind of request made. + """ + kind: FulfillmentOrderMerchantRequestKind! + + """ + The optional message that the merchant included in the request. + """ + message: String + + """ + Additional options requested by the merchant. These depend on the `kind` of the request. + For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the + merchant intends to notify the customer upon fulfillment. The fulfillment service can then set + `notifyCustomer` when making calls to `FulfillmentCreate`. + """ + requestOptions: JSON + + """ + The response from the fulfillment service. + """ + responseData: JSON + + """ + The timestamp when the request was made. + """ + sentAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests. +""" +type FulfillmentOrderMerchantRequestConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderMerchantRequestEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderMerchantRequestEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderMerchantRequest!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination. +""" +type FulfillmentOrderMerchantRequestEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of FulfillmentOrderMerchantRequestEdge. + """ + node: FulfillmentOrderMerchantRequest! +} + +""" +The kinds of request merchants can make to a fulfillment service. +""" +enum FulfillmentOrderMerchantRequestKind { + """ + The merchant requests 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 { + """ + The details of the fulfillment orders to be merged. + """ + mergeIntents: [FulfillmentOrderMergeInputMergeIntent!]! +} + +""" +The input fields for merging fulfillment orders into a single merged fulfillment order. +""" +input FulfillmentOrderMergeInputMergeIntent { + """ + The ID of the fulfillment order to be merged. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be merged. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +Return type for `fulfillmentOrderMerge` mutation. +""" +type FulfillmentOrderMergePayload { + """ + The result of the fulfillment order merges. + """ + fulfillmentOrderMerges: [FulfillmentOrderMergeResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderMergeUserError!]! +} + +""" +The result of merging a set of fulfillment orders. +""" +type FulfillmentOrderMergeResult { + """ + The new fulfillment order as a result of the merge. + """ + fulfillmentOrder: FulfillmentOrder! +} + +""" +An error that occurs during the execution of `FulfillmentOrderMerge`. +""" +type FulfillmentOrderMergeUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderMergeUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderMergeUserError`. +""" +enum FulfillmentOrderMergeUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY +} + +""" +Return type for `fulfillmentOrderMove` mutation. +""" +type FulfillmentOrderMovePayload { + """ + The fulfillment order which now contains the moved line items and is assigned to the destination location. + + If the original fulfillment order doesn't have any line items which are fully + or partially fulfilled, the original fulfillment order will be moved to the new location. + However if this isn't the case, the moved fulfillment order will differ from the original one. + """ + movedFulfillmentOrder: FulfillmentOrder + + """ + The final state of the original fulfillment order. + + As a result of the move operation, the original fulfillment order might be moved to the new location + or remain in the original location. The original fulfillment order might have the same status or be closed. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + This field is deprecated. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderOpen` mutation. +""" +type FulfillmentOrderOpenPayload { + """ + The fulfillment order that was transitioned to open and is fulfillable. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectCancellationRequest` mutation. +""" +type FulfillmentOrderRejectCancellationRequestPayload { + """ + The fulfillment order whose cancellation request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderRejectFulfillmentRequest` mutation. +""" +type FulfillmentOrderRejectFulfillmentRequestPayload { + """ + The fulfillment order whose fulfillment request was rejected. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The reason for a fulfillment order rejection. +""" +enum FulfillmentOrderRejectionReason { + """ + The fulfillment order was rejected because of an incorrect address. + """ + INCORRECT_ADDRESS + + """ + The fulfillment order was rejected because 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 { + """ + The fulfillment order on which the hold was released. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderReleaseHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReleaseHold`. +""" +type FulfillmentOrderReleaseHoldUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderReleaseHoldUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderReleaseHoldUserError`. +""" +enum FulfillmentOrderReleaseHoldUserErrorCode { + """ + The fulfillment order wasn't found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The app doesn't have access to release the fulfillment hold. + """ + INVALID_ACCESS +} + +""" +The request status of a fulfillment order. +""" +enum FulfillmentOrderRequestStatus { + """ + The 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 { + """ + A fulfillment order with the rescheduled line items. + + Fulfillment orders may be merged if they have the same `fulfillAt` datetime. + + If the fulfillment order is merged then the resulting fulfillment order will be returned. + Otherwise the original fulfillment order will be returned with an updated `fulfillAt` datetime. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderRescheduleUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReschedule`. +""" +type FulfillmentOrderRescheduleUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderRescheduleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderRescheduleUserError`. +""" +enum FulfillmentOrderRescheduleUserErrorCode { + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND +} + +""" +The set of valid sort keys for the FulfillmentOrder query. +""" +enum FulfillmentOrderSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields for the split applied to the fulfillment order. +""" +input FulfillmentOrderSplitInput { + """ + The ID of the fulfillment order to be split. + """ + fulfillmentOrderId: ID! + + """ + The fulfillment order line items to be split out. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! +} + +""" +Return type for `fulfillmentOrderSplit` mutation. +""" +type FulfillmentOrderSplitPayload { + """ + The result of the fulfillment order splits. + """ + fulfillmentOrderSplits: [FulfillmentOrderSplitResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderSplitUserError!]! +} + +""" +The result of splitting a fulfillment order. +""" +type FulfillmentOrderSplitResult { + """ + The original fulfillment order as a result of the split. + """ + fulfillmentOrder: FulfillmentOrder! + + """ + The remaining fulfillment order as a result of the split. + """ + remainingFulfillmentOrder: FulfillmentOrder! + + """ + The replacement fulfillment order if the original fulfillment order wasn't in a state to be split. + """ + replacementFulfillmentOrder: FulfillmentOrder +} + +""" +An error that occurs during the execution of `FulfillmentOrderSplit`. +""" +type FulfillmentOrderSplitUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrderSplitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderSplitUserError`. +""" +enum FulfillmentOrderSplitUserErrorCode { + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY + + """ + The fulfillment order must have at least one line item input to split. + """ + NO_LINE_ITEMS_PROVIDED_TO_SPLIT +} + +""" +The status of a fulfillment order. +""" +enum FulfillmentOrderStatus { + """ + The fulfillment order 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 { + """ + The fulfillment order specified in the cancelation request. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentOrderSubmitFulfillmentRequest` mutation. +""" +type FulfillmentOrderSubmitFulfillmentRequestPayload { + """ + The original fulfillment order intended to request fulfillment for. + """ + originalFulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was submitted to the fulfillment service. This will be the same as + the original fulfillment order field. The exception to this is partial fulfillment requests or + fulfillment request for cancelled or incomplete fulfillment orders. + """ + submittedFulfillmentOrder: FulfillmentOrder + + """ + This field will only be present for partial fulfillment requests. This will represent the new + fulfillment order with the remaining line items not submitted to the fulfillment service. + """ + unsubmittedFulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +One of the actions that the fulfillment order supports in its current state. +""" +type FulfillmentOrderSupportedAction { + """ + The action value. + """ + action: FulfillmentOrderAction! + + """ + The external URL to be used to initiate the fulfillment process outside Shopify. + Applicable only when the `action` value is `EXTERNAL`. + """ + externalUrl: URL +} + +""" +Return type for `fulfillmentOrdersReroute` mutation. +""" +type FulfillmentOrdersReroutePayload { + """ + The fulfillment orders which contains the moved line items. + """ + movedFulfillmentOrders: [FulfillmentOrder!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersRerouteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersReroute`. +""" +type FulfillmentOrdersRerouteUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersRerouteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersRerouteUserError`. +""" +enum FulfillmentOrdersRerouteUserErrorCode { + """ + 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 { + """ + Whether the fulfillment deadline was successfully set. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrdersSetFulfillmentDeadlineUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersSetFulfillmentDeadline`. +""" +type FulfillmentOrdersSetFulfillmentDeadlineUserError implements DisplayableError { + """ + The error code. + """ + code: FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersSetFulfillmentDeadlineUserError`. +""" +enum FulfillmentOrdersSetFulfillmentDeadlineUserErrorCode { + """ + The fulfillment orders could not be found. + """ + FULFILLMENT_ORDERS_NOT_FOUND +} + +""" +The address at which the fulfillment occurred. This object is intended for tax +purposes, as a full address is required for tax providers to accurately +calculate taxes. Typically this is the address of the warehouse or fulfillment +center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +type FulfillmentOriginAddress { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The country code of the fulfillment location. + """ + countryCode: String! + + """ + The province code of the fulfillment location. + """ + provinceCode: String + + """ + The zip code of the fulfillment location. + """ + zip: String +} + +""" +The input fields used to include the address at which the fulfillment occurred. +This input object is intended for tax purposes, as a full address is required +for tax providers to accurately calculate taxes. Typically this is the address +of the warehouse or fulfillment center. To retrieve a fulfillment location's +address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +input FulfillmentOriginAddressInput { + """ + The street address of the fulfillment location. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The city in which the fulfillment location is located. + """ + city: String + + """ + The 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 { + """ + The callback URL that the fulfillment service has registered for requests. The following considerations apply: + + - Shopify queries the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the `/fetch_stock` endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the `/fulfillment_order_notification` endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support). + """ + callbackUrl: URL + + """ + Whether the fulfillment service uses the [fulfillment order based workflow](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments) + for managing fulfillments. + + As the migration is now finished, the `fulfillmentOrdersOptIn` property is [deprecated]( + https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field) + and is always set to `true` on correctly functioning fulfillment services. + """ + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: "Migration period ended. All correctly functioning fulfillment services have `fulfillmentOrdersOptIn` set to `true`.") + + """ + Human-readable unique identifier for this fulfillment service. + """ + handle: String! + + """ + The ID of the fulfillment service. + """ + id: ID! + + """ + Whether the fulfillment service tracks product inventory and provides updates to Shopify. + """ + inventoryManagement: Boolean! + + """ + Location associated with the fulfillment service. + """ + location: Location + + """ + Whether the fulfillment service can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean! @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https:\/\/shopify.dev\/changelog\/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\nAs of API version `2026-04` this field will be removed.\n") + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean! + + """ + The name of the fulfillment service as seen by merchants. + """ + serviceName: String! + + """ + Whether the fulfillment service implemented the /fetch_tracking_numbers endpoint. + """ + trackingSupport: Boolean! + + """ + Type associated with the fulfillment service. + """ + type: FulfillmentServiceType! +} + +""" +Return type for `fulfillmentServiceCreate` mutation. +""" +type FulfillmentServiceCreatePayload { + """ + The created fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Actions that can be taken at the location when a client requests the deletion of the fulfillment service. +""" +enum FulfillmentServiceDeleteInventoryAction { + """ + Deactivate and delete the inventory and location. + """ + DELETE + + """ + Keep the inventory in place and convert the Fulfillment Service's location to be merchant managed. + """ + KEEP + + """ + Transfer the inventory and other dependencies to the provided location. + """ + TRANSFER +} + +""" +Return type for `fulfillmentServiceDelete` mutation. +""" +type FulfillmentServiceDeletePayload { + """ + The ID of the deleted fulfillment service. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The type of a fulfillment service. +""" +enum FulfillmentServiceType { + """ + Fulfillment by gift card. + """ + GIFT_CARD + + """ + Manual fulfillment by the merchant. + """ + MANUAL + + """ + Fullfillment by a third-party fulfillment service. + """ + THIRD_PARTY +} + +""" +Return type for `fulfillmentServiceUpdate` mutation. +""" +type FulfillmentServiceUpdatePayload { + """ + The updated fulfillment service. + """ + fulfillmentService: FulfillmentService + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The status of a fulfillment. +""" +enum FulfillmentStatus { + """ + 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 { + """ + 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 { + """ + The updated fulfillment with tracking information. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentTrackingInfoUpdateV2` mutation. +""" +type FulfillmentTrackingInfoUpdateV2Payload { + """ + The updated fulfillment with tracking information. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields that specify all possible fields for tracking information. + +> Note: +> If you provide the `url` field, you should not provide the `urls` field. +> +> If you provide the `number` field, you should not provide the `numbers` field. +> +> If you provide the `url` field, you should provide the `number` field. +> +> If you provide the `urls` field, you should provide the `numbers` field. +""" +input FulfillmentTrackingInput { + """ + The 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 { + """ + 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 +} + +""" +The App Bridge information for a Shopify Function. +""" +type FunctionsAppBridge { + """ + The relative path for creating a customization. + """ + createPath: String! + + """ + The relative path for viewing a customization. + """ + detailsPath: String! +} + +""" +The error history from running a Shopify Function. +""" +type FunctionsErrorHistory { + """ + The date and time that the first error occurred. + """ + errorsFirstOccurredAt: DateTime! + + """ + The date and time that the first error occurred. + """ + firstOccurredAt: DateTime! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasBeenSharedSinceLastError: Boolean! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasSharedRecentErrors: Boolean! +} + +""" +Represents any file other than HTML. +""" +type GenericFile implements File & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The generic file's MIME type. + """ + mimeType: String + + """ + The generic file's size in bytes. + """ + originalFileSize: Int + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! + + """ + The generic file's URL. + """ + url: URL +} + +""" +A gift card that customers use as a payment method. Stores the initial value, current balance, and expiration date. + +You can issue gift cards to a specific +[`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) +or send them to a [`GiftCardRecipient`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardRecipient) +with a personalized message. The card tracks its transaction history through [`GiftCardCreditTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardCreditTransaction) and [`GiftCardDebitTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardDebitTransaction) +records. You can create and deactivate gift cards using the [`GiftCardCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardCreate) and [`GiftCardDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardDeactivate) +mutations, respectively. + +> Note: After a gift card is deactivated, it can't be used for further purchases or re-enabled. +""" +type GiftCard implements Node { + """ + The gift card's remaining balance. + """ + balance: MoneyV2! + + """ + The date and time at which the gift card was created. + """ + createdAt: DateTime! + + """ + The customer who will receive the gift card. + """ + customer: Customer + + """ + The date and time at which the gift card was deactivated. + """ + deactivatedAt: DateTime + + """ + Whether the gift card is enabled. + """ + enabled: Boolean! + + """ + The date at which the gift card will expire. + """ + expiresOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The initial value of the gift card. + """ + initialValue: MoneyV2! + + """ + The final four characters of the gift card code. + """ + lastCharacters: String! + + """ + The gift card code. Everything but the final four characters is masked. + """ + maskedCode: String! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The order associated with the gift card. This value is `null` if the gift card was issued manually. + """ + order: Order + + """ + The recipient who will receive the gift card. + """ + recipientAttributes: GiftCardRecipient + + """ + The theme template used to render the gift card online. + """ + templateSuffix: String + + """ + The transaction history of the gift card. + """ + transactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The issue limit for gift cards in the default shop currency. + """ + issueLimit: MoneyV2! + + """ + The purchase limit for gift cards in the default shop currency. + """ + purchaseLimit: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple GiftCards. +""" +type GiftCardConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardEdge!]! + + """ + A list of nodes that are contained in GiftCardEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [GiftCard!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to issue a gift card. +""" +input GiftCardCreateInput { + """ + The gift card's code. It must be 8-20 characters long and contain only letters(a-z) and numbers(0-9). + It isn't case sensitive. If not provided, then a random code will be generated. + """ + code: String + + """ + The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. + """ + customerId: ID + + """ + The date at which the gift card will expire. If not provided, then the gift card will never expire. + """ + expiresOn: Date + + """ + The initial value of the gift card. + """ + initialValue: Decimal! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The recipient attributes of the gift card. + """ + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + If not provided, then the default `gift_card.liquid` template is used. + """ + templateSuffix: String +} + +""" +Return type for `giftCardCreate` mutation. +""" +type GiftCardCreatePayload { + """ + The created gift card. + """ + giftCard: GiftCard + + """ + The created gift card's code. + """ + giftCardCode: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardUserError!]! +} + +""" +The input fields for a gift card credit transaction. +""" +input GiftCardCreditInput { + """ + The amount to credit the gift card. + """ + creditAmount: MoneyInput! + + """ + A note about the credit. + """ + note: String + + """ + The date and time the credit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +""" +Return type for `giftCardCredit` mutation. +""" +type GiftCardCreditPayload { + """ + The gift card credit transaction that was created. + """ + giftCardCreditTransaction: GiftCardCreditTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardTransactionUserError!]! +} + +""" +A credit transaction which increases the gift card balance. +""" +type GiftCardCreditTransaction implements GiftCardTransaction & HasMetafields & Node { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +Return type for `giftCardDeactivate` mutation. +""" +type GiftCardDeactivatePayload { + """ + The deactivated gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardDeactivateUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardDeactivate`. +""" +type GiftCardDeactivateUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardDeactivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardDeactivateUserError`. +""" +enum GiftCardDeactivateUserErrorCode { + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND +} + +""" +The input fields for a gift card debit transaction. +""" +input GiftCardDebitInput { + """ + The amount to debit the gift card. + """ + debitAmount: MoneyInput! + + """ + A note about the debit. + """ + note: String + + """ + The date and time the debit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +""" +Return type for `giftCardDebit` mutation. +""" +type GiftCardDebitPayload { + """ + The gift card debit transaction that was created. + """ + giftCardDebitTransaction: GiftCardDebitTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardTransactionUserError!]! +} + +""" +A debit transaction which decreases the gift card balance. +""" +type GiftCardDebitTransaction implements GiftCardTransaction & HasMetafields & Node { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +An auto-generated type which holds one GiftCard and a cursor during pagination. +""" +type GiftCardEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of GiftCardEdge. + """ + node: GiftCard! +} + +""" +Possible error codes that can be returned by `GiftCardUserError`. +""" +enum GiftCardErrorCode { + """ + The 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 + + """ + 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 a recipient who will receive the issued gift card. +""" +type GiftCardRecipient { + """ + The message sent with the gift card. + """ + message: String + + """ + The preferred name of the recipient who will receive the gift card. + """ + preferredName: String + + """ + The recipient who will receive the gift card. + """ + recipient: Customer! + + """ + The scheduled datetime on which the gift card will be sent to the recipient. + The gift card will be sent within an hour of the specified datetime. + """ + sendNotificationAt: DateTime +} + +""" +The input fields to add a recipient to a gift card. +""" +input GiftCardRecipientInput { + """ + The ID of the customer who will be the recipient of the gift card. Requires `write_customers` access_scope. + """ + id: ID! + + """ + The 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 { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line item for the associated sale. + """ + lineItem: LineItem! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +Return type for `giftCardSendNotificationToCustomer` mutation. +""" +type GiftCardSendNotificationToCustomerPayload { + """ + The gift card that was sent. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardSendNotificationToCustomerUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToCustomer`. +""" +type GiftCardSendNotificationToCustomerUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardSendNotificationToCustomerUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToCustomerUserError`. +""" +enum GiftCardSendNotificationToCustomerUserErrorCode { + """ + The 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 { + """ + The gift card that was sent. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [GiftCardSendNotificationToRecipientUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToRecipient`. +""" +type GiftCardSendNotificationToRecipientUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardSendNotificationToRecipientUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToRecipientUserError`. +""" +enum GiftCardSendNotificationToRecipientUserErrorCode { + """ + The 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 { + """ + Sort by the `amount_spent` value. + """ + AMOUNT_SPENT + + """ + Sort by the `balance` value. + """ + BALANCE + + """ + Sort by the `code` value. + """ + CODE + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + Sort by the `disabled_at` value. + """ + DISABLED_AT + + """ + Sort by the `expires_on` value. + """ + EXPIRES_ON + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `initial_value` value. + """ + INITIAL_VALUE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Interface for a gift card transaction. +""" +interface GiftCardTransaction implements HasMetafields { + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The gift card that the transaction belongs to. + """ + giftCard: GiftCard! + + """ + The unique ID for the transaction. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple GiftCardTransactions. +""" +type GiftCardTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardTransactionEdge!]! + + """ + A list of nodes that are contained in GiftCardTransactionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [GiftCardTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one GiftCardTransaction and a cursor during pagination. +""" +type GiftCardTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of GiftCardTransactionEdge. + """ + node: GiftCardTransaction! +} + +""" +Represents an error that happens during the execution of a gift card transaction mutation. +""" +type GiftCardTransactionUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardTransactionUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardTransactionUserError`. +""" +enum GiftCardTransactionUserErrorCode { + """ + The 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 { + """ + The ID of the customer who will receive the gift card. The ID can't be changed + if the gift card already has an assigned customer ID. + """ + customerId: ID + + """ + The 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 + + """ + The recipient attributes of the gift card. + """ + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + """ + templateSuffix: String +} + +""" +Return type for `giftCardUpdate` mutation. +""" +type GiftCardUpdatePayload { + """ + The updated gift card. + """ + giftCard: GiftCard + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents an error that happens during the execution of a gift card mutation. +""" +type GiftCardUserError implements DisplayableError { + """ + The error code. + """ + code: GiftCardErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A string containing HTML code. Refer to the [HTML spec](https://html.spec.whatwg.org/#elements-3) for a +complete list of HTML elements. + +Example value: `"

Grey cotton knit sweater.

"` +""" +scalar HTML + +""" +Represents a summary of the current version of data in a resource. + +The `compare_digest` field can be used as input for mutations that implement a compare-and-swap mechanism. +""" +interface HasCompareDigest { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! +} + +""" +Represents an object that has a list of events. +""" +interface HasEvents { + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 input fields that identify metafield definitions. +""" +input HasMetafieldsMetafieldIdentifierInput { + """ + 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 { + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Represents information about the store credit accounts associated to the specified owner. +""" +interface HasStoreCreditAccounts { + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! +} + +""" +Represents a unique identifier, often used to refetch an object. +The ID type appears in a JSON response as a String, but it is not intended to be human-readable. + +Example value: `"gid://shopify/Product/10079785100"` +""" +scalar ID + +""" +Represents an image resource. +""" +type Image implements HasMetafields & HasPublishedTranslations { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + height: Int + + """ + A unique ID for the image. + """ + id: ID + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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 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 + ): [Translation!]! + + """ + The location of the image as a URL. + + If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + + All transformation options are considered "best-effort". Any transformation + that the original image type doesn't support will be ignored. + + If you need multiple variations of the same image, then you can use [GraphQL + aliases](https://graphql.org/learn/queries/#aliases). + """ + url( + """ + A set of options to transform the original image. + """ + transform: ImageTransformInput + ): URL! + + """ + The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + width: Int +} + +""" +An auto-generated type for paginating through multiple Images. +""" +type ImageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ImageEdge!]! + + """ + A list of nodes that are contained in ImageEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Image!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +List of supported image content types. +""" +enum ImageContentType { + """ + A 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ImageEdge. + """ + node: Image! +} + +""" +The input fields for an image. +""" +input ImageInput { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + A globally-unique ID. + """ + id: ID + + """ + The URL of the image. May be a staged upload URL. + """ + src: String +} + +""" +The available options for transforming an image. + +All transformation options are considered best effort. Any transformation that +the original image type doesn't support will be ignored. +""" +input ImageTransformInput { + """ + The region of the image to remain after cropping. + Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, + where the `maxWidth` and `maxHeight` aren't equal. + The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while + a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ + maxWidth: 5, maxHeight: 10, crop: LEFT }` will result + in an image with a width of 5 and height of 10, where the right side of the image is removed. + """ + crop: CropRegion + + """ + Image 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 { + """ + The parameter name. + """ + name: String! + + """ + The parameter value. + """ + value: String! +} + +""" +Answers the question if prices include duties and / or taxes. +""" +enum InclusiveDutiesPricingStrategy { + """ + Add duties at checkout when configured to collect. + """ + ADD_DUTIES_AT_CHECKOUT + + """ + Include duties in price when configured to collect. + """ + INCLUDE_DUTIES_IN_PRICE +} + +""" +Answers the question if prices include duties and / or taxes. +""" +enum InclusiveTaxPricingStrategy { + """ + Add taxes at checkout when configured to collect. + """ + ADD_TAXES_AT_CHECKOUT + + """ + Include taxes in price when configured to collect. + """ + INCLUDES_TAXES_IN_PRICE + + """ + Include taxes in price based on country when configured to collect. + """ + INCLUDES_TAXES_IN_PRICE_BASED_ON_COUNTRY +} + +""" +The input fields for the incoming line item. +""" +input IncomingRequestLineItemInput { + """ + The ID of the rejected line item. + """ + fulfillmentOrderLineItemId: ID! + + """ + The rejection message of the line item. + """ + message: String +} + +""" +Return type for `inventoryActivate` mutation. +""" +type InventoryActivatePayload { + """ + The inventory level that was activated. + """ + inventoryLevel: InventoryLevel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields required to adjust inventory quantities. +""" +input InventoryAdjustQuantitiesInput { + """ + The 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryAdjustQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryAdjustQuantities`. +""" +type InventoryAdjustQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryAdjustQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryAdjustQuantitiesUserError`. +""" +enum InventoryAdjustQuantitiesUserErrorCode { + """ + 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 { + """ + The app that triggered the inventory event, if one exists. + """ + app: App + + """ + The set of inventory quantity changes that occurred in the inventory event. + """ + changes( + """ + The IDs of the inventory items to filter changes by. + """ + inventoryItemIds: [ID!] + + """ + The IDs of the locations to filter changes by. + """ + locationIds: [ID!] + + """ + The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + 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 +} + +""" +The input fields required to adjust the available quantity of a product variant at a location. +""" +input InventoryAdjustmentInput { + """ + The adjustment of the available quantity at the location. If the value is + `null`, then the product variant is no longer stocked at the location. + """ + adjustment: Int + + """ + The quantity to compare against before applying the delta. + """ + changeFromQuantity: Int + + """ + The ID of the location where the available quantity should be adjusted. + """ + locationId: ID! +} + +""" +The input fields to specify whether the inventory item should be activated or not at the specified location. +""" +input InventoryBulkToggleActivationInput { + """ + 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! +} + +""" +Return type for `inventoryBulkToggleActivation` mutation. +""" +type InventoryBulkToggleActivationPayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The activated inventory levels. + """ + inventoryLevels: [InventoryLevel!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryBulkToggleActivationUserError!]! +} + +""" +An error that occurred while setting the activation status of an inventory item. +""" +type InventoryBulkToggleActivationUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryBulkToggleActivationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryBulkToggleActivationUserError`. +""" +enum InventoryBulkToggleActivationUserErrorCode { + """ + 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 { + """ + The amount by which the inventory quantity was changed. + """ + delta: Int! + + """ + The inventory item associated with this inventory change. + """ + item: InventoryItem + + """ + A URI that represents what the inventory quantity change was applied to. + """ + ledgerDocumentUri: String + + """ + The location associated with this inventory change. + """ + location: Location + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + of the inventory quantity that was changed. + """ + name: String! + + """ + The quantity of named inventory after the change. + """ + quantityAfterChange: Int +} + +""" +The input fields for the change to be made to an inventory item at a location. +""" +input InventoryChangeInput { + """ + The quantity to compare against before applying the delta. 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! + + """ + 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! +} + +""" +Return type for `inventoryDeactivate` mutation. +""" +type InventoryDeactivatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A [product variant's](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) inventory information across all locations. The inventory item connects the +product variant to its [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) +at different locations, tracking stock keeping unit (SKU), whether quantities +are tracked, shipping requirements, and customs information for the product. + +Learn more about [inventory object relationships](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryItem implements LegacyInteroperability & Node { + """ + The ISO 3166-1 alpha-2 country code of where the item originated from. + """ + countryCodeOfOrigin: CountryCode + + """ + A list of country specific harmonized system codes. + """ + countryHarmonizedSystemCodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + The harmonized system code of the item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL that points to the inventory history for the item. + """ + inventoryHistoryUrl: URL + + """ + The inventory item's quantities at the specified location. + """ + inventoryLevel( + """ + ID of the location for which the inventory level is requested. + """ + locationId: ID! + ): InventoryLevel + + """ + A list of the inventory item's quantities for each location that the inventory item can be stocked at. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The number of locations where this inventory item is stocked. + """ + locationsCount: Count + + """ + The packaging dimensions of the inventory item. + """ + measurement: InventoryItemMeasurement! + + """ + The ISO 3166-2 alpha-2 province code of where the item originated from. + """ + provinceCodeOfOrigin: String + + """ + Whether the inventory item requires shipping. + """ + requiresShipping: Boolean! + + """ + Inventory item SKU. Case-sensitive string. + """ + sku: String + + """ + Whether inventory levels are tracked for the item. + """ + tracked: Boolean! + + """ + Whether the value of the `tracked` field for the inventory item can be changed. + """ + trackedEditable: EditableProperty! + + """ + Unit cost associated with the inventory item. Note: the user must have "View + product costs" permission granted in order to access this field once product + granular permissions are enabled. + """ + unitCost: MoneyV2 + + """ + The date and time when the inventory item was updated. + """ + updatedAt: DateTime! + + """ + The variant that owns this inventory item. + """ + variant: ProductVariant! @deprecated(reason: "Use `variants` instead.") + + """ + A paginated list of the variants that reference this inventory item. + """ + variants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryItemEdge!]! + + """ + A list of nodes that are contained in InventoryItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryItem and a cursor during pagination. +""" +type InventoryItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryItemEdge. + """ + node: InventoryItem! +} + +""" +The input fields for an inventory item. +""" +input InventoryItemInput { + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The weight of the inventory item. + """ + weight: Weight +} + +""" +The input fields for an inventory item measurement. +""" +input InventoryItemMeasurementInput { + """ + Shipping package associated with inventory item. + """ + shippingPackageId: ID + + """ + The weight of the inventory item. + """ + weight: WeightInput +} + +""" +Return type for `inventoryItemUpdate` mutation. +""" +type InventoryItemUpdatePayload { + """ + The inventory item that was updated. + """ + inventoryItem: InventoryItem + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The quantities of an inventory item at a specific location. Each inventory level connects one [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) to one [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location), +tracking multiple quantity states like available, on-hand, incoming, and committed. + +The [`quantities`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel#field-InventoryLevel.fields.quantities) field provides access to different inventory states. Learn [more about inventory states and relationships](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). +""" +type InventoryLevel implements Node { + """ + Whether the inventory items associated with the inventory level can be deactivated. + """ + canDeactivate: Boolean! + + """ + The date and time when the inventory level was created. + """ + createdAt: DateTime! + + """ + Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated. + """ + deactivationAlert: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + Inventory item associated with the inventory level. + """ + item: InventoryItem! + + """ + The location associated with the inventory level. + """ + location: Location! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantities( + """ + The + [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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryLevelEdge!]! + + """ + A list of nodes that are contained in InventoryLevelEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryLevel!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryLevel and a cursor during pagination. +""" +type InventoryLevelEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryLevelEdge. + """ + node: InventoryLevel! +} + +""" +The input fields for an inventory level. +""" +input InventoryLevelInput { + """ + The available quantity of an inventory item at a location. + """ + availableQuantity: Int! + + """ + The ID of a location associated with the inventory level. + """ + locationId: ID! +} + +""" +The input fields required to move inventory quantities. +""" +input InventoryMoveQuantitiesInput { + """ + The 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryMoveQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryMoveQuantities`. +""" +type InventoryMoveQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryMoveQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryMoveQuantitiesUserError`. +""" +enum InventoryMoveQuantitiesUserErrorCode { + """ + 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 { + """ + Details about where the move will be made from. + """ + from: InventoryMoveQuantityTerminalInput! + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! + + """ + The amount by which the inventory quantity will be changed. + """ + quantity: Int! + + """ + Details about where the move will be made to. + """ + to: InventoryMoveQuantityTerminalInput! +} + +""" +The input fields representing the change to be made to an inventory item at a location. +""" +input InventoryMoveQuantityTerminalInput { + """ + The quantity to compare against before applying the move. 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! + + """ + 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 { + """ + All the quantity names. + """ + quantityNames: [InventoryQuantityName!]! +} + +""" +The `InventoryQuantity` object lets you manage and track inventory quantities for specific [states](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). +Inventory quantities represent different states of items such as available for +purchase, committed to orders, reserved for drafts, incoming from suppliers, or +set aside for quality control or safety stock. + +You can use [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel) +to manage where inventory items are stocked. You can also [make inventory adjustments](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) +to apply changes to inventory quantities. + +Inventory quantities can be managed by a merchant or by [fulfillment services](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentservice) +that handle inventory tracking. +Learn more about working with [Shopify's inventory management +system](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps). +""" +type InventoryQuantity implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory state [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + that identifies the inventory quantity. + """ + name: String! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantity: Int! + + """ + When the inventory quantity was last updated. + """ + updatedAt: DateTime +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventoryQuantityInput { + """ + The current quantity to be compared against the persisted quantity. + Explicitly passing in `null` to this field opts out of the quantity comparison check. + Explicitly passing in any value (be it `null` or an integer) to `changeFromQuantity` will cause the values + passed into the `compareQuantity` and `InventorySetQuantitiesInput.ignoreCompareQuantity` fields to be + ignored in favour of the `changeFromQuantity` value. 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 current quantity to be compared against the persisted quantity. + """ + compareQuantity: Int @deprecated(reason: "Use `changeFromQuantity` instead. This will be removed in 2026-04.") + + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +Details about an individual quantity name. +""" +type InventoryQuantityName { + """ + List of quantity names that this quantity name belongs to. + """ + belongsTo: [String!]! + + """ + List of quantity names that comprise this quantity name. + """ + comprises: [String!]! + + """ + The display name for quantity names translated into applicable language. + """ + displayName: String + + """ + Whether the quantity name has been used by the merchant. + """ + isInUse: Boolean! + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) of + the inventory quantity. Used by + [inventory queries and mutations](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#graphql-queries-and-mutations). + """ + name: String! +} + +""" +Returns the scheduled changes to inventory states related to the ledger document. +""" +type InventoryScheduledChange { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantities of an inventory item that are related to a specific location. + """ + inventoryLevel: InventoryLevel! + + """ + A freeform URI that represents what changed the inventory quantities. + """ + ledgerDocumentUri: URL! + + """ + The quantity of the scheduled change associated with the ledger document in the `fromName` state. + """ + quantity: Int! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +An auto-generated type for paginating through multiple InventoryScheduledChanges. +""" +type InventoryScheduledChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryScheduledChangeEdge!]! + + """ + A list of nodes that are contained in InventoryScheduledChangeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryScheduledChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryScheduledChange and a cursor during pagination. +""" +type InventoryScheduledChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryScheduledChangeEdge. + """ + node: InventoryScheduledChange! +} + +""" +The input fields for a scheduled change of an inventory item. +""" +input InventoryScheduledChangeInput { + """ + The date and time that the scheduled change is expected to happen. + """ + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +The input fields for the inventory item associated with the scheduled changes that need to be applied. +""" +input InventoryScheduledChangeItemInput { + """ + The ID of the inventory item. + """ + inventoryItemId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: URL! + + """ + The ID of the location. + """ + locationId: ID! + + """ + An array of all the scheduled changes for the item. + """ + scheduledChanges: [InventoryScheduledChangeInput!]! +} + +""" +The input fields required to set inventory on hand quantities. +""" +input InventorySetOnHandQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """ + The value to which the on hand quantity will be set. + """ + setQuantities: [InventorySetQuantityInput!]! +} + +""" +Return type for `inventorySetOnHandQuantities` mutation. +""" +type InventorySetOnHandQuantitiesPayload { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetOnHandQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetOnHandQuantities`. +""" +type InventorySetOnHandQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetOnHandQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetOnHandQuantitiesUserError`. +""" +enum InventorySetOnHandQuantitiesUserErrorCode { + """ + The 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 { + """ + Skip the compare quantity check in the quantities field. + """ + ignoreCompareQuantity: Boolean = false @deprecated(reason: "Instead of opting out of quantity comparison checks by passing in `ignoreCompareQuantity: true`, you can now opt out by explicitly passing in a null value to `InventoryQuantityInput.changeFromQuantity`. This field will be removed in `2026-04`.") + + """ + 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 { + """ + The group of changes made by the operation. + """ + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetQuantities`. +""" +type InventorySetQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetQuantitiesUserError`. +""" +enum InventorySetQuantitiesUserErrorCode { + """ + The 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 { + """ + The current quantity to be compared against the persisted quantity. For more + information, refer to the [Compare and Swap documentation](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap). + """ + changeFromQuantity: Int + + """ + Specifies the inventory item to which the quantity will be set. + """ + inventoryItemId: ID! + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +The input fields for setting up scheduled changes of inventory items. +""" +input InventorySetScheduledChangesInput { + """ + The list of all the items on which the scheduled changes need to be applied. + """ + items: [InventoryScheduledChangeItemInput!]! + + """ + The reason for setting up the scheduled changes. + """ + 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: URL! +} + +""" +Return type for `inventorySetScheduledChanges` mutation. +""" +type InventorySetScheduledChangesPayload { + """ + The scheduled changes that were created. + """ + scheduledChanges: [InventoryScheduledChange!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventorySetScheduledChangesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetScheduledChanges`. +""" +type InventorySetScheduledChangesUserError implements DisplayableError { + """ + The error code. + """ + code: InventorySetScheduledChangesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetScheduledChangesUserError`. +""" +enum InventorySetScheduledChangesUserErrorCode { + """ + The item can only have one scheduled change for quantity name as the fromName. + """ + DUPLICATE_FROM_NAME + + """ + The item can only have one scheduled change for quantity name as the toName. + """ + DUPLICATE_TO_NAME + + """ + There was an error updating the scheduled changes. + """ + ERROR_UPDATING_SCHEDULED + + """ + 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 field is invalid. + """ + INCLUSION + + """ + The specified fromName is invalid. + """ + INVALID_FROM_NAME + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified toName is invalid. + """ + INVALID_TO_NAME + + """ + The inventory item was not found. + """ + INVENTORY_ITEM_NOT_FOUND + + """ + The inventory item was not found at the location specified. + """ + INVENTORY_STATE_NOT_FOUND + + """ + At least 1 item must be provided. + """ + ITEMS_EMPTY + + """ + The ledger document URI is invalid. + """ + LEDGER_DOCUMENT_INVALID + + """ + The location couldn't be found. + """ + LOCATION_NOT_FOUND + + """ + The from_name and to_name can't be the same. + """ + SAME_FROM_TO_NAMES +} + +""" +Represents an inventory shipment. +""" +type InventoryShipment implements Node { + """ + The date the shipment was created in UTC. + """ + dateCreated: DateTime + + """ + The date the shipment was initially received in UTC. + """ + dateReceived: DateTime + + """ + The date the shipment was shipped in UTC. + """ + dateShipped: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The total quantity of all items in the shipment. + """ + lineItemTotalQuantity: Int! + + """ + The line items included in this shipment. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The list of added line items. + """ + addedItems: [InventoryShipmentLineItem!] + + """ + The inventory shipment with the added items. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentAddItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentAddItems`. +""" +type InventoryShipmentAddItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentAddItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentAddItemsUserError`. +""" +enum InventoryShipmentAddItemsUserErrorCode { + """ + 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 location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryShipmentEdge!]! + + """ + A list of nodes that are contained in InventoryShipmentEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryShipment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `inventoryShipmentCreateInTransit` mutation. +""" +type InventoryShipmentCreateInTransitPayload { + """ + The created inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentCreateInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentCreateInTransit`. +""" +type InventoryShipmentCreateInTransitUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentCreateInTransitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentCreateInTransitUserError`. +""" +enum InventoryShipmentCreateInTransitUserErrorCode { + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The 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 { + """ + 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! + + """ + The tracking information for the shipment. + """ + trackingInput: InventoryShipmentTrackingInput +} + +""" +Return type for `inventoryShipmentCreate` mutation. +""" +type InventoryShipmentCreatePayload { + """ + The created inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentCreate`. +""" +type InventoryShipmentCreateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentCreateUserError`. +""" +enum InventoryShipmentCreateUserErrorCode { + """ + This barcode is already assigned to another shipment. + """ + BARCODE_DUPLICATE + + """ + Barcode must be 255 characters or less. + """ + BARCODE_TOO_LONG + + """ + 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 { + """ + The ID of the inventory shipment that was deleted. + """ + id: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentDelete`. +""" +type InventoryShipmentDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentDeleteUserError`. +""" +enum InventoryShipmentDeleteUserErrorCode { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryShipmentEdge. + """ + node: InventoryShipment! +} + +""" +Represents a single line item within an inventory shipment. +""" +type InventoryShipmentLineItem implements Node { + """ + The quantity of items that were accepted in this shipment line item. + """ + acceptedQuantity: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory item associated with this line item. + """ + inventoryItem: InventoryItem + + """ + The quantity of items in this shipment line item. + """ + quantity: Int! + + """ + The quantity of items that were rejected in this shipment line item. + """ + rejectedQuantity: Int! + + """ + The total quantity of units that haven't been received (neither accepted or rejected) in this shipment line item. + """ + unreceivedQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryShipmentLineItems. +""" +type InventoryShipmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryShipmentLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryShipmentLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryShipmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryShipmentLineItem and a cursor during pagination. +""" +type InventoryShipmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryShipmentLineItemEdge. + """ + node: InventoryShipmentLineItem! +} + +""" +The input fields for a line item on an inventory shipment. +""" +input InventoryShipmentLineItemInput { + """ + The inventory item ID for the shipment line item. + """ + inventoryItemId: ID! + + """ + The quantity for the shipment line item. + """ + quantity: Int! +} + +""" +Return type for `inventoryShipmentMarkInTransit` mutation. +""" +type InventoryShipmentMarkInTransitPayload { + """ + The marked in transit inventory shipment. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentMarkInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentMarkInTransit`. +""" +type InventoryShipmentMarkInTransitUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentMarkInTransitUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentMarkInTransitUserError`. +""" +enum InventoryShipmentMarkInTransitUserErrorCode { + """ + 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 { + """ + 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! +} + +""" +The reason for receiving a line item on an inventory shipment. +""" +enum InventoryShipmentReceiveLineItemReason { + """ + The line item was accepted. + """ + ACCEPTED + + """ + The line item was rejected. + """ + REJECTED +} + +""" +Return type for `inventoryShipmentReceive` mutation. +""" +type InventoryShipmentReceivePayload { + """ + The inventory shipment with received items. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentReceiveUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentReceive`. +""" +type InventoryShipmentReceiveUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentReceiveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentReceiveUserError`. +""" +enum InventoryShipmentReceiveUserErrorCode { + """ + 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 location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +Return type for `inventoryShipmentRemoveItems` mutation. +""" +type InventoryShipmentRemoveItemsPayload { + """ + The inventory shipment with items removed. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentRemoveItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentRemoveItems`. +""" +type InventoryShipmentRemoveItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentRemoveItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentRemoveItemsUserError`. +""" +enum InventoryShipmentRemoveItemsUserErrorCode { + """ + 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 location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +Return type for `inventoryShipmentSetTracking` mutation. +""" +type InventoryShipmentSetTrackingPayload { + """ + The inventory shipment with the edited tracking info. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentSetTrackingUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentSetTracking`. +""" +type InventoryShipmentSetTrackingUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentSetTrackingUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentSetTrackingUserError`. +""" +enum InventoryShipmentSetTrackingUserErrorCode { + """ + The URL is invalid. + """ + INVALID_URL + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +The status of an inventory shipment. +""" +enum InventoryShipmentStatus { + """ + The inventory shipment has been created but not yet shipped. + """ + DRAFT + + """ + The inventory shipment is currently in transit. + """ + IN_TRANSIT + + """ + 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 { + """ + The estimated date and time that the shipment will arrive. + """ + arrivesAt: DateTime + + """ + The name of the shipping carrier company. + """ + company: String + + """ + The tracking number used by the carrier to identify the shipment. + """ + trackingNumber: String + + """ + The URL to track the shipment. + + Given a tracking number and a shipping carrier company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company), + Shopify will return a generated tracking URL if no tracking URL was set manually. + """ + trackingUrl: URL +} + +""" +The input fields for an inventory shipment's tracking information. +""" +input InventoryShipmentTrackingInput { + """ + The 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 { + """ + The quantity for the shipment line item. + """ + quantity: Int! + + """ + The ID for the inventory shipment line item. + """ + shipmentLineItemId: ID! +} + +""" +Return type for `inventoryShipmentUpdateItemQuantities` mutation. +""" +type InventoryShipmentUpdateItemQuantitiesPayload { + """ + The inventory shipment with updated item quantities. + """ + shipment: InventoryShipment + + """ + The updated item quantities. + """ + updatedLineItems: [InventoryShipmentLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentUpdateItemQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentUpdateItemQuantities`. +""" +type InventoryShipmentUpdateItemQuantitiesUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryShipmentUpdateItemQuantitiesUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentUpdateItemQuantitiesUserError`. +""" +enum InventoryShipmentUpdateItemQuantitiesUserErrorCode { + """ + The 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 location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + 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 { + """ + 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 + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/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( + """ + 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 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 { + """ + The cancelled inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCancelUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCancel`. +""" +type InventoryTransferCancelUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCancelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCancelUserError`. +""" +enum InventoryTransferCancelUserErrorCode { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferEdge!]! + + """ + A list of nodes that are contained in InventoryTransferEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryTransfer!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create an inventory transfer. +""" +input InventoryTransferCreateAsReadyToShipInput { + """ + The 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 + + """ + 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 + + """ + 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 { + """ + The created inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCreateAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreateAsReadyToShip`. +""" +type InventoryTransferCreateAsReadyToShipUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCreateAsReadyToShipUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateAsReadyToShipUserError`. +""" +enum InventoryTransferCreateAsReadyToShipUserErrorCode { + """ + 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 { + """ + 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 + + """ + 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 + + """ + 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 { + """ + The created inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferCreateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreate`. +""" +type InventoryTransferCreateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateUserError`. +""" +enum InventoryTransferCreateUserErrorCode { + """ + 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 { + """ + The ID of the deleted inventory transfer. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDelete`. +""" +type InventoryTransferDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDeleteUserError`. +""" +enum InventoryTransferDeleteUserErrorCode { + """ + 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 { + """ + The duplicated inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferDuplicateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDuplicate`. +""" +type InventoryTransferDuplicateUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferDuplicateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDuplicateUserError`. +""" +enum InventoryTransferDuplicateUserErrorCode { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryTransferEdge. + """ + node: InventoryTransfer! +} + +""" +The input fields to edit an inventory transfer. +""" +input InventoryTransferEditInput { + """ + The 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 + + """ + 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 + + """ + 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 { + """ + The edited inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferEditUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferEdit`. +""" +type InventoryTransferEditUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferEditUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferEditUserError`. +""" +enum InventoryTransferEditUserErrorCode { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The inventory item associated with this line item. + """ + inventoryItem: InventoryItem + + """ + The quantity of the item that has been picked for a draft shipment but not yet shipped. + """ + pickedForShipmentQuantity: Int! + + """ + The quantity of the item that can be actioned upon, such as editing the item + quantity on the transfer or adding to a shipment. + """ + processableQuantity: Int! + + """ + The quantity of the item that can be shipped. + """ + shippableQuantity: Int! + + """ + The quantity of the item that has been shipped. + """ + shippedQuantity: Int! + + """ + The title of the product associated with this line item. + """ + title: String + + """ + The total quantity of items being transferred. + """ + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryTransferLineItems. +""" +type InventoryTransferLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryTransferLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryTransferLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryTransferLineItem and a cursor during pagination. +""" +type InventoryTransferLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of InventoryTransferLineItemEdge. + """ + node: InventoryTransferLineItem! +} + +""" +The input fields for a line item on an inventory transfer. +""" +input InventoryTransferLineItemInput { + """ + The inventory item ID for the transfer line item. + """ + inventoryItemId: ID! + + """ + The quantity for the transfer line item. + """ + quantity: Int! +} + +""" +Represents an update to a single transfer line item. +""" +type InventoryTransferLineItemUpdate { + """ + The delta quantity for the transfer line item. + """ + deltaQuantity: Int + + """ + The inventory item ID for the transfer line item. + """ + inventoryItemId: ID + + """ + The new quantity for the transfer line item. + """ + newQuantity: Int +} + +""" +Return type for `inventoryTransferMarkAsReadyToShip` mutation. +""" +type InventoryTransferMarkAsReadyToShipPayload { + """ + The ready to ship inventory transfer. + """ + inventoryTransfer: InventoryTransfer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferMarkAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferMarkAsReadyToShip`. +""" +type InventoryTransferMarkAsReadyToShipUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferMarkAsReadyToShipUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferMarkAsReadyToShipUserError`. +""" +enum InventoryTransferMarkAsReadyToShipUserErrorCode { + """ + 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 { + """ + The ID of the inventory transfer where the items will be removed. + """ + id: ID! + + """ + The IDs of the transfer line items to be removed from the transfer. + """ + transferLineItemIds: [ID!] +} + +""" +Return type for `inventoryTransferRemoveItems` mutation. +""" +type InventoryTransferRemoveItemsPayload { + """ + The transfer with line items removed. + """ + inventoryTransfer: InventoryTransfer + + """ + The line items that have had their shippable quantity removed. + """ + removedQuantities: [InventoryTransferLineItemUpdate!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferRemoveItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferRemoveItems`. +""" +type InventoryTransferRemoveItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferRemoveItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferRemoveItemsUserError`. +""" +enum InventoryTransferRemoveItemsUserErrorCode { + """ + The item cannot have its shippable quantity removed if all of its quantity is fully allocated in one or more shipments. + """ + ALL_QUANTITY_SHIPPED + + """ + A ready to ship transfer must have at least one item. + """ + 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 item cannot be removed because it exists in a draft shipment with zero quantity. + """ + 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 { + """ + The ID of the inventory transfer where the items will be set. + """ + id: ID! + + """ + The line items to be set on the Transfer. + """ + lineItems: [InventoryTransferLineItemInput!]! +} + +""" +Return type for `inventoryTransferSetItems` mutation. +""" +type InventoryTransferSetItemsPayload { + """ + The Transfer with its line items updated. + """ + inventoryTransfer: InventoryTransfer + + """ + The updated line items. + """ + updatedLineItems: [InventoryTransferLineItemUpdate!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryTransferSetItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferSetItems`. +""" +type InventoryTransferSetItemsUserError implements DisplayableError { + """ + The error code. + """ + code: InventoryTransferSetItemsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferSetItemsUserError`. +""" +enum InventoryTransferSetItemsUserErrorCode { + """ + 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 { + """ + 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 { + """ + The total monetary value to be invoiced in shop and presentment currencies. + """ + amount: MoneyBag! +} + +""" +A [JSON](https://www.json.org/json-en.html) object. + +Example value: +`{ + "product": { + "id": "gid://shopify/Product/1346443542550", + "title": "White T-shirt", + "options": [{ + "name": "Size", + "values": ["M", "L"] + }] + } +}` +""" +scalar JSON + +""" +A job corresponds to some long running task that the client should poll for status. +""" +type Job { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! + + """ + This field will only resolve once the job is done. Can be used to ask for object(s) that have been changed by the job. + """ + query: QueryRoot +} + +""" +A job corresponds to some long running task that the client should poll for status. +""" +interface JobResult { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +Language codes supported by Shopify. +""" +enum LanguageCode { + """ + Afrikaans. + """ + AF + + """ + Akan. + """ + AK + + """ + Amharic. + """ + AM + + """ + Arabic. + """ + AR + + """ + Assamese. + """ + AS + + """ + Azerbaijani. + """ + AZ + + """ + Belarusian. + """ + BE + + """ + Bulgarian. + """ + BG + + """ + Bambara. + """ + BM + + """ + Bangla. + """ + BN + + """ + Tibetan. + """ + BO + + """ + Breton. + """ + BR + + """ + Bosnian. + """ + BS + + """ + Catalan. + """ + CA + + """ + Chechen. + """ + CE + + """ + Central Kurdish. + """ + CKB + + """ + Czech. + """ + CS + + """ + 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 +} + +""" +Interoperability metadata for types that directly correspond to a REST Admin API resource. +For example, on the Product type, LegacyInteroperability returns metadata for +the corresponding [Product +object](https://shopify.dev/api/admin-graphql/latest/objects/product) in the +REST Admin API. +""" +interface LegacyInteroperability { + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! +} + +""" +Units of measurement for length. +""" +enum LengthUnit { + """ + 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 { + """ + This is set when the number of pending orders has reached the maximum. + """ + atMax: Boolean! + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + count: Int! +} + +""" +The `LineItem` object represents a single product or service that a customer purchased in an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). +Each line item is associated with a +[product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +and can have multiple [discount allocations](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAllocation). +Line items contain details about what was purchased, including the product variant, quantity, pricing, +and fulfillment status. + +Use the `LineItem` object to manage the following processes: + +- [Track the quantity of items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions) +ordered, fulfilled, and unfulfilled. +- [Calculate prices](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders), including discounts and taxes. +- Manage fulfillment through [fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps). +- Manage [returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) and [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges). +- Handle [subscriptions](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) and recurring orders. + +Line items can also include custom attributes and properties, allowing merchants to add specific details +about each item in an order. Learn more about +[managing orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type LineItem implements Node { + """ + Whether the line item can be restocked. + """ + canRestock: Boolean! @deprecated(reason: "Use `restockable` instead.") + + """ + The subscription contract associated with this line item. + """ + contract: SubscriptionContract + + """ + The number of units ordered, excluding refunded and removed units. + """ + currentQuantity: Int! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated to the line item by discount + applications, including discounts allocated to refunded and removed quantities. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total discounted price of the line item in shop currency, including + refunded and removed quantities. This value doesn't include order-level discounts. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total discounted price of the line item in shop and presentment + currencies, including refunded and removed quantities. This value doesn't + include order-level discounts. Code-based discounts aren't included by default. + """ + discountedTotalSet( + """ + Whether to include code-based discounts in the total. + """ + withCodeDiscounts: Boolean = false + ): MoneyBag! + + """ + The approximate unit price of the line item in shop currency. This value + includes line-level discounts and discounts applied to refunded and removed + quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `discountedUnitPriceSet` instead.") + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes discounts applied to refunded and removed quantities. + """ + discountedUnitPriceAfterAllDiscountsSet: MoneyBag! + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes line-level discounts and discounts applied to + refunded and removed quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The duties associated with the line item. + """ + duties: [Duty!]! + + """ + The total number of units to fulfill. + """ + fulfillableQuantity: Int! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/objects\/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead.") + + """ + The fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) + is a third-party fulfillment service. Third-party fulfillment services don't + have a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was awaiting + fulfillment by a third-party fulfillment service. Third-party fulfillment + services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: FulfillmentService @deprecated(reason: "\nThe [relationship between a product variant and a fulfillment service was changed](\/changelog\/fulfillment-service-sku-sharing). A [ProductVariant](\/api\/admin-graphql\/latest\/objects\/ProductVariant) can be stocked by multiple fulfillment services. As a result, we recommend that you use the [inventoryItem field](\/api\/admin-graphql\/latest\/objects\/ProductVariant#field-productvariant-inventoryitem) if you need to determine where a product variant is stocked.\n\nIf you need to determine whether a product is a gift card, then you should continue to use this field until an alternative is available.\n\nAltering the locations which stock a product variant won't change the value of this field for existing orders.\n\nLearn about [managing inventory quantities and states](\/apps\/fulfillment\/inventory-management-apps\/quantities-states).\n") + + """ + The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, + 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. + """ + fulfillmentStatus: String! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https:\/\/shopify.dev\/api\/admin-graphql\/latest\/objects\/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated to the line item's variant. + """ + image( + """ + 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 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 +} + +""" +An auto-generated type for paginating through multiple LineItems. +""" +type LineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LineItemEdge!]! + + """ + A list of nodes that are contained in LineItemEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LineItem and a cursor during pagination. +""" +type LineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LineItemEdge. + """ + node: LineItem! +} + +""" +The information for [line +items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) that +are part of a bundle. When a bundle is purchased, each component line item references its [`LineItemGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItemGroup) through the [`lineItemGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem#field-lineItemGroup) +field to maintain the relationship with the bundle. + +The parent bundle's product, variant, and custom attributes enable apps to group +and display bundle components in order management systems, transactional emails, +and other contexts where understanding the bundle structure is needed. + +Learn more about [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). +""" +type LineItemGroup implements Node { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + ID of the product of the line item group. + """ + productId: ID + + """ + Quantity of the line item group on the order. + """ + quantity: Int! + + """ + Title of the line item group. + """ + title: String! + + """ + ID of the variant of the line item group. + """ + variantId: ID + + """ + SKU of the variant of the line item group. + """ + variantSku: String +} + +""" +Represents the selling plan for a line item. +""" +type LineItemSellingPlan { + """ + The name of the selling plan for display purposes. + """ + name: String! + + """ + The ID of the selling plan associated with the line item. + """ + sellingPlanId: ID +} + +""" +A link to direct users to. +""" +type Link implements HasPublishedTranslations { + """ + A context-sensitive label for the link. + """ + label: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The URL that the link visits. + """ + url: URL! +} + +""" +The identifier for the metafield linked to this option. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) +for more details. +""" +type LinkedMetafield { + """ + Key of the metafield the option is linked to. + """ + key: String + + """ + Namespace of the metafield the option is linked to. + """ + namespace: String +} + +""" +The input fields required to link a product option to a metafield. +""" +input LinkedMetafieldCreateInput { + """ + The 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 { + """ + 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 { + """ + 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 { + """ + The descriptor by the payment provider. Only available for Amazon Pay and Buy with Prime. + """ + paymentDescriptor: String + + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +A locale. +""" +type Locale { + """ + Locale ISO code. + """ + isoCode: String! + + """ + Human-readable locale name. + """ + name: String! +} + +""" +Specifies the type of the underlying localizable content. This can be used to +conditionally render different UI elements such as input fields. +""" +enum LocalizableContentType { + """ + A 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 { + """ + Country ISO 3166-1 alpha-2 code. + """ + countryCode: CountryCode! + + """ + The localized extension keys that are allowed. + """ + key: LocalizationExtensionKey! + + """ + The purpose of this localization extension. + """ + purpose: LocalizationExtensionPurpose! + + """ + The localized extension title. + """ + title: String! + + """ + The value of the field. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizationExtensions. +""" +type LocalizationExtensionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizationExtensionEdge!]! + + """ + A list of nodes that are contained in LocalizationExtensionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LocalizationExtension!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizationExtension and a cursor during pagination. +""" +type LocalizationExtensionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocalizationExtensionEdge. + """ + node: LocalizationExtension! +} + +""" +The input fields for a LocalizationExtensionInput. +""" +input LocalizationExtensionInput { + """ + The key for the localization extension. + """ + key: LocalizationExtensionKey! + + """ + The localization extension value. + """ + value: String! +} + +""" +The key of a localization extension. +""" +enum LocalizationExtensionKey { + """ + Extension key '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 { + """ + Extensions that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """ + Extensions that are used for taxes purposes, for example, invoicing. + """ + TAX +} + +""" +Represents the value captured by a localized field. Localized fields are +additional fields required by certain countries on international orders. For +example, some countries require additional fields for customs information or tax +identification numbers. +""" +type LocalizedField { + """ + Country ISO 3166-1 alpha-2 code. + """ + countryCode: CountryCode! + + """ + The localized field keys that are allowed. + """ + key: LocalizedFieldKey! + + """ + The purpose of this localized field. + """ + purpose: LocalizedFieldPurpose! + + """ + The localized field title. + """ + title: String! + + """ + The value of the field. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizedFields. +""" +type LocalizedFieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizedFieldEdge!]! + + """ + A list of nodes that are contained in LocalizedFieldEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LocalizedField!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizedField and a cursor during pagination. +""" +type LocalizedFieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocalizedFieldEdge. + """ + node: LocalizedField! +} + +""" +The input fields for a LocalizedFieldInput. +""" +input LocalizedFieldInput { + """ + The key for the localized field. + """ + key: LocalizedFieldKey! + + """ + The localized field value. + """ + value: String! +} + +""" +The key of a localized field. +""" +enum LocalizedFieldKey { + """ + Localized field key '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 { + """ + Fields that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """ + Fields that are used for taxes purposes, for example, invoicing. + """ + TAX +} + +""" +A physical location where merchants store and fulfill inventory. Locations +include retail stores, warehouses, popups, dropshippers, or other places where +inventory is managed or stocked. + +Active locations can fulfill online orders when configured with shipping rates, +local pickup, or local delivery options. Locations track inventory quantities for +[products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and +process [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +fulfillment. Third-party apps using [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) +can create and manage their own locations. +""" +type Location implements HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + Whether the location can be reactivated. If `false`, then trying to activate the location with the + [`LocationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation will return an error that describes why the location can't be activated. + """ + activatable: Boolean! + + """ + The address of this location. + """ + address: LocationAddress! + + """ + Whether the location address has been verified. + """ + addressVerified: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. + """ + createdAt: DateTime! + + """ + Whether this location can be deactivated. If `true`, then the location can be deactivated by calling the + [`LocationDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationDeactivate) + mutation. If `false`, then calling the mutation to deactivate it will return an error that describes why the + location can't be deactivated. + """ + deactivatable: Boolean! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + that the location was deactivated at. For example, 3:30 pm on September 7, + 2019 in the time zone of UTC (Universal Time Coordinated) is represented as + `"2019-09-07T15:50:00Z`". + """ + deactivatedAt: String + + """ + Whether this location can be deleted. + """ + deletable: Boolean! + + """ + Name of the service provider that fulfills from this location. + """ + fulfillmentService: FulfillmentService + + """ + Whether this location can fulfill online orders. + """ + fulfillsOnlineOrders: Boolean! + + """ + Whether this location has active inventory. + """ + hasActiveInventory: Boolean! + + """ + Whether this location has orders that need to be fulfilled. + """ + hasUnfulfilledOrders: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantities of an inventory item at this location. + """ + inventoryLevel( + """ + The ID of the inventory item to obtain the inventory level for. + """ + inventoryItemId: ID! + ): InventoryLevel + + """ + A list of the quantities of the inventory items that can be stocked at this location. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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! + + """ + Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has + `activatable` set to `true` by calling the + [`locationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation. + """ + isActive: Boolean! + + """ + Whether this location is a fulfillment service. + """ + isFulfillmentService: Boolean! + + """ + Whether the location is your primary location for shipping inventory. + """ + isPrimary: Boolean! @deprecated(reason: "The concept of a primary location is deprecated, shipsInventory can be used to get a fallback location") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + Local pickup settings for the location. + """ + localPickupSettingsV2: DeliveryLocalPickupSettings + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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 name of the location. + """ + name: String! + + """ + Legacy field indicating this location was designated for shipping. All locations with valid addresses can now ship. + """ + shipsInventory: Boolean! + + """ + List of suggested addresses for this location (empty if none). + """ + suggestedAddresses: [LocationSuggestedAddress!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `locationActivate` mutation. +""" +type LocationActivatePayload { + """ + The location that was activated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationActivateUserErrors: [LocationActivateUserError!]! +} + +""" +An error that occurs while activating a location. +""" +type LocationActivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationActivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationActivateUserError`. +""" +enum LocationActivateUserErrorCode { + """ + An error occurred while activating the location. + """ + GENERIC_ERROR + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The location that was added. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationAddUserError!]! +} + +""" +An error that occurs while adding a location. +""" +type LocationAddUserError implements DisplayableError { + """ + The error code. + """ + code: LocationAddUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationAddUserError`. +""" +enum LocationAddUserErrorCode { + """ + 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 { + """ + The first line of the address for the location. + """ + address1: String + + """ + The second line of the address for the location. + """ + address2: String + + """ + The city of the location. + """ + city: String + + """ + The country of the location. + """ + country: String + + """ + The country code of the location. + """ + countryCode: String + + """ + A formatted version of the address for the location. + """ + formatted: [String!]! + + """ + The approximate latitude coordinates of the location. + """ + latitude: Float + + """ + The approximate longitude coordinates of the location. + """ + longitude: Float + + """ + The phone number of the location. + """ + phone: String + + """ + The province of the location. + """ + province: String + + """ + The code for the province, state, or district of the address of the location. + """ + provinceCode: String + + """ + The ZIP code of the location. + """ + zip: String +} + +""" +An auto-generated type for paginating through multiple Locations. +""" +type LocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocationEdge!]! + + """ + A list of nodes that are contained in LocationEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Location!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `locationDeactivate` mutation. +""" +type LocationDeactivatePayload { + """ + The location that was deactivated. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeactivateUserErrors: [LocationDeactivateUserError!]! +} + +""" +The possible errors that can be returned when executing the `locationDeactivate` mutation. +""" +type LocationDeactivateUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeactivateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeactivateUserError`. +""" +enum LocationDeactivateUserErrorCode { + """ + 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 Shopify Fulfillment Network transfers. + """ + HAS_INCOMING_MOVEMENTS_ERROR + + """ + 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 { + """ + The ID of the location that was deleted. + """ + deletedLocationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + locationDeleteUserErrors: [LocationDeleteUserError!]! +} + +""" +An error that occurs while deleting a location. +""" +type LocationDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: LocationDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeleteUserError`. +""" +enum LocationDeleteUserErrorCode { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of LocationEdge. + """ + node: Location! +} + +""" +The input fields to use to edit the address of a location. +""" +input LocationEditAddressInput { + """ + The first line of the address. + """ + address1: String + + """ + The second line of the address. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The 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 { + """ + 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 { + """ + The location that was edited. + """ + location: Location + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [LocationEditUserError!]! +} + +""" +An error that occurs while editing a location. +""" +type LocationEditUserError implements DisplayableError { + """ + The error code. + """ + code: LocationEditUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `LocationEditUserError`. +""" +enum LocationEditUserErrorCode { + """ + 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 { + """ + 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 { + """ + The ID of the location for which local pickup was disabled. + """ + locationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +Return type for `locationLocalPickupEnable` mutation. +""" +type LocationLocalPickupEnablePayload { + """ + The local pickup settings that were enabled. + """ + localPickupSettings: DeliveryLocalPickupSettings + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +""" +A snapshot of location details including name and address captured at a specific +point in time. Refer to the parent model to know the lifecycle. +""" +type LocationSnapshot { + """ + The address details of the location as they were when the snapshot was recorded. + """ + address: LocationAddress! + + """ + A reference to the live Location object, if it still exists and is accessible. + This provides current details of the location, which may differ from the + snapshotted name and address. + """ + location: Location + + """ + The name of the location as it was when the snapshot was recorded. + """ + name: String! + + """ + The date and time when these snapshot details (name and address) were recorded. + """ + snapshottedAt: DateTime! +} + +""" +The set of valid sort keys for the Location query. +""" +enum LocationSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +Represents a suggested address for a location. +""" +type LocationSuggestedAddress { + """ + The first line of the suggested address. + """ + address1: String + + """ + The second line of the suggested address. + """ + address2: String + + """ + The city of the suggested address. + """ + city: String + + """ + The country of the suggested address. + """ + country: String + + """ + The country code of the suggested address. + """ + countryCode: CountryCode + + """ + A formatted version of the suggested address. + """ + formatted: [String!]! + + """ + The province of the suggested address. + """ + province: String + + """ + The code for the province, state, or district of the suggested address. + """ + provinceCode: String + + """ + The ZIP code of the suggested address. + """ + zip: String +} + +""" +A condition checking the location that the visitor is shopping from. +""" +type LocationsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The locations that comprise the market. + """ + locations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! +} + +""" +A physical mailing address. For example, a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s +default address and an +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order)'s +billing address are both mailing addresses. Stores standard address components, +customer name information, and company details. + +The address includes geographic coordinates ([`latitude`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.latitude) and [`longitude`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.longitude)). +You can format addresses for display using the [`formatted`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.formatted) +field with options to include or exclude name and company information. +""" +type MailingAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + Whether the address corresponds to recognized latitude and longitude values. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name of the customer. + """ + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """ + Whether to include the customer's company in the formatted address. + """ + withCompany: Boolean = true + + """ + Whether to include the customer's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer. + """ + lastName: String + + """ + The latitude coordinate of the customer address. + """ + latitude: Float + + """ + The longitude coordinate of the customer address. + """ + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String + + """ + A unique phone number for the customer. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The time zone of the address. + """ + timeZone: String + + """ + The validation status that 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 +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. +""" +type MailingAddressConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MailingAddressEdge!]! + + """ + A list of nodes that are contained in MailingAddressEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MailingAddress!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MailingAddress and a cursor during pagination. +""" +type MailingAddressEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MailingAddressEdge. + """ + node: MailingAddress! +} + +""" +The input fields to create or update a mailing address. +""" +input MailingAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String @deprecated(reason: "Use `countryCode` instead.") + + """ + The two-letter code for the country of the address. + """ + countryCode: CountryCode + + """ + The first name of the customer. + """ + firstName: String + id: ID @deprecated(reason: "Not needed for 90% of mutations, and provided separately where it is needed.") + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String @deprecated(reason: "Use `provinceCode` instead.") + + """ + The code for the region of the address, such as the province, state, or district. + For example QC for Quebec, Canada. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +Highest level of validation concerns identified for the address. +""" +enum MailingAddressValidationResult { + """ + Indicates that the address has been validated and 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 { + """ + 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 { + """ + 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 market is a group of one or more regions that you want to target for international sales. +By creating a market, you can configure a distinct, localized shopping experience for +customers from a specific area of the world. For example, you can +[change currency](https://shopify.dev/api/admin-graphql/current/mutations/marketCurrencySettingsUpdate), +[configure international pricing](https://shopify.dev/apps/internationalization/product-price-lists), +or [add market-specific domains or subfolders](https://shopify.dev/api/admin-graphql/current/objects/MarketWebPresence). +""" +type Market implements HasMetafieldDefinitions & HasMetafields & Node { + """ + Whether the market has a customization with the given ID. + """ + assignedCustomization( + """ + The ID of the customization that the market has been assigned to. + """ + customizationId: ID! + ): Boolean! + + """ + The catalogs that belong to the market. + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 conditions under which a visitor is in the market. + """ + conditions: MarketConditions + + """ + The market’s currency settings. + """ + currencySettings: MarketCurrencySettings + + """ + Whether the market is enabled to receive visitors and sales. **Note**: Regions in inactive + markets can't be selected on the storefront or in checkout. + """ + enabled: Boolean! @deprecated(reason: "Use `status` instead.") + + """ + A short, human-readable unique identifier for the market. This is changeable by the merchant. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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 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 { + """ + 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 + + """ + Most recent catalog operations. + """ + operations: [ResourceOperation!]! + + """ + The price list associated with the catalog. + """ + priceList: PriceList + + """ + A group of products and collections that's published to a catalog. + """ + publication: Publication + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple MarketCatalogs. +""" +type MarketCatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketCatalogEdge!]! + + """ + A list of nodes that are contained in MarketCatalogEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketCatalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketCatalog and a cursor during pagination. +""" +type MarketCatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketCatalogEdge. + """ + node: MarketCatalog! +} + +""" +The application level for a market condition. +""" +enum MarketConditionApplicationType { + """ + The condition matches 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 { + """ + 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 { + """ + The company location conditions that determine whether a visitor is in the market. + """ + companyLocationsCondition: CompanyLocationsCondition + + """ + The set of condition types that are defined for the market. + """ + conditionTypes: [MarketConditionType!]! + + """ + The retail location conditions that determine whether a visitor is in the market. + """ + locationsCondition: LocationsCondition + + """ + The region conditions that determine whether a visitor is in the market. + """ + regionsCondition: RegionsCondition +} + +""" +The input fields required to create or update a company location market condition. +""" +input MarketConditionsCompanyLocationsInput @oneOf { + """ + A 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!] +} + +""" +The input fields required to create or update the market conditions. +""" +input MarketConditionsInput { + """ + The company locations to include in the market conditions. + """ + companyLocationsCondition: MarketConditionsCompanyLocationsInput + + """ + The locations to include in the market conditions. + """ + locationsCondition: MarketConditionsLocationsInput + + """ + The regions to include in the market conditions. + """ + regionsCondition: MarketConditionsRegionsInput +} + +""" +The input fields required to create or update a location market condition. +""" +input MarketConditionsLocationsInput @oneOf { + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType + + """ + A list of location IDs to include in the market condition. + """ + locationIds: [ID!] +} + +""" +The input fields to specify a region condition. +""" +input MarketConditionsRegionInput { + """ + A country code to which this condition should apply. + """ + countryCode: CountryCode! +} + +""" +The input fields required to create or update a region market condition. +""" +input MarketConditionsRegionsInput @oneOf { + """ + A 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!] + + """ + A list of market regions to include in the market condition. + """ + regions: [MarketConditionsRegionInput!] +} + +""" +The input fields required to update a market condition. +""" +input MarketConditionsUpdateInput { + """ + The conditions to update to the market condition. + """ + conditionsToAdd: MarketConditionsInput + + """ + The conditions to delete from the market condition. + """ + conditionsToDelete: MarketConditionsInput +} + +""" +An auto-generated type for paginating through multiple Markets. +""" +type MarketConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketEdge!]! + + """ + A list of nodes that are contained in MarketEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Market!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields required to create a market. +""" +input MarketCreateInput { + """ + Catalog IDs to include in the market. + """ + catalogs: [ID!] + + """ + The conditions that apply to the market. + """ + conditions: MarketConditionsInput + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + 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!] +} + +""" +Return type for `marketCreate` mutation. +""" +type MarketCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +A market's currency settings. +""" +type MarketCurrencySettings { + """ + The currency which this market's customers must use if local currencies are disabled. + """ + baseCurrency: CurrencySetting! + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean! + + """ + Whether or not rounding is enabled on multi-currency prices. + """ + roundingEnabled: Boolean! +} + +""" +The input fields used to update the currency settings of a market. +""" +input MarketCurrencySettingsUpdateInput { + """ + The currency which this market’s customers must use if local currencies are disabled. + """ + baseCurrency: CurrencyCode + + """ + The manual exchange rate that will be used to convert shop currency prices. If + null, then the automatic exchange rates will be used. + """ + baseCurrencyManualRate: Decimal + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean + + """ + Whether or not rounding is enabled on multi-currency prices. + """ + roundingEnabled: Boolean +} + +""" +Return type for `marketCurrencySettingsUpdate` mutation. +""" +type MarketCurrencySettingsUpdatePayload { + """ + The market object. + """ + market: Market @deprecated(reason: "Use `marketCreate` and `marketUpdate` mutations instead.") + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketCurrencySettingsUserError!]! +} + +""" +Error codes for failed market multi-currency operations. +""" +type MarketCurrencySettingsUserError implements DisplayableError { + """ + The error code. + """ + code: MarketCurrencySettingsUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketCurrencySettingsUserError`. +""" +enum MarketCurrencySettingsUserErrorCode { + """ + The 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 { + """ + The ID of the deleted market. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one Market and a cursor during pagination. +""" +type MarketEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketEdge. + """ + node: Market! +} + +""" +The market localizable content of a resource's field. +""" +type MarketLocalizableContent { + """ + The hash digest representation of the content value. + """ + digest: String + + """ + The resource field that's being localized. + """ + key: String! + + """ + The content value. + """ + value: String +} + +""" +A resource that has market localizable fields. +""" +type MarketLocalizableResource { + """ + The market localizable content. + """ + marketLocalizableContent: [MarketLocalizableContent!]! + + """ + Market localizations for the market localizable content. + """ + marketLocalizations( + """ + Filters market localizations by market ID. + """ + marketId: ID! + ): [MarketLocalization!]! + + """ + The GID of the resource. + """ + resourceId: ID! +} + +""" +An auto-generated type for paginating through multiple MarketLocalizableResources. +""" +type MarketLocalizableResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketLocalizableResourceEdge!]! + + """ + A list of nodes that are contained in MarketLocalizableResourceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MarketLocalizableResource!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketLocalizableResource and a cursor during pagination. +""" +type MarketLocalizableResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketLocalizableResourceEdge. + """ + node: MarketLocalizableResource! +} + +""" +The type of resources that are market localizable. +""" +enum MarketLocalizableResourceType { + """ + A metafield. Market localizable fields: `value`. + """ + METAFIELD + + """ + A Metaobject. Market Localizable fields are determined by the Metaobject type. + """ + METAOBJECT +} + +""" +The market localization of a field within a resource, which is determined by the market ID. +""" +type MarketLocalization { + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """ + The market that the localization is specific to. + """ + market: Market! + + """ + Whether the original content has changed since this market localization was updated. + """ + outdated: Boolean! + + """ + The date and time when the market localization was updated. + """ + updatedAt: DateTime + + """ + The value of the market localization. + """ + value: String +} + +""" +The input fields and values for creating or updating a market localization. +""" +input MarketLocalizationRegisterInput { + """ + 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! + + """ + 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 { + """ + The market localizations that were created or updated. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +Return type for `marketLocalizationsRemove` mutation. +""" +type MarketLocalizationsRemovePayload { + """ + The market localizations that were deleted. + """ + marketLocalizations: [MarketLocalization!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +The inclusive pricing strategy for a market. +""" +type MarketPriceInclusions { + """ + The inclusive duties pricing strategy of the market. This determines if prices include duties. + """ + inclusiveDutiesPricingStrategy: InclusiveDutiesPricingStrategy! + + """ + The inclusive tax pricing strategy of the market. This determines if prices include taxes. + """ + inclusiveTaxPricingStrategy: InclusiveTaxPricingStrategy! +} + +""" +The input fields used to create a price inclusion. +""" +input MarketPriceInclusionsInput { + """ + The inclusive duties pricing strategy for the market. + """ + dutiesPricingStrategy: InclusiveDutiesPricingStrategy + + """ + The inclusive tax pricing strategy for the market. + """ + taxPricingStrategy: InclusiveTaxPricingStrategy +} + +""" +A geographic region which comprises a market. +""" +interface MarketRegion { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple MarketRegions. +""" +type MarketRegionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketRegionEdge!]! + + """ + A list of nodes that are contained in MarketRegionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketRegion!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A country which comprises a market. +""" +type MarketRegionCountry implements MarketRegion & Node { + """ + The ISO code identifying the country. + """ + code: CountryCode! + + """ + The currency which this country uses given its market settings. + """ + currency: CurrencySetting! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +The input fields for creating a market region with exactly one required option. +""" +input MarketRegionCreateInput { + """ + A country code for the region. + """ + countryCode: CountryCode! +} + +""" +Return type for `marketRegionDelete` mutation. +""" +type MarketRegionDeletePayload { + """ + The ID of the deleted market region. + """ + deletedId: ID + + """ + The parent market object of the deleted region. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketRegion and a cursor during pagination. +""" +type MarketRegionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketRegionEdge. + """ + node: MarketRegion! +} + +""" +Return type for `marketRegionsCreate` mutation. +""" +type MarketRegionsCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketRegionsDelete` mutation. +""" +type MarketRegionsDeletePayload { + """ + The ID of the deleted market region. + """ + deletedIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +The possible market statuses. +""" +enum MarketStatus { + """ + The market is active. + """ + ACTIVE + + """ + The market is in draft. + """ + DRAFT +} + +""" +The market types. +""" +enum MarketType { + """ + The market 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 { + """ + Catalog IDs to include in the market. + """ + catalogsToAdd: [ID!] + + """ + Catalog IDs to remove from the market. + """ + catalogsToDelete: [ID!] + + """ + The conditions to update. + """ + conditions: MarketConditionsUpdateInput + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + 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!] + + """ + The web presences to remove from the market. + """ + webPresencesToDelete: [ID!] +} + +""" +Return type for `marketUpdate` mutation. +""" +type MarketUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Defines errors encountered while managing a Market. +""" +type MarketUserError implements DisplayableError { + """ + The error code. + """ + code: MarketUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketUserError`. +""" +enum MarketUserErrorCode { + """ + B2B markets must be merchant managed. + """ + B2B_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + The input value is blank. + """ + BLANK + + """ + 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 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 + + """ + 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 + + """ + 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 + + """ + 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 market region wasn't found. + """ + REGION_NOT_FOUND + + """ + 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 { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketWebPresenceEdge!]! + + """ + A list of nodes that are contained in MarketWebPresenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketWebPresence!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields used to create a web presence for a market. +""" +input MarketWebPresenceCreateInput { + """ + The 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 + + """ + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceCreate` mutation. +""" +type MarketWebPresenceCreatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketWebPresenceDelete` mutation. +""" +type MarketWebPresenceDeletePayload { + """ + The ID of the deleted web presence. + """ + deletedId: ID + + """ + The market for which the web presence was deleted. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketWebPresence and a cursor during pagination. +""" +type MarketWebPresenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketWebPresenceEdge. + """ + node: MarketWebPresence! +} + +""" +The URL for the homepage of the online store in the context of a particular market and a +particular locale. +""" +type MarketWebPresenceRootUrl { + """ + The locale that the storefront loads in. + """ + locale: String! + + """ + The URL. + """ + url: URL! +} + +""" +The input fields used to update a web presence for a market. +""" +input MarketWebPresenceUpdateInput { + """ + The 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 + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be null if `domainId` is not null. + """ + subfolderSuffix: String +} + +""" +Return type for `marketWebPresenceUpdate` mutation. +""" +type MarketWebPresenceUpdatePayload { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketingActivitiesDeleteAllExternal` mutation. +""" +type MarketingActivitiesDeleteAllExternalPayload { + """ + The asynchronous job that performs the deletion. The status of the job may be + used to determine when it's safe again to create new activities. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The marketing activity resource represents marketing that a + merchant created through an app. +""" +type MarketingActivity implements Node { + """ + The URL of the marketing activity listing page in the marketing section. + """ + activityListUrl: URL + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyV2 + + """ + The app which created this marketing activity. + """ + app: App! + + """ + The errors generated when an app publishes the marketing activity. + """ + appErrors: MarketingActivityExtensionAppErrors + + """ + The allocated budget for the marketing activity. + """ + budget: MarketingBudget + + """ + The date and time when the marketing activity was created. + """ + createdAt: DateTime! + + """ + The completed content in the marketing activity creation form. + """ + formData: String + + """ + The hierarchy level of the marketing activity. + """ + hierarchyLevel: MarketingActivityHierarchyLevel + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the marketing activity is in the main workflow version of the marketing automation. + """ + inMainWorkflowVersion: Boolean! + + """ + The marketing activity represents an external marketing activity. + """ + isExternal: Boolean! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannel: MarketingChannel! @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + Associated marketing event of this marketing activity. + """ + marketingEvent: MarketingEvent + + """ + ID of the parent activity of this marketing activity. + """ + parentActivityId: ID + + """ + ID of the parent activity of this marketing activity. + """ + parentRemoteId: String + + """ + A contextual description of the marketing activity based on the platform and tactic used. + """ + sourceAndMedium: String! + + """ + The current state of the marketing activity. + """ + status: MarketingActivityStatus! + + """ + The severity of the marketing activity's status. + """ + statusBadgeType: MarketingActivityStatusBadgeType @deprecated(reason: "Use `statusBadgeTypeV2` instead.") + + """ + The severity of the marketing activity's status. + """ + statusBadgeTypeV2: BadgeType + + """ + The rendered status of the marketing activity. + """ + statusLabel: String! + + """ + The [date and time]( + https://help.shopify.com/https://en.wikipedia.org/wiki/ISO_8601 + ) when the activity's status last changed. + """ + statusTransitionedAt: DateTime + + """ + The method of marketing used for this marketing activity. + """ + tactic: MarketingTactic! + + """ + The status to which the marketing activity is currently transitioning. + """ + targetStatus: MarketingActivityStatus + + """ + The marketing activity's title, which is rendered on the marketing listing page. + """ + title: String! + + """ + The date and time when the marketing activity was updated. + """ + updatedAt: DateTime! + + """ + The value portion of the URL query parameter used in attributing sessions to this activity. + """ + urlParameterValue: String + + """ + The set of [Urchin Tracking Module]( + https://help.shopify.com/https://en.wikipedia.org/wiki/UTM_parameters + ) used in the URL for tracking this marketing activity. + """ + utmParameters: UTMParameters +} + +""" +The input fields combining budget amount and its marketing budget type. +""" +input MarketingActivityBudgetInput { + """ + Budget type for marketing activity. + """ + budgetType: MarketingBudgetBudgetType + + """ + Amount of budget for the marketing activity. + """ + total: MoneyInput +} + +""" +An auto-generated type for paginating through multiple MarketingActivities. +""" +type MarketingActivityConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingActivityEdge!]! + + """ + A list of nodes that are contained in MarketingActivityEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingActivity!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating an externally-managed marketing activity. +""" +input MarketingActivityCreateExternalInput { + """ + The 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 + + """ + 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 { + """ + The external marketing activity that was created. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to create a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityCreateInput { + """ + The 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! + + """ + 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 { + """ + The created marketing activity. + """ + marketingActivity: MarketingActivity @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The path to return back to shopify admin from embedded editor. + """ + redirectPath: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `marketingActivityDeleteExternal` mutation. +""" +type MarketingActivityDeleteExternalPayload { + """ + The ID of the marketing activity that was deleted, if one was deleted. + """ + deletedMarketingActivityId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An auto-generated type which holds one MarketingActivity and a cursor during pagination. +""" +type MarketingActivityEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingActivityEdge. + """ + node: MarketingActivity! +} + +""" +The error code resulted from the marketing activity extension integration. +""" +enum MarketingActivityExtensionAppErrorCode { + """ + The 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 validation errors. + """ + VALIDATION_ERROR +} + +""" +Represents errors returned from apps when using the marketing activity extension. +""" +type MarketingActivityExtensionAppErrors { + """ + The app error type. + """ + code: MarketingActivityExtensionAppErrorCode! + + """ + The list of errors returned by the app. + """ + userErrors: [UserError!]! +} + +""" +Set of possible statuses for an external marketing activity. +""" +enum MarketingActivityExternalStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity 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 { + """ + An advertisement activity. Must be parented by an ad group or a campaign + activity, and must be assigned tracking parameters (URL or UTM). + """ + AD + + """ + A group of advertisement activities. Must be parented by a campaign activity. + """ + AD_GROUP + + """ + A campaign activity. May contain either ad groups or ads as child activities. + If childless, then the campaign activity should have tracking parameters + assigned (URL or UTM) otherwise it won't appear in marketing reports. + """ + CAMPAIGN +} + +""" +The set of valid sort keys for the MarketingActivity query. +""" +enum MarketingActivitySortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +Status helps to identify if this marketing activity has been completed, queued, failed etc. +""" +enum MarketingActivityStatus { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity is permanently unavailable. + """ + DELETED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """ + This marketing activity is disconnected and no longer editable. + """ + DISCONNECTED + + """ + This marketing activity has been edited, but it is not yet created. + """ + DRAFT + + """ + This marketing activity is unable to run. + """ + FAILED + + """ + This marketing activity has completed running. + """ + INACTIVE + + """ + This marketing activity is currently not running. + """ + PAUSED + + """ + This marketing activity is pending creation on the app's marketing platform. + """ + PENDING + + """ + This marketing activity is scheduled to run. + """ + SCHEDULED + + """ + The marketing activity's status is unknown. + """ + UNDEFINED +} + +""" +StatusBadgeType helps to identify the color of the status badge. +""" +enum MarketingActivityStatusBadgeType { + """ + This status badge has type 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 { + """ + 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 { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to update a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityUpdateInput { + """ + The 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 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 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! + + """ + 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.") + + """ + The ID of the recommendation that the marketing activity was created from, if one exists. + """ + marketingRecommendationId: ID @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The 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.") + + """ + 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. 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 { + """ + The updated marketing activity. + """ + marketingActivity: MarketingActivity + + """ + The redirect path from the embedded editor to the Shopify admin. + """ + redirectPath: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for creating or updating an externally-managed marketing activity. +""" +input MarketingActivityUpsertExternalInput { + """ + The 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 { + """ + The external marketing activity that was created or updated. + """ + marketingActivity: MarketingActivity + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +An error that occurs during the execution of marketing activity and engagement mutations. +""" +type MarketingActivityUserError implements DisplayableError { + """ + The error code. + """ + code: MarketingActivityUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MarketingActivityUserError`. +""" +enum MarketingActivityUserErrorCode { + """ + The 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 { + """ + The budget type for a marketing activity. + """ + budgetType: MarketingBudgetBudgetType! + + """ + The amount of budget for marketing activity. + """ + total: MoneyV2! +} + +""" +The budget type for a marketing activity. +""" +enum MarketingBudgetBudgetType { + """ + A daily budget. + """ + DAILY + + """ + A budget for the lifetime of a marketing activity. + """ + LIFETIME +} + +""" +The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. +""" +enum MarketingChannel { + """ + 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 { + """ + 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 is strongly preferred, and support for cumulative metrics may + be deprecated in the future. + """ + isCumulative: Boolean! + + """ + The marketing activity object related to this engagement. This corresponds to + the marketingActivityId passed in on creation of the engagement. + """ + marketingActivity: MarketingActivity + + """ + The calendar date (in the time zone offset specified by the utcOffset field) + for which the metrics are being reported. For example, a shop in UTC-5 would + set utcOffset="-05:00" and aggregate all engagements from 05:00:00Z up to + 29:00:00Z (5am UTC next day) for each call. + """ + occurredOn: Date! + + """ + The number of orders generated from the marketing content. + """ + orders: Decimal + + """ + The number of primary conversions from the marketing content. This field + supports ad platforms that track conversions beyond traditional sales metrics. + Primary conversions represent the main conversion goal defined by the ad + platform, such as purchases, sign-ups, or add-to-carts. + """ + primaryConversions: Decimal + + """ + The number of returning customers that have placed an order. Doesn't include + adjustments such as edits, exchanges, or returns. + """ + returningCustomers: Decimal + + """ + The amount of sales generated from the marketing content. + """ + sales: MoneyV2 + + """ + The total number of marketing emails or messages that were sent. + """ + sendsCount: Int + + """ + The number of online store sessions generated from the marketing content. + """ + sessionsCount: Int + + """ + The total number of times marketing content was distributed or reposted to + either one's own network of followers through a social media platform or other + digital channels. For message-based platforms such as email or SMS, this + represents the number of times marketing emails or messages were forwarded. + """ + sharesCount: Int + + """ + The total number of unique clicks on the marketing content. + """ + uniqueClicksCount: Int + + """ + The total number of all users who saw marketing content since it was + published. For message-based platforms such as email or SMS, this represents + the number of unique users that opened a marketing email or message. For + video-based content, this represents the number of unique users that played video content. + """ + uniqueViewsCount: Int + + """ + The total number of unsubscribes on the marketing content. For social media + platforms, this represents the number of unfollows. + """ + unsubscribesCount: Int + + """ + The UTC offset for the time zone in which the metrics are being reported, in + the format `"+HH:MM"` or `"-HH:MM"`. Used in combination with occurredOn when + aggregating daily metrics. Must match the account settings for the shop to + minimize eventual discrepancies in reporting. + """ + utcOffset: UtcOffset! + + """ + The total number of views on the marketing content. For message-based + platforms such as email or SMS, this represents the number of times marketing + emails or messages were opened. For video-based content, this represents the + number of times videos were played. + """ + viewsCount: Int +} + +""" +Return type for `marketingEngagementCreate` mutation. +""" +type MarketingEngagementCreatePayload { + """ + The marketing engagement that was created. This represents customer activity + taken on a marketing activity or a marketing channel. + """ + marketingEngagement: MarketingEngagement + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields for a marketing engagement. +""" +input MarketingEngagementInput { + """ + The 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 is strongly preferred, and support for cumulative metrics may + be deprecated in the future. + """ + isCumulative: Boolean! + + """ + 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 { + """ + Informational message about the engagement data that has been marked for deletion. + """ + result: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketingActivityUserError!]! +} + +""" +Represents actions that market a merchant's store or products. +""" +type MarketingEvent implements LegacyInteroperability & Node { + """ + The app that the marketing event is attributed to. + """ + app: App! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The unique string identifier of the channel to which this activity belongs. + For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """ + A human-readable description of the marketing event. + """ + description: String + + """ + The date and time when the marketing event ended. + """ + endedAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL where the marketing event can be managed. + """ + manageUrl: URL + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """ + The URL where the marketing event can be previewed. + """ + previewUrl: URL + + """ + An optional ID that helps Shopify validate engagement data. + """ + remoteId: String + + """ + The date and time when the marketing event is scheduled to end. + """ + scheduledToEndAt: DateTime + + """ + Where the `MarketingEvent` occurred and what kind of content was used. + Because `utmSource` and `utmMedium` are often used interchangeably, this is + based on a combination of `marketingChannel`, `referringDomain`, and `type` to + provide a consistent representation for any given piece of marketing + regardless of the app that created it. + """ + sourceAndMedium: String! + + """ + The date and time when the marketing event started. + """ + startedAt: DateTime! + + """ + The display text for the marketing event type. + """ + targetTypeDisplayText: String! @deprecated(reason: "Use `sourceAndMedium` instead.") + + """ + The marketing event type. + """ + type: MarketingTactic! + + """ + The name of the marketing campaign. + """ + utmCampaign: String + + """ + The medium that the marketing campaign is using. Example values: `cpc`, `banner`. + """ + utmMedium: String + + """ + The referrer of the marketing event. Example values: `google`, `newsletter`. + """ + utmSource: String +} + +""" +An auto-generated type for paginating through multiple MarketingEvents. +""" +type MarketingEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingEventEdge!]! + + """ + A list of nodes that are contained in MarketingEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketingEvent and a cursor during pagination. +""" +type MarketingEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MarketingEventEdge. + """ + node: MarketingEvent! +} + +""" +The set of valid sort keys for the MarketingEvent query. +""" +enum MarketingEventSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `started_at` value. + """ + STARTED_AT +} + +""" +The available types of tactics for a marketing activity. +""" +enum MarketingTactic { + """ + An abandoned cart recovery email. + """ + ABANDONED_CART + + """ + An ad, such as a Facebook ad. + """ + AD + + """ + An affiliate link. + """ + AFFILIATE + + """ + A link. + """ + LINK + + """ + A loyalty program. + """ + LOYALTY + + """ + A messaging app, such as Facebook Messenger. + """ + MESSAGE + + """ + A newsletter. + """ + NEWSLETTER + + """ + A notification in the Shopify admin. + """ + NOTIFICATION + + """ + A blog post. + """ + POST + + """ + A retargeting ad. + """ + RETARGETING + + """ + Search engine optimization. + """ + SEO + + """ + A popup on the online store. + """ + STOREFRONT_APP + + """ + A transactional email. + """ + TRANSACTIONAL +} + +""" +The entitlements for B2B markets. +""" +type MarketsB2BEntitlement { + """ + The entitlements for B2B market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether B2B markets are enabled. + """ + enabled: Boolean! +} + +""" +The entitlements for catalogs. +""" +type MarketsCatalogsEntitlement { + """ + Whether catalogs are enabled. + """ + enabled: Boolean! +} + +""" +The entitlements for region markets. +""" +type MarketsRegionsEntitlement { + """ + The entitlements for region market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether region markets are enabled. + """ + enabled: Boolean! +} + +""" +The resolved values based on the markets configuration for a buyer signal. +Resolved values include the resolved catalogs, web presences, currency, and +price inclusivity. +""" +type MarketsResolvedValues { + """ + The resolved catalogs. + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The entitlements for retail market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether retail markets are enabled. + """ + enabled: Boolean! +} + +""" +The set of valid sort keys for the Markets query. +""" +enum MarketsSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `market_condition_types` value. + """ + MARKET_CONDITION_TYPES + + """ + Sort by the `market_type` value. + """ + MARKET_TYPE + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The entitlements for themes. +""" +type MarketsThemesEntitlement { + """ + Whether themes are enabled. + """ + enabled: Boolean! +} + +""" +Markets entitlement information. +""" +type MarketsType { + """ + The entitlements for B2B markets. + """ + b2b: MarketsB2BEntitlement! + + """ + The entitlements for region markets. + """ + regions: MarketsRegionsEntitlement! + + """ + The entitlements for retail markets. + """ + retail: MarketsRetailEntitlement! + + """ + The entitlements for themes. + """ + themes: MarketsThemesEntitlement! +} + +""" +Represents a media interface. +""" +interface Media { + """ + A word or phrase to share the nature or contents of a media. + """ + alt: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! +} + +""" +An auto-generated type for paginating through multiple Media. +""" +type MediaConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MediaEdge!]! + + """ + A list of nodes that are contained in MediaEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Media!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The possible content types for a media object. +""" +enum MediaContentType { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MediaEdge. + """ + node: Media! +} + +""" +Represents a media error. This typically occurs when there is an issue with the media itself causing it to fail validation. +Check the media before attempting to upload again. +""" +type MediaError { + """ + Code representing the type of error. + """ + code: MediaErrorCode! + + """ + Additional details regarding the error. + """ + details: String + + """ + Translated error message. + """ + message: String! +} + +""" +Error types for media. +""" +enum MediaErrorCode { + """ + Media 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 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 { + """ + 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 { + """ + 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 MIME type of the image. + """ + mimeType: String + + """ + The original source of the image. + """ + originalSource: MediaImageOriginalSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +The original source for an image. +""" +type MediaImageOriginalSource { + """ + The size of the original file in bytes. + """ + fileSize: Int + + """ + The URL of the original image, valid only for a short period. + """ + url: URL +} + +""" +Represents the preview image for a media. +""" +type MediaPreviewImage { + """ + The preview image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """ + Current status of the preview image. + """ + status: MediaPreviewImageStatus! +} + +""" +The possible statuses for a media preview image. +""" +enum MediaPreviewImageStatus { + """ + Preview image 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 { + """ + 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 { + """ + The error code. + """ + code: MediaUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MediaUserError`. +""" +enum MediaUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 { + """ + The code representing the type of warning. + """ + code: MediaWarningCode! + + """ + Translated warning message. + """ + message: String +} + +""" +Warning types for media. +""" +enum MediaWarningCode { + """ + 3D model physical size might be invalid. The dimensions of your model are very + 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 { + """ + The menu's handle. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the menu is a default. The handle for default menus can't be updated and default menus can't be deleted. + """ + isDefault: Boolean! + + """ + A list of items on the menu sorted by position. + """ + items( + """ + The number of menu items to be returned. + """ + limit: Int + ): [MenuItem!]! + + """ + The menu's title. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple Menus. +""" +type MenuConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MenuEdge!]! + + """ + A list of nodes that are contained in MenuEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Menu!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `menuCreate` mutation. +""" +type MenuCreatePayload { + """ + The created menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuCreateUserError!]! +} + +""" +An error that occurs during the execution of `MenuCreate`. +""" +type MenuCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuCreateUserError`. +""" +enum MenuCreateUserErrorCode { + """ + The 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 { + """ + The ID of the deleted menu. + """ + deletedMenuId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MenuDelete`. +""" +type MenuDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MenuDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuDeleteUserError`. +""" +enum MenuDeleteUserErrorCode { + """ + Menu does not exist. + """ + MENU_DOES_NOT_EXIST + + """ + Default menu cannot be deleted. + """ + UNABLE_TO_DELETE_DEFAULT_MENU +} + +""" +An auto-generated type which holds one Menu and a cursor during pagination. +""" +type MenuEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MenuEdge. + """ + node: Menu! +} + +""" +Individual navigation links that make up store menus, giving customers clickable +paths to explore the store. Menu items are the building blocks that connect +shoppers to products, collections, pages, or external resources. + +For example, within a "Products" menu, individual menu items might link to +specific collections like "Summer Collection" or "Best Sellers," each with its +own title, URL, and resource connection. + +Use the `MenuItem` object to: +- Define individual navigation links and their destinations +- Create nested menu hierarchies through item relationships +- Use tags for collection filtering +- Connect menu links to specific store resources + +Menu items support various link types, enabling connections to internal store +content or external websites. The nested items capability allows for dropdown or +multi-level navigation structures that help organize complex store catalogs. +""" +type MenuItem { + """ + A globally-unique ID of the navigation menu item. + """ + id: ID! + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItem!]! + + """ + The ID of the resource to link to. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!]! + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's url. + """ + url: String +} + +""" +The input fields required to create a valid menu item. +""" +input MenuItemCreateInput { + """ + 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 + + """ + 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 { + """ + 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 { + """ + A globally-unique ID of the online store navigation menu item. + """ + id: ID + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemUpdateInput!] + + """ + The menu item's association with an existing resource. + """ + resourceId: ID + + """ + The menu item's tags to filter a collection. + """ + tags: [String!] + + """ + The menu item's title. + """ + title: String! + + """ + The menu item's type. + """ + type: MenuItemType! + + """ + The menu item's url 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 { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `menuUpdate` mutation. +""" +type MenuUpdatePayload { + """ + The updated menu. + """ + menu: Menu + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MenuUpdateUserError!]! +} + +""" +An error that occurs during the execution of `MenuUpdate`. +""" +type MenuUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MenuUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MenuUpdateUserError`. +""" +enum MenuUpdateUserErrorCode { + """ + The 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 { + """ + 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 approval for accelerated onboarding to channel integration apps. +""" +type MerchantApprovalSignals { + """ + Whether the shop's Shopify Payments account identity is verified. Returns + `false` if the identity is unverified or if the shop doesn't have a Shopify + Payments account. + """ + identityVerified: Boolean! + + """ + Whether Shopify has pre-verified the merchant's business for onboarding to + channel integration apps. Returns `false` if the shop isn't marked for verification. + """ + verifiedByShopify: Boolean! + + """ + Which tier of the Shopify verification was determined for the merchant's + business for onboarding to channel integration apps. + """ + verifiedByShopifyTier: String! +} + +""" +Metafields enable you to attach additional information to a Shopify resource, such +as a [Product](https://shopify.dev/api/admin-graphql/latest/objects/product) or +a [Collection](https://shopify.dev/api/admin-graphql/latest/objects/collection). +For more information about where you can attach metafields refer to [HasMetafields](https://shopify.dev/api/admin-graphql/latest/interfaces/HasMetafields). +Some examples of the data that metafields enable you to store are +specifications, size charts, downloadable documents, release dates, images, or part numbers. +Metafields are identified by an owner resource, namespace, and key. and store a +value along with type information for that value. +""" +type Metafield implements HasCompareDigest & LegacyInteroperability & Node { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! + + """ + The date and time when the metafield was created. + """ + createdAt: DateTime! + + """ + The metafield definition that the metafield belongs to, if any. + """ + definition: MetafieldDefinition + + """ + The description of the metafield. + """ + description: String @deprecated(reason: "This field will be removed in a future release. Use the `description` on the metafield definition instead.\n") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The data stored in the metafield in JSON format. + """ + jsonValue: JSON! + + """ + The unique identifier for the metafield within its namespace. + """ + key: String! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The container for a group of metafields that the metafield is associated with. + """ + namespace: String! + + """ + The resource that the metafield is attached to. + """ + owner: HasMetafields! + + """ + The type of resource that the metafield is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + Returns a reference object if the metafield definition's type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of reference objects if the metafield's type is a resource reference list. + """ + references( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 type of data that's stored in the metafield. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: String! + + """ + The date and time when the metafield was updated. + """ + updatedAt: DateTime! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! +} + +""" +Access permissions for the definition's metafields. +""" +type MetafieldAccess { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccess + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccess! + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccess +} + +""" +The input fields that set access permissions for the definition's metafields. +""" +input MetafieldAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccessInput + + """ + The access permitted on the 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 { + """ + 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 { + """ + 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 { + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE +} + +""" +Provides the capabilities of a metafield definition. +""" +type MetafieldCapabilities { + """ + Indicate whether a metafield definition is configured for filtering. + """ + adminFilterable: MetafieldCapabilityAdminFilterable! + + """ + Indicate whether a metafield definition can be used as a smart collection condition. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionCondition! + + """ + Indicate whether the metafield values for a metafield definition are required to be unique. + """ + uniqueValues: MetafieldCapabilityUniqueValues! +} + +""" +Information about the admin filterable capability on a metafield definition. +""" +type MetafieldCapabilityAdminFilterable { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! + + """ + Determines the metafield definition's filter status for use in admin filtering. + """ + status: MetafieldDefinitionAdminFilterStatus! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetafieldCapabilityAdminFilterableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metafield capability. +""" +input MetafieldCapabilityCreateInput { + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + 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 { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the smart collection condition capability. +""" +input MetafieldCapabilitySmartCollectionConditionInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Information about the unique values capability on a metafield definition. +""" +type MetafieldCapabilityUniqueValues { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the unique values capability. +""" +input MetafieldCapabilityUniqueValuesInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for updating a metafield capability. +""" +input MetafieldCapabilityUpdateInput { + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + 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 { + """ + 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 { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ + + """ + Read and write access. + """ + READ_WRITE +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccessInput { + """ + 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 { + """ + The access settings associated with the metafield definition. + """ + access: MetafieldAccess! + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilities! + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what subtypes of resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraints + + """ + The description of the metafield definition. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The metafields that belong to the metafield definition. + """ + metafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean! + + """ + The validation status for the metafields that belong to the metafield definition. + """ + validationStatus: MetafieldDefinitionValidationStatus! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidation!]! +} + +""" +Possible filter statuses associated with a metafield definition for use in admin filtering. +""" +enum MetafieldDefinitionAdminFilterStatus { + """ + The metafield definition 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Metafield definition constraint criteria to filter metafield definitions by. +""" +enum MetafieldDefinitionConstraintStatus { + """ + Returns both constrained and unconstrained metafield definitions. + """ + CONSTRAINED_AND_UNCONSTRAINED + + """ + Only returns metafield definitions that are constrained to a resource subtype. + """ + CONSTRAINED_ONLY + + """ + Only returns metafield definitions that are not constrained to a resource subtype. + """ + UNCONSTRAINED_ONLY +} + +""" +The input fields used to identify a subtype of a resource for the purposes of metafield definition constraints. +""" +input MetafieldDefinitionConstraintSubtypeIdentifier { + """ + The category of the resource subtype. + """ + key: String! + + """ + The specific subtype value within the identified subtype category. + """ + value: String! +} + +""" +A constraint subtype value that the metafield definition applies to. +""" +type MetafieldDefinitionConstraintValue { + """ + The subtype value of the constraint. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues. +""" +type MetafieldDefinitionConstraintValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionConstraintValueEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionConstraintValueEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [MetafieldDefinitionConstraintValue!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldDefinitionConstraintValue and a cursor during pagination. +""" +type MetafieldDefinitionConstraintValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldDefinitionConstraintValueEdge. + """ + node: MetafieldDefinitionConstraintValue! +} + +""" +The inputs fields for modifying a metafield definition's constraint subtype values. +Exactly one option is required. +""" +input MetafieldDefinitionConstraintValueUpdateInput { + """ + The constraint subtype value to create. + """ + create: String + + """ + The constraint subtype value to delete. + """ + delete: String +} + +""" +The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) +that determine what subtypes of resources a metafield definition applies to. +""" +type MetafieldDefinitionConstraints { + """ + The category of resource subtypes that the definition applies to. + """ + key: String + + """ + The specific constraint subtype values that the definition applies to. + """ + values( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The category of resource subtypes that the definition applies to. + """ + key: String! + + """ + The specific constraint subtype values that the definition applies to. + """ + values: [String!]! +} + +""" +The input fields required to update metafield definition [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions). +Each constraint applies a metafield definition to a subtype of a resource. +""" +input MetafieldDefinitionConstraintsUpdatesInput { + """ + The category of resource subtypes that the definition applies to. + If omitted and the definition is already constrained, the existing constraint key will be used. + If set to `null`, all constraints will be removed. + """ + key: String + + """ + The specific constraint subtype values to create or delete. + """ + values: [MetafieldDefinitionConstraintValueUpdateInput!] +} + +""" +Return type for `metafieldDefinitionCreate` mutation. +""" +type MetafieldDefinitionCreatePayload { + """ + The metafield definition that was created. + """ + createdDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionCreateUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionCreate`. +""" +type MetafieldDefinitionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionCreateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionCreateUserError`. +""" +enum MetafieldDefinitionCreateUserErrorCode { + """ + 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 + + """ + 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 { + """ + The metafield definition that was deleted. + """ + deletedDefinition: MetafieldDefinitionIdentifier + + """ + The ID of the deleted metafield definition. + """ + deletedDefinitionId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionDelete`. +""" +type MetafieldDefinitionDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionDeleteUserError`. +""" +enum MetafieldDefinitionDeleteUserErrorCode { + """ + 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldDefinitionEdge. + """ + node: MetafieldDefinition! +} + +""" +Identifies a metafield definition by its owner type, namespace, and key. +""" +type MetafieldDefinitionIdentifier { + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The container for a group of metafields that the metafield definition is associated with. + """ + namespace: String! + + """ + The resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! +} + +""" +The input fields that identify metafield definitions. +""" +input MetafieldDefinitionIdentifierInput { + """ + The 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 { + """ + 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 { + """ + The metafield definition that was pinned. + """ + pinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionPinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionPin`. +""" +type MetafieldDefinitionPinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionPinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionPinUserError`. +""" +enum MetafieldDefinitionPinUserErrorCode { + """ + The metafield definition is already pinned. + """ + ALREADY_PINNED + + """ + 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 { + """ + All metafield definitions. + """ + ANY + + """ + Only metafield definitions that are pinned. + """ + PINNED + + """ + Only metafield definitions that are not pinned. + """ + UNPINNED +} + +""" +The set of valid sort keys for the MetafieldDefinition query. +""" +enum MetafieldDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `pinned_position` value. + """ + PINNED_POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The type and name for the optional validation configuration of a metafield. + +For example, a supported validation might consist of a `max` name and a `number_integer` type. +This validation can then be used to enforce a maximum character length for a `single_line_text_field` metafield. +""" +type MetafieldDefinitionSupportedValidation { + """ + The name of the metafield definition validation. + """ + name: String! + + """ + The type of input for the validation. + """ + type: String! +} + +""" +A metafield definition type provides basic foundation and validation for a metafield. +""" +type MetafieldDefinitionType { + """ + The category associated with the metafield definition type. + """ + category: String! + + """ + The name of the type for the metafield definition. + See the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + name: String! + + """ + The supported validations for a metafield definition type. + """ + supportedValidations: [MetafieldDefinitionSupportedValidation!]! + + """ + Whether metafields without a definition can be migrated to a definition of this type. + """ + supportsDefinitionMigrations: Boolean! + + """ + The value type for a metafield created with this definition type. + """ + valueType: MetafieldValueType! @deprecated(reason: "`valueType` is deprecated and `name` should be used for type information.") +} + +""" +Return type for `metafieldDefinitionUnpin` mutation. +""" +type MetafieldDefinitionUnpinPayload { + """ + The metafield definition that was unpinned. + """ + unpinnedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUnpinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUnpin`. +""" +type MetafieldDefinitionUnpinUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUnpinUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUnpinUserError`. +""" +enum MetafieldDefinitionUnpinUserErrorCode { + """ + 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 { + """ + 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 cannot 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 { + """ + The metafield definition that was updated. + """ + updatedDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldDefinitionUpdateUserError!]! + + """ + The asynchronous job updating the metafield definition's validation_status. + """ + validationJob: Job +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUpdate`. +""" +type MetafieldDefinitionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldDefinitionUpdateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUpdateUserError`. +""" +enum MetafieldDefinitionUpdateUserErrorCode { + """ + 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 { + """ + The validation name. + """ + name: String! + + """ + The name for the metafield type of this validation. + """ + type: String! + + """ + The validation value. + """ + value: String +} + +""" +The name and value for a metafield definition validation. + +For example, for a metafield definition of `single_line_text_field` type, you +can set a validation with the name `min` and a value of `10`. +This validation will ensure that the value of the metafield is at least 10 characters. + +Refer to the [list of supported validations](https://shopify.dev/apps/build/custom-data/metafields/list-of-validation-options). +""" +input MetafieldDefinitionValidationInput { + """ + The name for the metafield definition validation. + """ + name: String! + + """ + The value for the metafield definition validation. + """ + value: String! +} + +""" +Possible metafield definition validation statuses. +""" +enum MetafieldDefinitionValidationStatus { + """ + All of this definition's metafields are valid. + """ + ALL_VALID + + """ + Asynchronous validation of this definition's metafields is in progress. + """ + IN_PROGRESS + + """ + Some of this definition's metafields are invalid. + """ + SOME_INVALID +} + +""" +An auto-generated type which holds one Metafield and a cursor during pagination. +""" +type MetafieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldEdge. + """ + node: Metafield! +} + +""" +Identifies a metafield by its owner resource, namespace, and key. +""" +type MetafieldIdentifier { + """ + The key of the metafield. + """ + key: String! + + """ + The namespace of the metafield. + """ + namespace: String! + + """ + GID of the owner resource that the metafield belongs to. + """ + ownerId: ID! +} + +""" +The input fields that identify metafields. +""" +input MetafieldIdentifierInput { + """ + The 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! +} + +""" +The input fields to use to create or update a metafield through a mutation on the owning resource. +An alternative way to create or update a metafield is by using the +[metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation. +""" +input MetafieldInput { + """ + The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. + """ + id: ID + + """ + The 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 is 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 { + """ + 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 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 = Article | Collection | Company | Customer | GenericFile | MediaImage | Metaobject | Model3d | Order | Page | Product | ProductVariant | TaxonomyValue | Video + +""" +An auto-generated type for paginating through multiple MetafieldReferences. +""" +type MetafieldReferenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldReferenceEdge!]! + + """ + A list of nodes that are contained in MetafieldReferenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldReference]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldReference and a cursor during pagination. +""" +type MetafieldReferenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldReferenceEdge. + """ + node: MetafieldReference +} + +""" +Types of resources that may use metafields to reference other resources. +""" +union MetafieldReferencer = AppInstallation | Article | Blog | Collection | Company | CompanyLocation | Customer | DeliveryCustomization | DiscountAutomaticNode | DiscountCodeNode | DiscountNode | DraftOrder | FulfillmentOrder | Location | Market | Metaobject | Order | Page | PaymentCustomization | Product | ProductVariant | Shop + +""" +Defines a relation between two resources via a reference metafield. +The referencer owns the joining field with a given namespace and key, +while the target is referenced by the field. +""" +type MetafieldRelation { + """ + The key of the field making the reference. + """ + key: String! + + """ + The name of the field making the reference. + """ + name: String! + + """ + The namespace of the metafield making the reference, or type of the metaobject. + """ + namespace: String! + + """ + The resource making the reference. + """ + referencer: MetafieldReferencer! + + """ + The referenced resource. + """ + target: MetafieldReference! @deprecated(reason: "No longer supported. Access the object directly instead.") +} + +""" +An auto-generated type for paginating through multiple MetafieldRelations. +""" +type MetafieldRelationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldRelationEdge!]! + + """ + A list of nodes that are contained in MetafieldRelationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldRelation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldRelation and a cursor during pagination. +""" +type MetafieldRelationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetafieldRelationEdge. + """ + node: MetafieldRelation! +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccessInput { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Possible metafield validation statuses. +""" +enum MetafieldValidationStatus { + """ + 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 { + """ + A `true` or `false` value. + """ + BOOLEAN + + """ + A whole number. + """ + INTEGER + + """ + A JSON string. + """ + JSON_STRING + + """ + A text field. + """ + STRING +} + +""" +Return type for `metafieldsDelete` mutation. +""" +type MetafieldsDeletePayload { + """ + List of metafield identifiers that were deleted, null if the corresponding metafield isn't found. + """ + deletedMetafields: [MetafieldIdentifier] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a metafield value to set. +""" +input MetafieldsSetInput { + """ + The `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! + + """ + The type of data that is stored in the metafield. + The type must be one of the [supported types](https://shopify.dev/apps/metafields/types). + + Required when there is 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 { + """ + The list of metafields that were set. + """ + metafields: [Metafield!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetafieldsSetUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldsSet`. +""" +type MetafieldsSetUserError implements DisplayableError { + """ + The error code. + """ + code: MetafieldsSetUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldsSetUserError`. +""" +enum MetafieldsSetUserErrorCode { + """ + 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 + + """ + 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 { + """ + 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! +} + +""" +Access permissions for the definition's metaobjects. +""" +type MetaobjectAccess { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccess! + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetaobjectCustomerAccountAccess! + + """ + The access permitted on the Storefront API. + """ + storefront: MetaobjectStorefrontAccess! +} + +""" +The input fields that set access permissions for the definition's metaobjects. +""" +input MetaobjectAccessInput { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccessInput + + """ + The access permitted on the 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 { + """ + 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 { + """ + The merchant has read-only access. No other apps have access. + """ + MERCHANT_READ + + """ + The merchant has read and write access. No other apps have access. + """ + MERCHANT_READ_WRITE +} + +""" +Return type for `metaobjectBulkDelete` mutation. +""" +type MetaobjectBulkDeletePayload { + """ + The asynchronous job that deletes the metaobjects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Specifies the condition by which metaobjects are deleted. +Exactly one field of input is required. +""" +input MetaobjectBulkDeleteWhereCondition { + """ + A list of metaobjects IDs to delete. + """ + ids: [ID!] + + """ + Deletes all metaobjects with the specified `type`. + """ + type: String +} + +""" +Provides the capabilities of a metaobject definition. +""" +type MetaobjectCapabilities { + """ + Indicates whether a metaobject definition can be displayed as a page on the Online Store. + """ + onlineStore: MetaobjectCapabilitiesOnlineStore + + """ + Indicate whether a metaobject definition is publishable. + """ + publishable: MetaobjectCapabilitiesPublishable! + + """ + Indicate whether a metaobject definition is renderable and exposes SEO data. + """ + renderable: MetaobjectCapabilitiesRenderable + + """ + Indicate whether a metaobject definition is translatable. + """ + translatable: MetaobjectCapabilitiesTranslatable! +} + +""" +The Online Store capability of a metaobject definition. +""" +type MetaobjectCapabilitiesOnlineStore { + """ + The data associated with the Online Store capability. + """ + data: MetaobjectCapabilityDefinitionDataOnlineStore + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The publishable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesPublishable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The renderable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesRenderable { + """ + The data associated with the renderable capability. + """ + data: MetaobjectCapabilityDefinitionDataRenderable + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The translatable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesTranslatable { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metaobject capability. +""" +input MetaobjectCapabilityCreateInput { + """ + The input for enabling the 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 { + """ + 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 { + """ + Online Store capability input. + """ + onlineStore: MetaobjectCapabilityDataOnlineStoreInput + + """ + Publishable capability input. + """ + publishable: MetaobjectCapabilityDataPublishableInput +} + +""" +The Online Store capability for the parent metaobject. +""" +type MetaobjectCapabilityDataOnlineStore { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The input fields for the Online Store capability to control renderability on the Online Store. +""" +input MetaobjectCapabilityDataOnlineStoreInput { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The publishable capability for the parent metaobject. +""" +type MetaobjectCapabilityDataPublishable { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The input fields for publishable capability to adjust visibility on channels. +""" +input MetaobjectCapabilityDataPublishableInput { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The Online Store capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataOnlineStore { + """ + Flag indicating if a sufficient number of redirects are available to redirect all published entries. + """ + canCreateRedirects: Boolean! + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! +} + +""" +The input fields of the Online Store capability. +""" +input MetaobjectCapabilityDefinitionDataOnlineStoreInput { + """ + 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 { + """ + The metaobject field used as an alias for the SEO page description. + """ + metaDescriptionKey: String + + """ + The metaobject field used as an alias for the SEO page title. + """ + metaTitleKey: String +} + +""" +The input fields of the renderable capability for SEO aliases. +""" +input MetaobjectCapabilityDefinitionDataRenderableInput { + """ + The metaobject field used as an alias for the SEO page 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 { + """ + 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 { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the renderable capability. +""" +input MetaobjectCapabilityRenderableInput { + """ + 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 { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Metaobject Capabilities types which can be enabled. +""" +enum MetaobjectCapabilityType { + """ + Allows for a Metaobject to be 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 { + """ + 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 { + """ + 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 { + """ + 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! +} + +""" +Return type for `metaobjectCreate` mutation. +""" +type MetaobjectCreatePayload { + """ + The created metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Metaobject access permissions for the Customer Account API. +""" +enum MetaobjectCustomerAccountAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ +} + +""" +Defines the structure and configuration for a custom data type in Shopify. Each +definition specifies the fields, validation rules, and capabilities that apply to all [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) +entries created from it. + +The definition includes field definitions that determine what data to store, +access controls for [the Shopify admin](https://shopify.dev/docs/apps/build/custom-data/permissions#admin-permissions) and [Storefront](https://shopify.dev/docs/apps/build/custom-data/permissions#storefront-permissions) +APIs, and capabilities such as publishability and translatability. You can track +which [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) or [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) +created the definition and optionally base it on a [`StandardMetaobjectDefinitionTemplate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StandardMetaobjectDefinitionTemplate). +""" +type MetaobjectDefinition implements Node { + """ + Access configuration for the metaobject definition. + """ + access: MetaobjectAccess! + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilities! + + """ + The app used to create the metaobject definition. + """ + createdByApp: App! + + """ + The staff member who created the metaobject definition. + """ + createdByStaff: StaffMember + + """ + The administrative description. + """ + description: String + + """ + The key of a field to reference as the display name for each object. + """ + displayNameKey: String + + """ + The fields defined for this object type. + """ + fieldDefinitions: [MetaobjectFieldDefinition!]! + + """ + Whether this metaobject definition has field whose type can visually represent + a metaobject with the `thumbnailField`. + """ + hasThumbnailField: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A paginated connection to the metaobjects associated with the definition. + """ + metaobjects( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! +} + +""" +An auto-generated type for paginating through multiple MetaobjectDefinitions. +""" +type MetaobjectDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectDefinitionEdge!]! + + """ + A list of nodes that are contained in MetaobjectDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetaobjectDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating a metaobject definition. +""" +input MetaobjectDefinitionCreateInput { + """ + 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 { + """ + The created metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDefinitionDelete` mutation. +""" +type MetaobjectDefinitionDeletePayload { + """ + The ID of the deleted metaobjects definition. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one MetaobjectDefinition and a cursor during pagination. +""" +type MetaobjectDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectDefinitionEdge. + """ + node: MetaobjectDefinition! +} + +""" +The input fields for updating a metaobject definition. +""" +input MetaobjectDefinitionUpdateInput { + """ + 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 { + """ + The updated metaobject definition. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Return type for `metaobjectDelete` mutation. +""" +type MetaobjectDeletePayload { + """ + The ID of the deleted metaobject. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one Metaobject and a cursor during pagination. +""" +type MetaobjectEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MetaobjectEdge. + """ + node: Metaobject! +} + +""" +Provides a field definition and the data value assigned to it. +""" +type MetaobjectField { + """ + The field definition for this object key. + """ + definition: MetaobjectFieldDefinition! + + """ + The assigned field value in JSON format. + """ + jsonValue: JSON + + """ + The object key of this field. + """ + key: String! + + """ + For resource reference fields, provides the referenced object. + """ + reference: MetafieldReference + + """ + For resource reference list fields, provides the list of referenced objects. + """ + references( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetaobjectFieldCapabilityAdminFilterableInput { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Defines a field for a MetaobjectDefinition with properties +such as the field's data type and validations. +""" +type MetaobjectFieldDefinition { + """ + Capabilities available for this metaobject field definition. + """ + capabilities: MetaobjectFieldDefinitionCapabilities! + + """ + The administrative description. + """ + description: String + + """ + A key name used to identify the field within the metaobject composition. + """ + key: String! + + """ + The human-readable name. + """ + name: String! + + """ + Required status of the field within the metaobject composition. + """ + required: Boolean! + + """ + The type of data that the field stores. + """ + type: MetafieldDefinitionType! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the field. For example, a field with the type `date` can set a minimum date requirement. + """ + validations: [MetafieldDefinitionValidation!]! +} + +""" +Capabilities available for a metaobject field definition. +""" +type MetaobjectFieldDefinitionCapabilities { + """ + Indicate whether a metaobject field definition is configured for filtering. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterable! +} + +""" +The input fields for creating capabilities on a metaobject field definition. +""" +input MetaobjectFieldDefinitionCapabilityCreateInput { + """ + The input for configuring the admin filterable capability. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterableInput +} + +""" +The input fields for creating a metaobject field definition. +""" +input MetaobjectFieldDefinitionCreateInput { + """ + 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!] +} + +""" +The input fields for deleting a metaobject field definition. +""" +input MetaobjectFieldDefinitionDeleteInput { + """ + The key of the field definition to delete. + """ + key: String! +} + +""" +The input fields for possible operations for modifying field definitions. Exactly one option is required. +""" +input MetaobjectFieldDefinitionOperationInput { + """ + The input fields for creating a metaobject field definition. + """ + create: MetaobjectFieldDefinitionCreateInput + + """ + The input fields for 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 { + """ + 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!] +} + +""" +The input fields for a metaobject field value. +""" +input MetaobjectFieldInput { + """ + The key of the field. + """ + key: String! + + """ + The value of the field. + """ + value: String! +} + +""" +The input fields for retrieving a metaobject by handle. +""" +input MetaobjectHandleInput { + """ + The 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 { + """ + The metaobjects is active for public use. + """ + ACTIVE + + """ + The metaobjects is an internal record. + """ + DRAFT +} + +""" +Metaobject access permissions for the Storefront API. +""" +enum MetaobjectStorefrontAccess { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Provides attributes for visual representation. +""" +type MetaobjectThumbnail { + """ + The file to be used for visual representation of this metaobject. + """ + file: File + + """ + The hexadecimal color code to be used for respresenting this metaobject. + """ + hex: String +} + +""" +The input fields for updating a metaobject. +""" +input MetaobjectUpdateInput { + """ + 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 +} + +""" +Return type for `metaobjectUpdate` mutation. +""" +type MetaobjectUpdatePayload { + """ + The updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +The input fields for upserting a metaobject. +""" +input MetaobjectUpsertInput { + """ + 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 { + """ + The created or updated metaobject. + """ + metaobject: Metaobject + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +Defines errors encountered while managing metaobject resources. +""" +type MetaobjectUserError implements DisplayableError { + """ + The error code. + """ + code: MetaobjectUserErrorCode + + """ + The index of the failing list element in an array. + """ + elementIndex: Int + + """ + The key of the failing object element. + """ + elementKey: String + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MetaobjectUserError`. +""" +enum MetaobjectUserErrorCode { + """ + 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 set of valid sort keys for the MethodDefinition query. +""" +enum MethodDefinitionSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `rate_provider_type` value. + """ + RATE_PROVIDER_TYPE +} + +""" +You can use the `MobilePlatformApplication` resource to enable +[shared web credentials](https://developer.apple.com/documentation/security/shared_web_credentials) for Shopify iOS apps, +as well as to create [iOS universal link](https://developer.apple.com/ios/universal-links/) +or [Android app link](https://developer.android.com/training/app-links/) +verification endpoints for merchant Shopify iOS or Android apps. +Shared web credentials let iOS users access a native app after logging into the +respective website in Safari without re-entering +their username and password. If a user changes their credentials in the app, then those changes are reflected in Safari. +You must use a custom domain to integrate shared web credentials with Shopify. With each platform's link system, +users can tap a link to a shop's website and get seamlessly redirected to a merchant's installed app without going +through a browser or manually selecting an app. + +For full configuration instructions on iOS shared web credentials, +see the [associated domains setup](https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains) +technical documentation. + +For full configuration instructions on iOS universal links or Android App Links, +see the respective [iOS universal link](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content) +or [Android app link](https://developer.android.com/training/app-links) technical documentation. +""" +union MobilePlatformApplication = AndroidApplication | AppleApplication + +""" +An auto-generated type for paginating through multiple MobilePlatformApplications. +""" +type MobilePlatformApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MobilePlatformApplicationEdge!]! + + """ + A list of nodes that are contained in MobilePlatformApplicationEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MobilePlatformApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationCreateAndroidInput { + """ + 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 { + """ + 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 { + """ + Android based mobile platform application. + """ + android: MobilePlatformApplicationCreateAndroidInput + + """ + Apple based mobile platform application. + """ + apple: MobilePlatformApplicationCreateAppleInput +} + +""" +Return type for `mobilePlatformApplicationCreate` mutation. +""" +type MobilePlatformApplicationCreatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +Return type for `mobilePlatformApplicationDelete` mutation. +""" +type MobilePlatformApplicationDeletePayload { + """ + The ID of the mobile platform application that was just deleted. + """ + deletedMobilePlatformApplicationId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An auto-generated type which holds one MobilePlatformApplication and a cursor during pagination. +""" +type MobilePlatformApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of MobilePlatformApplicationEdge. + """ + node: MobilePlatformApplication! +} + +""" +The input fields for an Android based mobile platform application. +""" +input MobilePlatformApplicationUpdateAndroidInput { + """ + 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 { + """ + 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 { + """ + Android based Mobile Platform Application. + """ + android: MobilePlatformApplicationUpdateAndroidInput + + """ + Apple based Mobile Platform Application. + """ + apple: MobilePlatformApplicationUpdateAppleInput +} + +""" +Return type for `mobilePlatformApplicationUpdate` mutation. +""" +type MobilePlatformApplicationUpdatePayload { + """ + Created mobile platform application. + """ + mobilePlatformApplication: MobilePlatformApplication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An error in the input of a mutation. Mutations return `UserError` objects to +indicate validation failures, such as invalid field values or business logic +violations, that prevent the operation from completing. +""" +type MobilePlatformApplicationUserError implements DisplayableError { + """ + The error code. + """ + code: MobilePlatformApplicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `MobilePlatformApplicationUserError`. +""" +enum MobilePlatformApplicationUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +Represents a Shopify hosted 3D model. +""" +type Model3d implements File & Media & Node { + """ + A word or phrase to describe the contents or the function of a file. + """ + alt: String + + """ + The 3d model's bounding box information. + """ + boundingBox: Model3dBoundingBox + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The 3d model's filename. + """ + filename: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The media content type. + """ + mediaContentType: MediaContentType! + + """ + Any errors which have occurred on the media. + """ + mediaErrors: [MediaError!]! + + """ + The warnings attached to the media. + """ + mediaWarnings: [MediaWarning!]! + + """ + The 3d model's original source. + """ + originalSource: Model3dSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + The 3d model's sources. + """ + sources: [Model3dSource!]! + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +Bounding box information of a 3d model. +""" +type Model3dBoundingBox { + """ + Size in meters of the smallest volume which contains the 3d model. + """ + size: Vector3! +} + +""" +A source for a Shopify-hosted 3d model. + +Types of sources include GLB and USDZ formatted 3d models, where the former +is an original 3d model and the latter has been converted from the original. + +If the original source is in GLB format and over 15 MBs in size, then both the +original and the USDZ formatted source are optimized to reduce the file size. +""" +type Model3dSource { + """ + The 3d model source's filesize. + """ + filesize: Int! + + """ + The 3d model source's format. + """ + format: String! + + """ + The 3d model source's MIME type. + """ + mimeType: String! + + """ + The 3d model source's URL. + """ + url: String! +} + +""" +A monetary value string without a currency symbol or code. Example value: `"100.57"`. +""" +scalar Money + +""" +A collection of monetary values in their respective currencies. Used throughout +the API for multi-currency pricing and transactions, when an amount in the +shop's currency is converted to the customer's currency of choice. The +`presentmentMoney` field contains the amount in the customer's selected +currency. The `shopMoney` field contains the equivalent in the shop's base currency. +""" +type MoneyBag { + """ + Amount in presentment currency. + """ + presentmentMoney: MoneyV2! + + """ + Amount in shop currency. + """ + shopMoney: MoneyV2! +} + +""" +An input collection of monetary values in their respective currencies. +Represents an amount in the shop's currency and the amount as converted to the +customer's currency of choice (the presentment currency). +""" +input MoneyBagInput { + """ + Amount in 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 { + """ + Decimal money amount. + """ + amount: Decimal! + + """ + Currency of the money. + """ + currencyCode: CurrencyCode! +} + +""" +A precise monetary value and its associated currency. Combines a decimal amount +with a three-letter currency code to express prices, costs, and other financial +values throughout the API. For example, 12.99 USD. +""" +type MoneyV2 { + """ + A monetary value in decimal format, allowing for precise representation of cents or fractional + currency. For example, 12.99. + """ + amount: Decimal! + + """ + The three-letter currency code that represents a world currency used in a store. Currency codes + include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, + and non-standard codes. For example, USD. + """ + currencyCode: CurrencyCode! +} + +""" +The input for moving a single object to a specific position in a set. + +Provide this input only for objects whose position actually changed; do not send inputs for the entire set. + +- id: The ID (GID) of the object to move. +- newPosition: The zero-based index of the object's position within the set at the time this move is applied. + +Moves are applied sequentially, so `newPosition` for each move is evaluated after all prior moves in the same list. +If `newPosition` is greater than or equal to the number of objects, the object is moved to the end of the set. +Values do not have to be unique. Objects not included in the move list keep +their relative order, aside from any displacement caused by the moves. +""" +input MoveInput { + """ + The ID of the object to be moved. + """ + id: ID! + + """ + Zero-based index of the object's position at the time this move is applied. If + the value is >= the number of objects, the object is placed at the end. + """ + newPosition: UnsignedInt64! +} + +""" +The schema's entry point for all mutation operations. +""" +type Mutation { + """ + Updates the email state value for an abandonment. + """ + abandonmentEmailStateUpdate( + """ + The 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! + ): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") + + """ + Updates the marketing activities delivery statuses for an abandonment. + """ + abandonmentUpdateActivitiesDeliveryStatuses( + """ + The ID of the abandonment that needs to be updated. + """ + abandonmentId: ID! + + """ + The 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! + ): AbandonmentUpdateActivitiesDeliveryStatusesPayload + + """ + Creates a one-time charge for app features or services that don't require + recurring billing. This mutation is ideal for apps that sell individual + features, premium content, or services on a per-use basis rather than + subscription models. + + For example, a design app might charge merchants once for premium templates, + or a marketing app could bill for individual campaign setups without ongoing monthly fees. + + Use the `AppPurchaseOneTimeCreate` mutation to: + - Charge for premium features or content purchases + - Bill for professional services or setup fees + - Generate revenue from one-time digital product sales + + The mutation returns a confirmation URL that merchants must visit to approve + the charge. Test and development stores are not charged, allowing safe testing + of billing flows. + + Explore one-time billing options on the [app purchases page](https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases). + """ + appPurchaseOneTimeCreate( + """ + The name of the one-time purchase from the app. + """ + name: String! + + """ + The amount to be charged to the store for the app one-time purchase. + """ + price: MoneyInput! + + """ + The URL where the merchant is redirected after approving the app one-time purchase. + """ + returnUrl: URL! + + """ + Whether the app one-time purchase is a test transaction. + """ + test: Boolean = false + ): AppPurchaseOneTimeCreatePayload + + """ + Revokes previously granted access scopes from an app installation, allowing + merchants to reduce an app's permissions without completely uninstalling it. + This provides granular control over what data and functionality apps can access. + + For example, if a merchant no longer wants an app to access customer + information but still wants to use its inventory features, they can revoke the + customer-related scopes while keeping inventory permissions active. + + Use the `appRevokeAccessScopes` mutation to: + - Remove specific permissions from installed apps + - Maintain app functionality while minimizing data exposure + + The mutation returns details about which scopes were successfully revoked and + any errors that prevented certain permissions from being removed. + + Learn more about [managing app permissions](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/manage-access-scopes#revoke-granted-scopes-dynamically). + """ + appRevokeAccessScopes( + """ + The list of scope handles to revoke. + """ + scopes: [String!]! + ): AppRevokeAccessScopesPayload + + """ + Cancels an active app subscription, stopping future billing cycles. The + cancellation behavior depends on the `replacementBehavior` setting - it can + either disable auto-renewal (allowing the subscription to continue until the + end of the current billing period) or immediately cancel with prorated refunds. + + When a merchant decides to discontinue using subscription features, this + mutation provides a clean cancellation workflow that respects billing periods + and merchant expectations. + + Use the `AppSubscriptionCancel` mutation to: + - Process merchant-initiated subscription cancellations + - Terminate subscriptions due to policy violations or account issues + - Handle subscription cancellations during app uninstallation workflows + + The cancellation timing and merchant access depends on the + `replacementBehavior` setting and the app's specific implementation of + subscription management. + + For subscription lifecycle management and cancellation best practices, consult + the [subscription management + guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). + """ + appSubscriptionCancel( + """ + The ID of the app subscription to be cancelled. + """ + id: ID! + + """ + Whether to issue prorated credits for the unused portion of the app subscription. There will + 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! + ): 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! + ): AppSubscriptionTrialExtendPayload + + """ + Uninstalls an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) from + a shop. Apps use this mutation to uninstall themselves programmatically, removing their [`AppInstallation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation) + from the merchant's store. + + When an app uninstalls, Shopify automatically performs cleanup tasks, such as deleting [`WebhookSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/WebhookSubscription) + objects and [admin + links](https://shopify.dev/docs/apps/build/admin/admin-links) associated with the app. + + Learn more about [app lifecycle management](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/uninstall-app-api-request). + + > Caution: + > This action is irreversible. You can't restore an uninstalled app's + configuration or data. Before you uninstall an app, make sure that you no + longer need to make API calls for the store in which the app has been installed. + """ + appUninstall: AppUninstallPayload + + """ + Creates a usage charge for an app subscription with usage-based pricing. The + charge counts toward the capped amount limit set when creating the subscription. + + Usage records track consumption of app features or services on a per-use + basis. You provide the charge amount, a description of what you consumed, and + the subscription line item ID. The optional [`idempotencyKey`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppUsageRecord#field-idempotencyKey) + parameter prevents duplicate charges if you send the same request multiple times. + + If the new charge would cause total usage charges in the current billing + interval to exceed the capped amount, then the mutation returns an error. + + Learn more about [creating usage-based subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-usage-based-subscriptions). + """ + appUsageRecordCreate( + """ + The 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! + ): AppUsageRecordCreatePayload + + """ + Creates an [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). Articles are content pieces that include a title, body text, and author information. + + You can publish the article immediately or schedule it with a specific publish + date. You can customize the article's URL handle, apply custom templates for + rendering, and add optional fields like [tags](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleCreate#arguments-article.fields.tags), an [image](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleCreate#arguments-article.fields.image), and [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. + + The mutation validates article content and ensures proper blog association. + Error handling provides specific feedback for content requirements. + """ + articleCreate( + """ + The properties of the new article. + """ + article: ArticleCreateInput! + + """ + The properties of the new blog. + """ + blog: ArticleBlogInput + ): ArticleCreatePayload + + """ + Permanently deletes a blog article from a shop's blog. This mutation removes the article and all associated metadata. + + For example, when outdated product information or seasonal content needs + removal, merchants can use this mutation to clean up their blog. + + Use the `articleDelete` mutation to: + - Remove outdated or incorrect blog content + - Clean up seasonal or time-sensitive articles + - Maintain blog organization + + The deletion is permanent and returns the deleted article's ID for confirmation. + """ + articleDelete( + """ + The ID of the article to be deleted. + """ + id: ID! + ): ArticleDeletePayload + + """ + Updates an existing [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). + You can modify the article's content, metadata, publication status, and + associated properties like author information and tags. + + If you update the [`handle`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleUpdate#arguments-article.fields.handle), + then you can optionally create a redirect from the old URL to the new one by setting [`redirectNewHandle`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleUpdate#arguments-article.fields.redirectNewHandle) to `true`. + """ + articleUpdate( + """ + The 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! + ): ArticleUpdatePayload + + """ + Update the backup region that is used when we have no better signal of what region a buyer is in. + """ + backupRegionUpdate( + """ + Optional input representing the region to be updated. If not provided, the existing regions remain unchanged. + """ + region: BackupRegionUpdateInput + ): BackupRegionUpdatePayload + + """ + Creates a new blog within a shop, establishing a container for organizing articles. + + For example, a fitness equipment retailer launching a wellness blog would use + this mutation to create the blog, enabling them to publish workout guides and + nutrition tips. + + Use the `blogCreate` mutation to: + - Launch new content marketing initiatives + - Create separate blogs for different content themes + - Establish spaces for article organization + + The mutation validates blog settings and establishes the structure for article publishing. + """ + blogCreate( + """ + The properties of the new blog. + """ + blog: BlogCreateInput! + ): BlogCreatePayload + + """ + Permanently deletes a blog from a shop. This mutation removes the blog container and its organizational structure. + + For example, when consolidating multiple seasonal blogs into a single + year-round content strategy, merchants can use this mutation to remove unused blogs. + + Use the `blogDelete` mutation to: + - Remove unused or outdated blogs + - Consolidate content organization + - Clean up blog structure + + The deletion is permanent and returns the deleted blog's ID for confirmation. + """ + blogDelete( + """ + The ID of the blog to be deleted. + """ + id: ID! + ): BlogDeletePayload + + """ + Updates an existing blog's configuration and settings. This mutation allows + merchants to modify blog properties to keep their content strategy current. + + For example, a merchant might update their blog's title from "Company News" to + "Sustainability Stories" when shifting their content focus, or modify the + handle to improve URL structure. + + Use the `blogUpdate` mutation to: + - Change blog titles for rebranding + - Modify blog handles for better URLs + - Adjust comment settings and moderation preferences + + The mutation returns the updated blog with any validation errors. + """ + blogUpdate( + """ + The properties of the blog to be updated. + """ + blog: BlogUpdateInput! + + """ + The ID of the blog to be updated. + """ + id: ID! + ): BlogUpdatePayload + + """ + Starts the cancelation process of a running bulk operation. + + There may be a short delay from when a cancelation starts until the operation is actually canceled. + """ + bulkOperationCancel( + """ + The ID of the bulk operation to cancel. + """ + id: ID! + ): BulkOperationCancelPayload + + """ + Creates and runs a [bulk operation](https://shopify.dev/docs/api/admin-graphql/latest/objects/BulkOperation) + to import data asynchronously. This mutation executes a specified GraphQL + mutation multiple times using input data from a [JSONL](http://jsonlines.org/) + file that you've uploaded to Shopify. + + The operation processes each line in your JSONL file as a separate mutation + execution. The operation delivers results in a JSONL file when it completes. + 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 + + """ + 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 + + """ + Creates product feedback for multiple products. + """ + bulkProductResourceFeedbackCreate( + """ + An array of inputs to create the feedback. Limited to 50. + """ + feedbackInput: [ProductResourceFeedbackInput!]! + ): BulkProductResourceFeedbackCreatePayload + + """ + Creates a carrier service that provides real-time shipping rates to Shopify. + Carrier services provide real-time shipping rates from external providers like + FedEx, UPS, or custom shipping solutions. The carrier service connects to your + external shipping rate calculation system through a callback URL. + + When customers reach checkout, Shopify sends order details to your callback + URL and displays the returned shipping rates. The service must be active to + provide rates during checkout. + """ + carrierServiceCreate( + """ + The input fields used to create a carrier service. + """ + input: DeliveryCarrierServiceCreateInput! + ): CarrierServiceCreatePayload + + """ + Removes an existing carrier service. + """ + carrierServiceDelete( + """ + The global ID of the carrier service to delete. + """ + id: ID! + ): CarrierServiceDeletePayload + + """ + Updates a carrier service. Only the app that creates a carrier service can update it. + """ + carrierServiceUpdate( + """ + The input fields used to update a carrier service. + """ + input: DeliveryCarrierServiceUpdateInput! + ): CarrierServiceUpdatePayload + + """ + Creates a cart transform function that lets merchants customize how products + are bundled and presented during checkout. This gives merchants powerful + control over their merchandising strategy by allowing apps to modify cart line + items programmatically, supporting advanced approaches like dynamic bundles or + personalized product recommendations. + + For example, a bundle app might create a cart transform that automatically + groups related products (like a camera, lens, and case) into a single bundle + line item when customers add them to their cart, complete with bundle pricing + and unified presentation. + + Use `CartTransformCreate` to: + - Deploy custom bundling logic to merchant stores + - Enable dynamic product grouping during checkout + - Implement personalized product recommendations + - Create conditional offers based on cart contents + - Support complex pricing strategies for product combinations + + The mutation processes synchronously and returns the created cart transform + along with any validation errors. Once created, the cart transform function + becomes active for the shop and will process cart modifications according to + your defined logic. Cart transforms integrate with [Shopify + Functions](https://shopify.dev/docs/api/functions) to provide powerful + customization capabilities while maintaining checkout performance. + + Cart Transform functions can be configured to block checkout on failure or + allow graceful degradation, giving you control over how errors are handled in + the customer experience. + + Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle). + """ + cartTransformCreate( + """ + 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 + + """ + Removes an existing cart transform function from the merchant's store, + disabling any customized bundle or cart modification logic it provided. This + mutation persistently deletes the transform configuration and stops all + associated cart processing. + + For example, when discontinuing a bundle app or removing specific + merchandising features, you would delete the corresponding cart transform to + ensure customers no longer see the bundled products or modified cart behavior. + + Use `CartTransformDelete` to: + - Deactivate customized bundle logic when removing app features + - Clean up unused transform functions + - Disable cart modifications during app uninstallation + - Remove outdated merchandising strategies + - Restore default cart behavior for merchants + + The deletion processes immediately and returns the ID of the removed cart + transform for confirmation. Once deleted, the transform function stops + processing new cart operations, though existing cart sessions may retain their + current state until refresh. This ensures a clean transition without + disrupting active customer sessions. + + Consider the timing of deletions carefully, as removing transforms during peak + shopping periods could affect customer experience if they have active carts + with transformed items. + + Learn more about [managing cart transforms](https://shopify.dev/docs/apps/selling-strategies/bundles). + """ + cartTransformDelete( + """ + A globally-unique identifier for the cart transform. + """ + id: ID! + ): CartTransformDeletePayload + + """ + Modifies which contexts, like + [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation), can access a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). + You can add or remove contexts to control where the catalog's products and + prices are available. + + Learn more about [managing catalog + contexts](https://shopify.dev/docs/apps/build/markets/new-markets/catalogs) + and [managing B2B + catalogs](https://shopify.dev/docs/apps/build/b2b/manage-catalogs). + """ + catalogContextUpdate( + """ + The ID of the catalog for which to update the context. + """ + catalogId: ID! + + """ + The contexts to add to the catalog. + """ + contextsToAdd: CatalogContextInput + + """ + The contexts to remove from the catalog. + """ + contextsToRemove: CatalogContextInput + ): CatalogContextUpdatePayload + + """ + Creates a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) that controls product availability and pricing for specific contexts like + [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation). + + ### Publications and Price Lists + + - **[`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication)** objects control which products are visible in a catalog. Publications are + **optional**. When a publication isn't associated with a catalog, product + availability is determined by the sales channel. + - **[`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList)** objects define custom pricing for products in a catalog. + + You can optionally associate a publication and price list when creating the + catalog, or add them later using separate mutations. + + ### When to use Publications + + **Create a publication only if you need to:** + - Limit which products are visible in a specific context (e.g., show different + products to different company locations or markets) + - Publish a curated subset of your product catalog + + **Do NOT create a publication if:** + - You want product availability determined by the sales channel + - You only need to customize pricing (use a price list without a publication) + + > **Important:** For company location catalogs that only require custom + pricing, create the catalog with a price list but without a publication. + + Learn more about [managing catalog + contexts](https://shopify.dev/docs/apps/build/markets/new-markets/catalogs) + and [using catalogs for different markets](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalogCreate( + """ + The properties of the new catalog. + """ + input: CatalogCreateInput! + ): CatalogCreatePayload + + """ + Delete a catalog. + """ + catalogDelete( + """ + 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! + ): CatalogDeletePayload + + """ + Updates an existing [catalog's](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) + configuration. Catalogs control product publishing and pricing for specific contexts like + [markets](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) or B2B [company locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation). + + You can modify the catalog's title, status, and associated context. You can + also update the [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) + that determines pricing adjustments or the [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that controls which products customers see. + """ + catalogUpdate( + """ + The ID of the catalog to update. + """ + id: ID! + + """ + The properties of the updated catalog. + """ + input: CatalogUpdateInput! + ): CatalogUpdatePayload + + """ + Updates the visual branding for a [`CheckoutProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile), + customizing how checkout displays to customers. Creates new branding settings + if none exist, or modifies existing settings. + + The mutation accepts two levels of customization through the [`CheckoutBrandingInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingInput) input object. [`designSystem`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert#arguments-checkoutBrandingInput.fields.designSystem) + defines foundational brand attributes like colors, typography, and corner + radius that apply consistently throughout checkout. [`customizations`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert#arguments-checkoutBrandingInput.fields.customizations) + defines styles for specific parts of the UI, individual components, or groups + of components like the header, buttons, form fields, and sections. + + Changes to a published checkout profile display immediately in the store's + checkout. You can preview draft profiles in the Shopify admin's checkout + editor before publishing. + + Learn more about [checkout styling](https://shopify.dev/docs/apps/checkout/styling). + """ + checkoutBrandingUpsert( + """ + 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! + ): CheckoutBrandingUpsertPayload + + """ + 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! + + """ + 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!]! + ): CollectionAddProductsPayload + + """ + Adds products to a [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + asynchronously and returns a + [`Job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) to + track the operation's progress. This mutation handles large product sets + efficiently by processing them in the background. + + You can poll the returned job using the + [`job`](https://shopify.dev/docs/api/admin-graphql/latest/queries/job) query + to monitor completion status. + + > Note: + > This mutation adds products in the order specified in the [`productIds`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/collectionAddProducts#arguments-productIds) argument. + """ + collectionAddProductsV2( + """ + The ID of the collection that's being updated. + """ + id: ID! + + """ + The IDs of the products that are being added to the collection. If the + collection's sort order is manual, the products will be added in the order + in which they are provided. + """ + productIds: [ID!]! + ): CollectionAddProductsV2Payload + + """ + 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 + + """ + Deletes a collection and removes it permanently from the store. This operation + cannot be undone and will remove the collection from all sales channels where + it was published. + + For example, when merchants discontinue seasonal promotions or reorganize + their catalog structure, they can delete outdated collections like "Back to + School 2023" to keep their store organized. + + Use `CollectionDelete` to: + - Remove outdated or unused collections from stores + - Clean up collection structures during catalog reorganization + - Implement collection management tools with deletion capabilities + + Products within the deleted collection remain in the store but are no longer grouped under that collection. + + Learn more about [collection management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionDelete( + """ + The collection to delete. + """ + input: CollectionDeleteInput! + ): CollectionDeletePayload + + """ + Duplicates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + + An existing collection ID and new title are required. + + ## Publication Duplication + + Publications may be excluded by passing `copyPublications: false` in the input. + + ## Metafields + Metafield values are not duplicated if the unique values capability is enabled. + """ + collectionDuplicate( + """ + The input for duplicating a collection. + """ + input: CollectionDuplicateInput! + ): CollectionDuplicatePayload + + """ + Publishes a collection to a channel. + """ + collectionPublish( + """ + Specify a collection to publish and the sales channels to publish it to. + """ + input: CollectionPublishInput! + ): CollectionPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Removes multiple 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! + + """ + The IDs of products to remove from the collection. The mutation doesn't + validate that the products belong to the collection or whether the products exist. + """ + productIds: [ID!]! + ): CollectionRemoveProductsPayload + + """ + Asynchronously reorders products within a specified collection. Instead of + returning an updated collection, this mutation returns a job, which should be + [polled](https://shopify.dev/api/admin-graphql/latest/queries/job). The [`Collection.sortOrder`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-collection-sortorder) + must be `MANUAL`. + + How to use this mutation: + - Provide only the products that actually moved in the `moves` list; do not + send the entire product list. For example: to move the product at index 1 to + index N, send a single move for that product with `newPosition: N`. + - Each move is applied sequentially in the order provided. + - `newPosition` is a zero-based index within the collection at the moment the + move is applied (after any prior moves in the list). + - Products not included in `moves` keep their relative order, aside from any displacement caused by the moves. + - If `newPosition` is greater than or equal to the number of products, the product is placed at the end. + + Example: + - Initial order: [A, B, C, D, E] (indices 0..4) + - Moves (applied in order): + - E -> newPosition: 1 + - C -> newPosition: 4 + - Result: [A, E, B, D, C] + + Displaced products will have their position altered in a consistent manner with no gaps. + """ + collectionReorderProducts( + """ + The ID of the collection on which to reorder products. + """ + id: ID! + + """ + A list of moves to perform, evaluated in order. Provide only products whose + positions changed; do not send the full list. + `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 + + """ + Unpublishes a collection. + """ + collectionUnpublish( + """ + Specify a collection to unpublish and the sales channels to remove it from. + """ + input: CollectionUnpublishInput! + ): CollectionUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), + modifying its properties, products, or publication settings. Collections help organize + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) together + in the [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + + Use the `collectionUpdate` mutation to programmatically modify collections in scenarios such as: + + - Updating collection details, like title, description, or image + - Modifying SEO metadata for better search visibility + - Changing which products are included (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 + + """ + 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!] + + """ + The updated title for the combined listing. + """ + title: String + ): CombinedListingUpdatePayload + + """ + Approves a pending comment, making it visible to store visitors on the associated blog article. + + For example, when a customer submits a question about a product in a blog + post, merchants can approve the comment to make it publicly visible. + + Use the `commentApprove` mutation to: + - Publish pending comments after review + - Enable customer discussions on blog articles + - Maintain quality control over comments + + Once approved, the comment becomes visible to all store visitors. + """ + commentApprove( + """ + The ID of the comment to be approved. + """ + id: ID! + ): CommentApprovePayload + + """ + Permanently removes a comment from a blog article. + + For example, when a comment contains spam links or inappropriate language that + violates store policies, merchants can delete it entirely. + + Use the `commentDelete` mutation to: + - Remove spam or inappropriate comments permanently + - Clean up irrelevant discussions + - Maintain content standards on blog articles + + Deletion is permanent and can't be undone. + """ + commentDelete( + """ + The ID of the comment to be deleted. + """ + id: ID! + ): CommentDeletePayload + + """ + Reverses a spam classification on a comment, restoring it to normal moderation + status. This mutation allows merchants to change their decision when a comment + has been manually marked as spam. + + For example, when a merchant reviews comments marked as spam and finds a + legitimate customer question, they can use this mutation to restore the + comment's normal status and make it eligible for approval. + + Use the `commentNotSpam` mutation to: + - Unmark comments that were marked as spam + - Restore comments to normal moderation status + - Move comments back to the approval queue + + This action changes the comment's status from spam back to pending, where it + can then be approved or managed according to standard moderation practices. + """ + commentNotSpam( + """ + The ID of the comment to be marked as not spam. + """ + id: ID! + ): CommentNotSpamPayload + + """ + Marks a comment as spam, removing it from public view. This mutation enables + merchants to quickly handle unwanted promotional content, malicious links, or + other spam that appears in blog discussions. + + For example, when a comment contains suspicious links to unrelated products or + services, merchants can mark it as spam to immediately hide it from customers. + + Use the `commentSpam` mutation to: + - Hide promotional or malicious comments from public view + - Protect customers from potentially harmful links + - Maintain professional discussion quality on blog articles + + Spam-marked comments can be reviewed later and potentially restored using the + `commentNotSpam` mutation if they were incorrectly classified. + """ + commentSpam( + """ + The ID of the comment to be marked as spam. + """ + id: ID! + ): CommentSpamPayload + + """ + Deletes a list of companies. + """ + companiesDelete( + """ + A list of IDs of companies to delete. + """ + companyIds: [ID!]! + ): CompaniesDeletePayload + + """ + Deletes a company address. + """ + companyAddressDelete( + """ + The ID of the address to delete. + """ + addressId: ID! + ): CompanyAddressDeletePayload + + """ + Adds an existing [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + as a contact to a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company). + Companies are business entities that make purchases from the merchant's + store. Use this mutation when you have a customer who needs to be associated + with a B2B company to make purchases on behalf of that company. + + The mutation returns the newly created [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) + that links the customer to the company. After assignment, the customer becomes + a company contact who can place orders on behalf of the company with access to + any catalogs, pricing, and payment terms configured for the company's locations. + """ + companyAssignCustomerAsContact( + """ + The ID of the company to assign the contact to. + """ + companyId: ID! + + """ + The ID of the customer to assign as the contact. + """ + customerId: ID! + ): CompanyAssignCustomerAsContactPayload + + """ + Assigns the main contact for the company. + """ + companyAssignMainContact( + """ + The ID of the company contact to be assigned as the main contact. + """ + companyContactId: ID! + + """ + The ID of the company to assign the main contact to. + """ + companyId: ID! + ): CompanyAssignMainContactPayload + + """ + Assigns a role to a contact for a location. + """ + companyContactAssignRole( + """ + The ID of the contact to assign a role to. + """ + companyContactId: ID! + + """ + The ID of the role to assign to a contact. + """ + companyContactRoleId: ID! + + """ + The ID of the location to assign a role to a contact. + """ + companyLocationId: ID! + ): CompanyContactAssignRolePayload + + """ + Assigns roles on a company contact. + """ + companyContactAssignRoles( + """ + The contact whose roles are being assigned. + """ + companyContactId: ID! + + """ + The new roles to assign. + """ + rolesToAssign: [CompanyContactRoleAssign!]! + ): CompanyContactAssignRolesPayload + + """ + Creates a company contact and the associated customer. + """ + companyContactCreate( + """ + The ID of the company that the company contact belongs to. + """ + companyId: ID! + + """ + The fields to use to create the company contact. + """ + input: CompanyContactInput! + ): CompanyContactCreatePayload + + """ + Deletes a company contact. + """ + companyContactDelete( + """ + The ID of the company contact to delete. + """ + companyContactId: ID! + ): CompanyContactDeletePayload + + """ + Removes a company contact from a Company. + """ + companyContactRemoveFromCompany( + """ + The ID of the company contact to remove from the Company. + """ + companyContactId: ID! + ): CompanyContactRemoveFromCompanyPayload + + """ + Revokes a role on a company contact. + """ + companyContactRevokeRole( + """ + The ID of the contact to revoke a role from. + """ + companyContactId: ID! + + """ + The ID of the role assignment to revoke from a contact. + """ + companyContactRoleAssignmentId: ID! + ): CompanyContactRevokeRolePayload + + """ + Revokes roles on a company contact. + """ + companyContactRevokeRoles( + """ + The contact whose roles are being revoked. + """ + companyContactId: ID! + + """ + Flag to revoke all roles on the contact. + """ + revokeAll: Boolean = false + + """ + The current role assignment IDs to revoke. + """ + roleAssignmentIds: [ID!] + ): CompanyContactRevokeRolesPayload + + """ + Sends the company contact a welcome email. + """ + companyContactSendWelcomeEmail( + """ + The ID of the company contact to send welcome email to. + """ + companyContactId: ID! + + """ + The welcome email fields. + """ + email: EmailInput + ): CompanyContactSendWelcomeEmailPayload + + """ + Updates a company contact. + """ + companyContactUpdate( + """ + The ID of the company contact to be updated. + """ + companyContactId: ID! + + """ + The fields to use to update the company contact. + """ + input: CompanyContactInput! + ): CompanyContactUpdatePayload + + """ + Deletes one or more company contacts. + """ + companyContactsDelete( + """ + The list of IDs of the company contacts to delete. + """ + companyContactIds: [ID!]! + ): CompanyContactsDeletePayload + + """ + Creates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) + for B2B commerce. This mutation creates the company and can optionally create an initial [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) and [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) + in a single operation. Company contacts are people who place orders on behalf + of the company. Company locations are branches or offices with their own + billing and shipping addresses. + + > Note: Creating a company without a `name` [returns an error](https://shopify.dev/docs/api/admin-graphql/latest/mutations/companycreate?example=creating-a-company-without-a-name-returns-an-error). + + Learn more about [creating companies for B2B](https://shopify.dev/docs/apps/build/b2b/start-building#step-1-create-a-company). + """ + companyCreate( + """ + The fields to use when creating the company. + """ + input: CompanyCreateInput! + ): CompanyCreatePayload + + """ + Deletes a company. + """ + companyDelete( + """ + The ID of the company to delete. + """ + id: ID! + ): CompanyDeletePayload + + """ + Updates an address on a company location. + """ + companyLocationAssignAddress( + """ + The 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! + ): CompanyLocationAssignAddressPayload + + """ + Assigns roles on a company location. + """ + companyLocationAssignRoles( + """ + The location whose roles are being assigned. + """ + companyLocationId: ID! + + """ + The roles to assign. + """ + rolesToAssign: [CompanyLocationRoleAssign!]! + ): CompanyLocationAssignRolesPayload + + """ + Creates one or more mappings between a staff member at a shop and a company location. + """ + companyLocationAssignStaffMembers( + """ + The ID of the company location to assign the staff member to. + """ + companyLocationId: ID! + + """ + The list of IDs of the staff members to assign. + """ + staffMemberIds: [ID!]! + ): CompanyLocationAssignStaffMembersPayload + + """ + Assigns tax exemptions to the company location. + """ + companyLocationAssignTaxExemptions( + """ + The location to which the tax exemptions will be assigned. + """ + companyLocationId: ID! + + """ + The tax exemptions that are being assigned to the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Creates a new location for a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company). + Company locations are branches or offices where B2B customers can place orders + with specific pricing, catalogs, and payment terms. + + Creates a company location. Each location can have its own billing and + shipping addresses, tax settings, and [`buyer experience configuration`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration). + You can assign [staff members](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) and [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) + objects to manage the location. + """ + companyLocationCreate( + """ + The ID of the company that the company location belongs to. + """ + companyId: ID! + + """ + The fields to use to create the company location. + """ + input: CompanyLocationInput! + ): CompanyLocationCreatePayload + + """ + Creates a tax registration for a company location. + """ + companyLocationCreateTaxRegistration( + """ + The ID of the company location that the tax registration gets assigned to. + """ + locationId: ID! + + """ + The unique tax id for the tax registration. + """ + taxId: String! + ): CompanyLocationCreateTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Deletes a company location. + """ + companyLocationDelete( + """ + The ID of the company location to delete. + """ + companyLocationId: ID! + ): CompanyLocationDeletePayload + + """ + Deletes one or more existing mappings between a staff member at a shop and a company location. + """ + companyLocationRemoveStaffMembers( + """ + The list of IDs of the company location staff member assignment to delete. + """ + companyLocationStaffMemberAssignmentIds: [ID!]! + ): CompanyLocationRemoveStaffMembersPayload + + """ + Revokes roles on a company location. + """ + companyLocationRevokeRoles( + """ + The location whose roles are being revoked. + """ + companyLocationId: ID! + + """ + The current roles to revoke. + """ + rolesToRevoke: [ID!]! + ): CompanyLocationRevokeRolesPayload + + """ + Revokes tax exemptions from the company location. + """ + companyLocationRevokeTaxExemptions( + """ + The location from which the tax exemptions will be revoked. + """ + companyLocationId: ID! + + """ + The tax exemptions that are being revoked from the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Revokes tax registration on a company location. + """ + companyLocationRevokeTaxRegistration( + """ + The location whose tax registration is being revoked. + """ + companyLocationId: ID! + ): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """ + Sets the tax settings for a company location. + """ + companyLocationTaxSettingsUpdate( + """ + The ID of the company location that the tax settings get assigned to. + """ + companyLocationId: ID! + + """ + The 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 + + """ + Updates a company location's information and B2B checkout settings. Company + locations are branches or offices where [`CompanyContact`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact) + members place orders on behalf of the company. Contacts must be assigned to a + location through `roleAssignments` to place orders. + + The mutation modifies details such as the location's name, contact + information, preferred locale, and internal notes. You can also configure the + B2B checkout experience through [`BuyerExperienceConfiguration`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration) + settings that control whether orders require merchant review, [`PaymentTermsTemplate`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTermsTemplate) + settings, shipping address editing permissions, and [`DepositConfiguration`](https://shopify.dev/docs/api/admin-graphql/latest/unions/DepositConfiguration) requirements. + + Learn more about [managing company locations](https://shopify.dev/docs/apps/build/b2b/manage-client-company-locations). + """ + companyLocationUpdate( + """ + The ID of the company location to update. + """ + companyLocationId: ID! + + """ + The input fields to update in the company location. + """ + input: CompanyLocationUpdateInput! + ): CompanyLocationUpdatePayload + + """ + Deletes a list of company locations. + """ + companyLocationsDelete( + """ + A list of IDs of company locations to delete. + """ + companyLocationIds: [ID!]! + ): CompanyLocationsDeletePayload + + """ + Revokes the main contact from the company. + """ + companyRevokeMainContact( + """ + The ID of the company to revoke the main contact from. + """ + companyId: ID! + ): CompanyRevokeMainContactPayload + + """ + Updates a [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) + with new information. Companies represent business customers that can have + multiple contacts and locations with specific pricing, payment terms, and + checkout settings. + + The mutation accepts the company's ID and an input object containing the + fields to update. You can modify the company name, add or update internal + notes, set an external ID for integration with other systems, or adjust the + customer relationship start date. + + Learn more about [building B2B features](https://shopify.dev/docs/apps/build/b2b/start-building). + """ + companyUpdate( + """ + The ID of the company to be updated. + """ + companyId: ID! + + """ + The input fields to update the company. + """ + input: CompanyInput! + ): CompanyUpdatePayload + + """ + Update or create consent policies in bulk. + """ + consentPolicyUpdate( + """ + The consent policies to update or create. If the country and region matches + an existing consent policy, then the consent policy is updated. Otherwise, a + new consent policy is created. + """ + consentPolicies: [ConsentPolicyInput!]! + ): ConsentPolicyUpdatePayload + + """ + Add tax exemptions for the customer. + """ + customerAddTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions to add for the customer, in the format of an + array or a comma-separated list. Example values: + `["CA_BC_RESELLER_EXEMPTION", "CA_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerAddTaxExemptionsPayload + + """ + Creates a new [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer). You can optionally set the address as the customer's default address. + + You can only add addresses to existing customers. Each customer can have multiple addresses. + """ + customerAddressCreate( + """ + Specifies the fields to use when creating the address. + """ + address: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! + + """ + Whether to set the address as the customer's default address. + """ + setAsDefault: Boolean + ): CustomerAddressCreatePayload + + """ + Deletes a customer's address. + """ + customerAddressDelete( + """ + The ID of the address to be deleted from the customer. + """ + addressId: ID! + + """ + The ID of the customer whose address is being deleted. + """ + customerId: ID! + ): CustomerAddressDeletePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress). You can modify any field of the address and optionally set it as the + customer's default address. + """ + customerAddressUpdate( + """ + Specifies the fields to use when updating the address. + """ + address: MailingAddressInput! + + """ + The ID of the address to update. + """ + addressId: ID! + + """ + The ID of the customer whose address is being updated. + """ + customerId: ID! + + """ + Whether to set the address as the customer's default address. + """ + setAsDefault: Boolean + ): CustomerAddressUpdatePayload + + """ + Cancels a pending erasure of a customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#cancel-customer-data-erasure). + + To request an erasure of a customer's data use the [customerRequestDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerRequestDataErasure). + """ + customerCancelDataErasure( + """ + The ID of the customer for whom to cancel a pending data erasure. + """ + customerId: ID! + ): CustomerCancelDataErasurePayload + + """ + Creates a new [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) in the store. + + Accepts customer details including contact information, marketing consent + preferences, and tax exemptions through the [`CustomerInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CustomerInput) + input object. You can also associate [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MetafieldInput) + and tags to organize and extend customer data. + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerCreate( + """ + The input fields to create a customer. + """ + input: CustomerInput! + ): CustomerCreatePayload + + """ + Deletes a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) from the store. You can only delete customers who haven't placed any + [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerDelete( + """ + Specifies the customer to delete. + """ + input: CustomerDeleteInput! + ): CustomerDeletePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s email marketing consent information. The customer must have an email address + to update their consent. Records the [marketing state](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingState) + (such as subscribed, pending, unsubscribed), [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerEmailAddress#field-marketingOptInLevel), + and when and where the customer gave or withdrew consent. + + Only three values are accepted as input: SUBSCRIBED, UNSUBSCRIBED, and PENDING. + NOT_SUBSCRIBED, REDACTED, and INVALID cannot be set via this mutation; they are + read-only or internally-set states. + """ + customerEmailMarketingConsentUpdate( + """ + Specifies the input fields to update a customer's email marketing consent information. + """ + input: CustomerEmailMarketingConsentUpdateInput! + ): CustomerEmailMarketingConsentUpdatePayload + + """ + Generates a one-time activation URL for a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + whose legacy customer account isn't yet enabled. Use this after importing + customers or creating accounts that need activation. + + The generated URL expires after 30 days and becomes invalid if you generate a new one. + + > Note: The generated URL only works when legacy customer accounts are enabled + on the shop. It only works for customers with disabled or invited [`account states`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer#field-Customer.fields.state). + Attempting to generate a URL for an already-enabled customer returns an error. + """ + customerGenerateAccountActivationUrl( + """ + The ID of the customer that the URL is generated for. + """ + customerId: ID! + ): CustomerGenerateAccountActivationUrlPayload + + """ + Merges two customers. + """ + customerMerge( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePayload + + """ + Creates a vaulted payment method for a customer from duplication data. + + This data must be obtained from another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodCreateFromDuplicationData( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! + + """ + The encrypted payment method data. + """ + encryptedDuplicationData: String! + ): CustomerPaymentMethodCreateFromDuplicationDataPayload + + """ + Creates a credit card payment method for a customer using a session id. + These values are only obtained through card imports happening from a PCI compliant environment. + Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly. + """ + customerPaymentMethodCreditCardCreate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! + + """ + The Cardserver session ID. Obtained by storing card data with Shopify's + Cardsink. Exchanging raw card data for a session ID must be done in a PCI + complaint environment. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardCreatePayload + + """ + Updates the credit card payment method for a customer. + """ + customerPaymentMethodCreditCardUpdate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! + + """ + The Cardserver session ID. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardUpdatePayload + + """ + Returns encrypted data that can be used to duplicate the payment method in another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodGetDuplicationData( + """ + The payment method to be duplicated. + """ + customerPaymentMethodId: ID! + + """ + The customer the payment method will be duplicated into. + """ + targetCustomerId: ID! + + """ + The shop the payment method will be duplicated into. + """ + targetShopId: ID! + ): CustomerPaymentMethodGetDuplicationDataPayload + + """ + Returns a URL that allows the customer to update a specific payment method. + + Currently, `customerPaymentMethodGetUpdateUrl` only supports Shop Pay. + """ + customerPaymentMethodGetUpdateUrl( + """ + The payment method to be updated. + """ + customerPaymentMethodId: ID! + ): CustomerPaymentMethodGetUpdateUrlPayload + + """ + Creates a PayPal billing agreement for a customer. + """ + 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! + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean = false + ): CustomerPaymentMethodPaypalBillingAgreementCreatePayload + + """ + Updates a PayPal billing agreement for a customer. + """ + customerPaymentMethodPaypalBillingAgreementUpdate( + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! + ): CustomerPaymentMethodPaypalBillingAgreementUpdatePayload + + """ + Creates a customer payment method using identifiers from remote payment + gateways like Stripe, Authorize.Net, or Braintree. Imports existing payment + methods from external gateways and associates them with [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + objects in Shopify. + + The operation processes payment methods asynchronously. The returned [`CustomerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod) + initially has incomplete details while Shopify validates and processes the + remote gateway information. Use the [`customerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/queries/customerPaymentMethod) + query to retrieve the payment method status until all details are available or + the payment method is revoked. + + Learn more about [migrating customer payment methods from remote gateways](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/migrate-to-subscriptions-api/migrate-customer-information#step-2-import-payment-methods-for-customers). + """ + customerPaymentMethodRemoteCreate( + """ + The ID of the customer. + """ + customerId: ID! + + """ + Remote gateway payment method details. + """ + remoteReference: CustomerPaymentMethodRemoteInput! + ): CustomerPaymentMethodRemoteCreatePayload + + """ + Revokes a customer's payment method. + """ + customerPaymentMethodRevoke( + """ + The ID of the customer payment method to be revoked. + """ + customerPaymentMethodId: ID! + ): CustomerPaymentMethodRevokePayload + + """ + Sends a link to the customer so they can update a specific payment method. + """ + customerPaymentMethodSendUpdateEmail( + """ + The payment method to be updated. + """ + customerPaymentMethodId: ID! + + """ + Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input. + """ + email: EmailInput + ): CustomerPaymentMethodSendUpdateEmailPayload + + """ + Remove tax exemptions from a customer. + """ + customerRemoveTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions to remove for the customer, in the format of an + array or a comma-separated list. Example values: + `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerRemoveTaxExemptionsPayload + + """ + Replace tax exemptions for a customer. + """ + customerReplaceTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! + + """ + The list of tax exemptions that will replace the current exemptions for a + customer. Can be an array or a comma-separated list. + Example values: `["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"]`, + `"CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION"`. + """ + taxExemptions: [TaxExemption!]! + ): CustomerReplaceTaxExemptionsPayload + + """ + Enqueues a request to erase customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#erase-customer-personal-data). + + To cancel the data erasure request use the [customerCancelDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerCancelDataErasure). + """ + customerRequestDataErasure( + """ + The ID of the customer to erase. + """ + customerId: ID! + ): CustomerRequestDataErasurePayload + + """ + Creates a customer segment members query. + """ + customerSegmentMembersQueryCreate( + """ + The input fields to create a customer segment members query. + """ + input: CustomerSegmentMembersQueryInput! + ): CustomerSegmentMembersQueryCreatePayload + + """ + Sends an email invitation for a customer to create a legacy customer account. + The invitation lets customers set up their password and activate their account + in the online store. + + You can optionally customize the email content including the subject, sender, + recipients, and message body. If you don't provide email customization, the + store uses its default account invitation template. + + > Note: The invite only works when legacy customer accounts are enabled on the shop. + """ + customerSendAccountInviteEmail( + """ + The ID of the customer to whom an account invite email is to be sent. + """ + customerId: ID! + + """ + Specifies the account invite email fields. + """ + email: EmailInput + ): CustomerSendAccountInviteEmailPayload + + """ + Creates or updates a customer in a single mutation. + + Use this mutation when syncing information from an external data source into Shopify. + + This mutation can be used to create a new customer, update an existing customer by id, or + upsert a customer by a unique key (email or phone). + + To create a new customer omit the `identifier` argument. + To update an existing customer, include the `identifier` with the id of the customer to update. + + To perform an 'upsert' by unique key (email or phone) + use the `identifier` argument to upsert a customer by a unique key (email or phone). If a customer + with the specified unique key exists, it will be updated. If not, a new customer will be created with + that unique key. + + As of API version 2022-10, apps using protected customer data must meet the + protected customer data [requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data) + + Any list field (e.g. + [addresses](https://shopify.dev/api/admin-graphql/unstable/input-objects/MailingAddressInput), + will be updated so that all included entries are either created or updated, and all existing entries not + included will be deleted. + + All other fields will be updated to the value passed. Omitted fields will not be updated. + """ + customerSet( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: CustomerSetIdentifiers + + """ + The properties of the customer. + """ + input: CustomerSetInput! + ): CustomerSetPayload + + """ + Updates a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s SMS marketing consent information. The customer must have a phone number on + their account to receive SMS marketing. + + You can set whether the customer subscribes or unsubscribes to SMS marketing + and specify the [opt-in level](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.marketingOptInLevel). + Optionally include when the consent was collected and which [location](https://shopify.dev/docs/api/admin-graphql/latest/mutations/customerSmsMarketingConsentUpdate#arguments-input.fields.smsMarketingConsent.sourceLocationId) collected it. + """ + customerSmsMarketingConsentUpdate( + """ + Specifies the input fields to update a customer's SMS marketing consent information. + """ + input: CustomerSmsMarketingConsentUpdateInput! + ): CustomerSmsMarketingConsentUpdatePayload + + """ + Updates a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s attributes including personal information and [`tax exemptions`](https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption). + + Apps using protected customer data must meet Shopify's [protected customer data requirements](https://shopify.dev/docs/apps/launch/protected-customer-data#requirements). + """ + customerUpdate( + """ + Provides updated fields for the customer. To set marketing consent, use the + `customerEmailMarketingConsentUpdate` or `customerSmsMarketingConsentUpdate` + mutations instead. + """ + input: CustomerInput! + ): CustomerUpdatePayload + + """ + Updates a customer's default address. + """ + customerUpdateDefaultAddress( + """ + The ID of the customer's new default address. + """ + addressId: ID! + + """ + The ID of the customer whose default address is being updated. + """ + customerId: ID! + ): CustomerUpdateDefaultAddressPayload + + """ + Opt out a customer from data sale. + """ + dataSaleOptOut( + """ + The email address of the customer to opt out of data sale. + """ + email: String! + ): DataSaleOptOutPayload + + """ + Creates a [`DelegateAccessToken`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DelegateAccessToken) with a subset of the parent token's permissions. + + Delegate access tokens enable secure permission delegation to subsystems or + services that need limited access to shop resources. Each token inherits only + the scopes you specify, ensuring subsystems operate with minimal required + permissions rather than full app access. + + Learn more about [delegating access tokens to subsystems](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/use-delegate-tokens). + """ + delegateAccessTokenCreate( + """ + The input fields for creating a delegate access token. + """ + input: DelegateAccessTokenInput! + ): DelegateAccessTokenCreatePayload + + """ + Destroys a delegate access token. + """ + delegateAccessTokenDestroy( + """ + Provides the delegate access token to destroy. + """ + accessToken: String! + ): DelegateAccessTokenDestroyPayload + + """ + Activates and deactivates delivery customizations. + """ + deliveryCustomizationActivation( + """ + The enabled status of the delivery customizations. + """ + enabled: Boolean! + + """ + The global IDs of the delivery customizations. + """ + ids: [ID!]! + ): DeliveryCustomizationActivationPayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationCreate( + """ + The input data used to create the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + ): DeliveryCustomizationCreatePayload + + """ + Creates a delivery customization. + """ + deliveryCustomizationDelete( + """ + The global ID of the delivery customization. + """ + id: ID! + ): DeliveryCustomizationDeletePayload + + """ + Updates a delivery customization. + """ + deliveryCustomizationUpdate( + """ + The input data used to update the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + + """ + The global ID of the delivery customization. + """ + id: ID! + ): DeliveryCustomizationUpdatePayload + + """ + Creates a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) that defines shipping rates for specific products and locations. + + A delivery profile groups products with their shipping zones and rates. You + can associate profiles with [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) + objects to customize shipping for subscriptions and pre-orders. Each profile contains [`DeliveryProfileLocationGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfileLocationGroup) + objects that specify which [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + objects ship to which [`DeliveryZone`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone) + objects with specific [`DeliveryMethodDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethodDefinition) + objects and rates. + + Learn more about [building delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). + """ + deliveryProfileCreate( + """ + Specifies the input fields for a delivery profile. + """ + profile: DeliveryProfileInput! + ): DeliveryProfileCreatePayload + + """ + Enqueue the removal of a delivery profile. + """ + deliveryProfileRemove( + """ + The ID of the delivery profile to remove. + """ + id: ID! + ): DeliveryProfileRemovePayload + + """ + Updates a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile)'s configuration, including its shipping zones, rates, and associated products. + + Modify location groups to control which fulfillment [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + objects serve specific geographic areas. Add or remove shipping zones with + custom countries and provinces. Create or update shipping methods with rate + definitions and delivery conditions. Associate or dissociate [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects and [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup) + objects to determine which products use this profile's shipping rules. + + The mutation supports partial updates through dedicated input fields for + creating, updating, and deleting specific components without affecting the + entire profile structure. + + Learn more about [building delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment/build-delivery-profiles). + """ + deliveryProfileUpdate( + """ + The ID of the delivery profile to update. + """ + id: ID! + + """ + Whether this delivery profile should leave legacy mode. + """ + leaveLegacyModeProfiles: Boolean @deprecated(reason: "Legacy mode profiles are no longer supported. This will be removed in 2026-04.") + + """ + Specifies the input fields for a delivery profile. + """ + profile: DeliveryProfileInput! + ): DeliveryProfileUpdatePayload + + """ + Updates the delivery promise participants by adding or removing owners based on a branded promise handle. + """ + deliveryPromiseParticipantsUpdate( + """ + The branded promise handle to update the delivery promise participants for. + """ + brandedPromiseHandle: String! + + """ + The owners to add to the delivery promise participants. + """ + ownersToAdd: [ID!] = [] + + """ + The owners to remove from the delivery promise participants. + """ + ownersToRemove: [ID!] = [] + ): DeliveryPromiseParticipantsUpdatePayload + + """ + Creates or updates a delivery promise provider. Currently restricted to select approved delivery promise partners. + """ + deliveryPromiseProviderUpsert( + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean + + """ + The number of seconds to add to the current time as a buffer when looking up + delivery promises. Represents how long the shop requires before releasing an + order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """ + The ID of the location that will be associated with the delivery promise provider. + """ + locationId: ID! + + """ + 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 + + """ + Set the delivery settings for a shop. + """ + deliverySettingUpdate( + """ + Specifies the input fields for the delivery shop level settings. + """ + setting: DeliverySettingInput! + ): DeliverySettingUpdatePayload + + """ + Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles. + Deprecated as of 2026-04 and will be removed in a future version as single origin shipping mode has been retired. + """ + deliveryShippingOriginAssign( + """ + The ID of the location to assign as the shipping origin. + """ + locationId: ID! + ): DeliveryShippingOriginAssignPayload @deprecated(reason: "Single origin shipping mode is no longer supported.") + + """ + Activates an automatic discount. + """ + discountAutomaticActivate( + """ + The ID of the automatic discount to activate. + """ + id: ID! + ): DiscountAutomaticActivatePayload + + """ + Creates an automatic discount that's managed by an app. + Use this mutation with [Shopify Functions](https://shopify.dev/docs/apps/build/functions) + when you need advanced, custom, or dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create an automatic discount using an app's + "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create code discounts with custom logic, use the + [`discountCodeAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppCreate) + mutation. + """ + discountAutomaticAppCreate( + """ + The input data used to create the automatic discount. + """ + automaticAppDiscount: DiscountAutomaticAppInput! + ): DiscountAutomaticAppCreatePayload + + """ + Updates an existing automatic discount that's managed by an app using + [Shopify Functions](https://shopify.dev/docs/apps/build/functions). + Use this mutation when you need advanced, custom, or + dynamic discount capabilities that aren't supported by + [Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to update a new "Volume" discount type that applies a percentage + off when customers purchase more than the minimum quantity of a product. For an example implementation, + refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To update code discounts with custom logic, use the + [`discountCodeAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppUpdate) + mutation instead. + """ + discountAutomaticAppUpdate( + """ + The input fields required to update the automatic discount. + """ + automaticAppDiscount: DiscountAutomaticAppInput! + + """ + The ID of the automatic discount to update. + """ + id: ID! + ): DiscountAutomaticAppUpdatePayload + + """ + Creates an + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) + mutation. + """ + discountAutomaticBasicCreate( + """ + The input data used to create the automatic amount off discount. + """ + automaticBasicDiscount: DiscountAutomaticBasicInput! + ): DiscountAutomaticBasicCreatePayload + + """ + Updates an existing + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate) + mutation instead. + """ + discountAutomaticBasicUpdate( + """ + The input data used to update the automatic amount off discount. + """ + automaticBasicDiscount: DiscountAutomaticBasicInput! + + """ + The ID of the automatic amount off discount to update. + """ + id: ID! + ): DiscountAutomaticBasicUpdatePayload + + """ + Deletes multiple automatic discounts in a single operation, providing + efficient bulk management for stores with extensive discount catalogs. This + mutation processes deletions asynchronously to handle large volumes without + blocking other operations. + + For example, when cleaning up expired seasonal promotions or removing outdated + automatic discounts across product categories, merchants can delete dozens of + discounts simultaneously rather than processing each individually. + + Use `DiscountAutomaticBulkDelete` to: + - Remove multiple automatic discounts efficiently + - Clean up expired or obsolete promotions + - Streamline discount management workflows + - Process large-scale discount removals asynchronously + + The operation returns a job object for tracking deletion progress and any validation errors encountered during processing. + + Learn more about [discount management](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomatic). + """ + discountAutomaticBulkDelete( + """ + The IDs of the automatic discounts to delete. + """ + ids: [ID!] + + """ + The ID of the saved search to use for filtering automatic discounts to delete. + """ + savedSearchId: ID + + """ + 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 + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyCreate) + mutation. + """ + discountAutomaticBxgyCreate( + """ + The input data used to create the automatic BXGY discount. + """ + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + ): DiscountAutomaticBxgyCreatePayload + + """ + Updates an existing + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyUpdate) + mutation instead. + """ + discountAutomaticBxgyUpdate( + """ + The input data used to update the automatic BXGY discount. + """ + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + + """ + The ID of the automatic BXGY discount to update. + """ + id: ID! + ): DiscountAutomaticBxgyUpdatePayload + + """ + Deactivates an automatic discount. + """ + discountAutomaticDeactivate( + """ + The ID of the automatic discount to deactivate. + """ + id: ID! + ): DiscountAutomaticDeactivatePayload + + """ + Deletes an existing automatic discount from the store, permanently removing it + from all future order calculations. This mutation provides a clean way to + remove promotional campaigns that are no longer needed. + + For example, when a seasonal promotion ends or a flash sale concludes, + merchants can use this mutation to ensure the discount no longer applies to + new orders while preserving historical order data. + + Use `DiscountAutomaticDelete` to: + - Remove expired promotional campaigns + - Clean up test discounts during development + - Delete automatic discounts that conflict with new promotions + - Maintain a clean discount configuration + + The mutation returns the ID of the deleted discount for confirmation and any + validation errors if the deletion cannot be completed. Once deleted, the + automatic discount will no longer appear in discount lists or apply to new + customer orders. + """ + discountAutomaticDelete( + """ + The ID of the automatic discount to delete. + """ + id: ID! + ): DiscountAutomaticDeletePayload + + """ + Creates automatic free shipping discounts that apply to qualifying orders + without requiring discount codes. These promotions automatically activate when + customers meet specified criteria, streamlining the checkout experience. + + For example, a store might create an automatic free shipping discount for + orders over variable pricing to encourage larger purchases, or offer free + shipping to specific customer segments during promotional periods. + + Use `DiscountAutomaticFreeShippingCreate` to: + - Set up code-free shipping promotions + - Create order value-based shipping incentives + - Target specific customer groups with shipping benefits + - Establish location-based shipping discounts + + The mutation validates discount configuration and returns the created + automatic discount node along with any configuration errors that need resolution. + + Learn more about [automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticNode). + """ + discountAutomaticFreeShippingCreate( + """ + The input data used to create the automatic free shipping discount. + """ + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + ): DiscountAutomaticFreeShippingCreatePayload + + """ + Updates existing automatic free shipping discounts, allowing merchants to + modify promotion criteria, shipping destinations, and eligibility requirements + without recreating the entire discount structure. + + For example, extending a holiday free shipping promotion to include additional + countries, adjusting the minimum order value threshold, or expanding customer + eligibility to include new segments. + + Use `DiscountAutomaticFreeShippingUpdate` to: + - Modify shipping discount thresholds and criteria + - Expand or restrict geographic availability + - Update customer targeting and eligibility rules + - Adjust promotion timing and activation periods + + Changes take effect immediately for new orders, while the mutation validates + all modifications and reports any configuration conflicts through user errors. + + Learn more about [managing automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping). + """ + discountAutomaticFreeShippingUpdate( + """ + The input data used to update the automatic free shipping discount. + """ + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + + """ + The ID of the automatic free shipping discount to update. + """ + id: ID! + ): DiscountAutomaticFreeShippingUpdatePayload + + """ + Activates a previously created code discount, making it available for + customers to use during checkout. This mutation transitions inactive discount + codes into an active state where they can be applied to orders. + + For example, after creating a "SUMMER20" discount code but leaving it inactive + during setup, merchants can activate it when ready to launch their summer + promotion campaign. + + Use `DiscountCodeActivate` to: + - Launch scheduled promotional campaigns + - Reactivate previously paused discount codes + - Enable discount codes after configuration changes + - Control the timing of discount availability + + The mutation returns the updated discount code node with its new active status + and handles any validation errors that might prevent activation, such as + conflicting discount rules or invalid date ranges. + """ + discountCodeActivate( + """ + The ID of the code discount to activate. + """ + id: ID! + ): DiscountCodeActivatePayload + + """ + Creates a code discount. The discount type must be provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Functions can implement + [order](https://shopify.dev/docs/api/functions/reference/order-discounts), + [product](https://shopify.dev/docs/api/functions/reference/product-discounts), or [shipping](https://shopify.dev/docs/api/functions/reference/shipping-discounts) + discount functions. Use this mutation with Shopify Functions when you need + custom logic beyond [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create a code discount using an app's + "Volume" discount type that applies a percentage off when customers purchase + more than the minimum quantity + of a product. For an example implementation, refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create automatic discounts with custom logic, use [`discountAutomaticAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppCreate). + """ + discountCodeAppCreate( + """ + The input data used to create the discount. + """ + codeAppDiscount: DiscountCodeAppInput! + ): DiscountCodeAppCreatePayload + + """ + Updates a code discount, where the discount type is provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Use this mutation + when you need advanced, custom, or dynamic discount capabilities that aren't + supported by [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + > Note: + > To update automatic discounts, use [`discountAutomaticAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppUpdate). + """ + discountCodeAppUpdate( + """ + The input fields required to update the discount. + """ + codeAppDiscount: DiscountCodeAppInput! + + """ + The ID of the discount to update. + """ + id: ID! + ): DiscountCodeAppUpdatePayload + + """ + Creates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicCreate) mutation. + """ + discountCodeBasicCreate( + """ + The input data used to create the discount code. + """ + basicCodeDiscount: DiscountCodeBasicInput! + ): DiscountCodeBasicCreatePayload + + """ + Updates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To update discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicUpdate) mutation. + """ + discountCodeBasicUpdate( + """ + The input data used to update the discount code. + """ + basicCodeDiscount: DiscountCodeBasicInput! + + """ + The ID of the discount code to update. + """ + id: ID! + ): DiscountCodeBasicUpdatePayload + + """ + Activates multiple [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can activate discounts for all codes that match a search + criteria, or activate a predefined set of discount codes. + """ + discountCodeBulkActivate( + """ + The IDs of the discounts to activate. + """ + ids: [ID!] + + """ + The ID of the saved search for filtering discounts to activate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + 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!] + + """ + The ID of the saved search for filtering discounts to deactivate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + 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!] + + """ + The ID of the saved search for filtering discounts to delete. Saved searches + represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """ + The 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 + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyCreate) + mutation. + """ + discountCodeBxgyCreate( + """ + The input data used to create the BXGY code discount. + """ + bxgyCodeDiscount: DiscountCodeBxgyInput! + ): DiscountCodeBxgyCreatePayload + + """ + Updates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyUpdate) + mutation. + """ + discountCodeBxgyUpdate( + """ + The input data used to update the BXGY code discount. + """ + bxgyCodeDiscount: DiscountCodeBxgyInput! + + """ + The ID of the BXGY code discount to update. + """ + id: ID! + ): DiscountCodeBxgyUpdatePayload + + """ + Temporarily suspends a code discount without permanently removing it from the + store. Deactivation allows merchants to pause promotional campaigns while + preserving the discount configuration for potential future use. + + For example, when a flash sale needs to end immediately or a discount code + requires temporary suspension due to inventory issues, merchants can + deactivate it to stop new redemptions while keeping the discount structure intact. + + Use `DiscountCodeDeactivate` to: + - Pause active promotional campaigns timely + - Temporarily suspend problematic discount codes + - Control discount availability during inventory shortages + - Maintain discount history while stopping usage + + Deactivated discounts remain in the system and can be reactivated later, + unlike deletion which persistently removes the code. Customers attempting to + use deactivated codes will receive appropriate error messages. + """ + discountCodeDeactivate( + """ + The ID of the code discount to deactivate. + """ + id: ID! + ): DiscountCodeDeactivatePayload + + """ + Removes a code discount from the store, making it permanently unavailable for + customer use. This mutation provides a clean way to eliminate discount codes + that are no longer needed or have been replaced. + + For example, when a seasonal promotion ends or a discount code has been + compromised, merchants can delete it entirely rather than just deactivating + it, ensuring customers cannot attempt to use expired promotional codes. + + Use `DiscountCodeDelete` to: + - persistently remove outdated promotional codes + - Clean up discount code lists after campaigns end + - Eliminate compromised or leaked discount codes + - Maintain organized discount management + + Once deleted, the discount code cannot be recovered and any customer attempts + to use it will fail. This differs from deactivation, which preserves the code + for potential future reactivation. + """ + discountCodeDelete( + """ + The ID of the code discount to delete. + """ + id: ID! + ): DiscountCodeDeletePayload + + """ + Creates an [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticFreeShippingCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingCreate) mutation. + """ + discountCodeFreeShippingCreate( + """ + The input data used to create the discount code. + """ + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + ): DiscountCodeFreeShippingCreatePayload + + """ + Updates a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update a free shipping discount that's automatically applied on a cart + and at checkout, use the [`discountAutomaticFreeShippingUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingUpdate) mutation. + """ + discountCodeFreeShippingUpdate( + """ + The input data used to update the discount code. + """ + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + + """ + The ID of the discount code to update. + """ + id: ID! + ): DiscountCodeFreeShippingUpdatePayload + + """ + Asynchronously delete + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. + """ + discountCodeRedeemCodeBulkDelete( + """ + The ID of the + [`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! + + """ + 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!] + + """ + The ID of a + [saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id). + """ + savedSearchId: ID + + """ + 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 + + """ + 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! + ): DiscountRedeemCodeBulkAddPayload + + """ + Updates a dispute evidence. + """ + disputeEvidenceUpdate( + """ + The ID of the dispute evidence to be updated. + """ + id: ID! + + """ + The updated properties for a dispute evidence. + """ + input: ShopifyPaymentsDisputeEvidenceUpdateInput! + ): DisputeEvidenceUpdatePayload + + """ + Adds tags to multiple draft orders. + """ + draftOrderBulkAddTags( + """ + The IDs of the draft orders to add tags to. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + 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 + + """ + Deletes multiple draft orders. + """ + draftOrderBulkDelete( + """ + The IDs of the draft orders to delete. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + ): DraftOrderBulkDeletePayload + + """ + Removes tags from multiple draft orders. + """ + draftOrderBulkRemoveTags( + """ + The IDs of the draft orders to remove tags from. + """ + ids: [ID!] + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID + + """ + 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 + + """ + Calculates the properties of a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) + without creating it. Returns pricing information including [`CalculatedDraftOrderLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedDraftOrderLineItem) + totals, shipping charges, applicable discounts, and tax calculations based on the provided [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) and [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) information. + + Use this mutation to preview total taxes and prices before creating a draft + order. It's particularly useful when working with B2B [`PurchasingEntity`](https://shopify.dev/docs/api/admin-graphql/latest/unions/PurchasingEntity) + or when you need to determine costs without committing to a draft order. Learn + more about [calculating draft orders for B2B purchasing entities](https://shopify.dev/docs/apps/build/b2b/draft-orders#step-1-calculate-a-draft-order-for-a-purchasing-entity). + """ + draftOrderCalculate( + """ + The fields for the draft order. + """ + input: DraftOrderInput! + ): DraftOrderCalculatePayload + + """ + Completes a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) and + converts it into a [regular order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + The order appears in the merchant's orders list, and the customer can be notified about their order. + + Use the `draftOrderComplete` mutation when a merchant is ready to finalize a draft order and create a real + order in their store. The `draftOrderComplete` mutation also supports sales channel attribution for tracking + order sources using the [`sourceName`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete#arguments-sourceName) + argument, [cart validation](https://shopify.dev/docs/apps/build/checkout/cart-checkout-validation) + controls for app integrations, and detailed error reporting for failed completions. + + You can complete a draft order with different [payment scenarios](https://help.shopify.com/manual/fulfillment/managing-orders/payments): + + - Mark the order as paid immediately. + - Set the order as payment pending using [payment terms](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms). + - Specify a custom payment amount. + - Select a specific payment gateway. + + > Note: + > When completing a draft order, inventory is [reserved](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + for the items in the order. This means the items will no longer be available for other customers to purchase. + Make sure to verify inventory availability before completing the draft order. + """ + draftOrderComplete( + """ + The draft order to complete. + """ + id: ID! + + """ + The gateway for the completed draft order. + """ + paymentGatewayId: ID + + """ + 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 + + """ + Creates a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) + with attributes such as customer information, line items, shipping and billing addresses, and payment terms. + Draft orders are useful for merchants that need to: + + - Create new orders for sales made by phone, in person, by chat, or elsewhere. + When a merchant accepts payment for a draft order, an order is created. + - Send invoices to customers with a secure checkout link. + - Use custom items to represent additional costs or products not in inventory. + - Re-create orders manually from active sales channels. + - Sell products at discount or wholesale rates. + - Take pre-orders. + + After creating a draft order, you can: + - Send an invoice to the customer using the [`draftOrderInvoiceSend`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderInvoiceSend) mutation. + - Complete the draft order using the [`draftOrderComplete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete) mutation. + - Update the draft order using the [`draftOrderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderUpdate) mutation. + - Duplicate a draft order using the [`draftOrderDuplicate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDuplicate) mutation. + - Delete the draft order using the [`draftOrderDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderDelete) mutation. + + > Note: + > When you create a draft order, you can't [reserve or hold inventory](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + for the items in the order by default. + > However, you can reserve inventory using the [`reserveInventoryUntil`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderCreate#arguments-input.fields.reserveInventoryUntil) input. + """ + draftOrderCreate( + """ + The fields used to create the draft order. + """ + input: DraftOrderInput! + ): DraftOrderCreatePayload + + """ + Creates a draft order from order. + """ + draftOrderCreateFromOrder( + """ + Specifies the order's id that we create the draft order from. + """ + orderId: ID! + ): DraftOrderCreateFromOrderPayload + + """ + Deletes a draft order. + """ + draftOrderDelete( + """ + Specify the draft order to delete by its ID. + """ + input: DraftOrderDeleteInput! + ): DraftOrderDeletePayload + + """ + Duplicates a draft order. + """ + draftOrderDuplicate( + """ + The ID of the draft order to duplicate. + """ + draftOrderId: ID @deprecated(reason: "Use `id` instead.") + + """ + The ID of the draft order to duplicate. + """ + id: ID + ): DraftOrderDuplicatePayload + + """ + Previews a draft order invoice email. + """ + draftOrderInvoicePreview( + """ + Specifies the draft order invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order invoice email to preview. + """ + id: ID! + ): DraftOrderInvoicePreviewPayload + + """ + Sends an invoice email for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder). + The invoice includes a secure checkout link for reviewing and paying for the order. Use the [`email`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderInvoiceSend#arguments-email) + argument to customize the email, such as the subject and message. + """ + draftOrderInvoiceSend( + """ + Specifies the draft order invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order to send the invoice for. + """ + id: ID! + ): DraftOrderInvoiceSendPayload + + """ + Updates a draft order. + + If a checkout has been started for a draft order, any update to the draft will unlink the checkout. Checkouts + are created but not immediately completed when opening the merchant credit card modal in the admin, and when a + buyer opens the invoice URL. This is usually fine, but there is an edge case where a checkout is in progress + and the draft is updated before the checkout completes. This will not interfere with the checkout and order + creation, but if the link from draft to checkout is broken the draft will remain open even after the order is + created. + """ + draftOrderUpdate( + """ + Specifies the draft order to update. + """ + id: ID! + + """ + The draft order properties to update. + """ + input: DraftOrderInput! + ): DraftOrderUpdatePayload + + """ + Updates the server pixel to connect to an EventBridge endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + eventBridgeServerPixelUpdate( + """ + The ARN for the EventBridge endpoint to which customer events are to be sent. + """ + arn: ARN! + ): EventBridgeServerPixelUpdatePayload + + """ + Creates a webhook subscription that notifies your + [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when + specific events occur in a shop. Webhooks push event data to your endpoint + immediately when changes happen, eliminating the need for polling. + + This mutation configures webhook delivery to an Amazon EventBridge partner + event source. You can filter events using [Shopify API search + syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only + relevant webhooks, control which data fields are included in webhook payloads, + and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) + determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + eventBridgeWebhookSubscriptionCreate( + """ + The type of event that triggers the webhook. + """ + topic: WebhookSubscriptionTopic! + + """ + Specifies the input fields for an EventBridge webhook subscription. + """ + webhookSubscription: EventBridgeWebhookSubscriptionInput! + ): EventBridgeWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates an Amazon EventBridge webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + eventBridgeWebhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for an EventBridge webhook subscription. + """ + webhookSubscription: EventBridgeWebhookSubscriptionInput! + ): EventBridgeWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Acknowledges file update failure by resetting FAILED status to READY and clearing any media errors. + """ + fileAcknowledgeUpdateFailed( + """ + Specifies the file(s) to acknowledge the failed updates of. + """ + fileIds: [ID!]! + ): FileAcknowledgeUpdateFailedPayload + + """ + Creates file assets for a store from external URLs or files that were previously uploaded using the + [`stagedUploadsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/stageduploadscreate) + mutation. + + Use the `fileCreate` mutation to add various types of media and documents to your store. These files are added to the + [**Files** page](https://shopify.com/admin/settings/files) in the Shopify admin and can be referenced by other + resources in your store. + + The `fileCreate` mutation supports multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing + - **External videos**: YouTube and Vimeo videos for enhanced product experiences + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types for store resources + + The mutation handles duplicate filenames using configurable resolution modes that automatically append UUIDs, + replace existing files, or raise errors when conflicts occur. + + > Note: + > Files are processed asynchronously. Check the + > [`fileStatus`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/File#fields-fileStatus) + > field to monitor processing completion. The maximum number of files that can be created in a single batch is 250. + + After creating files, you can make subsequent updates using the following mutations: + + - [`fileUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileUpdate): + Update file properties such as alt text or replace file contents while preserving the same URL. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + To list all files in your store, use the + [`files`](https://shopify.dev/docs/api/admin-graphql/latest/queries/files) query. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileCreate( + """ + List of new files to be created. + """ + files: [FileCreateInput!]! + ): FileCreatePayload + + """ + Deletes file assets that were previously uploaded to your store. + + Use the `fileDelete` mutation to permanently remove media and file assets from your store when they are no longer needed. + This mutation handles the complete removal of files from both your store's file library and any associated references + to products or other resources. + + The `fileDelete` mutation supports removal of multiple file types: + + - **Images**: Product photos, variant images, and general store imagery + - **Videos**: Shopify-hosted videos for product demonstrations and marketing content + - **External Videos**: YouTube and Vimeo videos linked to your products + - **3D models**: Interactive 3D representations of products + - **Generic files**: PDFs, documents, and other file types stored in your + [**Files** page](https://shopify.com/admin/settings/files) + + When you delete files that are referenced by products, the mutation automatically removes those references and + reorders any remaining media to maintain proper positioning. Product file references are database relationships + managed through a media reference system, not just links in product descriptions. The Shopify admin provides a UI + to manage these relationships, and when files are deleted, the system automatically cleans up all references. + Files that are currently being processed by other operations are rejected to prevent conflicts. + + > Caution: + > File deletion is permanent and can't be undone. When you delete a file that's being used in your store, + > it will immediately stop appearing wherever it was displayed. For example, if you delete a product image, + > that product will show a broken image or placeholder on your storefront and in the admin. The same applies + > to any other files linked from themes, blog posts, or pages. Before deleting files, you can use the + > [`files` query](https://shopify.dev/api/admin-graphql/latest/queries/files) to list and review + > your store's file assets. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileDelete( + """ + The IDs of the files to be deleted. + """ + fileIds: [ID!]! + ): FileDeletePayload + + """ + Updates properties, content, and metadata associated with an existing file + asset that has already been uploaded to Shopify. + + Use the `fileUpdate` mutation to modify various aspects of files already stored in your store. + Files can be updated individually or in batches. + + The `fileUpdate` mutation supports updating multiple file properties: + + - **Alt text**: Update accessibility descriptions for images and other media. + - **File content**: Replace image or generic file content while maintaining the same URL. + - **Filename**: Modify file names (extension must match the original). + - **Product references**: Add or remove associations between files and products. Removing file-product associations + deletes the file from the product's media gallery and clears the image from any product variants that were using it. + + The mutation handles different file types with specific capabilities: + + - **Images**: Update preview images, original source, filename, and alt text. + - **Generic files**: Update original source, filename, and alt text. + - **Videos and 3D models**: Update alt text and product references. + + > Note: + > Files must be in `ready` state before they can be updated. The mutation includes file locking to prevent + > conflicts during updates. You can't simultaneously update both `originalSource` and `previewImageSource`. + + After updating files, you can use related mutations for additional file management: + + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Create new file assets from external URLs or staged uploads. + - [`fileDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileDelete): + Remove files from your store when they are no longer needed. + + Learn how to manage + [product media and file assets](https://shopify.dev/docs/apps/build/online-store/product-media) + in your app. + """ + fileUpdate( + """ + List of files to be updated. + """ + files: [FileUpdateInput!]! + ): FileUpdatePayload + + """ + Generates a signature for a Flow action payload. + """ + flowGenerateSignature( + """ + The unique identifier of the Flow action definition. + """ + id: ID! + + """ + The request payload used to generate the signature. + """ + payload: String! + ): FlowGenerateSignaturePayload + + """ + Triggers any workflows that begin with the trigger specified in the request + body. To learn more, refer to [_Create Shopify Flow + triggers_](https://shopify.dev/apps/flow/triggers). + """ + flowTriggerReceive( + """ + The payload needed to run the Trigger. + """ + body: String @deprecated(reason: "Use `payload` and `handle` to execute your Flow trigger.") + + """ + The handle of the trigger. + """ + handle: String + + """ + The payload needed to run the Trigger. + """ + payload: JSON + ): FlowTriggerReceivePayload + + """ + Cancels an existing [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment) + and reverses its effects on associated [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + objects. When you cancel a fulfillment, the system creates new fulfillment + orders for the cancelled items so they can be fulfilled again. + + The cancellation affects fulfillment orders differently based on their + fulfillment status. If a fulfillment order was entirely fulfilled, then it + automatically closes. If a fulfillment order is partially fulfilled, then the + remaining quantities adjust to include the cancelled items. The system creates + new fulfillment orders at the original [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + when items are still stocked there, or at alternative locations based on the + store's fulfillment priority settings. + + Learn more about [canceling fulfillments](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-7-cancel-a-fulfillment). + """ + fulfillmentCancel( + """ + The ID of the fulfillment to be canceled. + """ + id: ID! + ): FulfillmentCancelPayload + + """ + Creates a fulfillment constraint rule and its metafield. + """ + fulfillmentConstraintRuleCreate( + """ + 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 + + """ + Deletes a fulfillment constraint rule and its metafields. + """ + fulfillmentConstraintRuleDelete( + """ + A globally-unique identifier for the fulfillment constraint rule. + """ + id: ID! + ): FulfillmentConstraintRuleDeletePayload + + """ + Update a fulfillment constraint rule. + """ + fulfillmentConstraintRuleUpdate( + """ + 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! + ): FulfillmentConstraintRuleUpdatePayload + + """ + Creates a fulfillment for one or more [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + objects. The fulfillment orders are associated with the same + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) and + are assigned to the same [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). + + Use this mutation to mark items as fulfilled when they're ready to ship. You + can specify tracking information, customer notification preferences, and which [`FulfillmentOrderLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorderlineitem) + objects to fulfill from each fulfillment order. If you don't specify line + items, then the mutation fulfills all items in the fulfillment order. + + Learn more about [building fulfillment solutions](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions#create-a-fulfillment). + """ + fulfillmentCreate( + """ + The input fields used to create a fulfillment from fulfillment orders. + """ + fulfillment: FulfillmentInput! + + """ + An optional message for the fulfillment request. + """ + message: String + ): FulfillmentCreatePayload + + """ + Creates a fulfillment for one or many fulfillment orders. + The fulfillment orders are associated with the same order and are assigned to the same location. + """ + fulfillmentCreateV2( + """ + The input fields used to create a fulfillment from fulfillment orders. + """ + fulfillment: FulfillmentV2Input! + + """ + An optional message for the fulfillment request. + """ + message: String + ): FulfillmentCreateV2Payload @deprecated(reason: "Use `fulfillmentCreate` instead.") + + """ + Creates a [`FulfillmentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) to track the shipment status and location of items that have shipped. Events + capture status updates like carrier pickup, in transit, out for delivery, or delivered. + + Each event records the timestamp and current status of the [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment). + You can include optional details such as the location where the event + occurred, estimated arrival time, and messages for tracking purposes. + """ + fulfillmentEventCreate( + """ + The input fields used to create a fulfillment event for a fulfillment. + """ + fulfillmentEvent: FulfillmentEventInput! + ): FulfillmentEventCreatePayload + + """ + Accept a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderAcceptCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for accepting the cancellation request. + """ + message: String + ): FulfillmentOrderAcceptCancellationRequestPayload + + """ + Accepts a fulfillment request that the fulfillment service has received for a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + which signals that the fulfillment service will process and fulfill the order. + The fulfillment service can optionally provide a message to the merchant and + an estimated shipped date when accepting the request. + + Learn more about [accepting fulfillment requests](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#accept-a-fulfillment-request). + """ + fulfillmentOrderAcceptFulfillmentRequest( + """ + The 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! + + """ + An optional reason for accepting the fulfillment request. + """ + message: String + ): FulfillmentOrderAcceptFulfillmentRequestPayload + + """ + Cancels a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) and creates a replacement fulfillment order to represent the work left to be + done. The original fulfillment order will be marked as closed. + + This mutation works when the fulfillment order has a `SUBMITTED` or + `CANCELLATION_REQUESTED` status. For `SUBMITTED` orders, cancellation happens + immediately because the fulfillment service hasn't accepted the request. + + > Note: Orders that have had cancellation requested but the cancellation has + yet to be accepted by the fulfillment service might still have work completed + despite cancellation. + """ + fulfillmentOrderCancel( + """ + The ID of the fulfillment order to mark as canceled. + """ + id: ID! + ): FulfillmentOrderCancelPayload + + """ + Marks an in-progress fulfillment order as incomplete, + indicating the fulfillment service is unable to ship any remaining items, + and closes the fulfillment request. + + This mutation can only be called for fulfillment orders that meet the following criteria: + - Assigned to a fulfillment service location, + - The fulfillment request has been accepted, + - The fulfillment order status is `IN_PROGRESS`. + + This mutation can only be called by the fulfillment service app that accepted the fulfillment request. + Calling this mutation returns the control of the fulfillment order to the merchant, allowing them to + move the fulfillment order line items to another location and fulfill from there, + remove and refund the line items, or to request fulfillment from the same fulfillment service again. + + Closing a fulfillment order is explained in + [the fulfillment service guide](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-7-optional-close-a-fulfillment-order). + """ + fulfillmentOrderClose( + """ + The ID of the fulfillment order to mark as incomplete. + """ + id: ID! + + """ + An optional reason for marking the fulfillment order as incomplete. + """ + message: String + ): FulfillmentOrderClosePayload + + """ + Applies a fulfillment hold on a fulfillment order. + + As of the + [2025-01 API version](https://shopify.dev/changelog/apply-multiple-holds-to-a-single-fulfillment-order), + the mutation can be successfully executed on fulfillment orders that are already on hold. + To place multiple holds on a fulfillment order, apps need to supply the + [handle](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentHold#field-handle) + field. Each app can place up to + 10 active holds + per fulfillment order. If an app attempts to place more than this, the mutation will return + [a user error indicating that the limit has been reached](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-fulfillmentorderholdlimitreached). + The app would need to release one of its existing holds before being able to apply a new one. + """ + fulfillmentOrderHold( + """ + The 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! + ): FulfillmentOrderHoldPayload + + """ + Marks [fulfillment order line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLineItem) + as ready for customer pickup. When executed, this mutation automatically sends + a "Ready For Pickup" notification to the customer. + + Use this mutation for local pickup orders after the items have been prepared + and are available for the customer to collect. You can specify one or more [fulfillment order](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + objects by providing the fulfillment order IDs in the [`lineItemsByFulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/PreparedFulfillmentOrderLineItemsInput) + field. This allows you to mark fulfillment order line items from different + fulfillment orders as ready for pickup. + """ + fulfillmentOrderLineItemsPreparedForPickup( + """ + The input for marking fulfillment order line items as ready for pickup. + """ + input: FulfillmentOrderLineItemsPreparedForPickupInput! + ): FulfillmentOrderLineItemsPreparedForPickupPayload + + """ + Merges a set or multiple sets of fulfillment orders together into one based on + line item inputs and quantities. + """ + fulfillmentOrderMerge( + """ + One or more sets of fulfillment orders to be merged. + """ + fulfillmentOrderMergeInputs: [FulfillmentOrderMergeInput!]! + ): FulfillmentOrderMergePayload + + """ + Changes the location which is assigned to fulfill a number of unfulfilled fulfillment order line items. + + Moving a fulfillment order will fail in the following circumstances: + + * The fulfillment order is closed. + * The fulfillment order has had progress manually reported. To move a + fulfillment order that has had progress manually reported, the fulfillment + order must first be marked as open resolving the ongoing progress state. + * The destination location doesn't stock the requested inventory item. + * The API client doesn't have the correct permissions. + + Line items which have already been fulfilled can't be re-assigned + and will always remain assigned to the original location. + + You can't change the assigned location while a fulfillment order has a + [request status](https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus) + of `SUBMITTED`, `ACCEPTED`, `CANCELLATION_REQUESTED`, or `CANCELLATION_REJECTED`. + These request statuses mean that a fulfillment order is awaiting action by a fulfillment service + and can't be re-assigned without first having the fulfillment service accept a cancellation request. + This behavior is intended to prevent items from being fulfilled by multiple locations or fulfillment services. + + ### How re-assigning line items affects fulfillment orders + + **First scenario:** Re-assign all line items belonging to a fulfillment order to a new location. + + In this case, the + [assignedLocation](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentorder#field-fulfillmentorder-assignedlocation) + of the original fulfillment order will be updated to the new location. + + **Second scenario:** Re-assign a subset of the line items belonging to a fulfillment order to a new location. + You can specify a subset of line items using the `fulfillmentOrderLineItems` parameter + (available as of the `2023-04` API version), + or specify that the original fulfillment order contains line items which have already been fulfilled. + + If the new location is already assigned to another active fulfillment order, on the same order, then + a new fulfillment order is created. The existing fulfillment order is closed and line items are recreated + in a new fulfillment order. + """ + fulfillmentOrderMove( + """ + The 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! + + """ + The ID of the location where the fulfillment order will be moved. + """ + newLocationId: ID! + ): FulfillmentOrderMovePayload + + """ + Marks a scheduled fulfillment order as open. + + From API version 2026-01, this will also mark a fulfillment order as open when + it is assigned to a merchant managed location and has had progress reported. + """ + fulfillmentOrderOpen( + """ + The ID of the fulfillment order to mark as open. + """ + id: ID! + ): FulfillmentOrderOpenPayload + + """ + Rejects a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for rejecting the cancellation request. + """ + message: String + ): FulfillmentOrderRejectCancellationRequestPayload + + """ + Rejects a fulfillment request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectFulfillmentRequest( + """ + The ID of the fulfillment order associated with the fulfillment request. + """ + id: ID! + + """ + 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 + + """ + 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!] + + """ + The ID of the fulfillment order for which to release the fulfillment hold. + """ + id: ID! + ): FulfillmentOrderReleaseHoldPayload + + """ + Reschedules a scheduled fulfillment order. + + Updates the value of the `fulfillAt` field on a scheduled fulfillment order. + + The fulfillment order will be marked as ready for fulfillment at this date and time. + """ + fulfillmentOrderReschedule( + """ + 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! + ): FulfillmentOrderReschedulePayload + + """ + Splits [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) objects by moving the specified [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + objects and quantities into a new fulfillment order. + + If the original fulfillment order can't be split due to its current state, + then the mutation creates a replacement fulfillment order instead. + """ + fulfillmentOrderSplit( + """ + The fulfillment orders, line items and quantities to be split into new fulfillment orders. + """ + fulfillmentOrderSplits: [FulfillmentOrderSplitInput!]! + ): FulfillmentOrderSplitPayload + + """ + Sends a cancellation request to the fulfillment service of a fulfillment order. + """ + fulfillmentOrderSubmitCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """ + An optional reason for the cancellation request. + """ + message: String + ): FulfillmentOrderSubmitCancellationRequestPayload + + """ + Sends a fulfillment request to the fulfillment service assigned to a [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder). + The fulfillment service must then accept or reject the request before + processing can begin. + + You can either request fulfillment for all line items or specify individual + items with quantities for partial fulfillment. When requesting partial + fulfillment, Shopify splits the original fulfillment order into two: one with + the submitted items and another with the remaining unsubmitted items. Include + an optional message to communicate special instructions to the fulfillment + service, such as gift wrapping or handling requirements. + + Learn more about [managing fulfillment requests as a fulfillment service](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-4-act-on-fulfillment-requests). + """ + fulfillmentOrderSubmitFulfillmentRequest( + """ + The 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! + + """ + 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 + + """ + 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!] + + """ + The list of IDs of the fulfillment orders. + """ + fulfillmentOrderIds: [ID!]! + + """ + The list of IDs of the locations to include for rerouting. By default, all locations are included. + """ + includedLocationIds: [ID!] + ): FulfillmentOrdersReroutePayload + + """ + 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!]! + ): FulfillmentOrdersSetFulfillmentDeadlinePayload + + """ + Creates a fulfillment service. + + ## Fulfillment service location + + When creating a fulfillment service, a new location will be automatically created on the shop + and will be associated with this fulfillment service. + This location will be named after the fulfillment service and inherit the shop's address. + + If you are using API version `2023-10` or later, and you need to specify + custom attributes for the fulfillment service location + (for example, to change its address to a country different from the shop's country), + use the + [LocationEdit](https://shopify.dev/api/admin-graphql/latest/mutations/locationEdit) + mutation after creating the fulfillment service. + """ + fulfillmentServiceCreate( + """ + The 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 can stock inventory alongside other locations. + As of API version `2025-10` this argument will return an error if set to false. + """ + permitsSkuSharing: Boolean = true @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https:\/\/shopify.dev\/changelog\/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\nAs of API version `2026-04` this argument will be removed.\n") + + """ + Whether the fulfillment service 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 + + """ + 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 + + """ + The ID of the fulfillment service to delete. + """ + id: ID! + + """ + The action to take with the location after the fulfillment service is deleted. + """ + inventoryAction: FulfillmentServiceDeleteInventoryAction = TRANSFER + ): FulfillmentServiceDeletePayload + + """ + Updates the [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) configuration, including its name, callback URL, and operational settings. + + The mutation modifies how the fulfillment service handles inventory tracking, + shipping requirements, and package tracking support. + + > Note: + > To update the physical address or other location details of the fulfillment + service, use the [`locationEdit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationEdit) + mutation instead. + + Learn more about [editing fulfillment service locations](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-2-edit-locations). + """ + fulfillmentServiceUpdate( + """ + The 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, + and `true` is the only valid value for `fulfillmentOrdersOptIn`. + """ + fulfillmentOrdersOptIn: Boolean @deprecated(reason: "Migration period has ended.") + + """ + The id of the fulfillment service. + """ + id: ID! + + """ + 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 can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nIn the next version, all new fulfillment services will support SKU sharing by default.\nAs of API version `2026-04` this argument will be removed.\n") + + """ + 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 + + """ + 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! + + """ + 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 + + """ + Updates tracking information for a fulfillment. + """ + fulfillmentTrackingInfoUpdateV2( + """ + The ID of the fulfillment. + """ + fulfillmentId: ID! + + """ + 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.") + + """ + 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 + + """ + Credit a gift card. + """ + giftCardCredit( + """ + The input fields to credit a gift card. + """ + creditInput: GiftCardCreditInput! + + """ + The ID of the gift card to be credited. + """ + id: ID! + ): GiftCardCreditPayload + + """ + Deactivate a gift card. A deactivated gift card cannot be used by a customer. + A deactivated gift card cannot be re-enabled. + """ + giftCardDeactivate( + """ + The ID of the gift card to deactivate. + """ + id: ID! + ): GiftCardDeactivatePayload + + """ + Debit a gift card. + """ + giftCardDebit( + """ + The input fields to debit a gift card. + """ + debitInput: GiftCardDebitInput! + + """ + The ID of the gift card to be debited. + """ + id: ID! + ): GiftCardDebitPayload + + """ + Send notification to the customer of a gift card. + """ + giftCardSendNotificationToCustomer( + """ + The ID of the gift card to send. + """ + id: ID! + ): GiftCardSendNotificationToCustomerPayload + + """ + Send notification to the recipient of a gift card. + """ + giftCardSendNotificationToRecipient( + """ + The ID of the gift card to send. + """ + id: ID! + ): GiftCardSendNotificationToRecipientPayload + + """ + Update a gift card. + """ + giftCardUpdate( + """ + The ID of the gift card to be updated. + """ + id: ID! + + """ + The input fields to update the gift card. + """ + input: GiftCardUpdateInput! + ): GiftCardUpdatePayload + + """ + Activates an inventory item at a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) by creating an [`InventoryLevel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) + that tracks stock quantities. This enables you to manage inventory for a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + at the specified location. + + When you activate an inventory item, you can set its initial quantities. The [`available`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryActivate#arguments-available) + argument sets the quantity that's available for sale. [`onHand`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryActivate#arguments-onHand) + argument sets the total physical quantity at the location. If you don't + specify quantities, then `available` and `onHand` default to zero. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states). + """ + inventoryActivate( + """ + The initial available quantity of the inventory item being activated at the location. + """ + available: Int + + """ + The ID of the inventory item to activate. + """ + inventoryItemId: ID! + + """ + The ID of the location of the inventory item being activated. + """ + locationId: ID! + + """ + The initial on_hand quantity of the inventory item being activated at the location. + """ + onHand: Int + + """ + Allow activation at or away from fulfillment service location with sku + sharing off. This will deactivate inventory at all other locations. + """ + stockAtLegacyLocation: Boolean = false + ): InventoryActivatePayload + + """ + Adjusts quantities for inventory items by applying incremental changes at + specific locations. Each adjustment modifies the quantity by a delta value + rather than setting an absolute amount. + + The mutation tracks adjustments with a reason code and optional reference URI + for audit trails. Returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) + that records all changes made in the operation. + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#adjust-inventory-quantities). + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryAdjustQuantities( + """ + The information required to adjust inventory quantities. + """ + input: InventoryAdjustQuantitiesInput! + ): InventoryAdjustQuantitiesPayload + + """ + Activates or deactivates an inventory item at multiple locations. When you activate an [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) at a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location), + that location can stock and track quantities for that item. When you + deactivate an inventory item at a location, the inventory item is no longer + stocked at that location. + + The mutation accepts an inventory item ID and a list of location-specific + activation settings. It returns the updated inventory item and any activated [`InventoryLevel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) objects. + + Learn more about [managing inventory quantities and states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). + """ + inventoryBulkToggleActivation( + """ + The ID of the inventory item to modify the activation status locations for. + """ + inventoryItemId: ID! + + """ + A list of pairs of locations and activate status to update for the specified inventory item. + """ + inventoryItemUpdates: [InventoryBulkToggleActivationInput!]! + ): InventoryBulkToggleActivationPayload + + """ + Removes an inventory item's quantities from a location, and turns off inventory at the location. + """ + inventoryDeactivate( + """ + The ID of the inventory level to deactivate. + """ + inventoryLevelId: ID! + ): InventoryDeactivatePayload + + """ + Updates an [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem)'s properties including whether inventory is tracked, cost, SKU, and whether + shipping is required. Inventory items represent the goods available to be + shipped to customers. + """ + inventoryItemUpdate( + """ + The ID of the inventory item to update. + """ + id: ID! + + """ + The input fields that update an + [`inventoryItem`](https://shopify.dev/api/admin-graphql/latest/queries/inventoryitem). + """ + input: InventoryItemInput! + ): InventoryItemUpdatePayload + + """ + Moves inventory quantities for a single inventory item between different + states at a single location. Use this mutation to reallocate inventory across + quantity states without moving it between locations. + + Each change specifies the quantity to move, the source state and location, and + the destination state and location. The mutation returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) + that tracks all changes made in a single operation, providing an audit trail + with the reason and reference document URI. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryMoveQuantities( + """ + The information required to move inventory quantities. + """ + input: InventoryMoveQuantitiesInput! + ): InventoryMoveQuantitiesPayload + + """ + Sets an inventory item's on-hand quantities to specific absolute values at + designated locations. The mutation takes a reason for tracking purposes and a + reference document URI for audit trails. + + Returns an [`InventoryAdjustmentGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryAdjustmentGroup) that tracks all changes made in this operation, including the delta values + calculated from the previous quantities. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetOnHandQuantities( + """ + The information required to set inventory on hand quantities. + """ + input: InventorySetOnHandQuantitiesInput! + ): InventorySetOnHandQuantitiesPayload @deprecated(reason: "Use `inventorySetQuantities` to set on_hand or available quantites instead.") + + """ + Set quantities of specified name using absolute values. This mutation supports compare-and-set functionality to handle + concurrent requests properly. If `ignoreCompareQuantity` is not set to true, + the mutation will only update the quantity if the persisted quantity matches the `compareQuantity` value. + If the `compareQuantity` value does not match the persisted value, the mutation will return an error. In order to opt out + of the `compareQuantity` check, the `ignoreCompareQuantity` argument can be set to true. + + > Note: + > Only use this mutation if calling on behalf of a system that acts as the source of truth for inventory quantities, + > otherwise please consider using the [inventoryAdjustQuantities](https://shopify.dev/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) mutation. + > + > + > Opting out of the `compareQuantity` check can lead to inaccurate inventory + quantities if multiple requests are made concurrently. + > It is recommended to always include the `compareQuantity` value to ensure + the accuracy of the inventory quantities and to opt out + > of the check using `ignoreCompareQuantity` only when necessary. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetQuantities( + """ + The information required to set inventory quantities. + """ + input: InventorySetQuantitiesInput! + ): InventorySetQuantitiesPayload + + """ + Set up scheduled changes of inventory items. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventorySetScheduledChanges( + """ + The input fields for setting up scheduled changes of inventory items. + """ + input: InventorySetScheduledChangesInput! + ): InventorySetScheduledChangesPayload @deprecated(reason: "Scheduled changes will be phased out in 2026-07.") + + """ + Adds items to an inventory shipment. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentAddItems( + """ + The ID of the inventory shipment to modify. + """ + id: ID! + + """ + The list of line items to add to the inventory shipment. + """ + lineItems: [InventoryShipmentLineItemInput!]! + ): InventoryShipmentAddItemsPayload + + """ + Adds a draft shipment to an inventory transfer. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentCreate( + """ + The input fields for the inventory shipment. + """ + input: InventoryShipmentCreateInput! + ): InventoryShipmentCreatePayload + + """ + Adds an in-transit shipment to an inventory transfer. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentCreateInTransit( + """ + The input fields for the inventory shipment. + """ + input: InventoryShipmentCreateInput! + ): InventoryShipmentCreateInTransitPayload + + """ + Deletes an inventory shipment. Only draft shipments can be deleted. + """ + inventoryShipmentDelete( + """ + The ID of the inventory shipment to be deleted. + """ + id: ID! + ): InventoryShipmentDeletePayload + + """ + Marks a draft inventory shipment as in transit. + """ + inventoryShipmentMarkInTransit( + """ + The date the shipment was shipped. + """ + dateShipped: DateTime + + """ + The ID of the inventory shipment to mark in transit. + """ + id: ID! + ): InventoryShipmentMarkInTransitPayload + + """ + Receive an inventory shipment. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryShipmentReceive( + """ + The 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! + + """ + The list of receive line items for the inventory shipment. + """ + lineItems: [InventoryShipmentReceiveItemInput!] + ): InventoryShipmentReceivePayload + + """ + Remove items from an inventory shipment. + """ + inventoryShipmentRemoveItems( + """ + The ID of the inventory shipment to remove items from. + """ + id: ID! + + """ + A list of inventory shipment line item ids representing the items to be removed from the shipment. + """ + lineItems: [ID!]! + ): InventoryShipmentRemoveItemsPayload + + """ + Edits the tracking info on an inventory shipment. + """ + inventoryShipmentSetTracking( + """ + The ID of the inventory shipment whose tracking info is being edited. + """ + id: ID! + + """ + The tracking info to edit on the inventory shipment. + """ + tracking: InventoryShipmentTrackingInput! + ): InventoryShipmentSetTrackingPayload + + """ + Updates items on an inventory shipment. + """ + inventoryShipmentUpdateItemQuantities( + """ + The ID of the inventory shipment to update item quantities. + """ + id: ID! + + """ + The list of line items to be updated to the shipment. + """ + items: [InventoryShipmentUpdateItemQuantitiesInput!] = [] + ): InventoryShipmentUpdateItemQuantitiesPayload + + """ + Cancels an inventory transfer. + """ + inventoryTransferCancel( + """ + The ID of the inventory transfer to cancel. + """ + id: ID! + ): InventoryTransferCancelPayload + + """ + Creates a draft inventory transfer to move inventory items between [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + objects in your store. The transfer tracks which items to move, their + quantities, and the origin and destination locations. + + Use [`inventoryTransferMarkAsReadyToShip`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryTransferMarkAsReadyToShip) to mark the transfer as ready to ship. + + > Caution: + > As of version `2026-01`, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of version `2026-04`, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferCreate( + """ + The input fields for the inventory transfer. + """ + input: InventoryTransferCreateInput! + ): InventoryTransferCreatePayload + + """ + Creates an inventory transfer in ready to ship. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferCreateAsReadyToShip( + """ + The input fields for the inventory transfer. + """ + input: InventoryTransferCreateAsReadyToShipInput! + ): InventoryTransferCreateAsReadyToShipPayload + + """ + Deletes an inventory transfer. + """ + inventoryTransferDelete( + """ + The ID of the inventory transfer to delete. + """ + id: ID! + ): InventoryTransferDeletePayload + + """ + This mutation allows duplicating an existing inventory transfer. The duplicated transfer will have the same + line items and quantities as the original transfer, but will be in a draft state with no shipments. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferDuplicate( + """ + The ID of the inventory transfer to duplicate. + """ + id: ID! + ): InventoryTransferDuplicatePayload + + """ + Edits an inventory transfer. + """ + inventoryTransferEdit( + """ + The ID of the inventory Transfer to be edited. + """ + id: ID! + + """ + The input fields to edit the inventory transfer. + """ + input: InventoryTransferEditInput! + ): InventoryTransferEditPayload + + """ + Sets an inventory transfer to ready to ship. + """ + inventoryTransferMarkAsReadyToShip( + """ + The ID of the inventory transfer to mark as ready to ship. + """ + id: ID! + ): InventoryTransferMarkAsReadyToShipPayload + + """ + This mutation allows removing the shippable quantities of line items on a Transfer. + It removes all quantities of the item from the transfer that are not associated with shipments. + """ + inventoryTransferRemoveItems( + """ + The input fields for the InventoryTransferRemoveItems mutation. + """ + input: InventoryTransferRemoveItemsInput! + ): InventoryTransferRemoveItemsPayload + + """ + This mutation allows for the setting of line items on a Transfer. Will replace the items already set, if any. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + inventoryTransferSetItems( + """ + The input fields for the InventoryTransferSetItems mutation. + """ + input: InventoryTransferSetItemsInput! + ): InventoryTransferSetItemsPayload + + """ + Activates a location so that you can stock inventory at the location. Refer to the + [`isActive`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-isactive) and + [`activatable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-activatable) + fields on the `Location` object. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + locationActivate( + """ + The ID of a location to activate. + """ + locationId: ID! + ): LocationActivatePayload + + """ + Adds a new [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) where you can stock inventory and fulfill orders. Locations represent physical + places like warehouses, retail stores, or fulfillment centers. + + The location requires a name and address with at least a country code. You can + specify whether the location fulfills online orders, which determines if its + inventory is available for online sales. You can also attach custom + [metafields](https://shopify.dev/docs/apps/build/custom-data) to store + additional information about the location. + """ + locationAdd( + """ + The properties of the location to add. + """ + input: LocationAddInput! + ): LocationAddPayload + + """ + Deactivates a location and moves inventory, pending orders, and moving transfers " "to a destination location. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + locationDeactivate( + """ + The ID of a destination location to which inventory, pending orders and + moving transfers will be moved from the location to deactivate. + """ + destinationLocationId: ID + + """ + The ID of a location to deactivate. + """ + locationId: ID! + ): LocationDeactivatePayload + + """ + Deletes a location. + """ + locationDelete( + """ + The ID of a location to delete. + """ + locationId: ID! + ): LocationDeletePayload + + """ + Updates the properties of an existing [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location). + You can modify the location's name, address, whether it fulfills online + orders, and custom + [`metafields`](https://shopify.dev/docs/apps/build/custom-data). + + Apps that created a [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) + can edit the associated location to ensure accurate representation of their + fulfillment network. + + > Note: + > You can't disable the [`fulfillsOnlineOrders`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationEdit#arguments-input.fields.fulfillsOnlineOrders) + setting for fulfillment service locations. + + Learn more about [editing locations for fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-2-edit-locations). + """ + locationEdit( + """ + The ID of a location to edit. + """ + id: ID! + + """ + The updated properties for the location. + """ + input: LocationEditInput! + ): LocationEditPayload + + """ + Disables local pickup for a location. + """ + locationLocalPickupDisable( + """ + The ID of the location to disable local pickup for. + """ + locationId: ID! + ): LocationLocalPickupDisablePayload + + """ + Enables local pickup for a location so customers can collect their orders in + person. Configures the estimated pickup time that customers see at checkout + and optional instructions for finding or accessing the pickup location. + """ + locationLocalPickupEnable( + """ + The settings required to enable local pickup for a location. + """ + localPickupSettings: DeliveryLocationLocalPickupEnableInput! + ): LocationLocalPickupEnablePayload + + """ + Creates a [`Market`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Market) + to deliver customized shopping experiences. Markets define various aspects of + the buyer experience including pricing, product availability, custom content, + inventory and fulfillment priorities, and payment methods. + + Define conditions to match buyers by region, company location, retail + location, or other criteria. Configure [`MarketCurrencySettings`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketCurrencySettings) + to control currency behavior. Set [`MarketPriceInclusions`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketPriceInclusions) + to determine tax and duty display. Assign [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) objects and [`MarketWebPresence`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketWebPresence) + configurations to control product availability and SEO strategy. + + Learn more about [Shopify Markets](https://shopify.dev/docs/apps/build/markets). + """ + marketCreate( + """ + The properties of the new market. + """ + input: MarketCreateInput! + ): MarketCreatePayload + + """ + Updates currency settings of a market. + """ + marketCurrencySettingsUpdate( + """ + Properties to update for the market currency settings. + """ + input: MarketCurrencySettingsUpdateInput! + + """ + The ID of the market definition to target. + """ + marketId: ID! + ): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") + + """ + Deletes a market definition. + """ + marketDelete( + """ + The ID of the market to delete. + """ + id: ID! + ): MarketDeletePayload + + """ + Creates or updates market localizations. + """ + marketLocalizationsRegister( + """ + The 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! + ): MarketLocalizationsRegisterPayload + + """ + Deletes market localizations. + """ + marketLocalizationsRemove( + """ + The list of market IDs. + """ + marketIds: [ID!]! + + """ + The list of market localization keys. + """ + marketLocalizationKeys: [String!]! + + """ + The ID of the resource for which market localizations are being deleted. + """ + resourceId: ID! + ): MarketLocalizationsRemovePayload + + """ + Deletes a market region. + """ + marketRegionDelete( + """ + The ID of the market region to delete. + """ + id: ID! + ): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Creates regions that belong to an existing market. + """ + marketRegionsCreate( + """ + The ID of the market to add the regions to. + """ + marketId: ID! + + """ + The regions to be created. + """ + regions: [MarketRegionCreateInput!]! + ): MarketRegionsCreatePayload @deprecated(reason: "This mutation is deprecated and will be removed in the future. Use `marketCreate` or `marketUpdate` instead.") + + """ + Deletes a list of market regions. + """ + marketRegionsDelete( + """ + A list of IDs of the market regions to delete. + """ + ids: [ID!]! + ): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """ + Updates the properties of a market. + """ + marketUpdate( + """ + The ID of the market to update. + """ + id: ID! + + """ + The properties to update. + """ + input: MarketUpdateInput! + ): MarketUpdatePayload + + """ + Creates a web presence for a market. + """ + marketWebPresenceCreate( + """ + The ID of the market for which to create a web presence. + """ + marketId: ID! + + """ + The details of the web presence to be created. + """ + webPresence: MarketWebPresenceCreateInput! + ): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") + + """ + Deletes a market web presence. + """ + marketWebPresenceDelete( + """ + The ID of the web presence to delete. + """ + webPresenceId: ID! + ): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") + + """ + Updates a market web presence. + """ + marketWebPresenceUpdate( + """ + The web_presence fields used to update the market's web presence. + """ + webPresence: MarketWebPresenceUpdateInput! + + """ + The ID of the web presence to update. + """ + webPresenceId: ID! + ): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") + + """ + Deletes all external marketing activities. Deletion is performed by a + background job, as it may take a bit of time to complete if a large number of + activities are to be deleted. Attempting to create or modify external + activities before the job has completed will result in the + create/update/upsert mutation returning an error. + """ + marketingActivitiesDeleteAllExternal: MarketingActivitiesDeleteAllExternalPayload + + """ + Create new marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. + """ + marketingActivityCreate( + """ + The Input of marketing activity create. + """ + input: MarketingActivityCreateInput! + ): MarketingActivityCreatePayload + + """ + Creates a new external marketing activity. + """ + marketingActivityCreateExternal( + """ + The input field for creating an external marketing activity. + """ + input: MarketingActivityCreateExternalInput! + ): MarketingActivityCreateExternalPayload + + """ + Deletes an external marketing activity. + """ + marketingActivityDeleteExternal( + """ + The ID of the marketing activity. A marketing activity ID or remote ID must be provided. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. A marketing activity ID or remote ID + must be provided. + """ + remoteId: String + ): MarketingActivityDeleteExternalPayload + + """ + Updates a marketing activity with the latest information. Marketing activity + app extensions are deprecated and will be removed in the near future. + """ + marketingActivityUpdate( + """ + The Input of the marketing activity. + """ + input: MarketingActivityUpdateInput! + ): MarketingActivityUpdatePayload + + """ + Update an external marketing activity. + """ + marketingActivityUpdateExternal( + """ + The input field for updating an external marketing activity. + """ + input: MarketingActivityUpdateExternalInput! + + """ + The ID of the marketing activity. Specify either the marketing activity ID, + remote ID, or UTM to update the marketing activity. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. Specify either the marketing activity + ID, remote ID, or UTM to update the marketing activity. + """ + remoteId: String + + """ + Specifies the [Urchin Traffic Module (UTM) + parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are + associated with a related marketing campaign. Specify either the marketing + activity ID, remote ID, or UTM to update the marketing activity. + """ + utm: UTMInput + ): MarketingActivityUpdateExternalPayload + + """ + Creates a new external marketing activity or updates an existing one. When + optional fields are absent or null, associated information will be removed + from an existing marketing activity. + """ + marketingActivityUpsertExternal( + """ + The input field for creating or updating an external marketing activity. + """ + input: MarketingActivityUpsertExternalInput! + ): MarketingActivityUpsertExternalPayload + + """ + Creates a new marketing engagement for a marketing activity or a marketing channel. + """ + marketingEngagementCreate( + """ + The 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 + + """ + 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 + + """ + Marks channel-level engagement data such that it no longer appears in reports. + Activity-level data cannot be deleted directly, instead the MarketingActivity itself should be deleted to + hide it from reports. + """ + marketingEngagementsDelete( + """ + The handle of the channel for which engagement data should be deleted. + """ + channelHandle: String + + """ + When true, engagements for all channels that belong to the api client will be deleted. + """ + deleteEngagementsForAllChannels: Boolean = false + ): MarketingEngagementsDeletePayload + + """ + Creates a navigation + [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) for + the online store. Menus organize links that help customers navigate to [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + [pages](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page), + [blogs](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog), and custom URLs. + + Each menu requires a unique handle for identification and can contain multiple [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) + objects with nested sub-items up to three levels deep. + """ + menuCreate( + """ + The menu's handle. + """ + handle: String! + + """ + List of the menu's items. + """ + items: [MenuItemCreateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuCreatePayload + + """ + Deletes a menu. + """ + menuDelete( + """ + The ID of the menu to be deleted. + """ + id: ID! + ): MenuDeletePayload + + """ + Updates a [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) for + display on the storefront. Modifies the menu's title and navigation structure, + including nested [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) + objects. You can update the handle for non-default menus. + + The items argument accepts a list of menu items with their nested structure. + Each item can include nested items to create multi-level navigation + hierarchies. Default menus have restricted updates—you can't change their handles. + """ + menuUpdate( + """ + The menu's handle. + """ + handle: String + + """ + ID of the menu to be updated. + """ + id: ID! + + """ + List of the menu's items. + """ + items: [MenuItemUpdateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuUpdatePayload + + """ + Creates a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) that establishes structure and validation rules for metafields. The definition + specifies the data type, validation constraints, and access permissions for + metafields with a given namespace and key combination. + + When you create a new definition, the system validates any existing + unstructured metafields matching the same owner type, namespace, and key + against it. The system updates each valid metafield's type to match the + definition. Invalid metafields remain unchanged but must conform to the + definition when updated. + + Learn more about [creating metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionCreate( + """ + Specifies the input fields for a metafield definition. + """ + definition: MetafieldDefinitionInput! + ): MetafieldDefinitionCreatePayload + + """ + Deletes a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition). You can identify the definition by providing either its owner type, namespace, + and key, or its global ID. + + When you set [`deleteAllAssociatedMetafields`](https://shopify.dev/docs/api/admin-graphql/current/mutations/metafieldDefinitionDelete#arguments-deleteAllAssociatedMetafields) to `true`, the mutation asynchronously deletes all [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) + objects that use this definition. This option must be `true` when deleting + definitions under the `$app` namespace. + + Learn more about [deleting metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionDelete( + """ + Whether to delete all associated metafields. + """ + deleteAllAssociatedMetafields: Boolean = false + + """ + The id of the metafield definition to delete. Using `identifier` is preferred. + """ + id: ID + + """ + The identifier of the metafield definition to delete. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionDeletePayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionPin( + """ + The id of the metafield definition to pin. Using `identifier` is preferred. + """ + definitionId: ID + + """ + The identifier of the metafield definition to pin. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionPinPayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionUnpin( + """ + The ID of the metafield definition to unpin. Using `identifier` is preferred. + """ + definitionId: ID + + """ + The identifier of the metafield definition to unpin. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionUnpinPayload + + """ + Updates a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition)'s configuration and settings. You can modify the definition's name, description, + validation rules, access settings, capabilities, and constraints. + + The mutation updates access settings that control visibility across different + APIs, such as the [GraphQL Admin + API](https://shopify.dev/docs/api/admin-graphql), [Storefront + API](https://shopify.dev/docs/api/storefront), and [Customer Account + API](https://shopify.dev/docs/api/customer). It also enables capabilities like + admin filtering or unique value validation, and modifies constraints that + determine which resource subtypes the definition applies to. + + > Note: The type, namespace, key, and owner type identify the definition and so can't be changed. + + Learn more about [updating metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). + """ + metafieldDefinitionUpdate( + """ + The input fields for the metafield definition update. + """ + definition: MetafieldDefinitionUpdateInput! + ): MetafieldDefinitionUpdatePayload + + """ + Deletes [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) objects in bulk by specifying combinations of owner ID, namespace, and key. + + Returns the identifiers of successfully deleted metafields. If a specified + metafield doesn't exist, then the mutation still succeeds but returns `null` + for that identifier in the response. + """ + metafieldsDelete( + """ + A list of identifiers specifying metafields to delete. At least one identifier must be specified. + """ + metafields: [MetafieldIdentifierInput!]! + ): MetafieldsDeletePayload + + """ + Sets metafield values. Metafield values will be set regardless if they were previously created or not. + + Allows a maximum of 25 metafields to be set at a time, with a maximum total request payload size of 10MB. + + This operation is atomic, meaning no changes are persisted if an error is encountered. + + As of `2024-07`, this operation supports compare-and-set functionality to better handle concurrent requests. + If `compareDigest` is set for any metafield, the mutation will only set that + metafield if the persisted metafield value matches the digest used on + `compareDigest`. + If the metafield doesn't exist yet, but you want to guarantee that the + operation will run in a safe manner, set `compareDigest` to `null`. + The `compareDigest` value can be acquired by querying the metafield object and selecting `compareDigest` as a field. + If the `compareDigest` value does not match the digest for the persisted value, the mutation will return an error. + You can opt out of write guarantees by not sending `compareDigest` in the request. + """ + metafieldsSet( + """ + The list of metafield values to set. Maximum of 25. + """ + metafields: [MetafieldsSetInput!]! + ): MetafieldsSetPayload + + """ + Asynchronously delete metaobjects and their associated metafields in bulk. + """ + metaobjectBulkDelete( + """ + Specifies the condition by which metaobjects are deleted. + Exactly one field of input is required. + """ + where: MetaobjectBulkDeleteWhereCondition! + ): MetaobjectBulkDeletePayload + + """ + Creates a metaobject entry based on an existing [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition). + The type must match a definition that already exists in the shop. + + Specify field values using key-value pairs that correspond to the field + definitions. The mutation generates a unique handle automatically if you don't + provide one. You can also configure capabilities like publishable status to + control the metaobject's visibility across channels. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectCreate( + """ + The parameters for the metaobject to create. + """ + metaobject: MetaobjectCreateInput! + ): MetaobjectCreatePayload + + """ + Creates a metaobject definition that establishes the structure for custom data + objects in your store. The definition specifies the fields, data types, and + access permissions that all [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) + entries of this type share. + + Use the `type` field to create a unique namespace for your metaobjects. Prefix + the type with `$app:` to reserve the definition for your app's exclusive use. + The definition can include capabilities like publishable status or translation + eligibility, to extend how metaobjects integrate with Shopify's features. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitionCreate( + """ + The input fields for creating a metaobject definition. + """ + definition: MetaobjectDefinitionCreateInput! + ): MetaobjectDefinitionCreatePayload + + """ + Deletes the specified metaobject definition. + Also deletes all related metafield definitions, metaobjects, and metafields asynchronously. + """ + metaobjectDefinitionDelete( + """ + The ID of the metaobjects definition to delete. + """ + id: ID! + ): MetaobjectDefinitionDeletePayload + + """ + Updates a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition)'s configuration and field structure. You can modify the definition's name, + description, display name key, access controls, and capabilities, as well as + those of all its fields. + + The mutation supports reordering fields when `resetFieldOrder` is `true`, + which arranges submitted fields first followed by alphabetized omitted fields. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitionUpdate( + """ + The input fields for updating a metaobject definition. + """ + definition: MetaobjectDefinitionUpdateInput! + + """ + The ID of the metaobject definition to update. + """ + id: ID! + ): MetaobjectDefinitionUpdatePayload + + """ + Deletes the specified metaobject and its associated metafields. + """ + metaobjectDelete( + """ + The ID of the metaobject to delete. + """ + id: ID! + ): MetaobjectDeletePayload + + """ + Updates a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) with new field values, handle, or capabilities. [Metaobjects](https://shopify.dev/docs/apps/build/custom-data#what-are-metaobjects) + are custom data structures that extend Shopify's data model. + + You can modify field values mapped to the metaobject's [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition), + update the handle for a unique identifier, and adjust capabilities like + publishing status. When updating the handle, you can optionally create a + redirect from the old handle to maintain existing references. + """ + metaobjectUpdate( + """ + The ID of the metaobject to update. + """ + id: ID! + + """ + Specifies parameters to update on the metaobject. + """ + metaobject: MetaobjectUpdateInput! + ): MetaobjectUpdatePayload + + """ + Creates or updates a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) + based on its handle. If a metaobject with the specified handle exists, the + mutation updates it with the provided field values. If no matching metaobject + exists, the mutation creates a new one. + + The handle serves as a unique identifier within a metaobject type. Field + values map to the [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition)'s + field keys and overwrite existing values during updates. + """ + metaobjectUpsert( + """ + The identifier of the metaobject to upsert. + """ + handle: MetaobjectHandleInput! + + """ + The parameters to upsert the metaobject. + """ + metaobject: MetaobjectUpsertInput! + ): MetaobjectUpsertPayload + + """ + Create a mobile platform application. + """ + mobilePlatformApplicationCreate( + """ + The input to create a mobile platform application. + """ + input: MobilePlatformApplicationCreateInput! + ): MobilePlatformApplicationCreatePayload + + """ + Delete a mobile platform application. + """ + mobilePlatformApplicationDelete( + """ + The ID of the Mobile Platform Application to be deleted. + """ + id: ID! + ): MobilePlatformApplicationDeletePayload + + """ + Update a mobile platform application. + """ + mobilePlatformApplicationUpdate( + """ + The ID of the Mobile Platform Application to be updated. + """ + id: ID! + + """ + The input to updat a Mobile Platform Application. + """ + input: MobilePlatformApplicationUpdateInput! + ): MobilePlatformApplicationUpdatePayload + + """ + Cancels an order, with options for refunding, restocking inventory, and customer notification. + + > Caution: + > Order cancellation is irreversible. An order that has been cancelled can't be restored to its original state. + + Use the `orderCancel` mutation to programmatically cancel orders in scenarios such as: + + - Customer-requested cancellations due to size, color, or other preference changes + - Payment processing failures or declined transactions + - Fraud detection and prevention + - Insufficient inventory availability + - Staff errors in order processing + - Wholesale or B2B order management workflows + + The `orderCancel` mutation provides flexible refund options including refunding to original payment methods + or issuing store credit. If a payment was only authorized (temporarily held) but not yet charged, + that hold will be automatically released when the order is cancelled, even if you choose not to refund other payments. + + The mutation supports different cancellation reasons: customer requests, payment declines, fraud, + inventory issues, staff errors, or other unspecified reasons. Each cancellation can include optional + staff notes for internal documentation (notes aren't visible to customers). + + An order can only be cancelled if it meets the following criteria: + + - The order hasn't already been cancelled. + - The order has no pending payment authorizations. + - The order has no active returns in progress. + - The order has no outstanding fulfillments that can't be cancelled. + + Orders might be assigned to locations that become + [deactivated](https://help.shopify.com/manual/fulfillment/setup/locations-management#deactivate-and-reactivate-locations) + after the order was created. When cancelling such orders, inventory behavior depends on payment status: + + - **Paid orders**: Cancellation will fail with an error if restocking is enabled, since inventory + can't be returned to deactivated locations. + - **Unpaid orders**: Cancellation succeeds but inventory is not restocked anywhere, even when the + restock option is enabled. The committed inventory effectively becomes unavailable rather than being + returned to stock at the deactivated location. + + After you cancel an order, you can still make limited updates to certain fields (like + notes and tags) using the + [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate). + + For partial refunds or more complex refund scenarios on active orders, + such as refunding only specific line items while keeping the rest of the order fulfilled, + consider using the [`refundCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/refundCreate) + mutation instead of full order cancellation. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCancel( + """ + 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! + + """ + 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 + + """ + Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously + reserved by an authorization transaction. + + The `orderCapture` mutation can be used in the following scenarios: + + - To capture the full amount of an authorized transaction + - To capture a partial payment by specifying an amount less than the total order amount + - To perform multiple captures on the same order, as long as the order transaction is + [multi-capturable](https://shopify.dev/docs/api/admin-graphql/latest/objects/ordertransaction#field-OrderTransaction.fields.multiCapturable) + + > Note: + > Multi-capture functionality is only available to stores on a + [Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan). + For multi-currency orders, the [`currency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.currency) + field is required and should match the presentment currency from the order. + + After capturing a payment, you can: + + - View the transaction details including status, amount, and processing information. + - Track the captured amount in both shop and presentment currencies. + - Monitor the transaction's settlement status. + + Learn more about [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction). + """ + orderCapture( + """ + The input for the mutation. + """ + input: OrderCaptureInput! + ): OrderCapturePayload + + """ + Marks an open [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) as + closed. A closed order is one where merchants fulfill or cancel all [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + objects and complete all financial transactions. + + Once closed, the order indicates that no further work is required. The order's [`closedAt`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-closedAt) + timestamp is set when this mutation completes successfully. + """ + orderClose( + """ + The input for the mutation. + """ + input: OrderCloseInput! + ): OrderClosePayload + + """ + Creates an order with attributes such as customer information, line items, and shipping and billing addresses. + + Use the `orderCreate` mutation to programmatically generate orders in scenarios where + orders aren't created through the standard checkout process, such as when importing orders from an external + system or creating orders for wholesale customers. + + The `orderCreate` mutation doesn't support applying multiple discounts, such as discounts on line items. + Automatic discounts won't be applied unless you replicate the logic of those discounts in your custom + implementation. You can [apply a discount code](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCreateDiscountCodeInput), + but only one discount code can be set for each order. + + > Note: + > If you're using the `orderCreate` mutation with a + > [trial](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/free-trial) or + > [development store](https://shopify.dev/docs/api/development-stores), then you can create a + > maximum of five new orders per minute. + + After you create an order, you can make subsequent edits to the order using one of the following mutations: + * [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate): + Used for simple updates to an order, such as changing the order's note, tags, or customer information. + * [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin): + Used when you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCreate( + """ + The 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 + + """ + 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! + + """ + A unique key to identify the payment request. + """ + idempotencyKey: String! + + """ + The mandate ID used for payment. + """ + mandateId: ID! + + """ + The ID of the payment schedule to collect the balance for. + """ + paymentScheduleId: ID + ): OrderCreateMandatePaymentPayload + + """ + Records a manual payment for an + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + that isn't fully paid. Use this mutation to track payments received outside + the standard checkout process, such as cash, check, bank transfer, or other + offline payment methods. + + You can specify the payment [amount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-amount), [method name](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-paymentMethodName), + and [when it was processed](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCreateManualPayment#arguments-processedAt). + """ + orderCreateManualPayment( + """ + The manual payment amount to be created. + """ + amount: MoneyInput + + """ + The ID of the order to create a manual payment for. + """ + id: ID! + + """ + The name of the payment method used for creating the payment. If none is + provided, then the default manual payment method ('Other') will be used. + """ + paymentMethodName: String + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format) when a manual payment was processed. If you're importing + transactions from an app or another platform, then you can set processedAt + to a date and time in the past to match when the original transaction was created. + """ + processedAt: DateTime + ): OrderCreateManualPaymentPayload + + """ + Removes customer from an order. + """ + orderCustomerRemove( + """ + The ID of the order having its customer removed. + """ + orderId: ID! + ): OrderCustomerRemovePayload + + """ + Sets a customer on an order. + """ + orderCustomerSet( + """ + The ID of the customer being set on the order. + """ + customerId: ID! + + """ + The ID of the order having a customer set. + """ + orderId: ID! + ): OrderCustomerSetPayload + + """ + Permanently deletes an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) from the store. + + You can only delete [specific order types](https://help.shopify.com/manual/orders/cancel-delete-order#delete-an-order). + Other orders you can cancel using the [`orderCancel`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCancel) + mutation instead. + + > Caution: + > This action is irreversible. You can't recover deleted orders. + """ + orderDelete( + """ + The ID of the order to be deleted. + """ + orderId: ID! + ): OrderDeletePayload + + """ + Adds a custom line item to an existing + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + Custom line items represent products or services not in your catalog, such as + gift wrapping, installation fees, or one-off charges. + + Creates a [`CalculatedLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedLineItem) with the specified title, price, and quantity. Changes remain in the edit + session until you commit them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [adding custom line items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders#add-a-custom-line-item). + """ + orderEditAddCustomItem( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit to which the custom item is added. + """ + id: ID! + + """ + 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 + + """ + 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 + + """ + Whether the custom item is taxable. Defaults to `true`. + """ + taxable: Boolean + + """ + The name of the custom item to add. + """ + title: String! + ): OrderEditAddCustomItemPayload + + """ + Applies a discount to a [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + during an order edit session. The discount can be either a fixed amount or + percentage value. + + To modify pricing on specific line items, use this mutation after starting an + order edit with the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) + mutation. The changes remain staged until you commit them with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditAddLineItemDiscount( + """ + The 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! + + """ + The ID of the calculated line item to add the discount to. + """ + lineItemId: ID! + ): OrderEditAddLineItemDiscountPayload + + """ + Adds a custom shipping line to an + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + during an edit session. Specify the shipping title and price to create a new [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine). + + Returns a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) showing the order with edits applied but not yet saved. To save your changes, use the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditAddShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit to which the shipping line is added. + """ + id: ID! + + """ + The shipping line to be added. + """ + shippingLine: OrderEditAddShippingLineInput! + ): OrderEditAddShippingLinePayload + + """ + Adds a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) as a line item to an + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + that's being edited. The mutation respects the variant's contextual pricing. + + You can specify a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + to check for inventory availability and control whether duplicate variants are allowed. The [`quantity`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant#arguments-quantity) + must be a positive value. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders#add-a-new-variant). + """ + orderEditAddVariant( + """ + 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! + + """ + The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location) + to check for inventory availability. A default location ID is chosen automatically if none is provided. + """ + locationId: ID + + """ + The quantity of the item to add to the order. Must be a positive value. + """ + quantity: Int! + + """ + The ID of the variant to add. + """ + variantId: ID! + ): OrderEditAddVariantPayload + + """ + Starts an order editing session that enables you to modify an existing + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + This mutation creates an [`OrderEditSession`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderEditSession) and returns a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) + showing how the order looks with your changes applied. + + Order editing follows a three-step workflow: Begin the edit with [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin), + apply changes using mutations like [`orderEditAddVariant`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant) or [`orderEditSetQuantity`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditSetQuantity), + and then save the changes with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) + mutation. The session tracks all staged changes until you commit or abandon them. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditBegin( + """ + The ID of the order to begin editing. + """ + id: ID! + ): OrderEditBeginPayload + + """ + Applies staged changes from an order editing session to the original order. + This finalizes all modifications made during the edit session, including + changes to line items, quantities, discounts, and shipping lines. + + Order editing follows a three-step workflow: start with [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) + to create an editing session, apply changes using various orderEdit mutations, + and then save the changes with the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) + mutation. The mutation can optionally notify the customer of changes and add + staff notes for internal tracking. + + You can only edit unfulfilled line items. If an edit changes the total order + value, then the customer might need to pay a balance or receive a refund. + + Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditCommit( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session that will have its changes applied to the order. + """ + id: ID! + + """ + Whether to notify the customer or not. + """ + notifyCustomer: Boolean + + """ + Note for staff members. + """ + staffNote: String + ): OrderEditCommitPayload + + """ + Removes a discount on the current order edit. For more information on how to + use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveDiscount( + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! + + """ + 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! + ): OrderEditRemoveDiscountPayload + + """ + 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! + + """ + 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! + ): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") + + """ + Removes a shipping line from an existing order. For more information on how to + use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit from which the shipping line is removed. + """ + id: ID! + + """ + The ID of the calculated shipping line to remove. + """ + shippingLineId: ID! + ): OrderEditRemoveShippingLinePayload + + """ + Sets the quantity of a line item on an order that's being edited. Use this + mutation to increase, decrease, or remove items by adjusting their quantities. + + Setting the quantity to zero effectively removes the line item from the order. + The item still exists as a data structure with zero quantity. When decreasing + quantities, you can optionally restock the removed items to inventory by + setting the `restock` parameter to `true`. + + Learn more about [editing workflows for existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + """ + orderEditSetQuantity( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. The edit changes the quantity on the line item. + """ + id: ID! + + """ + The ID of the calculated line item to edit. + """ + lineItemId: ID! + + """ + The 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.") + + """ + 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 + + """ + 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! + + """ + 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! + ): OrderEditUpdateDiscountPayload + + """ + Updates a shipping line on the current order edit. For more information on how + to use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditUpdateShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit used to update the shipping line. + """ + id: ID! + + """ + The updated shipping line. + """ + shippingLine: OrderEditUpdateShippingLineInput! + + """ + The ID of the calculated shipping line to update. + """ + shippingLineId: ID! + ): OrderEditUpdateShippingLinePayload + + """ + Sends an email invoice for an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + You can customize the email recipient, sender, and subject line using the [`email`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email) argument. + + > Note: + > Use store or staff account email addresses for the [`from`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email.fields.from) and [`bcc`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderInvoiceSend#arguments-email.fields.bcc) input fields. + """ + orderInvoiceSend( + """ + The 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! + ): OrderInvoiceSendPayload + + """ + Marks an order as paid by recording a payment transaction for the outstanding amount. + + Use the `orderMarkAsPaid` mutation to record payments received outside the standard checkout + process. The `orderMarkAsPaid` mutation is particularly useful in scenarios where: + + - Orders were created with manual payment methods (cash on delivery, bank deposit, money order) + - Payments were received offline and need to be recorded in the system + - Previously authorized payments need to be captured manually + - Orders require manual payment reconciliation due to external payment processing + + The mutation validates that the order can be marked as paid before processing. + An order can be marked as paid only if it has a positive outstanding balance and its + [financial status](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) + isn't already `PAID`. The mutation will either create a new sale transaction for the full + outstanding amount or capture an existing authorized transaction, depending on the order's current payment state. + + After successfully marking an order as paid, the order's financial status is updated to + reflect the payment, and payment events are logged for tracking and analytics + purposes. + + Learn more about [managing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + in apps. + """ + orderMarkAsPaid( + """ + The input for the mutation. + """ + input: OrderMarkAsPaidInput! + ): OrderMarkAsPaidPayload + + """ + Opens a closed order. + """ + orderOpen( + """ + The input for the mutation. + """ + input: OrderOpenInput! + ): OrderOpenPayload + + """ + Create a risk assessment for an order. + """ + orderRiskAssessmentCreate( + """ + The input fields required to create a risk assessment. + """ + orderRiskAssessmentInput: OrderRiskAssessmentCreateInput! + ): OrderRiskAssessmentCreatePayload + + """ + Updates the attributes of an order, such as the customer's email, the shipping address for the order, + tags, and [metafields](https://shopify.dev/docs/apps/build/custom-data) associated with the order. + + If you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts, then use + the [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) + mutation instead. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + If you need to remove a customer from an order, then use the [`orderCustomerRemove`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCustomerRemove) + mutation instead. + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderUpdate( + """ + The attributes of the updated order. + """ + input: OrderInput! + ): OrderUpdatePayload + + """ + Creates a [`Page`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page) for the online store. + + Pages contain custom content like "About Us" or "Contact" information that + merchants display outside their product catalog. The page requires a [`title`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.title) + and can include HTML content, publishing settings, and custom [template suffixes](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.templateSuffix). + You can control visibility through the [`isPublished`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page#field-Page.fields.isPublished) + flag or schedule publication with a specific date. + + The mutation returns the complete page object upon successful creation or validation errors if the input is invalid. + """ + pageCreate( + """ + The properties of the new page. + """ + page: PageCreateInput! + ): PageCreatePayload + + """ + Permanently deletes a page from the online store. + + For example, merchants might delete seasonal landing pages after campaigns + end, or remove outdated policy pages when terms change. + + Use the `pageDelete` mutation to: + - Remove outdated or unnecessary pages + - Clean up seasonal landing pages + - Delete duplicate pages + + The deletion is permanent and returns the deleted page's ID for confirmation. + """ + pageDelete( + """ + The ID of the page to be deleted. + """ + id: ID! + ): PageDeletePayload + + """ + Updates an existing page's content and settings. + + For example, merchants can update their "Shipping Policy" page when rates + change, or refresh their "About Us" page with new team information. + + Use the `pageUpdate` mutation to: + - Update page content and titles + - Modify publication status + - Change page handles for URL structure + - Adjust template settings + + The mutation supports partial updates, allowing specific changes while preserving other page properties. + """ + pageUpdate( + """ + The ID of the page to be updated. + """ + id: ID! + + """ + The properties of the page to be updated. + """ + page: PageUpdateInput! + ): PageUpdatePayload + + """ + Activates and deactivates payment customizations. + """ + paymentCustomizationActivation( + """ + The enabled status of the payment customizations. + """ + enabled: Boolean! + + """ + The global IDs of the payment customizations. + """ + ids: [ID!]! + ): PaymentCustomizationActivationPayload + + """ + Creates a payment customization. + """ + paymentCustomizationCreate( + """ + The input data used to create the payment customization. + """ + paymentCustomization: PaymentCustomizationInput! + ): PaymentCustomizationCreatePayload + + """ + Deletes a payment customization. + """ + paymentCustomizationDelete( + """ + The global ID of the payment customization. + """ + id: ID! + ): PaymentCustomizationDeletePayload + + """ + Updates a payment customization. + """ + paymentCustomizationUpdate( + """ + The global ID of the payment customization. + """ + id: ID! + + """ + The input data used to update the payment customization. + """ + paymentCustomization: PaymentCustomizationInput! + ): PaymentCustomizationUpdatePayload + + """ + Sends an email payment reminder for a payment schedule. + """ + paymentReminderSend( + """ + The payment schedule id associated with the reminder. + """ + paymentScheduleId: ID! + ): PaymentReminderSendPayload + + """ + Create payment terms on an order. To create payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsCreate( + """ + The attributes used to create the payment terms. + """ + paymentTermsAttributes: PaymentTermsCreateInput! + + """ + Specifies the reference orderId to add the payment terms for. + """ + referenceId: ID! + ): PaymentTermsCreatePayload + + """ + Delete payment terms for an order. To delete payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsDelete( + """ + The input fields used to delete the payment terms. + """ + input: PaymentTermsDeleteInput! + ): PaymentTermsDeletePayload + + """ + Update payment terms on an order. To update payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsUpdate( + """ + The input fields used to update the payment terms. + """ + input: PaymentTermsUpdateInput! + ): PaymentTermsUpdatePayload + + """ + Creates a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Price lists enable contextual pricing by defining fixed prices or + percentage-based adjustments. + + The price list requires a unique name, currency for fixed prices, and parent + adjustment settings that determine how the system calculates prices relative + to base prices. To apply contextual pricing, link the price list to a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). + When that catalog's context is matched, customers receive the price list's prices. + + Learn more about [building catalogs with price lists](https://shopify.dev/docs/apps/build/markets/build-catalog#step-2-associate-a-price-list-with-the-catalog). + """ + priceListCreate( + """ + The properties of the new price list. + """ + input: PriceListCreateInput! + ): PriceListCreatePayload + + """ + Deletes a price list. For example, you can delete a price list so that it no + longer applies for products in the associated market. + """ + priceListDelete( + """ + The ID of the price list to be deleted. + """ + id: ID! + ): PriceListDeletePayload + + """ + Creates or updates fixed prices on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). + Use this mutation to set specific prices for [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects that override the price list's default percentage-based adjustments. + + When you add fixed prices, the mutation replaces any existing fixed prices for those variants on the price list. + """ + priceListFixedPricesAdd( + """ + The ID of the price list to which the fixed prices will be added or updated. + """ + priceListId: ID! + + """ + The list of fixed prices to add or update in the price list. + """ + prices: [PriceListPriceInput!]! + ): PriceListFixedPricesAddPayload + + """ + Sets or removes fixed prices for all variants of a + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). + Simplifies pricing management when all variants of a product should have the + same price on a price list, rather than setting individual variant prices. + + When you add a fixed price for a product, all its [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects receive the same price on the price list. When you remove a product's + fixed prices, all variant prices revert to the price list's adjustment rules. + """ + priceListFixedPricesByProductUpdate( + """ + The price list to update the prices for. + """ + priceListId: ID! + + """ + 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!] + ): PriceListFixedPricesByProductUpdatePayload + + """ + Deletes specific fixed prices from a price list using a product variant ID. + You can use the `priceListFixedPricesDelete` mutation to delete a set of fixed + prices from a price list. After deleting the set of fixed prices from the + price list, the price of each product variant reverts to the original price + that was determined by the price list adjustment. + """ + priceListFixedPricesDelete( + """ + The ID of the price list from which the fixed prices will be removed. + """ + priceListId: ID! + + """ + A list of product variant IDs whose fixed prices will be removed from the price list. + """ + variantIds: [ID!]! + ): PriceListFixedPricesDeletePayload + + """ + Updates fixed prices on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). + This mutation lets you add new fixed prices for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects and remove existing prices in a single operation. + + Use this mutation to modify variant pricing on a price list by providing prices to add and variant IDs to delete. + + Learn more about [setting fixed prices for product variants](https://shopify.dev/docs/apps/build/markets/build-catalog#step-3-set-fixed-prices-for-specific-product-variants). + """ + priceListFixedPricesUpdate( + """ + The price list that the prices will be updated against. + """ + priceListId: ID! + + """ + The fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of product variant IDs to remove from the price list. + """ + variantIdsToDelete: [ID!]! + ): PriceListFixedPricesUpdatePayload + + """ + Updates a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList)'s configuration, including its name, currency, [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) + association, and pricing adjustments. + + Changing the currency removes all fixed prices from the price list. The affected [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects revert to prices calculated from the price list's adjustment settings. + """ + priceListUpdate( + """ + The ID of the price list to update. + """ + id: ID! + + """ + The input data used to update the price list. + """ + input: PriceListUpdateInput! + ): PriceListUpdatePayload + + """ + Disable a shop's privacy features. + """ + privacyFeaturesDisable( + """ + The list of privacy features to disable. + """ + featuresToDisable: [PrivacyFeaturesEnum!]! + ): PrivacyFeaturesDisablePayload + + """ + Creates a product bundle that groups multiple + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + objects together as components. The bundle appears as a single product in the + store, with its price determined by the parent product and inventory + calculated from the component products. + + The mutation runs asynchronously and returns a [`ProductBundleOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleOperation) + object to track the creation status. Poll the operation using the [`productOperation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/productOperation) + query to determine when the bundle is ready. + + Learn more about [creating product fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle#step-1-create-a-bundle). + """ + productBundleCreate( + """ + Input for creating a product bundle or componentized product. + """ + input: ProductBundleCreateInput! + ): ProductBundleCreatePayload + + """ + Updates a product bundle or componentized product. + """ + productBundleUpdate( + """ + Input for updating a product bundle or componentized product. + """ + input: ProductBundleUpdateInput! + ): ProductBundleUpdatePayload + + """ + Changes the status of a product. This allows you to set the availability of the product across all channels. + """ + productChangeStatus( + """ + The ID of the product. + """ + productId: ID! + + """ + The status to be assigned to the product. + """ + status: ProductStatus! + ): ProductChangeStatusPayload @deprecated(reason: "Use `productUpdate` instead.") + + """ + Creates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productCreate` mutation helps you create many products at once, avoiding the tedious or time-consuming + process of adding them one by one in the Shopify admin. Common examples include creating products for a + new collection, launching a new product line, or adding seasonal products. + + You can define product + [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue), + allowing you to create products with different variations like sizes or colors. You can also associate media + files to your products, including images and videos. + + The `productCreate` mutation only supports creating a product with its initial + [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To create multiple product variants for a single product and manage prices, use the + [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + mutation. + + > Note: + > The `productCreate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be created per day. + + After you create a product, you can make subsequent edits to the product using one of the following mutations: + + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers. The `productCreate` mutation creates products + in an unpublished state by default, so you must perform a separate operation to publish the product. + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Used to update a single product, such as changing the product's title, description, vendor, or associated media. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productCreate( + """ + The properties of the new product. + """ + input: ProductInput @deprecated(reason: "Use `product` instead.") + + """ + The media to add to the product. + """ + media: [CreateMediaInput!] + + """ + The attributes of the new product. + """ + product: ProductCreateInput + ): ProductCreatePayload + + """ + Adds media files to a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as images, videos, or 3D models. Media files enhance product listings by + providing visual representations that help customers understand the product. + + The mutation accepts an array of [`CreateMediaInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CreateMediaInput) + objects, each specifying the source URL, content type, and optional alt text. + + You can add multiple media files in a single request. The mutation adds all + valid files and returns errors for any invalid ones. + """ + productCreateMedia( + """ + List of new media to be added to a product. + """ + media: [CreateMediaInput!]! + + """ + Specifies the product associated with the media. + """ + productId: ID! + ): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") + + """ + Permanently deletes a product and all its associated data, including variants, media, publications, and inventory items. + + Use the `productDelete` mutation to programmatically remove products from your store when they need to be + permanently deleted from your catalog, such as when removing discontinued items, cleaning up test data, or + synchronizing with external inventory management systems. + + The `productDelete` mutation removes the product from all associated collections, + and removes all associated data for the product, including: + + - All product variants and their inventory items + - Product media (images, videos) that are not referenced by other products + - [Product options](https://shopify.dev/api/admin-graphql/latest/objects/ProductOption) and [option values](https://shopify.dev/api/admin-graphql/latest/objects/ProductOptionValue) + - Product publications across all sales channels + - Product tags and metadata associations + + The `productDelete` mutation also has the following effects on existing orders and transactions: + + - **Draft orders**: Existing draft orders that reference this product will + retain the product information as stored data, but the product reference will + be removed. Draft orders can still be completed with the stored product details. + - **Completed orders and refunds**: Previously completed orders that included + this product aren't affected. The product information in completed orders is + preserved for record-keeping, and existing refunds for this product remain + valid and processable. + + > Caution: + > Product deletion is irreversible. After a product is deleted, it can't be recovered. Consider archiving + > or unpublishing products instead if you might need to restore them later. + + If you need to delete a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/objects/Location), + you might encounter timeout errors. To avoid these timeout errors, you can set the + [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productDelete#arguments-synchronous) + parameter to `false` to run the deletion asynchronously, which returns a + [`ProductDeleteOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductDeleteOperation) + that you can monitor for completion status. + + If you need more granular control over product cleanup, consider using these alternative mutations: + + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Update the product status to archived or unpublished instead of deleting. + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete): + Delete specific variants while keeping the product. + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete): + Delete the choices available for a product, such as size, color, or material. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model). + """ + productDelete( + """ + Specifies the product to delete by its ID. + """ + input: ProductDeleteInput! + + """ + Specifies whether or not to run the mutation synchronously. + """ + synchronous: Boolean = true + ): ProductDeletePayload + + """ + Deletes media from a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as images, videos, and 3D models. + + When you delete media images, the mutation also removes any corresponding + product images. The mutation returns the IDs of both the deleted media and any + product images that the deletion removed. + + > Caution: + > This action is irreversible. You can't recover deleted media. + """ + productDeleteMedia( + """ + The media IDs to be deleted. + """ + mediaIds: [ID!]! + + """ + Specifies the product ID from which the media will be deleted. + """ + productId: ID! + ): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Duplicates a product. + + If you need to duplicate a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/input-objects/ProductVariantInput) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/input-objects/InventoryLevelInput), + you might encounter timeout errors. + + To avoid these timeout errors, you can instead duplicate the product asynchronously. + + In API version 2024-10 and higher, include `synchronous: false` argument in + this mutation to perform the duplication asynchronously. + + In API version 2024-07 and lower, use the asynchronous [`ProductDuplicateAsyncV2`](https://shopify.dev/api/admin-graphql/2024-07/mutations/productDuplicateAsyncV2). + + Metafield values are not duplicated if the unique values capability is enabled. + """ + productDuplicate( + """ + 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! + + """ + Specifies whether or not to run the mutation synchronously. + """ + synchronous: Boolean = true + ): ProductDuplicatePayload + + """ + Creates a product feed for a specific publication. + """ + productFeedCreate( + """ + The properties of the new product feed. + """ + input: ProductFeedInput + ): ProductFeedCreatePayload + + """ + Deletes a product feed for a specific publication. + """ + productFeedDelete( + """ + The ID of the product feed to be deleted. + """ + id: ID! + ): ProductFeedDeletePayload + + """ + Runs the full product sync for a given shop. + """ + productFullSync( + """ + Syncs only products that haven't changed since the specified timestamp. + """ + beforeUpdatedAt: DateTime + + """ + The product feed which needs syncing. + """ + id: ID! + + """ + Syncs only products that have changed since the specified timestamp. + """ + updatedAtSince: DateTime + ): ProductFullSyncPayload + + """ + Adds multiple selling plan groups to a product. + """ + productJoinSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductJoinSellingPlanGroupsPayload + + """ + Removes multiple groups from a product. + """ + productLeaveSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductLeaveSellingPlanGroupsPayload + + """ + Updates an [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + on a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as size, color, or material. Each option includes a name, position, and a list of values. The combination + of a product option and value creates a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + + Use the `productOptionUpdate` mutation for the following use cases: + + - **Update product choices**: Modify an existing option, like "Size" (Small, Medium, Large) or + "Color" (Red, Blue, Green), so customers can select their preferred variant. + - **Enable personalization features**: Update an option (for example, + "Engraving text") to let customers customize their purchase. + - **Offer seasonal or limited edition products**: Update a value + (for example, "Holiday red") on an existing option to support limited-time or seasonal variants. + - **Integrate with apps that manage product configuration**: Allow third-party apps to update options, like + "Bundle size", when customers select or customize + [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). + - **Link options to metafields**: Associate a product option with a custom + [metafield](https://shopify.dev/docs/apps/build/custom-data), like "Fabric code", for + richer integrations with other systems or apps. + + > Note: + > The `productOptionUpdate` mutation enforces strict data integrity for product options and variants. + All option positions must be sequential, and every option should be used by at least one variant. + + After you update a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionUpdate( + """ + Option to update. + """ + option: OptionUpdateInput! + + """ + New option values to create. + """ + optionValuesToAdd: [OptionValueCreateInput!] + + """ + IDs of the existing option values to delete. + """ + optionValuesToDelete: [ID!] + + """ + Existing option values to update. + """ + optionValuesToUpdate: [OptionValueUpdateInput!] + + """ + The ID of the Product the Option belongs to. + """ + productId: ID! + + """ + 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 + + """ + 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! + + """ + 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 + + """ + 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!]! + + """ + ID of the product from which to delete the options. + """ + productId: ID! + + """ + The strategy defines which behavior the mutation should observe,such as how + to handle a situation where deleting an option would result in duplicate variants. + """ + strategy: ProductOptionDeleteStrategy = DEFAULT + ): ProductOptionsDeletePayload + + """ + Reorders the [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [option values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue) on a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + updating the order in which [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + are presented to customers. + + The `productOptionsReorder` mutation accepts a list of product options, each identified by `id` or `name`, and an + optional list of values (also by `id` or `name`) specifying the new order. The order of options in the + mutation's input determines their new positions (for example, the first option becomes `option1`). + The order of values within each option determines their new positions. The mutation recalculates the order of + variants based on the new option and value order. + + Suppose a product has the following variants: + + 1. `"Red / Small"` + 2. `"Green / Medium"` + 3. `"Blue / Small"` + + You reorder options and values: + + ``` + options: [ + { name: "Size", values: [{ name: "Small" }, { name: "Medium" }] }, + { name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } + ] + ``` + + The resulting variant order will be: + + 1. `"Small / Green"` + 2. `"Small / Red"` + 3. `"Small / Blue"` + 4. `"Medium / Green"` + + Use the `productOptionsReorder` mutation for the following use cases: + + - **Change the order of product options**: For example, display "Color" before "Size" in a store. + - **Reorder option values within an option**: For example, show "Red" before "Blue" in a color picker. + - **Control the order of product variants**: The order of options and their + values determines the sequence in which variants are listed and selected. + - **Highlight best-selling options**: Present the most popular or relevant options and values first. + - **Promote merchandising strategies**: Highlight seasonal colors, limited editions, or featured sizes. + + > Note: + > The `productOptionsReorder` mutation enforces strict data integrity for product options and variants. + > All option positions must be sequential, and every option should be used by at least one variant. + + After you reorder product options, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [managing product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsReorder( + """ + Options to reorder on the product. + """ + options: [OptionReorderInput!]! + + """ + The ID of the product to update. + """ + productId: ID! + ): ProductOptionsReorderPayload + + """ + Publishes a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) to specified [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) objects. + + Products sold exclusively on subscription (`requiresSellingPlan: true`) can only be published to online stores. + """ + productPublish( + """ + Specifies the product to publish and the channels to publish it to. + """ + input: ProductPublishInput! + ): ProductPublishPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Reorders [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Media) + attached to a product, changing their sequence in product displays. The + operation processes asynchronously to handle + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with large media collections. + + Specify the [product ID](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productReorderMedia#arguments-id) + and an array of [moves](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productReorderMedia#arguments-moves), + where each move contains a media ID and its new zero-based position. + + > Note: + > Only include media items that need repositioning. Unchanged items maintain their relative order automatically. + + The mutation returns a + [`Job`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Job) to + track the reordering progress. Poll the job status to determine when the + operation completes and media positions update across all sales channels. + + Learn more about [reordering product media](https://shopify.dev/docs/apps/build/online-store/product-media#step-6-reorder-media-objects). + """ + productReorderMedia( + """ + The ID of the product on which to reorder medias. + """ + id: ID! + + """ + A list of moves to perform which will be evaluated in order. + """ + moves: [MoveInput!]! + ): ProductReorderMediaPayload + + """ + Performs multiple operations to create or update products in a single request. + + Use the `productSet` mutation to sync information from an external data source into Shopify, manage large + product catalogs, and perform batch updates. The mutation is helpful for bulk product management, including price + adjustments, inventory updates, and product lifecycle management. + + The behavior of `productSet` depends on the type of field it's modifying: + + - **For list fields**: Creates new entries, updates existing entries, and deletes existing entries + that aren't included in the mutation's input. Common examples of list fields include + [`collections`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.collections), + [`metafields`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.metafields), + and [`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet#arguments-input.fields.variants). + + - **For all other field types**: Updates only the included fields. Any omitted fields will remain unchanged. + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + You can run `productSet` in one of the following modes: + + - **Synchronously**: Returns the updated product in the response. + - **Asynchronously**: Returns a [`ProductSetOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductSetOperation) object. + Use the [`productOperation`](https://shopify.dev/api/admin-graphql/latest/queries/productOperation) query to check the status of the operation and + retrieve details of the updated product and its product variants. + + If you need to only manage product variants, then use one of the following mutations: + + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete) + + If you need to only manage product options, then use one of the following mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about [syncing product data from an external source](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/sync-data). + """ + productSet( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: ProductSetIdentifiers + + """ + The properties of the newly created or updated product. + """ + input: ProductSetInput! + + """ + 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 + + """ + Unpublishes a product. + """ + productUnpublish( + """ + Specifies the product to unpublish and the channel to unpublish it from. + """ + input: ProductUnpublishInput! + ): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productUpdate` mutation helps you modify many products at once, avoiding the tedious or time-consuming + process of updating them one by one in the Shopify admin. Common examples including updating + product details like status or tags. + + The `productUpdate` mutation doesn't support updating + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To update multiple product variants for a single product and manage prices, use the + [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + mutation. + + > Note: + > The `productUpdate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be updated per day. + + After updating a product, you can make additional changes using one of the following mutations: + + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers, if the product is currently unpublished. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productUpdate( + """ + The updated properties for a product. + """ + input: ProductInput @deprecated(reason: "Use `product` instead.") + + """ + List of new media to be added to the product. + """ + media: [CreateMediaInput!] + + """ + The updated properties for a product. + """ + product: ProductUpdateInput + ): ProductUpdatePayload + + """ + Updates properties of media attached to a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + You can modify alt text for accessibility or change preview images for + existing media items. + + Provide the product ID and an array of [`UpdateMediaInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/UpdateMediaInput) + objects. Each update specifies the media's ID and the properties to change. + Updates apply only to media already attached to the product and don't affect + their position in the product gallery. + """ + productUpdateMedia( + """ + A list of media updates. + """ + media: [UpdateMediaInput!]! + + """ + Specifies the product on which media will be updated. + """ + productId: ID! + ): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Appends existing media from a product to specific variants of that product, + creating associations between media files and particular product options. This + allows different variants to showcase relevant images or videos. + + For example, a t-shirt product might have color variants where each color + variant displays only the images showing that specific color, helping + customers see exactly what they're purchasing. + + Use `ProductVariantAppendMedia` to: + - Associate specific images with product variants for accurate display + - Build variant-specific media management in product interfaces + - Implement automated media assignment based on variant attributes + + The operation links existing product media to variants without duplicating + files, maintaining efficient media storage while enabling variant-specific displays. + + Learn more about [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + """ + productVariantAppendMedia( + """ + Specifies the product associated to the media. + """ + productId: ID! + + """ + A list of pairs of variants and media to be attached to the variants. + """ + variantMedia: [ProductVariantAppendMediaInput!]! + ): ProductVariantAppendMediaPayload + + """ + Detaches media from product variants. + """ + productVariantDetachMedia( + """ + Specifies the product to which the variants and media are associated. + """ + productId: ID! + + """ + A list of pairs of variants and media to be deleted from the variants. + """ + variantMedia: [ProductVariantDetachMediaInput!]! + ): ProductVariantDetachMediaPayload + + """ + Adds multiple selling plan groups to a product variant. + """ + productVariantJoinSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! + ): ProductVariantJoinSellingPlanGroupsPayload + + """ + Remove multiple groups from a product variant. + """ + productVariantLeaveSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! + + """ + The IDs of the selling plan groups to leave. + """ + sellingPlanGroupIds: [ID!]! + ): ProductVariantLeaveSellingPlanGroupsPayload + + """ + Creates new bundles, updates component quantities in existing bundles, and + removes bundle components for one or multiple [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects. + + Each bundle variant can contain up to 30 component variants with specified + quantities. After an app assigns components to a bundle, only that app can + manage those components. + + > Note: + > For most use cases, use [`productBundleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productBundleCreate) + instead, which creates product fixed bundles. + `productVariantRelationshipBulkUpdate` is for [variant fixed bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-variant-fixed-bundle), + where each variant has its own component configuration. + """ + productVariantRelationshipBulkUpdate( + """ + The input options for the product variant being updated. + """ + input: [ProductVariantRelationshipUpdateInput!]! + ): ProductVariantRelationshipBulkUpdatePayload + + """ + Creates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk + operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkCreate` mutation to efficiently add new product variants—such as different sizes, + colors, or materials—to an existing product. The mutation is helpful if you need to add product variants in bulk, + such as importing from an external system. + + The mutation supports: + + - Creating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using one of the following mutations: + + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate): + Updates multiple product variants for a single product in one operation. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkCreate( + """ + 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! + + """ + 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 + + """ + 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! + + """ + An array of product variants IDs to delete. + """ + variantsIds: [ID!]! + ): ProductVariantsBulkDeletePayload + + """ + 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! + ): ProductVariantsBulkReorderPayload + + """ + Updates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk + operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkUpdate` mutation to efficiently modify product variants—such as different sizes, + colors, or materials—associated with an existing product. The mutation is helpful if you need to update a + product's variants in bulk, such as importing from an external system. + + The mutation supports: + + - Updating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using the + [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) mutation, + which is used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkUpdate( + """ + 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! + + """ + An array of product variants to update. + """ + variants: [ProductVariantsBulkInput!]! + ): ProductVariantsBulkUpdatePayload + + """ + Updates the server pixel to connect to a Google PubSub endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + pubSubServerPixelUpdate( + """ + The Google PubSub project ID. + """ + pubSubProject: String! + + """ + The Google PubSub topic ID. + """ + pubSubTopic: String! + ): PubSubServerPixelUpdatePayload + + """ + Creates a webhook subscription that notifies your + [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when + specific events occur in a shop. Webhooks push event data to your endpoint + immediately when changes happen, eliminating the need for polling. + + This mutation configures webhook delivery to a Google Cloud Pub/Sub topic. You + can filter events using [Shopify API search + syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only + relevant webhooks, control which data fields are included in webhook payloads, + and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) + determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + pubSubWebhookSubscriptionCreate( + """ + The type of event that triggers the webhook. + """ + topic: WebhookSubscriptionTopic! + + """ + Specifies the input fields for a Google Cloud Pub/Sub webhook subscription. + """ + webhookSubscription: PubSubWebhookSubscriptionInput! + ): PubSubWebhookSubscriptionCreatePayload @deprecated(reason: "Use `webhookSubscriptionCreate` instead.") + + """ + Updates a Google Cloud Pub/Sub webhook subscription. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + pubSubWebhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for a Google Cloud Pub/Sub webhook subscription. + """ + webhookSubscription: PubSubWebhookSubscriptionInput! + ): PubSubWebhookSubscriptionUpdatePayload @deprecated(reason: "Use `webhookSubscriptionUpdate` instead.") + + """ + Creates a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) that controls which + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + customers can access through a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog). + + ### When to create a publication + + Publications are **optional** for catalogs. Only create a publication if you + need to control which products are visible in a specific catalog context. When + a publication isn't associated with a catalog, product availability is + determined by the sales channel. + + **Create a publication if you need to:** + - Restrict product visibility to a subset of your inventory for a specific market or company location + - Publish different product selections to different contexts + + **Do NOT create a publication if:** + - You want product availability determined by the sales channel + - You only need custom pricing (use a price list on the catalog instead) + + ### Configuration options + + You can create an empty publication and add products later, or prepopulate it + with all existing products. The [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publicationCreate#arguments-input.fields.autoPublish) + field determines whether the publication automatically adds newly created products. + """ + publicationCreate( + """ + The input fields to use when creating the publication. + """ + input: PublicationCreateInput! + ): PublicationCreatePayload + + """ + Deletes a publication. + """ + publicationDelete( + """ + The ID of the publication to delete. + """ + id: ID! + ): PublicationDeletePayload + + """ + Updates a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + You can add or remove + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + from the publication, with a maximum of 50 items per operation. The [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publicationUpdate#arguments-input.fields.autoPublish) + field determines whether new products automatically display in this publication. + """ + publicationUpdate( + """ + The ID of the publication to update. + """ + id: ID! + + """ + The input fields to use when updating the publication. + """ + input: PublicationUpdateInput! + ): PublicationUpdatePayload + + """ + Publishes a resource, such as a + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), to one or more [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + For products to be visible in a channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). + Products sold exclusively on subscription (`requiresSellingPlan: true`) can + only be published to online stores. + + You can schedule future publication by providing a publish date. Only online + store channels support [scheduled publishing](https://shopify.dev/docs/apps/build/sales-channels/scheduled-product-publishing). + """ + publishablePublish( + """ + The resource to create or update publications for. + """ + id: ID! + + """ + Specifies the input fields required to publish a resource. + """ + input: [PublicationInput!]! + ): PublishablePublishPayload + + """ + Publishes a resource to the current + [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) + associated with the requesting app. The system determines the current channel + by the app's API client ID. Resources include + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + objects that implement the [`Publishable`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Publishable) interface. + + For products to be visible in the channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). + Products sold exclusively on subscription ([`requiresSellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product#field-Product.fields.requiresSellingPlan): + `true`) can only be published to online stores. + """ + publishablePublishToCurrentChannel( + """ + The resource to create or update publications for. + """ + id: ID! + ): PublishablePublishToCurrentChannelPayload @deprecated(reason: "Use `publishablePublish` instead.") + + """ + Unpublishes a resource, such as a + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), + from one or more [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + The resource remains in your store but becomes unavailable to customers. + + For products to be visible in a channel, they must have an active [`ProductStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductStatus). + """ + publishableUnpublish( + """ + The resource to delete or update publications for. + """ + id: ID! + + """ + Specifies the input fields required to unpublish a resource. + """ + input: [PublicationInput!]! + ): PublishableUnpublishPayload + + """ + Unpublishes a resource from the current channel. If the resource is a product, + then it's visible in the channel only if the product status is `active`. + """ + publishableUnpublishToCurrentChannel( + """ + The resource to delete or update publications for. + """ + id: ID! + ): PublishableUnpublishToCurrentChannelPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates quantity pricing on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects. You can set fixed prices (see [`PriceListPrice`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceListPrice)), + quantity rules, and quantity price breaks in a single operation. + + [`QuantityRule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/QuantityRule) objects define minimum, maximum, and increment constraints for ordering. [`QuantityPriceBreak`](https://shopify.dev/docs/api/admin-graphql/latest/objects/QuantityPriceBreak) + objects offer tiered pricing based on purchase volume. + + The mutation executes delete operations before create operations and doesn't allow partial updates. + + > Note: If any requested change fails, then the mutation doesn't apply any of the changes. + """ + quantityPricingByVariantUpdate( + """ + The 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! + ): QuantityPricingByVariantUpdatePayload + + """ + Creates or updates existing quantity rules on a price list. + You can use the `quantityRulesAdd` mutation to set order level minimums, + maximumums and increments for specific product variants. + """ + quantityRulesAdd( + """ + The ID of the price list to which the quantity rules will be added or updated. + """ + priceListId: ID! + + """ + The list of quantity rules to add or update in the price list. + """ + quantityRules: [QuantityRuleInput!]! + ): QuantityRulesAddPayload + + """ + Deletes specific quantity rules from a price list using a product variant ID. + You can use the `quantityRulesDelete` mutation to delete a set of quantity rules from a price list. + """ + quantityRulesDelete( + """ + The ID of the price list from which the quantity rules will be deleted. + """ + priceListId: ID! + + """ + A list of product variant IDs whose quantity rules will be removed from the price list. + """ + variantIds: [ID!]! + ): QuantityRulesDeletePayload + + """ + Creates a refund for an order, allowing you to process returns and issue payments back to customers. + + Use the `refundCreate` mutation to programmatically process refunds in scenarios where you need to + return money to customers, such as when handling returns, processing chargebacks, or correcting + order errors. + + The `refundCreate` mutation supports various refund scenarios: + + - Refunding line items with optional restocking + - Refunding shipping costs + - Refunding duties and import taxes + - Refunding additional fees + - Processing refunds through different payment methods + - Issuing store credit refunds (when enabled) + + You can create both full and partial refunds, and optionally allow over-refunding in specific + cases. + + After creating a refund, you can track its status and details through the order's + [`refunds`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.refunds) + field. The refund is associated with the order and can be used for reporting and reconciliation purposes. + + Learn more about + [managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + and [refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties). + + > Note: + > The refunding behavior of the `refundCreate` mutation is similar to the + [`refundReturn`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnRefund) + mutation. The key difference is that the `refundCreate` mutation lets you to specify restocking behavior + for line items, whereas the `returnRefund` mutation focuses solely on handling the financial refund without + any restocking input. + + > Caution: + > As of 2026-01, this mutation supports an optional idempotency key using the `@idempotent` directive. + > As of 2026-04, the idempotency key is required and must be provided using the `@idempotent` directive. + > For more information, see the [idempotency documentation](https://shopify.dev/docs/api/usage/idempotent-requests). + """ + refundCreate( + """ + The input fields that are used in the mutation for creating a refund. + """ + input: RefundInput! + ): RefundCreatePayload + + """ + Removes return and/or exchange lines from a return. + """ + removeFromReturn( + """ + The exchange line items to remove from the return. + """ + exchangeLineItems: [ExchangeLineItemRemoveFromReturnInput!] + + """ + The ID of the return for line item removal. + """ + returnId: ID! + + """ + The return line items to remove from the return. + """ + returnLineItems: [ReturnLineItemRemoveFromReturnInput!] + ): RemoveFromReturnPayload + + """ + Approves a customer's return request. + If this mutation is successful, then the `Return.status` field of the + approved return is set to `OPEN`. + """ + returnApproveRequest( + """ + The input fields to approve a return. + """ + input: ReturnApproveRequestInput! + ): ReturnApproveRequestPayload + + """ + Cancels a return and restores the items back to being fulfilled. + Canceling a return is only available before any work has been done + on the return (such as an inspection or refund). + """ + returnCancel( + """ + The ID of the return to cancel. + """ + id: ID! + + """ + Whether the customer receives an email notification regarding the canceled return. + """ + notifyCustomer: Boolean = false @deprecated(reason: "Not supported. This argument will be removed in a future version.") + ): ReturnCancelPayload + + """ + Indicates a return is complete, either when a refund has been made and items restocked, + or simply when it has been marked as returned in the system. + """ + returnClose( + """ + The ID of the return to close. + """ + id: ID! + ): ReturnClosePayload + + """ + Creates a return from an existing order that has at least one fulfilled + [line item](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + that hasn't yet been refunded. If you create a return on an archived order, then the order is automatically + unarchived. + + Use the `returnCreate` mutation when your workflow involves + [approving](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnApproveRequest) or + [declining](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnDeclineRequest) requested returns + outside of the Shopify platform. + + The `returnCreate` mutation performs the following actions: + + - Creates a return in the `OPEN` state, and assumes that the return request from the customer has already been + approved + - Creates a [reverse fulfillment order](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), + and enables you to create a [reverse delivery](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) + for the reverse fulfillment order + - Creates a sales agreement with a `RETURN` reason, which links to all sales created for the return or exchange + - Generates sales records that reverse the sales records for the items being returned + - Generates sales records for any exchange line items + + After you've created a return, use the + [`return`](https://shopify.dev/docs/api/admin-graphql/latest/queries/return) query to retrieve the + return by its ID. Learn more about providing a + [return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + for merchants. + """ + returnCreate( + """ + Specifies the input fields for a return. + """ + returnInput: ReturnInput! + ): ReturnCreatePayload + + """ + Declines a return on an order. + When a return is declined, each `ReturnLineItem.fulfillmentLineItem` can be associated to a new return. + Use the `ReturnCreate` or `ReturnRequest` mutation to initiate a new return. + """ + returnDeclineRequest( + """ + The input fields for declining a customer's return request. + """ + input: ReturnDeclineRequestInput! + ): ReturnDeclineRequestPayload + + """ + Removes return lines from a return. + """ + returnLineItemRemoveFromReturn( + """ + The ID of the return for line item removal. + """ + returnId: ID! + + """ + The return line items to remove from the return. + """ + returnLineItems: [ReturnLineItemRemoveFromReturnInput!]! + ): ReturnLineItemRemoveFromReturnPayload @deprecated(reason: "Use `removeFromReturn` instead.") + + """ + Processes a return by confirming which items customers return and exchange, + handling their disposition, and optionally issuing refunds. This mutation + confirms the quantities for [`ReturnLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnLineItem) and [`ExchangeLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ExchangeLineItem) + objects previously created on the + [`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return). + + For returned items, you specify how to handle them through dispositions such + as restocking or disposal. The mutation creates [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + objects for exchange items and records all transactions in the merchant's + financial reports. You can optionally issue refunds through financial + transfers, apply refund duties, and refund shipping costs. + + Learn more about [processing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnProcess( + """ + Specifies the input fields for processing a return. + """ + input: ReturnProcessInput! + ): ReturnProcessPayload + + """ + Creates a refund for items being returned when the return status is `OPEN` or + `CLOSED`. This mutation processes the financial aspects of a return by + refunding line items, shipping costs, and duties back to the customer. + """ + returnRefund( + """ + The input fields to refund a return. + """ + returnRefundInput: ReturnRefundInput! + ): ReturnRefundPayload @deprecated(reason: "Use `returnProcess` instead.") + + """ + Reopens a closed return. + """ + returnReopen( + """ + The ID of the return to reopen. + """ + id: ID! + ): ReturnReopenPayload + + """ + Creates a return request that requires merchant approval before processing. + The return has its status set to `REQUESTED` and the merchant must approve or decline it. + + Use this mutation when customers initiate returns that need review. After + creating a requested return, use [`returnApproveRequest`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnApproveRequest) + to approve it or [`returnDeclineRequest`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnDeclineRequest) to decline it. + + For returns that should be immediately open for processing, use the [`returnCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnCreate) + mutation instead. + + Learn more about [building return management workflows](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnRequest( + """ + The input fields for requesting a return. + """ + input: ReturnRequestInput! + ): ReturnRequestPayload + + """ + Creates a new reverse delivery with associated external shipping information. + """ + reverseDeliveryCreateWithShipping( + """ + The 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! + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryCreateWithShippingPayload + + """ + 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! + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryShippingUpdatePayload + + """ + Disposes reverse fulfillment order line items. + """ + reverseFulfillmentOrderDispose( + """ + The input parameters required to dispose reverse fulfillment order line items. + """ + dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]! + ): ReverseFulfillmentOrderDisposePayload + + """ + Creates a saved search. + """ + savedSearchCreate( + """ + Specifies the input fields for a saved search. + """ + input: SavedSearchCreateInput! + ): SavedSearchCreatePayload + + """ + Delete a saved search. + """ + savedSearchDelete( + """ + The input fields to delete a saved search. + """ + input: SavedSearchDeleteInput! + ): SavedSearchDeletePayload + + """ + Updates a saved search. + """ + savedSearchUpdate( + """ + The input fields to update a saved search. + """ + input: SavedSearchUpdateInput! + ): SavedSearchUpdatePayload + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + Updates a script tag. + """ + scriptTagUpdate( + """ + The ID of the script tag to update. + """ + id: ID! + + """ + Specifies the input fields for a script tag. + """ + input: ScriptTagInput! + ): ScriptTagUpdatePayload + + """ + Creates a segment. + """ + segmentCreate( + """ + The name of the segment to be created. Segment names must be unique. + """ + name: String! + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String! + ): SegmentCreatePayload + + """ + Deletes a segment. + """ + segmentDelete( + """ + Specifies the segment to delete. + """ + id: ID! + ): SegmentDeletePayload + + """ + Updates a segment. + """ + segmentUpdate( + """ + Specifies the segment to be updated. + """ + id: ID! + + """ + The new name for the segment. + """ + name: String + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + ): SegmentUpdatePayload + + """ + Adds multiple product variants to a selling plan group. + """ + sellingPlanGroupAddProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the product variants to add. + """ + productVariantIds: [ID!]! + ): SellingPlanGroupAddProductVariantsPayload + + """ + Adds multiple products to a selling plan group. + """ + sellingPlanGroupAddProducts( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the products to add. + """ + productIds: [ID!]! + ): SellingPlanGroupAddProductsPayload + + """ + Creates a selling plan group that defines how products can be sold and + purchased. A selling plan group represents a selling method such as "Subscribe + and save", "Pre-order", or "Try before you buy" and contains one or more + selling plans with specific billing, delivery, and pricing policies. + + Use the [`resources`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate#arguments-resources) argument to associate products or product variants with the group during + creation. You can also add products later using [`sellingPlanGroupAddProducts`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupAddProducts) or [`sellingPlanGroupAddProductVariants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupAddProductVariants). + + Learn more about [building selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan#step-1-create-a-selling-plan-group) + or explore [examples of creating TBYB and other selling plan groups](https://shopify.dev/docs/api/admin-graphql/latest/mutations/sellingPlanGroupCreate?example=create-a-tbyb-selling-plan-group). + """ + sellingPlanGroupCreate( + """ + The properties of the new Selling Plan Group. + """ + input: SellingPlanGroupInput! + + """ + The resources this Selling Plan Group should be applied to. + """ + resources: SellingPlanGroupResourceInput + ): SellingPlanGroupCreatePayload + + """ + Delete a Selling Plan Group. This does not affect subscription contracts. + """ + sellingPlanGroupDelete( + """ + The id of the selling plan group to delete. + """ + id: ID! + ): SellingPlanGroupDeletePayload + + """ + Removes multiple product variants from a selling plan group. + """ + sellingPlanGroupRemoveProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the product variants to remove. + """ + productVariantIds: [ID!]! + ): SellingPlanGroupRemoveProductVariantsPayload + + """ + Removes multiple products from a selling plan group. + """ + sellingPlanGroupRemoveProducts( + """ + The ID of the selling plan group. + """ + id: ID! + + """ + The IDs of the products to remove. + """ + productIds: [ID!]! + ): SellingPlanGroupRemoveProductsPayload + + """ + Update a Selling Plan Group. + """ + sellingPlanGroupUpdate( + """ + The Selling Plan Group to update. + """ + id: ID! + + """ + The properties of the Selling Plan Group to update. + """ + input: SellingPlanGroupInput! + ): SellingPlanGroupUpdatePayload + + """ + Creates a new unconfigured server pixel. A single server pixel can exist for + an app and shop combination. If you call this mutation when a server pixel + already exists, then an error will return. + """ + serverPixelCreate: ServerPixelCreatePayload + + """ + Deletes the Server Pixel associated with the current app & shop. + """ + serverPixelDelete: ServerPixelDeletePayload + + """ + Deletes a shipping package. + """ + shippingPackageDelete( + """ + The ID of the shipping package to remove. + """ + id: ID! + ): ShippingPackageDeletePayload + + """ + Set a shipping package as the default. + The default shipping package is the one used to calculate shipping costs on checkout. + """ + shippingPackageMakeDefault( + """ + The ID of the shipping package to set as the default. + """ + id: ID! + ): ShippingPackageMakeDefaultPayload + + """ + Updates a shipping package. + """ + shippingPackageUpdate( + """ + The ID of the shipping package to update. + """ + id: ID! + + """ + Specifies the input fields for a shipping package. + """ + shippingPackage: CustomShippingPackageInput! + ): ShippingPackageUpdatePayload + + """ + Deletes a locale for a shop. This also deletes all translations of this locale. + """ + shopLocaleDisable( + """ + ISO code of the locale to delete. + """ + locale: String! + ): ShopLocaleDisablePayload + + """ + Adds a locale for a shop. The newly added locale is in the unpublished state. + """ + shopLocaleEnable( + """ + ISO code of the locale to enable. + """ + locale: String! + + """ + The list of markets web presences to add the locale to. + """ + marketWebPresenceIds: [ID!] + ): ShopLocaleEnablePayload + + """ + Updates a locale for a shop. + """ + shopLocaleUpdate( + """ + ISO code of the locale to update. + """ + locale: String! + + """ + Specifies the input fields for a shop locale. + """ + shopLocale: ShopLocaleInput! + ): ShopLocaleUpdatePayload + + """ + Updates a shop policy. + """ + shopPolicyUpdate( + """ + The properties to use when updating the shop policy. + """ + shopPolicy: ShopPolicyInput! + ): ShopPolicyUpdatePayload + + """ + The `ResourceFeedback` object lets your app report the status of shops and their resources. For example, if + your app is a marketplace channel, then you can use resource feedback to alert + merchants that they need to connect their marketplace account by signing in. + + Resource feedback notifications are displayed to the merchant on the home + screen of their Shopify admin, and in the product details view for any + products that are published to your app. + + This resource should be used only in cases where you're describing steps that + a merchant is required to complete. If your app offers optional or promotional + set-up steps, or if it makes recommendations, then don't use resource feedback + to let merchants know about them. + + ## Sending feedback on a shop + + You can send resource feedback on a shop to let the merchant know what steps + they need to take to make sure that your app is set up correctly. Feedback can + have one of two states: `requires_action` or `success`. 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. + And to remove the feedback message from the Shopify admin, send a `success` + feedback request. + + #### Important + Sending feedback replaces previously sent feedback for the shop. Send a new + `shopResourceFeedbackCreate` mutation to push the latest state of a shop or + its resources to Shopify. + """ + shopResourceFeedbackCreate( + """ + The fields required to create shop feedback. + """ + input: ResourceFeedbackCreateInput! + ): ShopResourceFeedbackCreatePayload + + """ + Creates an alternate currency payout for a Shopify Payments account. + """ + shopifyPaymentsPayoutAlternateCurrencyCreate( + """ + The ID of the Shopify Payments account on which the mutation is being performed. + """ + accountId: ID + + """ + The currency of the balance to payout. + """ + currency: CurrencyCode! + ): ShopifyPaymentsPayoutAlternateCurrencyCreatePayload + + """ + Generates the URL and signed paramaters needed to upload an asset to Shopify. + """ + stagedUploadTargetGenerate( + """ + The input fields for generating a staged upload. + """ + input: StagedUploadTargetGenerateInput! + ): StagedUploadTargetGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Uploads multiple images. + """ + stagedUploadTargetsGenerate( + """ + The input fields for generating staged uploads. + """ + input: [StageImageInput!]! + ): StagedUploadTargetsGeneratePayload @deprecated(reason: "Use `stagedUploadsCreate` instead.") + + """ + Creates staged upload targets for file uploads such as images, videos, and 3D models. + + Use the `stagedUploadsCreate` mutation instead of direct file creation mutations when: + + - **Uploading large files**: Files over a few MB benefit from staged uploads for better reliability + - **Uploading media files**: Videos, 3D models, and high-resolution images + - **Bulk importing**: CSV files, product catalogs, or other bulk data + - **Using external file sources**: When files are stored remotely and need to be transferred to Shopify + + The `stagedUploadsCreate` mutation is the first step in Shopify's secure two-step upload process: + + **Step 1: Create staged upload targets** (this mutation) + - Generate secure, temporary upload URLs for your files. + - Receive authentication parameters for the upload. + + **Step 2: Upload files and create assets** + - Upload your files directly to the provided URLs using the authentication parameters. + - Use the returned `resourceUrl` as the `originalSource` in subsequent mutations like `fileCreate`. + + This approach provides better performance for large files, handles network interruptions gracefully, + and ensures secure file transfers to Shopify's storage infrastructure. + + > Note: + > File size is required when uploading + > [`VIDEO`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-VIDEO) or + > [`MODEL_3D`](https://shopify.dev/docs/api/admin-graphql/latest/enums/StagedUploadTargetGenerateUploadResource#enums-MODEL_3D) + > resources. + + After creating staged upload targets, complete the process by: + + 1. **Uploading files**: Send your files to the returned [`url`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.url) + using the provided + [`parameters`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.parameters) + for authentication + 2. **Creating file assets**: Use the [`resourceUrl`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StagedMediaUploadTarget#field-StagedMediaUploadTarget.fields.resourceUrl) + as the `originalSource` in mutations such as: + - [`fileCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fileCreate): + Creates file assets from staged uploads + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Updates products with new media from staged uploads + + Learn more about [uploading media to Shopify](https://shopify.dev/apps/online-store/media/products). + """ + stagedUploadsCreate( + """ + The information required to generate staged upload targets. + """ + input: [StagedUploadInput!]! + ): StagedUploadsCreatePayload + + """ + Activates the specified standard metafield definition from its template. + + Refer to the [list of standard metafield definition templates](https://shopify.dev/apps/metafields/definitions/standard-definitions). + """ + standardMetafieldDefinitionEnable( + """ + The 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 + + """ + 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 + + """ + Enables the specified standard metaobject definition from its template. + """ + standardMetaobjectDefinitionEnable( + """ + The type of the metaobject definition to enable. + """ + type: String! + ): StandardMetaobjectDefinitionEnablePayload + + """ + Adds funds to a [`StoreCreditAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccount) by creating a [`StoreCreditAccountCreditTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccountCreditTransaction). + The mutation accepts either a store credit account ID, a [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) ID, or a [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) + ID. When you provide a customer or company location ID, it automatically + creates an account if one doesn't exist for the specified currency. + + Store credit accounts are currency-specific. A single owner can have multiple + accounts, each holding a different currency. Use the most appropriate currency + for the given store credit account owner. + + Credits can optionally include an expiration date. + """ + storeCreditAccountCredit( + """ + The 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! + ): StoreCreditAccountCreditPayload + + """ + 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! + ): StoreCreditAccountDebitPayload + + """ + Creates a storefront access token that delegates unauthenticated access scopes + to clients using the [Storefront + API](https://shopify.dev/docs/api/storefront). The token provides public + access to storefront resources without requiring customer authentication. + + Each shop can have up to 100 active [`StorefrontAccessToken`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StorefrontAccessToken) + objects. Headless storefronts, mobile apps, and other client applications + typically use these tokens to access public storefront data. + + Learn more about [building with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started). + """ + storefrontAccessTokenCreate( + """ + Provides the input fields for creating a storefront access token. + """ + input: StorefrontAccessTokenInput! + ): StorefrontAccessTokenCreatePayload + + """ + Deletes a storefront access token. + """ + storefrontAccessTokenDelete( + """ + Provides the input fields required to delete a storefront access token. + """ + input: StorefrontAccessTokenDeleteInput! + ): StorefrontAccessTokenDeletePayload + + """ + Creates a billing attempt to charge for a [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). + The mutation processes either the payment for the current billing cycle or for + a specific cycle, if selected. + + The mutation creates an + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + when successful. Failed billing attempts include a [`processingError`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate#returns-subscriptionBillingAttempt.fields.processingError) + field with error details. + + > Tip: + > Use the [`idempotencyKey`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate#arguments-subscriptionBillingAttemptInput.fields.idempotencyKey) to ensure the billing attempt executes only once, preventing duplicate charges + if the request is retried. + + You can target a specific billing cycle using the [`billingCycleSelector`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/SubscriptionBillingCycleSelector) + to bill past or future cycles. The [`originTime`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingAttempt#field-SubscriptionBillingAttempt.fields.originTime) + parameter adjusts fulfillment scheduling for attempts completed after the + expected billing date. + + Learn more about [creating billing attempts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract#step-4-create-a-billing-attempt). + """ + subscriptionBillingAttemptCreate( + """ + The information to apply as a billing attempt. + """ + subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput! + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionBillingAttemptCreatePayload + + """ + Asynchronously queries and charges all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkCharge( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """ + Criteria to filter the billing cycles on which the action is executed. + """ + filters: SubscriptionBillingCycleBulkFilters + + """ + The behaviour to use when updating inventory. + """ + inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY + ): SubscriptionBillingCycleBulkChargePayload + + """ + Asynchronously queries all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkSearch( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """ + Criteria to filter the billing cycles on which the action is executed. + """ + filters: SubscriptionBillingCycleBulkFilters + ): SubscriptionBillingCycleBulkSearchPayload + + """ + Creates a new subscription billing attempt for a specified billing cycle. This + is the alternative mutation for [subscriptionBillingAttemptCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate). + For more information, refer to [Create a subscription contract](https://shopify.dev/docs/apps/selling-strategies/subscriptions/contracts/create#step-4-create-a-billing-attempt). + """ + subscriptionBillingCycleCharge( + """ + 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 + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionBillingCycleChargePayload + + """ + Commits the updates of a Subscription Billing Cycle Contract draft. + """ + subscriptionBillingCycleContractDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! + ): SubscriptionBillingCycleContractDraftCommitPayload + + """ + Concatenates a contract to a Subscription Draft. + """ + subscriptionBillingCycleContractDraftConcatenate( + """ + 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! + ): SubscriptionBillingCycleContractDraftConcatenatePayload + + """ + Edit the contents of a subscription contract for the specified billing cycle. + """ + subscriptionBillingCycleContractEdit( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleContractEditPayload + + """ + Delete the schedule and contract edits of the selected subscription billing cycle. + """ + subscriptionBillingCycleEditDelete( + """ + Input object used to select and use billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleEditDeletePayload + + """ + Delete the current and future schedule and contract edits of a list of subscription billing cycles. + """ + subscriptionBillingCycleEditsDelete( + """ + The globally-unique identifier of the subscription contract that the billing cycle belongs to. + """ + contractId: ID! + + """ + Select billing cycles to be deleted. + """ + targetSelection: SubscriptionBillingCyclesTargetSelection! + ): SubscriptionBillingCycleEditsDeletePayload + + """ + Modify the schedule of a specific billing cycle. + """ + subscriptionBillingCycleScheduleEdit( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + + """ + Data used to create or modify billing cycle schedule edit. + """ + input: SubscriptionBillingCycleScheduleEditInput! + ): SubscriptionBillingCycleScheduleEditPayload + + """ + Skips a Subscription Billing Cycle. + """ + subscriptionBillingCycleSkip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleSkipPayload + + """ + Unskips a Subscription Billing Cycle. + """ + subscriptionBillingCycleUnskip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleUnskipPayload + + """ + Activates a Subscription Contract. Contract status must be either active, paused, or failed. + """ + subscriptionContractActivate( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractActivatePayload + + """ + Creates a Subscription Contract. + """ + subscriptionContractAtomicCreate( + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionContractAtomicCreateInput! + ): SubscriptionContractAtomicCreatePayload + + """ + Cancels a Subscription Contract. + """ + subscriptionContractCancel( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractCancelPayload + + """ + Creates a subscription contract draft, which is an intention to create a new + subscription. The draft lets you incrementally build and modify subscription + details before committing them to create the actual [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). + + The mutation requires [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + information, billing details, and contract configuration including the [`SubscriptionBillingPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingPolicy) and [`SubscriptionDeliveryPolicy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDeliveryPolicy). + You can specify the [`CustomerPaymentMethod`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod), the [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) + for shipping, and subscription intervals. + + After you create the draft, you can either modify it with the [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftUpdate) + mutation or finalize and create the active subscription contract with [`subscriptionDraftCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit). + + Learn more about [building subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract). + """ + subscriptionContractCreate( + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionContractCreateInput! + ): SubscriptionContractCreatePayload + + """ + Expires a Subscription Contract. + """ + subscriptionContractExpire( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractExpirePayload + + """ + Fails a Subscription Contract. + """ + subscriptionContractFail( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractFailPayload + + """ + Pauses a Subscription Contract. + """ + subscriptionContractPause( + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractPausePayload + + """ + Allows for the easy change of a Product in a Contract or a Product price change. + """ + subscriptionContractProductChange( + """ + The properties of the Product changes. + """ + input: SubscriptionContractProductChangeInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! + ): SubscriptionContractProductChangePayload + + """ + Sets the next billing date of a Subscription Contract. This field is managed by the apps. + Alternatively you can utilize our + [Billing Cycles APIs](https://shopify.dev/docs/apps/selling-strategies/subscriptions/billing-cycles), + which provide auto-computed billing dates and additional functionalities. + """ + subscriptionContractSetNextBillingDate( + """ + The gid of the Subscription Contract to set the next billing date for. + """ + contractId: ID! + + """ + The next billing date. + """ + date: DateTime! + ): SubscriptionContractSetNextBillingDatePayload + + """ + Creates a draft of an existing [`SubscriptionContract`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract). + The draft captures the current state of the contract and allows incremental + modifications through draft mutations such as [`subscriptionDraftLineAdd`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftLineAdd), [`subscriptionDraftDiscountAdd`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftDiscountAdd), and [`subscriptionDraftUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftUpdate). + + Changes remain in draft state and don't affect the live contract until + committed. After you've made all necessary changes to the draft, commit it using [`subscriptionDraftCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionDraftCommit) + to apply the updates to the original contract. + + Learn more about [updating subscription contracts](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract#step-2-create-a-draft-of-an-existing-contract). + """ + subscriptionContractUpdate( + """ + The gid of the Subscription Contract to update. + """ + contractId: ID! + ): SubscriptionContractUpdatePayload + + """ + Commits the updates of a Subscription Contract draft. + """ + subscriptionDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! + ): SubscriptionDraftCommitPayload + + """ + Adds a subscription discount to a subscription draft. + """ + subscriptionDraftDiscountAdd( + """ + The ID of the Subscription Contract draft to add a subscription discount to. + """ + draftId: ID! + + """ + The properties of the new Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountAddPayload + + """ + Applies a code discount on the subscription draft. + """ + subscriptionDraftDiscountCodeApply( + """ + The gid of the subscription contract draft to apply a subscription code discount on. + """ + draftId: ID! + + """ + Code discount redeem code. + """ + redeemCode: String! + ): SubscriptionDraftDiscountCodeApplyPayload + + """ + Removes a subscription discount from a subscription draft. + """ + subscriptionDraftDiscountRemove( + """ + The gid of the subscription draft discount to remove. + """ + discountId: ID! + + """ + The gid of the subscription contract draft to remove a subscription discount from. + """ + draftId: ID! + ): SubscriptionDraftDiscountRemovePayload + + """ + Updates a subscription discount on a subscription draft. + """ + subscriptionDraftDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """ + The properties to update on the Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountUpdatePayload + + """ + Adds a subscription free shipping discount to a subscription draft. + """ + subscriptionDraftFreeShippingDiscountAdd( + """ + The ID of the subscription contract draft to add a subscription free shipping discount to. + """ + draftId: ID! + + """ + The properties of the new subscription free shipping discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountAddPayload + + """ + Updates a subscription free shipping discount on a subscription draft. + """ + subscriptionDraftFreeShippingDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """ + The properties to update on the Subscription Free Shipping Discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountUpdatePayload + + """ + Adds a subscription line to a subscription draft. + """ + subscriptionDraftLineAdd( + """ + The gid of the Subscription Contract draft to add a subscription line to. + """ + draftId: ID! + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineInput! + ): SubscriptionDraftLineAddPayload + + """ + Removes a subscription line from a subscription draft. + """ + subscriptionDraftLineRemove( + """ + The gid of the Subscription Contract draft to remove a subscription line from. + """ + draftId: ID! + + """ + The gid of the Subscription Line to remove. + """ + lineId: ID! + ): SubscriptionDraftLineRemovePayload + + """ + Updates a subscription line on a subscription draft. + """ + subscriptionDraftLineUpdate( + """ + The gid of the Subscription Contract draft to update a subscription line from. + """ + draftId: ID! + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineUpdateInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! + ): SubscriptionDraftLineUpdatePayload + + """ + Updates a Subscription Draft. + """ + subscriptionDraftUpdate( + """ + The gid of the Subscription Draft to update. + """ + draftId: ID! + + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionDraftInput! + ): SubscriptionDraftUpdatePayload + + """ + Adds tags to a resource in the store. Supported resources include + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), and [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). + + 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. + """ + id: ID! + + """ + A list of tags to add to the resource. Can be an array of strings or a + single string composed of a comma-separated list of values. Example values: + `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"`. + """ + tags: [String!]! + ): TagsAddPayload + + """ + Removes tags from an + [`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), or [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article). + + Tags are searchable keywords that help organize and filter these resources. + """ + tagsRemove( + """ + The ID of the resource to remove tags from. + """ + id: ID! + + """ + A list of tags to remove from the resource in the form of an array of + strings. Example value: `["tag1", "tag2", "tag3"]`. + """ + tags: [String!]! + ): TagsRemovePayload + + """ + Allows tax app configurations for tax partners. + """ + taxAppConfigure( + """ + Configures whether the tax app is correctly configured and ready to be used. + """ + ready: Boolean! + ): TaxAppConfigurePayload + + """ + Creates a tax summary for a given order. + If both an order ID and a start and end time are provided, the order ID will be used. + """ + taxSummaryCreate( + """ + The 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 + + """ + The start time of the range of orders to create the tax summary for. + """ + startTime: DateTime + ): TaxSummaryCreatePayload + + """ + Creates a theme from an external URL or staged upload. The theme source can + either be a ZIP file hosted at a public URL or files previously uploaded using the [`stagedUploadsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/stageduploadscreate) + mutation. The theme displays in the [Themes + page](https://admin.shopify.com/themes) in the Shopify admin. + + New themes have an [`UNPUBLISHED`](https://shopify.dev//docs/api/admin-graphql/latest/mutations/themeCreate#arguments-role.enums.UNPUBLISHED) + role by default. You can optionally specify a [`DEVELOPMENT`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeCreate#arguments-role.enums.DEVELOPMENT) + role for temporary themes used during development. + """ + themeCreate( + """ + 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 + + """ + Deletes a theme. + """ + themeDelete( + """ + The ID of the theme to be deleted. + """ + id: ID! + ): ThemeDeletePayload + + """ + Duplicates a theme. + """ + themeDuplicate( + """ + ID of the theme to be duplicated. + """ + id: ID! + + """ + Name of the new theme. + """ + name: String + ): ThemeDuplicatePayload + + """ + Copy theme files. Copying to existing theme files will overwrite them. + """ + themeFilesCopy( + """ + The files to update. + """ + files: [ThemeFilesCopyFileInput!]! + + """ + The theme to update. + """ + themeId: ID! + ): ThemeFilesCopyPayload + + """ + Deletes a theme's files. + """ + themeFilesDelete( + """ + The files to delete. + """ + files: [String!]! + + """ + Specifies the theme to deleted. + """ + themeId: ID! + ): ThemeFilesDeletePayload + + """ + Creates or updates theme files in an online store theme. This mutation allows + batch operations on multiple theme files, either creating new files or + overwriting existing ones with the same filename. + + > Note: You can process a maximum of 50 files in a single request. + + Each file requires a filename and body content. The body must specify a [`type`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#arguments-files.fields.body.type) + with the corresponding [`value`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#arguments-files.fields.body.value). + The mutation returns a [`job`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#returns-job) + field for tracking asynchronous operations and an [`upsertedThemeFiles`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/themeFilesUpsert#returns-upsertedThemeFiles) + field with details about the processed files. + """ + themeFilesUpsert( + """ + The files to update. + """ + files: [OnlineStoreThemeFilesUpsertFileInput!]! + + """ + The theme to update. + """ + themeId: ID! + ): ThemeFilesUpsertPayload + + """ + Publishes a theme. + """ + themePublish( + """ + ID of the theme to be published. + """ + id: ID! + ): ThemePublishPayload + + """ + Updates a theme. + """ + themeUpdate( + """ + The ID of the theme to be updated. + """ + id: ID! + + """ + The attributes of the theme to be updated. + """ + input: OnlineStoreThemeInput! + ): ThemeUpdatePayload + + """ + Trigger the voiding of an uncaptured authorization transaction. + """ + transactionVoid( + """ + An uncaptured authorization transaction. + """ + parentTransactionId: ID! + ): TransactionVoidPayload + + """ + Creates or updates translations for a resource's [translatable content](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableContent). + + Each translation requires a digest value from the resource's translatable + content. Use the [`translatableResource`](https://shopify.dev/docs/api/admin-graphql/latest/queries/translatableResource) + query to get a resource's translatable content and digest values before + creating translations. You can optionally scope translations to specific + markets using the `marketId` field in each translation input. + + Learn more about [managing translations](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translationsRegister( + """ + ID of the resource that is being translated. + """ + resourceId: ID! + + """ + Specifies the input fields for a translation. + """ + translations: [TranslationInput!]! + ): TranslationsRegisterPayload + + """ + Deletes translations. + """ + translationsRemove( + """ + The list of translation locales. Only locales returned in `shopLocales` are valid. + """ + locales: [String!]! + + """ + The list of market IDs. + """ + marketIds: [ID!] + + """ + ID of the translatable resource for which translations are being deleted. + """ + resourceId: ID! + + """ + The list of translation keys. + """ + translationKeys: [String!]! + ): TranslationsRemovePayload + + """ + Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. + """ + urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload + + """ + Asynchronously delete [URLRedirect](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) + objects in bulk by IDs. + Learn more about [URLRedirect](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect) + objects. + """ + urlRedirectBulkDeleteByIds( + """ + A list of [`URLRedirect`]( + https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect + ) object IDs to delete. + """ + ids: [ID!]! + ): UrlRedirectBulkDeleteByIdsPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySavedSearch( + """ + The ID of the URL redirect saved search for filtering. + """ + savedSearchId: ID! + ): UrlRedirectBulkDeleteBySavedSearchPayload + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySearch( + """ + Search query for filtering redirects on (both Redirect from and Redirect to fields). + """ + search: String! + ): UrlRedirectBulkDeleteBySearchPayload + + """ + Creates a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectCreate( + """ + The fields to use when creating the redirect. + """ + urlRedirect: UrlRedirectInput! + ): UrlRedirectCreatePayload + + """ + Deletes a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectDelete( + """ + The ID of the redirect to delete. + """ + id: ID! + ): UrlRedirectDeletePayload + + """ + Creates a [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object. + + After creating the `UrlRedirectImport` object, the `UrlRedirectImport` request + can be performed using the [`urlRedirectImportSubmit`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportSubmit) mutation. + """ + urlRedirectImportCreate( + """ + The staged upload URL of the CSV file. + You can download [a sample URL redirect CSV file](https://help.shopify.com/csv/sample-redirect-template.csv). + """ + url: URL! + ): UrlRedirectImportCreatePayload + + """ + Submits a `UrlRedirectImport` request to be processed. + + The `UrlRedirectImport` request is first created with the [`urlRedirectImportCreate`](https://shopify.dev/api/admin-graphql/latest/mutations/urlRedirectImportCreate) mutation. + """ + urlRedirectImportSubmit( + """ + The ID of the [`UrlRedirectImport`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirectImport) object. + """ + id: ID! + ): UrlRedirectImportSubmitPayload + + """ + Updates a URL redirect. + """ + urlRedirectUpdate( + """ + The ID of the URL redirect to update. + """ + id: ID! + + """ + The input fields required to update the URL redirect. + """ + urlRedirect: UrlRedirectInput! + ): UrlRedirectUpdatePayload + + """ + Creates a validation. + """ + validationCreate( + """ + The input fields for a new validation. + """ + validation: ValidationCreateInput! + ): ValidationCreatePayload + + """ + Deletes a validation. + """ + validationDelete( + """ + The ID representing the installed validation. + """ + id: ID! + ): ValidationDeletePayload + + """ + Update a validation. + """ + validationUpdate( + """ + The ID representing the validation to update. + """ + id: ID! + + """ + The input fields to update a validation. + """ + validation: ValidationUpdateInput! + ): ValidationUpdatePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by creating a web pixel record on the store where you installed your app. + + When you run the `webPixelCreate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelCreate( + """ + The web pixel settings in JSON format. + """ + webPixel: WebPixelInput! + ): WebPixelCreatePayload + + """ + Deletes the web pixel shop settings. + """ + webPixelDelete( + """ + The ID of the web pixel to delete. + """ + id: ID! + ): WebPixelDeletePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by updating a web pixel record on the store where you installed your app. + + When you run the `webPixelUpdate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelUpdate( + """ + The ID of the web pixel to update. + """ + id: ID! + + """ + The web pixel settings in JSON format. + """ + webPixel: WebPixelInput! + ): WebPixelUpdatePayload + + """ + Creates a web presence. + """ + webPresenceCreate( + """ + The details of the web presence to be created. + """ + input: WebPresenceCreateInput! + ): WebPresenceCreatePayload + + """ + Deletes a web presence. + """ + webPresenceDelete( + """ + The ID of the web presence to delete. + """ + id: ID! + ): WebPresenceDeletePayload + + """ + Updates a web presence. + """ + webPresenceUpdate( + """ + The ID of the web presence to update. + """ + id: ID! + + """ + The web presence properties to update. + """ + input: WebPresenceUpdateInput! + ): WebPresenceUpdatePayload + + """ + Creates a webhook subscription that notifies your + [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) when + specific events occur in a shop. Webhooks push event data to your endpoint + immediately when changes happen, eliminating the need for polling. + + The subscription configuration supports multiple endpoint types including + HTTPS URLs, Google Pub/Sub topics, and AWS EventBridge event sources. You can + filter events using [Shopify API search + syntax](https://shopify.dev/docs/api/usage/search-syntax) to receive only + relevant webhooks, control which data fields are included in webhook payloads, + and specify metafield namespaces to include. + + > Note: + > The Webhooks API version [configured in your app](https://shopify.dev/docs/apps/build/webhooks/subscribe/use-newer-api-version) + determines the API version for webhook events. You can't specify it per subscription. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionCreate( + """ + The type of event that triggers the webhook. + """ + topic: WebhookSubscriptionTopic! + + """ + Specifies the input fields for a webhook subscription. + """ + webhookSubscription: WebhookSubscriptionInput! + ): WebhookSubscriptionCreatePayload + + """ + Deletes a [`WebhookSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/WebhookSubscription) and stops all future webhooks to its endpoint. Returns the deleted + subscription's ID for confirmation. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionDelete( + """ + The ID of the webhook subscription to delete. + """ + id: ID! + ): WebhookSubscriptionDeletePayload + + """ + Updates a webhook subscription's configuration. Modify the endpoint URL, event + filters, included fields, or metafield namespaces without recreating the subscription. + + The mutation accepts a [`WebhookSubscriptionInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/WebhookSubscriptionInput) + that specifies the new configuration. You can switch between endpoint types + (HTTP, Pub/Sub, EventBridge) by providing a different URI format. Updates + apply atomically without interrupting webhook delivery. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptionUpdate( + """ + The ID of the webhook subscription to update. + """ + id: ID! + + """ + Specifies the input fields for a webhook subscription. + """ + webhookSubscription: WebhookSubscriptionInput! + ): WebhookSubscriptionUpdatePayload +} + +""" +A signed upload parameter for uploading an asset to Shopify. + +Deprecated in favor of +[StagedUploadParameter](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadParameter), +which is used in +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget) +and returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type MutationsStagedUploadTargetGenerateUploadParameter { + """ + The upload parameter name. + """ + name: String! + + """ + The upload parameter value. + """ + value: String! +} + +""" +A default cursor that you can use in queries to paginate your results. Each edge in a connection can +return a cursor, which is a reference to the edge's position in the connection. You can use an edge's cursor as +the starting point to retrieve the nodes before or after it in a connection. + +To learn more about using cursor-based pagination, refer to +[Paginating results with GraphQL](https://shopify.dev/api/usage/pagination-graphql). +""" +interface Navigable { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! +} + +""" +A navigation item, holding basic link attributes. +""" +type NavigationItem { + """ + The unique identifier of the navigation item. + """ + id: String! + + """ + The name of the navigation item. + """ + title: String! + + """ + The URL of the page that the navigation item links to. + """ + url: URL! +} + +""" +An object with an ID field to support global identification, in accordance with the +[Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). +This interface is used by the [node](https://shopify.dev/api/admin-graphql/unstable/queries/node) +and [nodes](https://shopify.dev/api/admin-graphql/unstable/queries/nodes) queries. +""" +interface Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The valid values for the notification usage, specifying the intended notification environment usage for certain operations. +""" +enum NotificationUsage { + """ + The notification environment is sms. + """ + SMS + + """ + The notification environment is web. + """ + WEB +} + +""" +The input fields for dimensions of an object. +""" +input ObjectDimensionsInput { + """ + 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! +} + +""" +The shop's online store channel. +""" +type OnlineStore { + """ + Storefront password information. + """ + passwordProtection: OnlineStorePasswordProtection! +} + +""" +Storefront password information. +""" +type OnlineStorePasswordProtection { + """ + Whether the storefront password is enabled. + """ + enabled: Boolean! +} + +""" +Online Store preview URL of the object. +""" +interface OnlineStorePreviewable { + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL +} + +""" +A theme for display on the storefront. Themes control the visual appearance and +functionality of the online store through templates, stylesheets, and assets +that determine how +[products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection), +and other content display to customers. + +Each theme has a [role](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme#field-OnlineStoreTheme.fields.role) +that indicates its status. Main themes are live on the storefront, unpublished +themes are inactive, demo themes require purchase before publishing, and +development themes are temporary for previewing during development. The theme includes [translations](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme#field-OnlineStoreTheme.fields.translations) +for multi-language support. +""" +type OnlineStoreTheme implements HasPublishedTranslations & Node { + """ + The date and time when the theme was created. + """ + createdAt: DateTime! + + """ + The files in the theme. + """ + files( + """ + 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 + ): [Translation!]! + + """ + The date and time when the theme was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemes. +""" +type OnlineStoreThemeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OnlineStoreTheme!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OnlineStoreTheme and a cursor during pagination. +""" +type OnlineStoreThemeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OnlineStoreThemeEdge. + """ + node: OnlineStoreTheme! +} + +""" +Represents a theme file. +""" +type OnlineStoreThemeFile { + """ + The body of the theme file. + """ + body: OnlineStoreThemeFileBody! + + """ + The md5 digest of the theme file for data integrity. + """ + checksumMd5: String + + """ + The content type of the theme file. + """ + contentType: String! + + """ + The date and time when the theme file was created. + """ + createdAt: DateTime! + + """ + The unique identifier of the theme file. + """ + filename: String! + + """ + The size of the theme file in bytes. + """ + size: UnsignedInt64! + + """ + The date and time when the theme file was last updated. + """ + updatedAt: DateTime! +} + +""" +Represents the body of a theme file. +""" +union OnlineStoreThemeFileBody = OnlineStoreThemeFileBodyBase64 | OnlineStoreThemeFileBodyText | OnlineStoreThemeFileBodyUrl + +""" +Represents the base64 encoded body of a theme file. +""" +type OnlineStoreThemeFileBodyBase64 { + """ + The body of the theme file, base64 encoded. + """ + contentBase64: String! +} + +""" +The input fields for the theme file body. +""" +input OnlineStoreThemeFileBodyInput { + """ + The input type of the theme file body. + """ + type: OnlineStoreThemeFileBodyInputType! + + """ + The body of the theme file. + """ + value: String! +} + +""" +The input type for a theme file body. +""" +enum OnlineStoreThemeFileBodyInputType { + """ + The 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 { + """ + The body of the theme file. + """ + content: String! +} + +""" +Represents the url of the body of a theme file. +""" +type OnlineStoreThemeFileBodyUrl { + """ + The short lived url for the body of the theme file. + """ + url: URL! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemeFiles. +""" +type OnlineStoreThemeFileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeFileEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeFileEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OnlineStoreThemeFile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + List of errors that occurred during the request. + """ + userErrors: [OnlineStoreThemeFileReadResult!]! +} + +""" +An auto-generated type which holds one OnlineStoreThemeFile and a cursor during pagination. +""" +type OnlineStoreThemeFileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OnlineStoreThemeFileEdge. + """ + node: OnlineStoreThemeFile! +} + +""" +Represents the result of a copy, delete, or write operation performed on a theme file. +""" +type OnlineStoreThemeFileOperationResult { + """ + The md5 digest of the theme file for data integrity. + """ + checksumMd5: String + + """ + The date and time when the theme file was created. + """ + createdAt: DateTime! + + """ + Unique identifier of the theme file. + """ + filename: String! + + """ + The size of the theme file in bytes. + """ + size: UnsignedInt64! + + """ + The date and time when the theme file was last updated. + """ + updatedAt: DateTime! +} + +""" +Represents the result of a read operation performed on a theme asset. +""" +type OnlineStoreThemeFileReadResult { + """ + Type that indicates the result of the operation. + """ + code: OnlineStoreThemeFileResultType! + + """ + Unique identifier associated with the operation and the theme file. + """ + filename: String! +} + +""" +Type of a theme file operation result. +""" +enum OnlineStoreThemeFileResultType { + """ + Operation was 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The new name of the theme. + """ + name: String +} + +""" +The input fields for the options and values of the combined listing. +""" +input OptionAndValueInput { + """ + 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 + + """ + The ordered values of the Product's Option. + """ + values: [String!]! +} + +""" +The input fields for creating a product option. +""" +input OptionCreateInput { + """ + 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 { + """ + Specifies the product option to reorder by ID. + """ + id: ID + + """ + Specifies the product option to reorder by name. + """ + name: String + + """ + Values associated with the option. + """ + values: [OptionValueReorderInput!] +} + +""" +The input fields for creating or updating a product option. +""" +input OptionSetInput { + """ + Specifies the product option to update. + """ + id: ID + + """ + 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 { + """ + Specifies the product option to update. + """ + id: ID! + + """ + 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 { + """ + 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 { + """ + Specifies the product option value by ID. + """ + id: ID + + """ + Specifies the product option value by name. + """ + name: String +} + +""" +The input fields for creating or updating a product option value. +""" +input OptionValueSetInput { + """ + Specifies the product option value. + """ + id: ID + + """ + Value associated with an option. + """ + name: String +} + +""" +The input fields for updating a product option value. +""" +input OptionValueUpdateInput { + """ + Specifies the product option value. + """ + id: ID! + + """ + 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 { + """ + 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 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 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! + + """ + A list of payment disputes associated with the order, such as chargebacks or payment inquiries. + Disputes occur when customers challenge transactions with their bank or payment provider. + """ + disputes: [OrderDisputeSummary!]! + + """ + Whether duties are included in the subtotal price of the order. + Duties are import taxes charged by customs authorities when goods cross international borders. + """ + dutiesIncluded: Boolean! + + """ + Whether the order has had any edits applied. For example, adding or removing + line items, updating quantities, or changing prices. + """ + edited: Boolean! + + """ + The email address associated with the customer for this order. + Used for sending order confirmations, shipping notifications, and other order-related communications. + Returns `null` if no email address was provided during checkout. + """ + email: String + + """ + Whether taxes on the order are estimated. + This field returns `false` when taxes on the order are finalized and aren't subject to any changes. + """ + estimatedTaxes: Boolean! + + """ + A list of events associated with the order. Events track significant changes + and activities related to the order, such as creation, payment, fulfillment, + and cancellation. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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 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 + + """ + 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! + + """ + 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 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 { + """ + An order with a purchase or charge. + """ + ORDER + + """ + An edit to the order. + """ + ORDER_EDIT + + """ + A refund on the order. + """ + REFUND + + """ + A return on the order. + """ + RETURN + + """ + An unknown agreement action. Represents new actions that may be added in future versions. + """ + UNKNOWN +} + +""" +An order adjustment accounts for the difference between a calculated and actual refund amount. +""" +type OrderAdjustment implements Node { + """ + The amount of the order adjustment in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + An optional reason that explains a discrepancy between calculated and actual refund amounts. + """ + reason: OrderAdjustmentDiscrepancyReason + + """ + The tax amount of the order adjustment in shop and presentment currencies. + """ + taxAmountSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple OrderAdjustments. +""" +type OrderAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderAdjustmentEdge!]! + + """ + A list of nodes that are contained in OrderAdjustmentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderAdjustment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Discrepancy reasons for order adjustments. +""" +enum OrderAdjustmentDiscrepancyReason { + """ + The discrepancy reason is 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderAdjustmentEdge. + """ + node: OrderAdjustment! +} + +""" +Discrepancy reasons for order adjustments. +""" +enum OrderAdjustmentInputDiscrepancyReason { + """ + The discrepancy reason is 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 +} + +""" +An agreement associated with an order placement. +""" +type OrderAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The order associated with the agreement. + """ + order: Order! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The application icon. + """ + icon: Image! + + """ + The application ID. + """ + id: ID! + + """ + The name of the application. + """ + name: String! +} + +""" +Return type for `orderCancel` mutation. +""" +type OrderCancelPayload { + """ + The job that asynchronously cancels the order. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + orderCancelUserErrors: [OrderCancelUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `orderCancelUserErrors` instead.") +} + +""" +Represents the reason for the order's cancellation. +""" +enum OrderCancelReason { + """ + The customer wanted to cancel the order. + """ + CUSTOMER + + """ + Payment was declined. + """ + DECLINED + + """ + The order was fraudulent. + """ + FRAUD + + """ + There was insufficient inventory. + """ + INVENTORY + + """ + 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 { + """ + Whether to refund to the original payment method. + """ + originalPaymentMethodsRefund: Boolean + + """ + Whether to refund to store credit. + """ + storeCreditRefund: OrderCancelStoreCreditRefundInput +} + +""" +The input fields used to refund to store credit. +""" +input OrderCancelStoreCreditRefundInput { + """ + The expiration date of the store credit. + """ + expiresAt: DateTime +} + +""" +Errors related to order cancellation. +""" +type OrderCancelUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCancelUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCancelUserError`. +""" +enum OrderCancelUserErrorCode { + """ + 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 { + """ + Staff provided note for the order cancellation. + """ + staffNote: String +} + +""" +The input fields for the authorized transaction to capture and the total amount to capture from it. +""" +input OrderCaptureInput { + """ + The 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! + + """ + The ID of the authorized transaction to capture. + """ + parentTransactionId: ID! +} + +""" +Return type for `orderCapture` mutation. +""" +type OrderCapturePayload { + """ + The created capture transaction. + """ + transaction: OrderTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying an open order to close. +""" +input OrderCloseInput { + """ + The ID of the order to close. + """ + id: ID! +} + +""" +Return type for `orderClose` mutation. +""" +type OrderClosePayload { + """ + The closed order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple Orders. +""" +type OrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderEdge!]! + + """ + A list of nodes that are contained in OrderEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Order!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for identifying an existing customer to associate with the order. +""" +input OrderCreateAssociateCustomerAttributesInput { + """ + The 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 +} + +""" +The input fields for a note attribute for an order. +""" +input OrderCreateCustomAttributeInput { + """ + The key or name of the custom attribute. + """ + key: String! + + """ + The value of the custom attribute. + """ + value: String! +} + +""" +The input fields for creating a customer's mailing address. +""" +input OrderCreateCustomerAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the customer's company or organization. + """ + company: String + + """ + The name of the country. + """ + country: String + + """ + The first name of the customer. + """ + firstName: String + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +The input fields for a customer to associate with an order. Allows creation of a new customer or specifying an existing one. +""" +input OrderCreateCustomerInput @oneOf { + """ + An existing customer to associate with the order, specified by ID. + """ + toAssociate: OrderCreateAssociateCustomerAttributesInput + + """ + A new customer to create or update and associate with the order. + """ + toUpsert: OrderCreateUpsertCustomerAttributesInput +} + +""" +The input fields for a discount code to apply to an order. Only one type of discount can be applied to an order. +""" +input OrderCreateDiscountCodeInput { + """ + A 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 { + """ + 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 { + """ + 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 { + """ + The discount code that was entered at checkout. + """ + code: String! +} + +""" +The input fields for a fulfillment to create for an order. +""" +input OrderCreateFulfillmentInput { + """ + The ID of the location to fulfill the order from. + """ + locationId: ID! + + """ + 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 { + """ + Every line item in the order has been fulfilled. + """ + FULFILLED + + """ + At least one line item in the order has been fulfilled. + """ + PARTIAL + + """ + Every line item in the order has been restocked and the order canceled. + """ + RESTOCKED +} + +""" +The types of behavior to use when updating inventory. +""" +enum OrderCreateInputsInventoryBehavior { + """ + Do not claim inventory. + """ + BYPASS + + """ + Ignore the product's inventory policy and claim inventory. + """ + DECREMENT_IGNORING_POLICY + + """ + Follow the product's inventory policy and claim inventory, if possible. + """ + DECREMENT_OBEYING_POLICY +} + +""" +The input fields for a line item to create for an order. +""" +input OrderCreateLineItemInput { + """ + The handle of a fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The + [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) is + a third-party fulfillment service. Third-party fulfillment services don't have + a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was + awaiting fulfillment by a third-party fulfillment service. Third-party + fulfillment services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: String + + """ + Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges. + """ + giftCard: Boolean = false + + """ + The price of the item before discounts have been applied in the shop currency. + """ + priceSet: MoneyBagInput + + """ + The ID of the product that the line item belongs to. Can be `null` if the + original product associated with the order is deleted at a later date. + """ + productId: ID + + """ + An array of custom information for the item that has been added to the cart. + Often used to provide product customization options. + """ + properties: [OrderCreateLineItemPropertyInput!] + + """ + The number of items that were purchased. + """ + quantity: Int! + + """ + Whether the item requires shipping. + """ + requiresShipping: Boolean = false + + """ + The item's SKU (stock keeping unit). + """ + sku: String + + """ + A list of tax line objects, each of which details a tax applied to the item. + """ + taxLines: [OrderCreateTaxLineInput!] + + """ + Whether the item was taxable. + """ + taxable: Boolean = true + + """ + The title of the product. + """ + title: String + + """ + The ID of the product variant. If both `productId` and `variantId` are + provided, then the product ID that corresponds to the `variantId` is used. + """ + variantId: ID + + """ + The title of the product variant. + """ + variantTitle: String + + """ + The name of the item's supplier. + """ + vendor: String + + """ + The weight of the line item. This will take precedence over the weight of the product variant, if one was specified. + """ + weight: WeightInput +} + +""" +The input fields for a line item property for an order. +""" +input OrderCreateLineItemPropertyInput { + """ + The name of the line item property. + """ + name: String! + + """ + The value of the line item property. + """ + value: String! +} + +""" +Return type for `orderCreateMandatePayment` mutation. +""" +type OrderCreateMandatePaymentPayload { + """ + The async job used for charging the payment. + """ + job: Job + + """ + The Unique ID for the created payment. + """ + paymentReferenceId: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateMandatePaymentUserError!]! +} + +""" +An error that occurs during the execution of `OrderCreateMandatePayment`. +""" +type OrderCreateMandatePaymentUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateMandatePaymentUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateMandatePaymentUserError`. +""" +enum OrderCreateMandatePaymentUserErrorCode { + """ + Errors for mandate payment on order. + """ + ORDER_MANDATE_PAYMENT_ERROR_CODE +} + +""" +An error that occurs during the execution of a order create manual payment mutation. +""" +type OrderCreateManualPaymentOrderCreateManualPaymentError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateManualPaymentOrderCreateManualPaymentErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateManualPaymentOrderCreateManualPaymentError`. +""" +enum OrderCreateManualPaymentOrderCreateManualPaymentErrorCode { + """ + Amount exceeds the remaining balance. + """ + AMOUNT_EXCEEDS_BALANCE + + """ + Amount must be positive. + """ + AMOUNT_NOT_POSITIVE + + """ + 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 { + """ + The order recorded a manual payment. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateManualPaymentOrderCreateManualPaymentError!]! +} + +""" +The input fields that define the strategies for updating inventory and +whether to send shipping and order confirmations to customers. +""" +input OrderCreateOptionsInput { + """ + The strategy for handling updates to inventory: not claiming inventory, ignoring inventory policies, + or following policies when claiming inventory. + """ + inventoryBehaviour: OrderCreateInputsInventoryBehavior = BYPASS + + """ + Whether to send 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 { + """ + The mailing address associated with the payment method. This address is an optional field that won't be + available on orders that don't require a payment method. + + > Note: + > If a customer is provided, this field or `shipping_address` (which has precedence) will be set as the + > customer's default address. Additionally, if the provided customer is new or hasn't created an order yet + > then their name will be set to the first/last name from this address (if provided). + """ + billingAddress: MailingAddressInput + + """ + Whether the customer consented to receive email updates from the shop. + """ + buyerAcceptsMarketing: Boolean = null + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) + when the order was closed. Returns null if the order isn't closed. + """ + closedAt: DateTime + + """ + The ID of the purchasing company's location for the order. + """ + companyLocationId: ID + + """ + The shop-facing currency for the order. If not specified, then the shop's default currency is used. + """ + currency: CurrencyCode + + """ + A list of extra information that's added to the order. Appears in the + **Additional details** section of an order details page. + """ + customAttributes: [OrderCreateCustomAttributeInput!] + + """ + The customer to associate to the order. + """ + customer: OrderCreateCustomerInput + + """ + The customer to associate to the order. + """ + customerId: ID @deprecated(reason: "This is replaced by the `customer` field in a future version.") + + """ + 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. + """ + 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 logged into Shopify POS who processed the order, if applicable. + """ + userId: ID +} + +""" +The input fields for a transaction to create for an order. +""" +input OrderCreateOrderTransactionInput { + """ + The amount of the transaction. + """ + amountSet: MoneyBagInput! + + """ + The authorization code associated with the transaction. + """ + authorizationCode: String + + """ + The ID of the device used to process the transaction. + """ + deviceId: ID + + """ + The name of the gateway the transaction was issued through. + """ + gateway: String + + """ + The ID of the gift card used for this transaction. + """ + giftCardId: ID + + """ + The kind of transaction. + """ + kind: OrderTransactionKind = SALE + + """ + The ID of the location where the transaction was processed. + """ + locationId: ID + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime + + """ + The transaction receipt that the payment gateway attaches to the transaction. + The value of this field depends on which payment gateway processed the transaction. + """ + receiptJson: JSON + + """ + The status of the transaction. + """ + status: OrderTransactionStatus = SUCCESS + + """ + Whether the transaction is a test transaction. + """ + test: Boolean = false + + """ + The ID of the user who processed the transaction. + """ + userId: ID +} + +""" +Return type for `orderCreate` mutation. +""" +type OrderCreatePayload { + """ + The order that was created. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCreateUserError!]! +} + +""" +The input fields for a percentage discount code to apply to an order. +""" +input OrderCreatePercentageDiscountCodeAttributesInput { + """ + The discount code that was entered at checkout. + """ + code: String! + + """ + The amount that's deducted from the order total. When you create an order, this value is the percentage to deduct. + """ + percentage: Float +} + +""" +The input fields for a shipping line to create for an order. +""" +input OrderCreateShippingLineInput { + """ + A reference to the shipping method. + """ + code: String + + """ + The price of this shipping method in the shop currency. Can't be negative. + """ + priceSet: MoneyBagInput! + + """ + The source of the shipping method. + """ + source: String + + """ + A list of tax line objects, each of which details a tax applicable to this shipping line. + """ + taxLines: [OrderCreateTaxLineInput!] + + """ + The title of the shipping method. + """ + title: String! +} + +""" +The input fields for a tax line to create for an order. +""" +input OrderCreateTaxLineInput { + """ + Whether the channel that submitted the tax line is liable for remitting. A + value of `null` indicates unknown liability for the tax line. + """ + channelLiable: Boolean = false + + """ + The amount added to the order for this tax in shop and presentment currencies after discounts are applied. + """ + priceSet: MoneyBagInput + + """ + The proportion of the item price that the tax represents as a decimal. + """ + rate: Decimal! + + """ + The name of the tax line to create. + """ + title: String! +} + +""" +The input fields for creating a new customer object or identifying an existing +customer to update & associate with the order. +""" +input OrderCreateUpsertCustomerAttributesInput { + """ + A list of addresses to associate with the customer. + """ + addresses: [OrderCreateCustomerAddressInput!] + + """ + The email address to update the customer with. If no `id` is provided, this is used to uniquely identify + the customer. + + > Note: + > If both this email input field and the email on `OrderCreateOrderInput` are provided, this field will + > take precedence. + """ + email: String + + """ + The first name of the customer. + """ + firstName: String + + """ + The id of the customer to associate to the order. + """ + id: ID + + """ + The last name of the customer. + """ + lastName: String + + """ + A unique identifier for the customer that's used with [Multipass login](https://shopify.dev/api/multipass). + """ + multipassIdentifier: String + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number ([E.164 format](https://en.wikipedia.org/wiki/E.164)) for this customer. + Attempting to assign the same phone number to multiple customers returns an error. The property can be + set using different formats, but each format must represent a number that can be dialed from anywhere + in the world. The following formats are all valid: + - 6135551212 + - +16135551212 + - (613)555-1212 + - +1 613-555-1212 + """ + phone: String + + """ + Tags that the shop owner has attached to the customer. A customer can have up + to 250 tags. Each tag can have up to 255 characters. + """ + tags: [String!] + + """ + Whether the customer is exempt from paying taxes on their order. If `true`, + then taxes won't be applied to an order at checkout. If `false`, then taxes + will be applied at checkout. + """ + taxExempt: Boolean +} + +""" +An error that occurs during the execution of `OrderCreate`. +""" +type OrderCreateUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateUserError`. +""" +enum OrderCreateUserErrorCode { + """ + 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 { + """ + The order that had its customer removed. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCustomerRemoveUserError!]! +} + +""" +Errors related to order customer removal. +""" +type OrderCustomerRemoveUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCustomerRemoveUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerRemoveUserError`. +""" +enum OrderCustomerRemoveUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + An error ocurred while saving the order. + """ + NOT_SAVED +} + +""" +Return type for `orderCustomerSet` mutation. +""" +type OrderCustomerSetPayload { + """ + The order that had a customer set. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderCustomerSetUserError!]! +} + +""" +Errors related to order customer set. +""" +type OrderCustomerSetUserError implements DisplayableError { + """ + The error code. + """ + code: OrderCustomerSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerSetUserError`. +""" +enum OrderCustomerSetUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The customer does not have the permissions to place this order. + """ + NOT_PERMITTED + + """ + An error ocurred while saving the order. + """ + NOT_SAVED +} + +""" +Return type for `orderDelete` mutation. +""" +type OrderDeletePayload { + """ + Deleted order ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderDeleteUserError!]! +} + +""" +Errors related to deleting an order. +""" +type OrderDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: OrderDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderDeleteUserError`. +""" +enum OrderDeleteUserErrorCode { + """ + The 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 { + """ + 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 { + """ + 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 +} + +""" +A summary of the important details for a dispute on an order. +""" +type OrderDisputeSummary implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The type that the dispute was initiated as. + """ + initiatedAs: DisputeType! + + """ + The current status of the dispute. + """ + status: DisputeStatus! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. +""" +type OrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderEdge. + """ + node: Order! +} + +""" +Return type for `orderEditAddCustomItem` mutation. +""" +type OrderEditAddCustomItemPayload { + """ + The custom line item that will be added to the order based on the current edits. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditAddLineItemDiscount` mutation. +""" +type OrderEditAddLineItemDiscountPayload { + """ + The discount applied to a line item during this order edit. + """ + addedDiscountStagedChange: OrderStagedChangeAddLineItemDiscount + + """ + The line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields used to add a shipping line. +""" +input OrderEditAddShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Return type for `orderEditAddShippingLine` mutation. +""" +type OrderEditAddShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The [calculated shipping line](https://shopify.dev/api/admin-graphql/latest/objects/calculatedshippingline) + that's added during this order edit. + """ + calculatedShippingLine: CalculatedShippingLine + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditAddShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditAddShippingLine`. +""" +type OrderEditAddShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditAddShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditAddShippingLineUserError`. +""" +enum OrderEditAddShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditAddVariant` mutation. +""" +type OrderEditAddVariantPayload { + """ + The [calculated line item](https://shopify.dev/api/admin-graphql/latest/objects/calculatedlineitem) + that's added during this order edit. + """ + calculatedLineItem: CalculatedLineItem + + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An agreement associated with an edit to the order. +""" +type OrderEditAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The description of the discount. + """ + description: String + + """ + The value of the discount as a fixed amount. + """ + fixedValue: MoneyInput + + """ + The value of the discount as a percentage. + """ + percentValue: Float +} + +""" +Return type for `orderEditBegin` mutation. +""" +type OrderEditBeginPayload { + """ + The order that will be edited. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session that was created. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditCommit` mutation. +""" +type OrderEditCommitPayload { + """ + The order with changes applied. + """ + order: Order + + """ + Messages to display to the user after the staged changes are commmitted. + """ + successMessages: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveDiscount` mutation. +""" +type OrderEditRemoveDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveDiscount`. +""" +type OrderEditRemoveDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveDiscountUserError`. +""" +enum OrderEditRemoveDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditRemoveLineItemDiscount` mutation. +""" +type OrderEditRemoveLineItemDiscountPayload { + """ + The calculated line item after removal of the discount. + """ + calculatedLineItem: CalculatedLineItem + + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditRemoveShippingLine` mutation. +""" +type OrderEditRemoveShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditRemoveShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveShippingLine`. +""" +type OrderEditRemoveShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditRemoveShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveShippingLineUserError`. +""" +enum OrderEditRemoveShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +An edit session for an order. +""" +type OrderEditSession implements Node { + """ + The unique ID of the order edit session. + """ + id: ID! +} + +""" +Return type for `orderEditSetQuantity` mutation. +""" +type OrderEditSetQuantityPayload { + """ + The calculated line item with the edits applied but not saved. + """ + calculatedLineItem: CalculatedLineItem + + """ + The calculated order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderEditUpdateDiscount` mutation. +""" +type OrderEditUpdateDiscountPayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateDiscount`. +""" +type OrderEditUpdateDiscountUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateDiscountUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateDiscountUserError`. +""" +enum OrderEditUpdateDiscountUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields used to update a shipping line. +""" +input OrderEditUpdateShippingLineInput { + """ + The price of the shipping line. + """ + price: MoneyInput + + """ + The title of the shipping line. + """ + title: String +} + +""" +Return type for `orderEditUpdateShippingLine` mutation. +""" +type OrderEditUpdateShippingLinePayload { + """ + An order with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The order edit session with the edits applied but not saved. + """ + orderEditSession: OrderEditSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderEditUpdateShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateShippingLine`. +""" +type OrderEditUpdateShippingLineUserError implements DisplayableError { + """ + The error code. + """ + code: OrderEditUpdateShippingLineUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateShippingLineUserError`. +""" +enum OrderEditUpdateShippingLineUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a order. +""" +input OrderIdentifierInput @oneOf { + """ + The [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 { + """ + 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! + + """ + 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 { + """ + The order associated with the invoice email. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderInvoiceSendUserError!]! +} + +""" +An error that occurs during the execution of `OrderInvoiceSend`. +""" +type OrderInvoiceSendUserError implements DisplayableError { + """ + The error code. + """ + code: OrderInvoiceSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderInvoiceSendUserError`. +""" +enum OrderInvoiceSendUserErrorCode { + """ + An error occurred while sending the invoice. + """ + ORDER_INVOICE_SEND_UNSUCCESSFUL +} + +""" +The input fields for specifying the order to mark as paid. +""" +input OrderMarkAsPaidInput { + """ + The ID of the order to mark as paid. + """ + id: ID! +} + +""" +Return type for `orderMarkAsPaid` mutation. +""" +type OrderMarkAsPaidPayload { + """ + The order marked as paid. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying a closed order to open. +""" +input OrderOpenInput { + """ + The ID of the order to open. + """ + id: ID! +} + +""" +Return type for `orderOpen` mutation. +""" +type OrderOpenPayload { + """ + The opened order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The payment collection details for an order that requires additional payment following an edit to the order. +""" +type OrderPaymentCollectionDetails { + """ + The URL to use for collecting an additional payment on the order. + """ + additionalPaymentCollectionUrl: URL + + """ + The list of vaulted payment methods for the order with their permissions. + """ + vaultedPaymentMethods: [PaymentMandate!] +} + +""" +The status of a customer's payment for an order. +""" +type OrderPaymentStatus { + """ + A message describing an error during the asynchronous processing of a payment. + """ + errorMessage: String + + """ + The ID of the payment, initially returned by an `orderCreateMandatePayment` or `orderCreatePayment` mutation. + """ + paymentReferenceId: String! + + """ + The status of the payment. + """ + status: OrderPaymentStatusResult! + + """ + The transaction associated with the payment. + """ + transactions: [OrderTransaction!]! + + """ + A translated message describing an error during the asynchronous processing of a payment. + """ + translatedErrorMessage: String +} + +""" +The type of a payment status. +""" +enum OrderPaymentStatusResult { + """ + The payment is authorized. + """ + AUTHORIZED + + """ + The payment is captured. + """ + CAPTURED + + """ + There was an error initiating the payment. + """ + ERROR + + """ + The payment is awaiting processing. + """ + INITIATED + + """ + 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 { + """ + 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 { + """ + Whether the risk level is shown in the Shopify admin. If false, then this + order risk is ignored when Shopify determines the overall risk level for the order. + """ + display: Boolean! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") + + """ + The likelihood that an order is fraudulent, based on this order risk. The + level can be set by Shopify risk analysis or by an app. + """ + level: OrderRiskLevel @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """ + The risk message that's shown to the merchant in the Shopify admin. + """ + message: String @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") +} + +""" +The risk assessments for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskAssessment { + """ + Optional facts used to describe the risk assessment. The values in here are specific to the provider. + See the [examples for the mutation orderRiskAssessmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/orderRiskAssessmentCreate#section-examples). + """ + facts: [RiskFact!]! + + """ + The app that provided the assessment, `null` if the assessment was provided by Shopify. + """ + provider: App + + """ + The likelihood that the order is fraudulent, based on this risk assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +The input fields for an order risk assessment. +""" +input OrderRiskAssessmentCreateInput { + """ + The list of facts used to determine the fraud assessment. + """ + facts: [OrderRiskAssessmentFactInput!]! + + """ + The ID of the order receiving the fraud assessment. + """ + orderId: ID! + + """ + The risk level of the fraud assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +Return type for `orderRiskAssessmentCreate` mutation. +""" +type OrderRiskAssessmentCreatePayload { + """ + The order risk assessment created. + """ + orderRiskAssessment: OrderRiskAssessment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OrderRiskAssessmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `OrderRiskAssessmentCreate`. +""" +type OrderRiskAssessmentCreateUserError implements DisplayableError { + """ + The error code. + """ + code: OrderRiskAssessmentCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `OrderRiskAssessmentCreateUserError`. +""" +enum OrderRiskAssessmentCreateUserErrorCode { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The list of risk assessments for the order. + """ + assessments: [OrderRiskAssessment!]! + + """ + The recommendation for the order based on the results of the risk assessments. + This suggests the action the merchant should take with regards to its risk of fraud. + """ + recommendation: OrderRiskRecommendationResult! +} + +""" +The set of valid sort keys for the Order query. +""" +enum OrderSortKeys { + """ + Sorts by the date and time the order was created. + """ + CREATED_AT + + """ + Sorts by the current total price of an order in the shop currency, including any returns/refunds/removals. + """ + CURRENT_TOTAL_PRICE + + """ + Sorts by the customer's name. + """ + CUSTOMER_NAME + + """ + Sort by shipping address to analyze regional sales patterns or plan logistics. + """ + DESTINATION + + """ + Sorts by the financial status of the order. + """ + FINANCIAL_STATUS + + """ + Sorts by the order's fulfillment status. + """ + FULFILLMENT_STATUS + + """ + Sort by the `id` value. + """ + ID + + """ + Sorts by the order number. + """ + ORDER_NUMBER + + """ + Sort by the purchase order number to match external procurement systems or track recent orders. + """ + PO_NUMBER + + """ + Sorts by the date and time the order was processed. + """ + PROCESSED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the total quantity of all line items to identify large purchases or analyze inventory demand patterns. + """ + TOTAL_ITEMS_QUANTITY + + """ + Sorts by the total sold price of an order in the shop currency, excluding any returns/refunds/removals. + """ + TOTAL_PRICE + + """ + Sorts by the date and time the order was last updated. + """ + UPDATED_AT +} + +""" +A change that has been applied to an order. +""" +union OrderStagedChange = OrderStagedChangeAddCustomItem | OrderStagedChangeAddLineItemDiscount | OrderStagedChangeAddShippingLine | OrderStagedChangeAddVariant | OrderStagedChangeDecrementItem | OrderStagedChangeIncrementItem | OrderStagedChangeRemoveDiscount | OrderStagedChangeRemoveShippingLine + +""" +A change to the order representing the addition of a +custom line item. For example, you might want to add gift wrapping service +as a custom line item. +""" +type OrderStagedChangeAddCustomItem { + """ + The price of an individual item without any discounts applied. This value can't be negative. + """ + originalUnitPrice: MoneyV2! + + """ + The quantity of the custom item to add to the order. This value must be greater than zero. + """ + quantity: Int! + + """ + The title of the custom item. + """ + title: String! +} + +""" +The discount applied to an item that was added during the current order edit. +""" +type OrderStagedChangeAddLineItemDiscount { + """ + The description of the discount. + """ + description: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The pricing value of the discount. + """ + value: PricingValue! +} + +""" +A new [shipping line](https://shopify.dev/api/admin-graphql/latest/objects/shippingline) +added as part of an order edit. +""" +type OrderStagedChangeAddShippingLine { + """ + The phone number at the shipping address. + """ + phone: String + + """ + The shipping line's title that's shown to the buyer. + """ + presentmentTitle: String + + """ + The price that applies to the shipping line. + """ + price: MoneyV2! + + """ + The title of the shipping line. + """ + title: String +} + +""" +A change to the order representing the addition of an existing product variant. +""" +type OrderStagedChangeAddVariant { + """ + The quantity of the product variant that was added. + """ + quantity: Int! + + """ + The product variant that was added. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple OrderStagedChanges. +""" +type OrderStagedChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderStagedChangeEdge!]! + + """ + A list of nodes that are contained in OrderStagedChangeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderStagedChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An removal of items from an existing line item on the order. +""" +type OrderStagedChangeDecrementItem { + """ + The number of items removed. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! + + """ + The intention to restock the removed items. + """ + restock: Boolean! +} + +""" +An auto-generated type which holds one OrderStagedChange and a cursor during pagination. +""" +type OrderStagedChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderStagedChangeEdge. + """ + node: OrderStagedChange! +} + +""" +An addition of items to an existing line item on the order. +""" +type OrderStagedChangeIncrementItem { + """ + The number of items added. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! +} + +""" +A discount application removed during an order edit. +""" +type OrderStagedChangeRemoveDiscount { + """ + The removed discount application. + """ + discountApplication: DiscountApplication! +} + +""" +A shipping line removed during an order edit. +""" +type OrderStagedChangeRemoveShippingLine { + """ + The removed shipping line. + """ + shippingLine: ShippingLine! +} + +""" +The `OrderTransaction` object represents a payment transaction that's associated with an order. An order +transaction is a specific action or event that happens within the context of an order, such as a customer paying +for a purchase or receiving a refund, or other payment-related activity. + +Use the `OrderTransaction` object to capture the complete lifecycle of a payment, from initial +authorization to final settlement, including refunds and currency exchanges. Common use cases for using the +`OrderTransaction` object include: + +- Processing new payments for orders +- Managing payment authorizations and captures +- Processing refunds for returned items +- Tracking payment status and errors +- Managing multi-currency transactions +- Handling payment gateway integrations + +Each `OrderTransaction` object has a [`kind`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionKind) +that defines the type of transaction and a [`status`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionStatus) +that indicates the current state of the transaction. The object stores detailed information about payment +methods, gateway processing, and settlement details. + +Learn more about [payment processing](https://help.shopify.com/manual/payments) +and [payment gateway integrations](https://www.shopify.com/ca/payment-gateways). +""" +type OrderTransaction implements Node { + """ + The masked account number associated with the payment method. + """ + accountNumber: String + + """ + The amount of money. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The rounding adjustment applied on the cash amount in shop and presentment currencies. + """ + amountRoundingSet: MoneyBag + + """ + The amount and currency of the transaction in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The amount and currency of the transaction. + """ + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """ + Authorization code associated with the transaction. + """ + authorizationCode: String @deprecated(reason: "Use `paymentId` instead.") + + """ + The time when the authorization expires. This field is available only to stores on a Shopify Plus plan. + """ + authorizationExpiresAt: DateTime + + """ + Date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. + """ + currencyExchangeAdjustment: CurrencyExchangeAdjustment + + """ + The Shopify Point of Sale device used to process the transaction. + """ + device: PointOfSaleDevice + + """ + A standardized error code, independent of the payment provider. + """ + errorCode: OrderTransactionErrorCode + + """ + The transaction fees charged on the order transaction. Only present for Shopify Payments transactions. + """ + fees: [TransactionFee!]! + + """ + The human-readable payment gateway name used to process the transaction. + """ + formattedGateway: String + + """ + The payment gateway used to process the transaction. + """ + gateway: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The kind of transaction. + """ + kind: OrderTransactionKind! + + """ + The physical location where the transaction was processed. + """ + location: Location + + """ + Whether the transaction is processed by manual payment gateway. + """ + manualPaymentGateway: Boolean! + + """ + Whether the transaction can be manually captured. + """ + manuallyCapturable: Boolean! + + """ + Specifies the available amount to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableV2` instead.") + + """ + Specifies the available amount with currency to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundableV2: MoneyV2 + + """ + Whether the transaction can be captured multiple times. + """ + multiCapturable: Boolean! + + """ + The associated order. + """ + order: Order + + """ + The associated parent transaction, for example the authorization of a capture. + """ + parentTransaction: OrderTransaction + + """ + The payment details for the transaction. + """ + paymentDetails: PaymentDetails + + """ + The payment icon to display for the transaction. + """ + paymentIcon( + """ + 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! + + """ + Specifies the available amount to capture on the gateway. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettled: Money @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + Specifies the available amount with currency to capture on the gateway in shop and presentment currencies. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettledSet: MoneyBag + + """ + Specifies the available amount with currency to capture on the gateway. + Only available when an amount is capturable or manually mark as paid. + """ + totalUnsettledV2: MoneyV2 @deprecated(reason: "Use `totalUnsettledSet` instead.") + + """ + Staff member who was logged into the Shopify POS device when the transaction was processed. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple OrderTransactions. +""" +type OrderTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderTransactionEdge!]! + + """ + A list of nodes that are contained in OrderTransactionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OrderTransaction and a cursor during pagination. +""" +type OrderTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of OrderTransactionEdge. + """ + node: OrderTransaction! +} + +""" +A standardized error code, independent of the payment provider. +""" +enum OrderTransactionErrorCode { + """ + The 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 issuer declined the transaction, the customer should contact their issuer for more details. + """ + CALL_ISSUER + + """ + The card was declined. + """ + CARD_DECLINED + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + 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 amount is invalid. + """ + 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 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 { + """ + The amount of money for this transaction. + """ + amount: Money! + + """ + The payment gateway to use for this transaction. + """ + gateway: String! + + """ + The kind of transaction. + """ + kind: OrderTransactionKind! + + """ + The ID of the order associated with the transaction. + """ + orderId: ID! + + """ + The ID of the optional parent transaction, for example the authorization of a capture. + """ + parentId: ID +} + +""" +The different kinds of order transactions. +""" +enum OrderTransactionKind { + """ + An 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 { + """ + 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 { + """ + The updated order. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A standalone content page in the online store. Pages display HTML-formatted +content for informational pages like "About Us", contact information, or +shipping policies. + +Each page has a unique handle for URL routing and supports custom template +suffixes for specialized layouts. Pages can be published or hidden, and include +creation and update timestamps. +""" +type Page implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { + """ + The text content of the page, complete with HTML markup. + """ + body: HTML! + + """ + The first 150 characters of the page body. If the page body contains more than + 150 characters, additional characters are truncated by ellipses. + """ + bodySummary: String! + + """ + The date and time (ISO 8601 format) of the page creation. + """ + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 date and time (ISO 8601 format) when the page became or will become visible. + Returns null when the page isn't visible. + """ + publishedAt: DateTime + + """ + The suffix of the template that's used to render the page. + """ + templateSuffix: String + + """ + Title of the page. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The date and time (ISO 8601 format) of the latest page update. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Pages. +""" +type PageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PageEdge!]! + + """ + A list of nodes that are contained in PageEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Page!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a page. +""" +input PageCreateInput { + """ + 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 { + """ + The page that was created. + """ + page: Page + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageCreateUserError!]! +} + +""" +An error that occurs during the execution of `PageCreate`. +""" +type PageCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PageCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageCreateUserError`. +""" +enum PageCreateUserErrorCode { + """ + 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 { + """ + The ID of the deleted page. + """ + deletedPageId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageDeleteUserError!]! +} + +""" +An error that occurs during the execution of `PageDelete`. +""" +type PageDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: PageDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageDeleteUserError`. +""" +enum PageDeleteUserErrorCode { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Page and a cursor during pagination. +""" +type PageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PageEdge. + """ + node: Page! +} + +""" +Returns information about pagination in a connection, in accordance with the +[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). +For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +""" +type PageInfo { + """ + The cursor corresponding to the last node in edges. + """ + endCursor: String + + """ + Whether there are more pages to fetch following the current page. + """ + hasNextPage: Boolean! + + """ + Whether there are any pages prior to the current page. + """ + hasPreviousPage: Boolean! + + """ + The cursor corresponding to the first node in edges. + """ + startCursor: String +} + +""" +The set of valid sort keys for the Page query. +""" +enum PageSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +The input fields to update a page. +""" +input PageUpdateInput { + """ + 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 { + """ + The page that was updated. + """ + page: Page + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PageUpdateUserError!]! +} + +""" +An error that occurs during the execution of `PageUpdate`. +""" +type PageUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PageUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PageUpdateUserError`. +""" +enum PageUpdateUserErrorCode { + """ + 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 { + """ + 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 Shopify Function implementing the payment customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the payment customization. + """ + title: String! +} + +""" +Return type for `paymentCustomizationActivation` mutation. +""" +type PaymentCustomizationActivationPayload { + """ + The IDs of the updated payment customizations. + """ + ids: [String!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple PaymentCustomizations. +""" +type PaymentCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentCustomizationEdge!]! + + """ + A list of nodes that are contained in PaymentCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `paymentCustomizationCreate` mutation. +""" +type PaymentCustomizationCreatePayload { + """ + Returns the created payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Return type for `paymentCustomizationDelete` mutation. +""" +type PaymentCustomizationDeletePayload { + """ + Returns the deleted payment customization ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type which holds one PaymentCustomization and a cursor during pagination. +""" +type PaymentCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentCustomizationEdge. + """ + node: PaymentCustomization! +} + +""" +An error that occurs during the execution of a payment customization mutation. +""" +type PaymentCustomizationError implements DisplayableError { + """ + The error code. + """ + code: PaymentCustomizationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentCustomizationError`. +""" +enum PaymentCustomizationErrorCode { + """ + Shop plan not eligible to use Functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function 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 { + """ + 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 { + """ + Returns the updated payment customization. + """ + paymentCustomization: PaymentCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentCustomizationError!]! +} + +""" +Payment details related to a transaction. +""" +union PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails + +""" +All possible instrument outputs for Payment Mandates. +""" +union PaymentInstrument = BankAccount | VaultCreditCard | VaultPaypalBillingAgreement + +""" +A payment instrument and the permission +the owner of the instrument gives to the merchant to debit it. +""" +type PaymentMandate implements Node { + """ + The unique ID of a payment mandate. + """ + id: ID! + + """ + The outputs details of the payment instrument. + """ + paymentInstrument: PaymentInstrument! +} + +""" +A payment mandate with resource information, representing the permission +the owner of the payment instrument gives to the merchant to debit it +for specific resources (e.g., Order, Subscriptions). +""" +type PaymentMandateResource { + """ + The ID of the resource that this payment method was created for. + """ + resourceId: ID + + """ + The resource type that this payment method was created for (e.g., Order, Subscriptions). + """ + resourceType: MandateResourceType +} + +""" +An auto-generated type for paginating through multiple PaymentMandateResources. +""" +type PaymentMandateResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentMandateResourceEdge!]! + + """ + A list of nodes that are contained in PaymentMandateResourceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [PaymentMandateResource!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentMandateResource and a cursor during pagination. +""" +type PaymentMandateResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentMandateResourceEdge. + """ + node: PaymentMandateResource! +} + +""" +Some of the payment methods used in Shopify. +""" +enum PaymentMethods { + 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 { + """ + Whether the payment reminder email was successfully sent. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentReminderSendUserError!]! +} + +""" +An error that occurs during the execution of `PaymentReminderSend`. +""" +type PaymentReminderSendUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentReminderSendUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentReminderSendUserError`. +""" +enum PaymentReminderSendUserErrorCode { + """ + An error occurred while sending the payment reminder. + """ + PAYMENT_REMINDER_SEND_UNSUCCESSFUL +} + +""" +Represents the payment schedule for a single payment defined in the payment terms. +""" +type PaymentSchedule implements Node { + """ + Amount owed for this payment schedule. + """ + amount: MoneyV2! @deprecated(reason: "Use `balanceDue`, `totalBalance`, or `Order.totalOutstandingSet` instead.") + + """ + Remaining balance to be captured for this payment schedule. + """ + balanceDue: MoneyV2! + + """ + Date and time when the payment schedule is paid or fulfilled. + """ + completedAt: DateTime + + """ + Whether the payment schedule is due. + """ + due: Boolean! + + """ + Date and time when the payment schedule is due. + """ + dueAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + Date and time when the invoice is sent. + """ + issuedAt: DateTime + + """ + The payment terms the payment schedule belongs to. + """ + paymentTerms: PaymentTerms! + + """ + Remaining balance to be paid or authorized by the customer for this payment schedule. + """ + totalBalance: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple PaymentSchedules. +""" +type PaymentScheduleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentScheduleEdge!]! + + """ + A list of nodes that are contained in PaymentScheduleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentSchedule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentSchedule and a cursor during pagination. +""" +type PaymentScheduleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PaymentScheduleEdge. + """ + node: PaymentSchedule! +} + +""" +The input fields used to create a payment schedule for payment terms. +""" +input PaymentScheduleInput { + """ + Specifies the date and time 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 { + """ + List of the digital wallets which the shop supports. + """ + supportedDigitalWallets: [DigitalWallet!]! +} + +""" +Payment conditions for an +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) or [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder), +including when payment is due and how it's scheduled. Payment terms are created +from templates that specify net terms (payment due after a certain number of +days) or fixed schedules with specific due dates. You can optionally provide +custom payment schedules using [`PaymentScheduleInput`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/PaymentScheduleInput). + +Each payment term contains one or more [`PaymentSchedule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentSchedule), +which you can access through the [`paymentSchedules`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms#field-PaymentTerms.fields.paymentSchedules) +field. Payment schedules contain detailed information for each payment installment. + +Learn more about [payment terms](https://shopify.dev/docs/apps/build/checkout/payments/payment-terms). +""" +type PaymentTerms implements Node { + """ + The draft order associated with the payment terms. + """ + draftOrder: DraftOrder + + """ + Whether payment terms have a payment schedule that's due. + """ + due: Boolean! + + """ + Duration of payment terms in days based on the payment terms template used to create the payment terms. + """ + dueInDays: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The order associated with the payment terms. + """ + order: Order + + """ + Whether the payment terms have overdue payment schedules. + """ + overdue: Boolean! + + """ + List of schedules for the payment terms. + """ + paymentSchedules( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] + + """ + Specifies the payment terms template ID used to generate payment terms. + """ + paymentTermsTemplateId: ID! +} + +""" +Return type for `paymentTermsCreate` mutation. +""" +type PaymentTermsCreatePayload { + """ + The created payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsCreateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsCreate`. +""" +type PaymentTermsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsCreateUserError`. +""" +enum PaymentTermsCreateUserErrorCode { + """ + An error occurred while creating payment terms. + """ + PAYMENT_TERMS_CREATION_UNSUCCESSFUL +} + +""" +The input fields used to delete the payment terms. +""" +input PaymentTermsDeleteInput { + """ + The ID of the payment terms being deleted. + """ + paymentTermsId: ID! +} + +""" +Return type for `paymentTermsDelete` mutation. +""" +type PaymentTermsDeletePayload { + """ + The deleted payment terms ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsDeleteUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsDelete`. +""" +type PaymentTermsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsDeleteUserError`. +""" +enum PaymentTermsDeleteUserErrorCode { + """ + An error occurred while deleting payment terms. + """ + PAYMENT_TERMS_DELETE_UNSUCCESSFUL +} + +""" +The input fields to create payment terms. Payment terms set the date that payment is due. +""" +input PaymentTermsInput { + """ + Specifies the 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 +} + +""" +Represents the payment terms template object. +""" +type PaymentTermsTemplate implements Node { + """ + The description of the payment terms template. + """ + description: String! + + """ + The number of days between the issued date and due date if this is the net type of payment terms. + """ + dueInDays: Int + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the payment terms template. + """ + name: String! + + """ + The type of the payment terms template. + """ + paymentTermsType: PaymentTermsType! + + """ + The translated payment terms template name. + """ + translatedName: String! +} + +""" +The type of a payment terms or a payment terms template. +""" +enum PaymentTermsType { + """ + The payment terms or payment terms template is 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 { + """ + The attributes used to update the payment terms. + """ + paymentTermsAttributes: PaymentTermsInput! + + """ + The ID of the payment terms being updated. + """ + paymentTermsId: ID! +} + +""" +Return type for `paymentTermsUpdate` mutation. +""" +type PaymentTermsUpdatePayload { + """ + The updated payment terms. + """ + paymentTerms: PaymentTerms + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PaymentTermsUpdateUserError!]! +} + +""" +An error that occurs during the execution of `PaymentTermsUpdate`. +""" +type PaymentTermsUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PaymentTermsUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsUpdateUserError`. +""" +enum PaymentTermsUpdateUserErrorCode { + """ + An error occurred while updating payment terms. + """ + PAYMENT_TERMS_UPDATE_UNSUCCESSFUL +} + +""" +The set of valid sort keys for the Payout query. +""" +enum PayoutSortKeys { + """ + Sort by the `adjustment_gross` value. + """ + ADJUSTMENT_GROSS + + """ + Sort by the `advance_gross` value. + """ + ADVANCE_GROSS + + """ + Sort by the `amount` value. + """ + AMOUNT + + """ + Sort by the `charge_gross` value. + """ + CHARGE_GROSS + + """ + Sort by the `duties_gross` value. + """ + DUTIES_GROSS + + """ + Sort by the `fee_amount` value. + """ + FEE_AMOUNT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `issued_at` value. + """ + ISSUED_AT + + """ + Sort by the `refund_gross` value. + """ + REFUND_GROSS + + """ + Sort by the `shipping_label_gross` value. + """ + SHIPPING_LABEL_GROSS + + """ + Sort by the `status` value. + """ + STATUS +} + +""" +Represents a valid PayPal Express subscriptions gateway status. +""" +enum PaypalExpressSubscriptionsGatewayStatus { + """ + The status is disabled. + """ + DISABLED + + """ + The status is enabled. + """ + ENABLED + + """ + The status is pending. + """ + PENDING +} + +""" +PayPal Wallet payment details related to a transaction. +""" +type PaypalWalletPaymentDetails implements BasePaymentDetails { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +A location for in-store pickup. +""" +type PickupInStoreLocation { + """ + The code of the pickup location. + """ + code: String! + + """ + Distance from the buyer to the pickup location. + """ + distanceFromBuyer: Distance + + """ + A unique identifier for this pickup location. + """ + handle: String! + + """ + Pickup instructions. + """ + instructions: String! + + """ + The location ID of the pickup location. + """ + locationId: ID! + + """ + The source of the pickup location. + """ + source: String! + + """ + Title of the pickup location. + """ + title: String! +} + +""" +Represents a mobile device that Shopify Point of Sale has been installed on. +""" +type PointOfSaleDevice implements Node { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The input fields used to include the line items of a specified fulfillment order +that should be marked as prepared for pickup by a customer. +""" +input PreparedFulfillmentOrderLineItemsInput { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! +} + +""" +How to calculate the parent product variant's price while bulk updating variant relationships. +""" +enum PriceCalculationType { + """ + The price of the parent will be the sum of the components price times their quantity. + """ + COMPONENTS_SUM + + """ + The price of the parent will be set to the price provided. + """ + FIXED + + """ + The price of the parent will not be adjusted. + """ + NONE +} + +""" +The input fields for updating the price of a parent product variant. +""" +input PriceInput { + """ + The specific type of calculation done to determine the price of the parent variant. + The price is calculated during Bundle creation. Updating a component variant won't recalculate the price. + """ + calculation: PriceCalculationType + + """ + The price of the parent product variant. This will be be used if calcualtion is set to 'FIXED'. + """ + price: Money +} + +""" +A list that defines pricing for [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). +Price lists override default product prices with either fixed prices or +percentage-based adjustments. + +Each price list associates with a [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) +to determine which customers see the pricing. The catalog's context rules +control when the price list applies, such as for specific markets, company +locations, or apps. + +Learn how to [support different pricing models](https://shopify.dev/docs/apps/build/markets/build-catalog). +""" +type PriceList implements Node { + """ + The catalog that the price list is associated with. + """ + catalog: Catalog + + """ + The currency for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """ + The number of fixed prices on the price list. + """ + fixedPricesCount: Int! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Relative adjustments to other prices. + """ + parent: PriceListParent + + """ + A list of prices associated with the price list. + """ + prices( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + The type of price adjustment, such as percentage increase or decrease. + """ + type: PriceListAdjustmentType! + + """ + The value of price adjustment, where positive numbers reduce the prices and negative numbers + increase them. + """ + value: Float! +} + +""" +The input fields to set a price list adjustment. +""" +input PriceListAdjustmentInput { + """ + The 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 { + """ + The type of price list adjustment setting for compare at price. + """ + compareAtMode: PriceListCompareAtMode! +} + +""" +The input fields to set a price list's adjustment settings. +""" +input PriceListAdjustmentSettingsInput { + """ + Determines how adjustments are applied to compare at prices. + """ + compareAtMode: PriceListCompareAtMode! = ADJUSTED +} + +""" +Represents a percentage price adjustment type. +""" +enum PriceListAdjustmentType { + """ + Percentage decrease type. Prices will have a lower value. + """ + PERCENTAGE_DECREASE + + """ + Percentage increase type. Prices will have a higher value. + """ + PERCENTAGE_INCREASE +} + +""" +Represents how the compare at price will be determined for a price list. +""" +enum PriceListCompareAtMode { + """ + The compare at price is adjusted based on percentage specified in price list. + """ + ADJUSTED + + """ + The compare at prices are set to `null` unless explicitly defined by a fixed price value. + """ + NULLIFY +} + +""" +An auto-generated type for paginating through multiple PriceLists. +""" +type PriceListConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListEdge!]! + + """ + A list of nodes that are contained in PriceListEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceList!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a price list. +""" +input PriceListCreateInput { + """ + The 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 + + """ + 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 { + """ + The newly created price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Return type for `priceListDelete` mutation. +""" +type PriceListDeletePayload { + """ + The ID of the deleted price list. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +An auto-generated type which holds one PriceList and a cursor during pagination. +""" +type PriceListEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListEdge. + """ + node: PriceList! +} + +""" +Return type for `priceListFixedPricesAdd` mutation. +""" +type PriceListFixedPricesAddPayload { + """ + The list of fixed prices that were added to or updated in the price list. + """ + prices: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Error codes for failed price list fixed prices by product bulk update operations. +""" +type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListFixedPricesByProductBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListFixedPricesByProductBulkUpdateUserError`. +""" +enum PriceListFixedPricesByProductBulkUpdateUserErrorCode { + """ + Duplicate ID in input. + """ + DUPLICATE_ID_IN_INPUT + + """ + IDs must be mutually exclusive across add or delete operations. + """ + ID_MUST_BE_MUTUALLY_EXCLUSIVE + + """ + 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 { + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The product for which the fixed prices were added. + """ + pricesToAddProducts: [Product!] + + """ + The product for which the fixed prices were deleted. + """ + pricesToDeleteProducts: [Product!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListFixedPricesByProductBulkUpdateUserError!]! +} + +""" +Return type for `priceListFixedPricesDelete` mutation. +""" +type PriceListFixedPricesDeletePayload { + """ + A list of product variant IDs whose fixed prices were removed from the price list. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Return type for `priceListFixedPricesUpdate` mutation. +""" +type PriceListFixedPricesUpdatePayload { + """ + A list of deleted variant IDs for prices. + """ + deletedFixedPriceVariantIds: [ID!] + + """ + The price list for which the fixed prices were modified. + """ + priceList: PriceList + + """ + The prices that were added to the price list. + """ + pricesAdded: [PriceListPrice!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListPriceUserError!]! +} + +""" +Represents relative adjustments from one price list to other prices. + You can use a `PriceListParent` to specify an adjusted relative price using a percentage-based + adjustment. Adjusted prices work in conjunction with exchange rules and rounding. + + [Adjustment types](https://shopify.dev/api/admin-graphql/latest/enums/pricelistadjustmenttype) + support both percentage increases and decreases. +""" +type PriceListParent { + """ + A price list adjustment. + """ + adjustment: PriceListAdjustment! + + """ + A price list's settings for adjustment. + """ + settings: PriceListAdjustmentSettings! +} + +""" +The input fields to create a price list adjustment. +""" +input PriceListParentCreateInput { + """ + The relative adjustments to other prices. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +The input fields used to update a price list's adjustment. +""" +input PriceListParentUpdateInput { + """ + The relative adjustments to other prices.. + """ + adjustment: PriceListAdjustmentInput! + + """ + The price list adjustment settings. + """ + settings: PriceListAdjustmentSettingsInput +} + +""" +Pricing for a [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) on a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList). Represents the variant's price, compare-at price, and whether the price is fixed +or calculated using percentage-based adjustments. The [`PriceListPriceOriginType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/PriceListPriceOriginType) +distinguishes between prices set directly on the price list (fixed) and prices +calculated using the price list's adjustment configuration (relative). + +Learn more about [building catalogs with different pricing +models](https://shopify.dev/docs/apps/build/markets/build-catalog). +""" +type PriceListPrice { + """ + The compare-at price of the product variant on this price list. + """ + compareAtPrice: MoneyV2 + + """ + The origin of a price, either fixed (defined on the price list) or relative + (calculated using a price list adjustment configuration). + """ + originType: PriceListPriceOriginType! + + """ + The price of the product variant on this price list. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListPriceEdge!]! + + """ + A list of nodes that are contained in PriceListPriceEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceListPrice!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceListPrice and a cursor during pagination. +""" +type PriceListPriceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceListPriceEdge. + """ + node: PriceListPrice! +} + +""" +The input fields for providing the fields and values to use when creating or updating a fixed price list price. +""" +input PriceListPriceInput { + """ + The 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! +} + +""" +Represents the origin of a price, either fixed (defined on the price list) or +relative (calculated using a price list adjustment configuration). For examples, refer to [PriceList](https://shopify.dev/api/admin-graphql/latest/queries/priceList#section-examples). +""" +enum PriceListPriceOriginType { + """ + The price is defined on the price list. + """ + FIXED + + """ + The price is relative to the adjustment type and value. + """ + RELATIVE +} + +""" +An error for a failed price list price operation. +""" +type PriceListPriceUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListPriceUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListPriceUserError`. +""" +enum PriceListPriceUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + The 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 { + """ + 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! +} + +""" +The set of valid sort keys for the PriceList query. +""" +enum PriceListSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The input fields used to update a price list. +""" +input PriceListUpdateInput { + """ + The ID of the catalog to associate with this price list. + """ + catalogId: ID + + """ + 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 { + """ + The updated price list. + """ + priceList: PriceList + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListUserError!]! +} + +""" +Error codes for failed contextual pricing operations. +""" +type PriceListUserError implements DisplayableError { + """ + The error code. + """ + code: PriceListUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PriceListUserError`. +""" +enum PriceListUserErrorCode { + """ + The input value is 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 + + """ + 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 { + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + How many discount codes associated with the price rule. + """ + discountCodesCount: Count + + """ + The date and time when the price rule ends. For open-ended price rules, use `null`. + """ + endsAt: DateTime + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatio @deprecated(reason: "Use `prerequisiteToEntitlementQuantityRatio` instead.") + + """ + The paginated list of events associated with the price rule. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 { + """ + 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 { + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 { + """ + The application that created the discount code. + """ + app: App + + """ + The code to apply the discount. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The number of times that the price rule has been used. This value is updated + asynchronously and can be different than the actual usage count. + """ + usageCount: Int! +} + +""" +An auto-generated type for paginating through multiple PriceRuleDiscountCodes. +""" +type PriceRuleDiscountCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceRuleDiscountCodeEdge!]! + + """ + A list of nodes that are contained in PriceRuleDiscountCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceRuleDiscountCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination. +""" +type PriceRuleDiscountCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PriceRuleDiscountCodeEdge. + """ + node: PriceRuleDiscountCode! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRuleEntitlementToPrerequisiteQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleFeature { + """ + The price rule supports 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 { + """ + The monetary value of the price rule. + """ + amount: Money! +} + +""" +The items to which this price rule applies. This may be multiple products, +product variants, collections or combinations of the aforementioned. +""" +type PriceRuleItemEntitlements { + """ + The collections to which the price rule applies. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + 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 { + """ + The lower bound of the money range. + """ + greaterThan: Money + + """ + The lower bound or equal of the money range. + """ + greaterThanOrEqualTo: Money + + """ + The upper bound of the money range. + """ + lessThan: Money + + """ + The upper bound or equal of the money range. + """ + lessThanOrEqualTo: Money +} + +""" +The value of a percent price rule. +""" +type PriceRulePercentValue { + """ + The percent value of the price rule. + """ + percentage: Float! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRulePrerequisiteToEntitlementQuantityRatio { + """ + The quantity of entitled items in the ratio. + """ + entitlementQuantity: Int! + + """ + The quantity of prerequisite items in the ratio. + """ + prerequisiteQuantity: Int! +} + +""" +A quantity range within which the price rule is applicable. +""" +type PriceRuleQuantityRange { + """ + The lower bound of the quantity range. + """ + greaterThan: Int + + """ + The lower bound or equal of the quantity range. + """ + greaterThanOrEqualTo: Int + + """ + The upper bound of the quantity range. + """ + lessThan: Int + + """ + The upper bound or equal of the quantity range. + """ + lessThanOrEqualTo: Int +} + +""" +Shareable URL for the discount code associated with the price rule. +""" +type PriceRuleShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """ + The type of page that's associated with the URL. + """ + targetType: PriceRuleShareableUrlTargetType! + + """ + The title of the page that's associated with the URL. + """ + title: String! + + """ + The URL for the discount code. + """ + url: URL! +} + +""" +The type of page where a shareable price rule URL lands. +""" +enum PriceRuleShareableUrlTargetType { + """ + The URL lands on a 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 { + """ + The codes for the countries to which the price rule applies to. + """ + countryCodes: [CountryCode!]! + + """ + Whether the price rule is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! + + """ + Whether the price rule applies to all shipping lines. + """ + targetAllShippingLines: Boolean! +} + +""" +The status of the price rule. +""" +enum PriceRuleStatus { + """ + The price rule is active. + """ + ACTIVE + + """ + The price rule is expired. + """ + EXPIRED + + """ + The price rule is scheduled. + """ + SCHEDULED +} + +""" +The type of lines (line_item or shipping_line) to which the price rule applies. +""" +enum PriceRuleTarget { + """ + The price rule applies to line items. + """ + LINE_ITEM + + """ + The price rule applies to shipping lines. + """ + SHIPPING_LINE +} + +""" +The list of features that can be supported by a price rule. +""" +enum PriceRuleTrait { + """ + The price rule supports 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 { + """ + The time after which the price rule becomes invalid. + """ + end: DateTime + + """ + The time after which the price rule is valid. + """ + start: DateTime! +} + +""" +The type of the price rule value. The price rule value might be a percentage value, or a fixed amount. +""" +union PriceRuleValue = PriceRuleFixedAmountValue | PriceRulePercentValue + +""" +One type of value given to a customer when a discount is applied to an order. +The application of a discount with this value gives the customer the specified percentage off a specified item. +""" +type PricingPercentageValue { + """ + The percentage value of the object. This is a number between -100 (free) and 0 (no discount). + """ + percentage: Float! +} + +""" +The type of value given to a customer when a discount is applied to an order. +For example, the application of the discount might give the customer a +percentage off a specified item. Alternatively, the application of the discount +might give the customer a monetary value in a given currency off an order. +""" +union PricingValue = MoneyV2 | PricingPercentageValue + +""" +A country code from the `ISO 3166` standard. e.g. `CA` for Canada. +""" +enum PrivacyCountryCode { + """ + The `ISO 3166` country code of `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 { + """ + The privacy features that were disabled. + """ + featuresDisabled: [PrivacyFeaturesEnum!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PrivacyFeaturesDisableUserError!]! +} + +""" +An error that occurs during the execution of `PrivacyFeaturesDisable`. +""" +type PrivacyFeaturesDisableUserError implements DisplayableError { + """ + The error code. + """ + code: PrivacyFeaturesDisableUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PrivacyFeaturesDisableUserError`. +""" +enum PrivacyFeaturesDisableUserErrorCode { + """ + Failed to disable privacy features. + """ + FAILED +} + +""" +The input fields for a shop's privacy settings. +""" +enum PrivacyFeaturesEnum { + """ + The cookie banner feature. + """ + COOKIE_BANNER + + """ + The data sale opt out page feature. + """ + DATA_SALE_OPT_OUT_PAGE + + """ + The privacy policy feature. + """ + PRIVACY_POLICY +} + +""" +A shop's privacy policy settings. +""" +type PrivacyPolicy { + """ + Whether the policy is auto managed. + """ + autoManaged: Boolean! + + """ + Policy template supported locales. + """ + supportedLocales: [String!]! +} + +""" +A shop's privacy settings. +""" +type PrivacySettings { + """ + Banner customizations for the 'cookie banner'. + """ + banner: CookieBanner + + """ + A shop's data sale opt out page (e.g. CCPA). + """ + dataSaleOptOutPage: DataSaleOptOutPage + + """ + A shop's privacy policy settings. + """ + privacyPolicy: PrivacyPolicy +} + +""" +The `Product` object lets you manage products in a merchant’s store. + +Products are the goods and services that merchants offer to customers. They can +include various details such as title, description, price, images, and options +such as size or color. +You can use [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) +to create or update different versions of the same product. +You can also add or update product [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/media). +Products can be organized by grouping them into a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection). + +Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components), +including limitations and considerations. +""" +type Product implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node & OnlineStorePreviewable & Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + bodyHtml: String @deprecated(reason: "Use `descriptionHtml` instead.") + + """ + A list of [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) + that are associated with a product in a bundle. + """ + bundleComponents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 [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! + ): 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! + + """ + The total count of [media](https://shopify.dev/docs/apps/build/online-store/product-media) + that's associated with a product. + """ + mediaCount: Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The 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 [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` | + | 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.") + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String! + + """ + 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + A list of the channels where the product is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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.") + + """ + The date and time when the product was published to the online store. + """ + publishedAt: DateTime + + """ + Whether the product is published for a customer only in a specified context. + For example, a product might be published for a customer only in a specific location. + """ + publishedInContext( + """ + The context used to determine publication status. + """ + context: ContextualPublicationContext! + ): Boolean! + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), + then the product is unpublished from all channels, except the online store. + """ + requiresSellingPlan: Boolean! + + """ + The resource that's either published or staged to be published to + the [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublicationOnCurrentPublication: ResourcePublicationV2 @deprecated(reason: "Use `resourcePublications` instead.") + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + Whether the merchant can make changes to the product when they + [edit the order](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders) + associated with the product. For example, a merchant might be restricted from changing product details when they + edit an order. + """ + restrictedForResource( + """ + The resource Id of the order with edits applied but not saved. + """ + calculatedOrderId: ID! + ): RestrictedForResource + + """ + A count of [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product either directly, or through the product's variants. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + ): [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.") + + """ + 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! + + """ + 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 { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductBundleComponentEdge!]! + + """ + A list of nodes that are contained in ProductBundleComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductBundleComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductBundleComponent and a cursor during pagination. +""" +type ProductBundleComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductBundleComponentEdge. + """ + node: ProductBundleComponent! +} + +""" +The input fields for a single component related to a componentized product. +""" +input ProductBundleComponentInput { + """ + The 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! + + """ + 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 { + """ + The option that existed on the component product prior to the fixed bundle creation. + """ + componentOption: ProductOption! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The component option values that are actively selected for this relationship. + """ + values: [ProductBundleComponentOptionSelectionValue!]! +} + +""" +The input fields for a single option related to a component product. +""" +input ProductBundleComponentOptionSelectionInput { + """ + The ID of the option present on the component product. + """ + componentOptionId: ID! + + """ + The name to create for this option on the parent product. + """ + name: String! + + """ + Array of selected option values. + """ + values: [String!]! +} + +""" +The status of a component option value related to a bundle. +""" +enum ProductBundleComponentOptionSelectionStatus { + """ + The component option value is 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 { + """ + Selection status of the option. + """ + selectionStatus: ProductBundleComponentOptionSelectionStatus! + + """ + The value of the option. + """ + value: String! +} + +""" +A quantity option related to a bundle. +""" +type ProductBundleComponentQuantityOption { + """ + The name of the option value. + """ + name: String! + + """ + The option that was created on the parent product. + """ + parentOption: ProductOption + + """ + The quantity values of the option. + """ + values: [ProductBundleComponentQuantityOptionValue!]! +} + +""" +Input for the quantity option related to a component product. This will become a +new option on the parent bundle product that doesn't have a corresponding option +on the component. +""" +input ProductBundleComponentQuantityOptionInput { + """ + The option name to create on the parent product. + """ + name: String! + + """ + Array of option values. + """ + values: [ProductBundleComponentQuantityOptionValueInput!]! +} + +""" +A quantity option value related to a componentized product. +""" +type ProductBundleComponentQuantityOptionValue { + """ + The name of the option value. + """ + name: String! + + """ + The quantity of the option value. + """ + quantity: Int! +} + +""" +The input fields for a single quantity option value related to a component product. +""" +input ProductBundleComponentQuantityOptionValueInput { + """ + The name associated with the option, e.g. one-pack, two-pack. + """ + name: String! + + """ + How many of the variant will be included for the option value (e.g. two-pack has quantity 2). + """ + quantity: Int! +} + +""" +The input fields for mapping a consolidated option to a specific component option. +""" +input ProductBundleConsolidatedOptionComponentInput { + """ + The ID of the component option that this consolidated option maps to. + If null, this selection targets the component's quantity option with the given name. + """ + componentOptionId: ID + + """ + The 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 { + """ + The name of the consolidated option (e.g., 'Size', 'Color'). + """ + optionName: String! + + """ + The option selections that define how this consolidated option maps to component options. + """ + optionSelections: [ProductBundleConsolidatedOptionSelectionInput!]! +} + +""" +The input fields for a consolidated option selection that maps to component options. +""" +input ProductBundleConsolidatedOptionSelectionInput { + """ + The 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 { + """ + 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 { + """ + The asynchronous ProductBundleOperation creating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Defines errors encountered while managing a product bundle. +""" +type ProductBundleMutationUserError implements DisplayableError { + """ + The error code. + """ + code: ProductBundleMutationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductBundleMutationUserError`. +""" +enum ProductBundleMutationUserErrorCode { + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductBundleMutationUserError!]! +} + +""" +The input fields for updating a componentized product. +""" +input ProductBundleUpdateInput { + """ + The 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! + + """ + The title to rename the componentized product to, if provided. + """ + title: String +} + +""" +Return type for `productBundleUpdate` mutation. +""" +type ProductBundleUpdatePayload { + """ + The asynchronous ProductBundleOperation updating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The details of a specific product category within Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). +Provides access to the associated [`ProductTaxonomyNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductTaxonomyNode). +""" +type ProductCategory { + """ + The product taxonomy node associated with the product category. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +Return type for `productChangeStatus` mutation. +""" +type ProductChangeStatusPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductChangeStatusUserError!]! +} + +""" +An error that occurs during the execution of `ProductChangeStatus`. +""" +type ProductChangeStatusUserError implements DisplayableError { + """ + The error code. + """ + code: ProductChangeStatusUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductChangeStatusUserError`. +""" +enum ProductChangeStatusUserErrorCode { + """ + 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 { + """ + Claiming ownership of bundles lets the app render a custom UI for the bundles' card on the + products details page in the Shopify admin. + + Bundle ownership can only be claimed when creating the product. If you create `ProductVariantComponents` + in any of its product variants, then the bundle ownership is automatically assigned to the app making the call. + + [Learn more](https://shopify.dev/docs/apps/selling-strategies/bundles/product-config). + """ + bundles: Boolean +} + +""" +The set of valid sort keys for products belonging to a collection. +""" +enum ProductCollectionSortKeys { + """ + Sort by best selling. + """ + BEST_SELLING + + """ + Sort by collection default order. + """ + COLLECTION_DEFAULT + + """ + Sort by creation time. + """ + CREATED + + """ + Sort by id. + """ + ID + + """ + Sort by manual order. + """ + MANUAL + + """ + Sort by price. + """ + PRICE + + """ + Sort by relevance. + """ + RELEVANCE + + """ + Sort by title. + """ + TITLE +} + +""" +The compare-at price range of the product. +""" +type ProductCompareAtPriceRange { + """ + The highest variant's compare-at price. + """ + maxVariantCompareAtPrice: MoneyV2! + + """ + The lowest variant's compare-at price. + """ + minVariantCompareAtPrice: MoneyV2! +} + +""" +The product component information. +""" +type ProductComponentType { + """ + The list of products' variants that are components. + """ + componentVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductComponentTypeEdge!]! + + """ + A list of nodes that are contained in ProductComponentTypeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductComponentType!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductComponentType and a cursor during pagination. +""" +type ProductComponentTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductComponentTypeEdge. + """ + node: ProductComponentType! +} + +""" +An auto-generated type for paginating through multiple Products. +""" +type ProductConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductEdge!]! + + """ + A list of nodes that are contained in ProductEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Product!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +in a specific country. Shows the minimum and maximum variant prices through the +price range and the count of fixed quantity rules that apply to the product's +variants in the given pricing context. +""" +type ProductContextualPricing { + """ + The number of fixed quantity rules for the product's variants on the price list. + """ + fixedQuantityRulesCount: Int! + + """ + The pricing of the variant with the highest price in the given context. + """ + maxVariantPricing: ProductVariantContextualPricing + + """ + The pricing of the variant with the lowest price in the given context. + """ + minVariantPricing: ProductVariantContextualPricing + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRange: ProductPriceRangeV2! +} + +""" +The input fields required to create a product. +""" +input ProductCreateInput { + """ + The 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!] + + """ + 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 { + """ + The newly created media. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productCreate` mutation. +""" +type ProductCreatePayload { + """ + The product object. + """ + product: Product + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for specifying the product to delete. +""" +input ProductDeleteInput { + """ + The ID of the product. + """ + id: ID! +} + +""" +Return type for `productDeleteMedia` mutation. +""" +type ProductDeleteMediaPayload { + """ + List of media IDs which were deleted. + """ + deletedMediaIds: [ID!] + + """ + List of product image IDs which were deleted. + """ + deletedProductImageIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product associated with the deleted media. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +An entity that represents details of an asynchronous +[ProductDelete](https://shopify.dev/api/admin-graphql/current/mutations/productDelete) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned when the product was deleted, this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `deletedProductId` field provides the ID of the deleted product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDeleteOperation implements Node & ProductOperation { + """ + The ID of the deleted product. + """ + deletedProductId: ID + + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productDelete` mutation. +""" +type ProductDeletePayload { + """ + The ID of the deleted product. + """ + deletedProductId: ID + + """ + The product delete operation, returned when run in asynchronous mode. + """ + productDeleteOperation: ProductDeleteOperation + + """ + The shop associated with the product. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a product duplication job. +""" +type ProductDuplicateJob { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +An entity that represents details of an asynchronous +[ProductDuplicate](https://shopify.dev/api/admin-graphql/current/mutations/productDuplicate) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was duplicated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the original product. + +The `newProduct` field provides the details of the new duplicate of the product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDuplicateOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The newly created duplicate of the original product. + """ + newProduct: Product + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productDuplicate` mutation. +""" +type ProductDuplicatePayload { + """ + The asynchronous job that duplicates the product images. + """ + imageJob: Job + + """ + The duplicated product. + """ + newProduct: Product + + """ + The product duplicate operation, returned when run in asynchronous mode. + """ + productDuplicateOperation: ProductDuplicateOperation + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. +""" +type ProductEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductEdge. + """ + node: Product! +} + +""" +A product feed. +""" +type ProductFeed implements Node { + """ + The country of the product feed. + """ + country: CountryCode + + """ + A globally-unique ID. + """ + id: ID! + + """ + The language of the product feed. + """ + language: LanguageCode + + """ + The status of the product feed. + """ + status: ProductFeedStatus! +} + +""" +An auto-generated type for paginating through multiple ProductFeeds. +""" +type ProductFeedConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductFeedEdge!]! + + """ + A list of nodes that are contained in ProductFeedEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductFeed!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `productFeedCreate` mutation. +""" +type ProductFeedCreatePayload { + """ + The newly created product feed. + """ + productFeed: ProductFeed + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedCreateUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedCreate`. +""" +type ProductFeedCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedCreateUserError`. +""" +enum ProductFeedCreateUserErrorCode { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Return type for `productFeedDelete` mutation. +""" +type ProductFeedDeletePayload { + """ + The ID of the product feed that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFeedDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ProductFeedDelete`. +""" +type ProductFeedDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFeedDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedDeleteUserError`. +""" +enum ProductFeedDeleteUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +An auto-generated type which holds one ProductFeed and a cursor during pagination. +""" +type ProductFeedEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductFeedEdge. + """ + node: ProductFeed! +} + +""" +The input fields required to create a product feed. +""" +input ProductFeedInput { + """ + The 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 { + """ + The product feed is active. + """ + ACTIVE + + """ + The product feed is inactive. + """ + INACTIVE +} + +""" +Return type for `productFullSync` mutation. +""" +type ProductFullSyncPayload { + """ + The ID for the full sync operation. + """ + id: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductFullSyncUserError!]! +} + +""" +An error that occurs during the execution of `ProductFullSync`. +""" +type ProductFullSyncUserError implements DisplayableError { + """ + The error code. + """ + code: ProductFullSyncUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductFullSyncUserError`. +""" +enum ProductFullSyncUserErrorCode { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a product. +""" +input ProductIdentifierInput @oneOf { + """ + The [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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION +} + +""" +The input fields for creating or updating a product. +""" +input ProductInput { + """ + The 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!] + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + You can specify this field only when you create a product. + """ + combinedListingRole: CombinedListingsRole + + """ + The 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 + + """ + 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 { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productLeaveSellingPlanGroups` mutation. +""" +type ProductLeaveSellingPlanGroupsPayload { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The set of valid sort keys for the ProductMedia query. +""" +enum ProductMediaSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `position` value. + """ + POSITION +} + +""" +An interface representing asynchronous operations on products. Tracks the status +and details of background product mutations like `productSet`, `productDelete`, +`productDuplicate`, and `productBundle` operations. Provides status field +(CREATED, ACTIVE, COMPLETE) and product field to monitor long-running product operations. +""" +interface ProductOperation { + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! +} + +""" +Represents the state of this product operation. +""" +enum ProductOperationStatus { + """ + Operation 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The metafield identifier linked to this option. + """ + linkedMetafield: LinkedMetafield + + """ + The product option’s name. + """ + name: String! + + """ + Similar to values, option_values returns all the corresponding option value + objects to the product option, including values not assigned to any variants. + """ + optionValues: [ProductOptionValue!]! + + """ + The product option's position. + """ + position: Int! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The corresponding value to the product option name. + """ + values: [String!]! +} + +""" +The set of variant strategies available for use in the `productOptionsCreate` mutation. +""" +enum ProductOptionCreateVariantStrategy { + """ + 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 { + """ + 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 { + """ + The product with which the option being updated is associated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionUpdateUserError!]! +} + +""" +Error codes for failed `ProductOptionUpdate` mutation. +""" +type ProductOptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionUpdateUserError`. +""" +enum ProductOptionUpdateUserErrorCode { + """ + 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 { + """ + Variants are not created nor deleted in response to option values to add or delete. + In cases where deleting a variant would be necessary to complete the operation, an error will be returned. + """ + LEAVE_AS_IS + + """ + Variants are created and deleted according to the option values to add and to delete. + + If an option value is added, a new variant will be added for each existing option combination + available on the product. For example, if the existing options are `Size` and `Color`, with + values `S`/`XL` and `Red`/`Blue`, adding a new option value `Green` for the option `Color` will create + variants with the option value combinations `S`/`Green` and `XL`/`Green`. + + If an option value is deleted, all variants referencing that option value will be deleted. + """ + MANAGE +} + +""" +A specific value for a [`ProductOption`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), +such as "Red" or "Blue" for a "Color" option. Each value can be assigned to [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +objects to create different versions of a +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + +The value tracks whether any variants currently use it through the [`hasVariants`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue#field-hasVariants) +field. Values can include visual representations through swatches that display +colors or images. When linked to a [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield), the [`linkedMetafieldValue`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue#field-linkedMetafieldValue) +provides additional structured data for the option value. +""" +type ProductOptionValue implements HasPublishedTranslations & Node { + """ + Whether the product option value has any linked variants. + """ + hasVariants: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The value of the linked metafield. + """ + linkedMetafieldValue: String + + """ + The name of the product option value. + """ + name: String! + + """ + The swatch associated with the product option value. + """ + swatch: ProductOptionValueSwatch + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +A swatch associated with a product option value. +""" +type ProductOptionValueSwatch { + """ + The color representation of the swatch. + """ + color: Color + + """ + An image representation of the swatch. + """ + image: MediaImage +} + +""" +Return type for `productOptionsCreate` mutation. +""" +type ProductOptionsCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsCreateUserError!]! +} + +""" +Error codes for failed `ProductOptionsCreate` mutation. +""" +type ProductOptionsCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsCreateUserError`. +""" +enum ProductOptionsCreateUserErrorCode { + """ + 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 { + """ + IDs of the options deleted. + """ + deletedOptionsIds: [ID!] + + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsDeleteUserError!]! +} + +""" +Error codes for failed `ProductOptionsDelete` mutation. +""" +type ProductOptionsDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsDeleteUserError`. +""" +enum ProductOptionsDeleteUserErrorCode { + """ + 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 { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductOptionsReorderUserError!]! +} + +""" +Error codes for failed `ProductOptionsReorder` mutation. +""" +type ProductOptionsReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductOptionsReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsReorderUserError`. +""" +enum ProductOptionsReorderUserErrorCode { + """ + 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 price range of the product. +""" +type ProductPriceRange { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +The price range of the product. +""" +type ProductPriceRangeV2 { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +Represents the channels where a product is published. +""" +type ProductPublication { + """ + The channel where the product was or is published. + """ + channel: Channel! + + """ + Whether the publication is published or not. + """ + isPublished: Boolean! + + """ + The product that was or is going to be published on the channel. + """ + product: Product! + + """ + The date that the product was or is going to be published on the channel. + """ + publishDate: DateTime +} + +""" +An auto-generated type for paginating through multiple ProductPublications. +""" +type ProductPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductPublicationEdge!]! + + """ + A list of nodes that are contained in ProductPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductPublication and a cursor during pagination. +""" +type ProductPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductPublicationEdge. + """ + node: ProductPublication! +} + +""" +The input fields for specifying a publication to which a product will be published. +""" +input ProductPublicationInput { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + ID of the publication. + """ + publicationId: ID + + """ + The date and time that the product was (or will be) published. + """ + publishDate: DateTime +} + +""" +The input fields for specifying a product to publish and the channels to publish it to. +""" +input ProductPublishInput { + """ + The product to create or update publications for. + """ + id: ID! + + """ + The publication that the product is published to. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productPublish` mutation. +""" +type ProductPublishPayload { + """ + The product that has been published. + """ + product: Product + + """ + The channels where the product is published. + """ + productPublications: [ProductPublication!] @deprecated(reason: "Use Product.publications instead.") + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `productReorderMedia` mutation. +""" +type ProductReorderMediaPayload { + """ + The asynchronous job which reorders the media. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Reports the status of product for a Sales Channel or Storefront API. +This might include why a product is not available in a Sales Channel +and how a merchant might fix this. +""" +type ProductResourceFeedback { + """ + The time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + The feedback messages presented to the merchant. + """ + messages: [String!]! + + """ + The ID of the product associated with the feedback. + """ + productId: ID! + + """ + The timestamp of the product associated with the feedback. + """ + productUpdatedAt: DateTime! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +""" +The input fields used to create a product feedback. +""" +input ProductResourceFeedbackInput { + """ + The 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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!] + + """ + 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") + + """ + 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 { + """ + The ID of the location of the inventory quantity being set. + """ + locationId: ID! + + """ + The name of the inventory quantity being set. Must be one of `available` or `on_hand`. + """ + name: String! + + """ + The values to which each quantities will be set. + """ + quantity: Int! +} + +""" +An entity that represents details of an asynchronous +[ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductSetOperation implements Node & ProductOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product on which the operation is being performed. + """ + product: Product + + """ + The status of this operation. + """ + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Return type for `productSet` mutation. +""" +type ProductSetPayload { + """ + The product object. + """ + product: Product + + """ + The product set operation, returned when run in asynchronous mode. + """ + productSetOperation: ProductSetOperation + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductSetUserError!]! +} + +""" +Defines errors for ProductSet mutation. +""" +type ProductSetUserError implements DisplayableError { + """ + The error code. + """ + code: ProductSetUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductSetUserError`. +""" +enum ProductSetUserErrorCode { + """ + 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +The possible product statuses. +""" +enum ProductStatus { + """ + The product is ready to sell and can be published to sales channels and apps. + Products with an active status aren't automatically published to sales + channels, such as the online store, or apps. By default, existing products are set to active. + """ + ACTIVE + + """ + The product is no longer being sold and isn't available to customers on sales channels and apps. + """ + ARCHIVED + + """ + The product isn't ready to sell and is unavailable to customers on sales + channels and apps. By default, duplicated and unarchived products are set to draft. + """ + DRAFT + + """ + The product is active but you need a direct link to view it. The product + doesn't show up in search, collections, or product recommendations. It will be + returned in Storefront API and Liquid only when referenced individually by + handle, id, or metafield reference.This status is only visible from 2025-10 + and up, is translated to active in older versions and can't be changed from + unlisted in older versions. + """ + UNLISTED +} + +""" +Represents a [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) node. +""" +type ProductTaxonomyNode implements Node { + """ + The full name of the product taxonomy node. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. + """ + fullName: String! + + """ + The ID of the product taxonomy node. + """ + id: ID! + + """ + Whether the node is a leaf node. + """ + isLeaf: Boolean! + + """ + Whether the node is a root node. + """ + isRoot: Boolean! + + """ + The name of the product taxonomy node. For example, Dog Beds. + """ + name: String! +} + +""" +The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. +""" +input ProductUnpublishInput { + """ + The ID of the product to create or update publications for. + """ + id: ID! + + """ + The channels to unpublish the product from. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productUnpublish` mutation. +""" +type ProductUnpublishPayload { + """ + The product that has been unpublished. + """ + product: Product + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for updating a product. +""" +input ProductUpdateInput { + """ + The 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!] + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] + + """ + Whether to delete metafields whose constraints don't match the product's category. + Can only be used when updating the product's category. + """ + deleteConflictingConstrainedMetafields: Boolean = false + + """ + The 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 + + """ + 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 { + """ + The updated media object. + """ + media: [Media!] + + """ + The list of errors that occurred from executing the mutation. + """ + mediaUserErrors: [MediaUserError!]! + + """ + The product on which media was updated. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Return type for `productUpdate` mutation. +""" +type ProductUpdatePayload { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The `ProductVariant` object represents a version of a +[product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that comes in more than one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), +such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, +blue t-shirt would be one product variant and a large, blue t-shirt would be another. + +Use the `ProductVariant` object to manage the full lifecycle and configuration of a product's variants. Common +use cases for using the `ProductVariant` object include: + +- Tracking inventory for each variant +- Setting unique prices for each variant +- Assigning barcodes and SKUs to connect variants to fulfillment services +- Attaching variant-specific images and media +- Setting delivery and tax requirements +- Supporting product bundles, subscriptions, and selling plans + +A `ProductVariant` is associated with a parent +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) object. +`ProductVariant` serves as the central link between a product's merchandising configuration, inventory, +pricing, fulfillment, and sales channels within the GraphQL Admin API schema. Each variant +can reference other GraphQL types such as: + +- [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem): Used for inventory tracking +- [`Image`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Image): Used for variant-specific images +- [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup): Used for subscriptions and selling plans + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). +""" +type ProductVariant implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node { + """ + Whether the product variant is available for sale. + """ + availableForSale: Boolean! + + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant in the default shop currency. + """ + compareAtPrice: Money + + """ + The pricing that applies for a customer in a given context. As of API version + 2025-04, only active markets are considered in the price resolution. + """ + contextualPricing( + """ + The context used to generate contextual pricing for the variant. + """ + context: ContextualPricingContext! + ): ProductVariantContextualPricing! + + """ + The date and time when the variant was created. + """ + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The [delivery profile](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile) for the variant. + """ + deliveryProfile: DeliveryProfile + + """ + Display name of the variant, based on product's title + variant's title. + """ + displayName: String! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 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` | + | 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! + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be omitted + from channels that don't support bundles. + """ + requiresComponents: Boolean! + + """ + List of product options applied to the variant. + """ + selectedOptions: [SelectedOption!]! + + """ + The total sellable quantity of the variant for online channels. + This doesn't represent the total available inventory or capture + [limitations based on customer location](https://help.shopify.com/manual/markets/inventory_and_fulfillment). + """ + sellableOnlineQuantity: Int! + + """ + Count of selling plan groups associated with the product variant. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all selling plan groups defined in the current shop associated with the product variant. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + ): [Translation!]! + + """ + The unit price value for the variant based on the variant measurement. + """ + unitPrice: MoneyV2 + + """ + The unit price measurement for the variant. + """ + unitPriceMeasurement: UnitPriceMeasurement + + """ + The date and time (ISO 8601 format) when the product variant was last modified. + """ + updatedAt: DateTime! +} + +""" +The input fields required to append media to a single variant. +""" +input ProductVariantAppendMediaInput { + """ + Specifies the media to append to the variant. + """ + mediaIds: [ID!]! + + """ + Specifies the variant to which media will be appended. + """ + variantId: ID! +} + +""" +Return type for `productVariantAppendMedia` mutation. +""" +type ProductVariantAppendMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +A product variant component that is included within a bundle. + +These are the individual product variants that make up a bundle product, +where each component has a specific required quantity. +""" +type ProductVariantComponent implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The product variant associated with the component. + """ + productVariant: ProductVariant! + + """ + The required quantity of the component. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ProductVariantComponents. +""" +type ProductVariantComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantComponentEdge!]! + + """ + A list of nodes that are contained in ProductVariantComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +""" +type ProductVariantComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantComponentEdge. + """ + node: ProductVariantComponent! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. +""" +type ProductVariantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantEdge!]! + + """ + A list of nodes that are contained in ProductVariantEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductVariant!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product variant in a specific country. +Prices vary between countries. +""" +type ProductVariantContextualPricing { + """ + The final compare-at price after all adjustments are applied. + """ + compareAtPrice: MoneyV2 + + """ + The final price after all adjustments are applied. + """ + price: MoneyV2! + + """ + A list of quantity breaks for the product variant. + """ + quantityPriceBreaks( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + Specifies the media to detach from the variant. + """ + mediaIds: [ID!]! + + """ + Specifies the variant from which media will be detached. + """ + variantId: ID! +} + +""" +Return type for `productVariantDetachMedia` mutation. +""" +type ProductVariantDetachMediaPayload { + """ + The product associated with the variants and media. + """ + product: Product + + """ + The product variants that were updated. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MediaUserError!]! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. +""" +type ProductVariantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantEdge. + """ + node: ProductVariant! +} + +""" +The input fields for the bundle components for core. +""" +input ProductVariantGroupRelationshipInput { + """ + The ID of the product variant that's a component of the bundle. + """ + id: ID! + + """ + The number of units of the product variant required to construct one unit of the bundle. + """ + quantity: Int! +} + +""" +The input fields for identifying a product variant. +""" +input ProductVariantIdentifierInput @oneOf { + """ + The [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 { + """ + 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 { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productVariantLeaveSellingPlanGroups` mutation. +""" +type ProductVariantLeaveSellingPlanGroupsPayload { + """ + The product variant object. + """ + productVariant: ProductVariant + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields representing a product variant position. +""" +input ProductVariantPositionInput { + """ + Specifies the ID of the product variant to update. + """ + id: ID! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! +} + +""" +The compare-at price and price of a variant sharing a currency. +""" +type ProductVariantPricePair { + """ + The compare-at price of the variant with associated currency. + """ + compareAtPrice: MoneyV2 + + """ + The price of the variant with associated currency. + """ + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductVariantPricePairs. +""" +type ProductVariantPricePairConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantPricePairEdge!]! + + """ + A list of nodes that are contained in ProductVariantPricePairEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantPricePair!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. +""" +type ProductVariantPricePairEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ProductVariantPricePairEdge. + """ + node: ProductVariantPricePair! +} + +""" +Return type for `productVariantRelationshipBulkUpdate` mutation. +""" +type ProductVariantRelationshipBulkUpdatePayload { + """ + The product variants with successfully updated product variant relationships. + """ + parentProductVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantRelationshipBulkUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ProductVariantRelationshipBulkUpdate`. +""" +type ProductVariantRelationshipBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantRelationshipBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantRelationshipBulkUpdateUserError`. +""" +enum ProductVariantRelationshipBulkUpdateUserErrorCode { + """ + 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 { + """ + A product ID which contains product variants that have relationships with other variants. + """ + parentProductId: ID + + """ + The product variant ID representing that which contains the relationships with other variants. + """ + parentProductVariantId: ID + + """ + 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 + + """ + 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 { + """ + 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 + + """ + 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 + + """ + 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 { + """ + Sort by the `full_title` value. + """ + FULL_TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by available inventory quantity in the location specified by the `query:"location_id:"` argument. + Don't use this sort key when no `location_id` in query is specified. + """ + INVENTORY_LEVELS_AVAILABLE + + """ + Sort by the `inventory_management` value. + """ + INVENTORY_MANAGEMENT + + """ + Sort by the `inventory_policy` value. + """ + INVENTORY_POLICY + + """ + Sort by the `inventory_quantity` value. + """ + INVENTORY_QUANTITY + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `popular` value. + """ + POPULAR + + """ + Sort by the `position` value. + """ + POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `sku` value. + """ + SKU + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +Return type for `productVariantsBulkCreate` mutation. +""" +type ProductVariantsBulkCreatePayload { + """ + The updated product object. + """ + product: Product + + """ + The newly created variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkCreateUserError!]! +} + +""" +The set of strategies available for use on the `productVariantsBulkCreate` mutation. +""" +enum ProductVariantsBulkCreateStrategy { + """ + The default strategy. Deletes the standalone default ("Default Title") variant + when it's the only variant on the product. Preserves the standalone custom variant. + """ + DEFAULT + + """ + 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 { + """ + 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 { + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Variant price must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Invalid input detected. + """ + INVALID + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED + + """ + 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 + + """ + 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 + + """ + Inventory locations cannot exceed the allowed resource limit or 10. + """ + TOO_MANY_INVENTORY_LOCATIONS + + """ + Quantity could not be set. The location was not found. + """ + TRACKED_VARIANT_LOCATION_NOT_FOUND + + """ + 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 { + """ + The updated product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkDeleteUserError!]! +} + +""" +Error codes for failed bulk variant delete mutations. +""" +type ProductVariantsBulkDeleteUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkDeleteUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkDeleteUserError`. +""" +enum ProductVariantsBulkDeleteUserErrorCode { + """ + 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 { + """ + The value of the barcode associated with the product variant. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + Specifies the product variant to update or delete. + """ + id: ID + + """ + The 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 + + """ + 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 + + """ + 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 { + """ + The updated product. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkReorderUserError!]! +} + +""" +Error codes for failed bulk product variants reorder operation. +""" +type ProductVariantsBulkReorderUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkReorderUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkReorderUserError`. +""" +enum ProductVariantsBulkReorderUserErrorCode { + """ + Product 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 { + """ + The updated product object. + """ + product: Product + + """ + The updated variants. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ProductVariantsBulkUpdateUserError!]! +} + +""" +Error codes for failed variant bulk update mutations. +""" +type ProductVariantsBulkUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: ProductVariantsBulkUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkUpdateUserError`. +""" +enum ProductVariantsBulkUpdateUserErrorCode { + """ + 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 price of the variant must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + Metafield value is invalid. + """ + INVALID_VALUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED + + """ + 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 + + """ + 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 too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + The variant already exists. + """ + VARIANT_ALREADY_EXISTS +} + +""" +The set of valid sort keys for the ProfileItem query. +""" +enum ProfileItemSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `inventory_total` value. + """ + INVENTORY_TOTAL + + """ + Sort by the `product_type` value. + """ + PRODUCT_TYPE + + """ + Sort by the `published_at` value. + """ + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the `title` value. + """ + TITLE + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT + + """ + Sort by the `vendor` value. + """ + VENDOR +} + +""" +Return type for `pubSubServerPixelUpdate` mutation. +""" +type PubSubServerPixelUpdatePayload { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `pubSubWebhookSubscriptionCreate` mutation. +""" +type PubSubWebhookSubscriptionCreatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionCreateUserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionCreate`. +""" +type PubSubWebhookSubscriptionCreateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionCreateUserError`. +""" +enum PubSubWebhookSubscriptionCreateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +The input fields for a PubSub webhook subscription. +""" +input PubSubWebhookSubscriptionInput { + """ + 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!] + + """ + The Pub/Sub project ID. + """ + pubSubProject: String! + + """ + The Pub/Sub topic ID. + """ + pubSubTopic: String! +} + +""" +Return type for `pubSubWebhookSubscriptionUpdate` mutation. +""" +type PubSubWebhookSubscriptionUpdatePayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PubSubWebhookSubscriptionUpdateUserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionUpdate`. +""" +type PubSubWebhookSubscriptionUpdateUserError implements DisplayableError { + """ + The error code. + """ + code: PubSubWebhookSubscriptionUpdateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionUpdateUserError`. +""" +enum PubSubWebhookSubscriptionUpdateUserErrorCode { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +A group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) +that are published to an app. + +Each publication manages which products and collections display on its associated +[`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). +Merchants can automatically publish products when they're created if [`autoPublish`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication#field-Publication.fields.autoPublish) +is enabled, or manually control publication through publication records. + +Publications support scheduled publishing through future publish dates for +online store channels, allowing merchants to coordinate product launches and +promotional campaigns. The [`catalog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication#field-Publication.fields.catalog) +field links to pricing and availability rules specific to that publication's context. +""" +type Publication implements Node { + """ + The app associated with the publication. + """ + app: App! @deprecated(reason: "Use [AppCatalog.apps](https:\/\/shopify.dev\/api\/admin-graphql\/unstable\/objects\/AppCatalog#connection-appcatalog-apps) instead.") + + """ + Whether new products are automatically published to this publication. + """ + autoPublish: Boolean! + + """ + The catalog associated with the publication. + """ + catalog: Catalog + + """ + The list of collection publication records, each representing the publication + status and details for a collection published to this publication (typically channel). + """ + collectionPublicationsV3( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + ): 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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` | + | 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 + ): 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 { + """ + 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 { + """ + Whether to automatically add newly created products to this publication. + """ + autoPublish: Boolean = false + + """ + The ID of the catalog. + """ + catalogId: ID + + """ + 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 { + """ + The publication is populated with all products. + """ + ALL_PRODUCTS + + """ + The publication is empty. + """ + EMPTY +} + +""" +Return type for `publicationCreate` mutation. +""" +type PublicationCreatePayload { + """ + The publication that's been created. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Return type for `publicationDelete` mutation. +""" +type PublicationDeletePayload { + """ + The ID of the publication that was deleted. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +An auto-generated type which holds one Publication and a cursor during pagination. +""" +type PublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of PublicationEdge. + """ + node: Publication! +} + +""" +The input fields required to publish a resource. +""" +input PublicationInput { + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") + + """ + ID of the publication. + """ + publicationId: ID + + """ + The date and time that the resource was published. Setting this to a date in + the future will schedule the resource to be published. Only online store + channels support future publishing. This field has no effect if you include it + in the `publishableUnpublish` mutation. + """ + publishDate: DateTime +} + +""" +The possible types of publication operations. +""" +union PublicationOperation = AddAllProductsOperation | CatalogCsvOperation | PublicationResourceOperation + +""" +A bulk update operation on a publication. +""" +type PublicationResourceOperation implements Node & ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +The input fields for updating a publication. +""" +input PublicationUpdateInput { + """ + 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!] = [] + + """ + A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToRemove: [ID!] = [] +} + +""" +Return type for `publicationUpdate` mutation. +""" +type PublicationUpdatePayload { + """ + The publication that's been updated. + """ + publication: Publication + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PublicationUserError!]! +} + +""" +Defines errors encountered while managing a publication. +""" +type PublicationUserError implements DisplayableError { + """ + The error code. + """ + code: PublicationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `PublicationUserError`. +""" +enum PublicationUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 +} + +""" +Represents a resource that can be published to a channel. +A publishable resource can be either a Product or Collection. +""" +interface Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The 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). + """ + publicationCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Int! @deprecated(reason: "Use `resourcePublicationsCount` instead.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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). + """ + resourcePublicationsCount( + """ + Include only the resource's publications that are published. If false, then + return all the resource's publications including future publications. + """ + onlyPublished: Boolean = true + ): Count + + """ + The list of resources that are either published or staged to be published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + 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! + + """ + 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.") + + """ + 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! +} + +""" +Return type for `publishablePublish` mutation. +""" +type PublishablePublishPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishablePublishToCurrentChannel` mutation. +""" +type PublishablePublishToCurrentChannelPayload { + """ + Resource that has been published. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublish` mutation. +""" +type PublishableUnpublishPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `publishableUnpublishToCurrentChannel` mutation. +""" +type PublishableUnpublishToCurrentChannelPayload { + """ + Resource that has been unpublished. + """ + publishable: Publishable + + """ + The user's shop. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents information about the purchasing company for the order or draft order. +""" +type PurchasingCompany { + """ + The company associated to the order or draft order. + """ + company: Company! + + """ + The company contact associated to the order or draft order. + """ + contact: CompanyContact + + """ + The company location associated to the order or draft order. + """ + location: CompanyLocation! +} + +""" +The input fields for a purchasing company, which is a combination of company, company contact, and company location. +""" +input PurchasingCompanyInput { + """ + ID of the company contact. + """ + companyContactId: ID! + + """ + ID of the company. + """ + companyId: ID! + + """ + ID of the company location. + """ + companyLocationId: ID! +} + +""" +Represents information about the purchasing entity for the order or draft order. +""" +union PurchasingEntity = Customer | PurchasingCompany + +""" +The input fields for a purchasing entity. Can either be a customer or a purchasing company. +""" +input PurchasingEntityInput { + """ + Represents a customer. Null if there's a purchasing company. + """ + customerId: ID + + """ + Represents a purchasing company. Null if there's a customer. + """ + purchasingCompany: PurchasingCompanyInput +} + +""" +Quantity price breaks lets you offer different rates that are based on the +amount of a specific variant being ordered. +""" +type QuantityPriceBreak implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + Minimum quantity required to reach new quantity break price. + """ + minimumQuantity: Int! + + """ + The price of variant after reaching the minimum quanity. + """ + price: MoneyV2! + + """ + The price list associated with this quantity break. + """ + priceList: PriceList! + + """ + The product variant associated with this quantity break. + """ + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityPriceBreaks. +""" +type QuantityPriceBreakConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityPriceBreakEdge!]! + + """ + A list of nodes that are contained in QuantityPriceBreakEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityPriceBreak!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +""" +type QuantityPriceBreakEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityPriceBreakEdge. + """ + node: QuantityPriceBreak! +} + +""" +The input fields and values to use when creating quantity price breaks. +""" +input QuantityPriceBreakInput { + """ + The 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! +} + +""" +The set of valid sort keys for the QuantityPriceBreak query. +""" +enum QuantityPriceBreakSortKeys { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `minimum_quantity` value. + """ + MINIMUM_QUANTITY +} + +""" +The input fields used to update quantity pricing. +""" +input QuantityPricingByVariantUpdateInput { + """ + A list of fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of variant IDs that identify which fixed prices to remove. + """ + pricesToDeleteByVariantId: [ID!]! + + """ + A list of quantity price breaks to add. + """ + quantityPriceBreaksToAdd: [QuantityPriceBreakInput!]! + + """ + A list of quantity price break IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDelete: [ID!]! + + """ + A list of product variant IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDeleteByVariantId: [ID!] + + """ + A list of quantity rules to add. + """ + quantityRulesToAdd: [QuantityRuleInput!]! + + """ + A list of variant IDs that identify which quantity rules to remove. + """ + quantityRulesToDeleteByVariantId: [ID!]! +} + +""" +Return type for `quantityPricingByVariantUpdate` mutation. +""" +type QuantityPricingByVariantUpdatePayload { + """ + The variants for which quantity pricing was created successfully in the price list. + """ + productVariants: [ProductVariant!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityPricingByVariantUserError!]! +} + +""" +Error codes for failed volume pricing operations. +""" +type QuantityPricingByVariantUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityPricingByVariantUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityPricingByVariantUserError`. +""" +enum QuantityPricingByVariantUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + 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 { + """ + The value that specifies the quantity increment between minimum and maximum of the rule. + Only quantities divisible by this value will be considered valid. + + The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum + must be divisible by this value. + """ + increment: Int! + + """ + Whether the quantity rule fields match one increment, one minimum and no maximum. + """ + isDefault: Boolean! + + """ + An optional value that defines the highest allowed quantity purchased by the customer. + If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + """ + maximum: Int + + """ + The value that defines the lowest allowed quantity purchased by the customer. + The minimum must be a multiple of the quantity rule's increment. + """ + minimum: Int! + + """ + Whether the values of the quantity rule were explicitly set. + """ + originType: QuantityRuleOriginType! + + """ + The product variant for which the quantity rule is applied. + """ + productVariant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityRules. +""" +type QuantityRuleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityRuleEdge!]! + + """ + A list of nodes that are contained in QuantityRuleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityRule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityRule and a cursor during pagination. +""" +type QuantityRuleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of QuantityRuleEdge. + """ + node: QuantityRule! +} + +""" +The input fields for the per-order quantity rule to be applied on the product variant. +""" +input QuantityRuleInput { + """ + The quantity increment. + """ + increment: Int! + + """ + The maximum quantity. + """ + maximum: Int = null + + """ + The minimum quantity. + """ + minimum: Int! + + """ + Product variant on which to apply the quantity rule. + """ + variantId: ID! +} + +""" +The origin of quantity rule on a price list. +""" +enum QuantityRuleOriginType { + """ + Quantity rule is explicitly defined. + """ + FIXED + + """ + Quantity rule falls back to the relative rule. + """ + RELATIVE +} + +""" +An error for a failed quantity rule operation. +""" +type QuantityRuleUserError implements DisplayableError { + """ + The error code. + """ + code: QuantityRuleUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `QuantityRuleUserError`. +""" +enum QuantityRuleUserErrorCode { + """ + The input value is blank. + """ + BLANK + + """ + 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 { + """ + The list of quantity rules that were added to or updated in the price list. + """ + quantityRules: [QuantityRule!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +Return type for `quantityRulesDelete` mutation. +""" +type QuantityRulesDeletePayload { + """ + A list of product variant IDs whose quantity rules were removed from the price list. + """ + deletedQuantityRulesVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [QuantityRuleUserError!]! +} + +""" +The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start. +""" +type QueryRoot { + """ + Returns a list of abandoned checkouts. A checkout is considered abandoned when + a customer adds contact information but doesn't complete their purchase. + Includes both abandoned and recovered checkouts. + + Each checkout provides [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) details, [`AbandonedCheckoutLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckoutLineItem) + objects, pricing information, and a recovery URL for re-engaging customers who + didn't complete their purchase. + """ + abandonedCheckouts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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 + ): Count + + """ + Returns a `Abandonment` resource by ID. + """ + abandonment( + """ + The ID of the `Abandonment` to return. + """ + id: ID! + ): Abandonment + + """ + Returns an Abandonment by the Abandoned Checkout ID. + """ + abandonmentByAbandonedCheckoutId( + """ + The ID of the Abandoned Checkout ID to query by. + """ + abandonedCheckoutId: ID! + ): Abandonment + + """ + Retrieves an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) by + its ID. If no ID is provided, returns details about the currently + authenticated app. The query provides access to app details including title, + icon, and pricing information. + + If the app isn't installed on the current shop, then the [`installation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/app#returns-App.fields.installation) + field will be `null`. + """ + app( + """ + The ID to lookup the App by. + """ + id: ID + ): App + + """ + Retrieves an app by its unique handle. The handle is a URL-friendly identifier for the app. + + Returns the [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) if + found, or `null` if no app exists with the specified handle. + """ + appByHandle( + """ + Handle of the App. + """ + handle: String! + ): App + + """ + Retrieves an [`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) by + its client ID (API key). Returns the app's configuration, installation status, [`AccessScope`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope) + objects, and developer information. + + Returns `null` if no app exists with the specified client ID. + """ + appByKey( + """ + Client ID of the app. + """ + apiKey: String! + ): App + + """ + An app discount type. + """ + appDiscountType( + """ + The ID for the function providing the app discount type. + """ + functionId: String! + ): AppDiscountType + + """ + A list of app discount types installed by apps. + """ + appDiscountTypes: [AppDiscountType!]! + + """ + A list of app discount types installed by apps. + """ + appDiscountTypesNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + ): 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! + ): 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! + + """ + List of all article tags. + """ + articleTags( + """ + The maximum number of tags to return. + """ + limit: Int! + + """ + Type of sort order. + """ + sort: ArticleTagSort = ALPHABETICAL + ): [String!]! + + """ + Returns a paginated list of articles from the shop's blogs. + [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) + objects are blog posts that contain content like text, images, and tags. + + Supports [cursor-based + pagination](https://shopify.dev/docs/api/usage/pagination-graphql) to control + the number of articles returned and their order. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/articles#arguments-query) + argument to filter results by specific criteria. + """ + articles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! + + """ + Returns a `DiscountAutomatic` resource by ID. + """ + automaticDiscount( + """ + The ID of the `DiscountAutomatic` to return. + """ + id: ID! + ): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") + + """ + Returns a `DiscountAutomaticNode` resource by ID. + """ + automaticDiscountNode( + """ + The ID of the `DiscountAutomaticNode` to return. + """ + id: ID! + ): DiscountAutomaticNode + + """ + 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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.") + + """ + 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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: [DeliveryCarrierServiceAndLocations!]! + + """ + Returns all locales that Shopify supports. Each + [`Locale`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Locale) + includes an ISO code and human-readable name. Use this query to discover which + locales you can enable on a shop with the [`shopLocaleEnable`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/shopLocaleEnable) mutation. + """ + availableLocales: [Locale!]! + + """ + The backup region of the shop. + """ + backupRegion: MarketRegion! + + """ + Returns a `Blog` resource by ID. + """ + blog( + """ + The ID of the `Blog` to return. + """ + id: ID! + ): Blog + + """ + Returns a paginated list of the shop's + [`Blog`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Blog) + objects. Blogs serve as containers for + [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) + objects and provide content management capabilities for the store's editorial content. + + Supports [cursor-based + pagination](https://shopify.dev/docs/api/usage/pagination-graphql) to control + the number of blogs returned and their order. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/blogs#arguments-query) + argument to filter results by specific criteria. + """ + blogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Returns a `BulkOperation` resource by ID. + """ + bulkOperation( + """ + The ID of the `BulkOperation` to return. + """ + id: ID! + ): BulkOperation + + """ + Returns the app's bulk operations meeting the specified filters. Defaults to + sorting by created_at, with newest operations first. + """ + bulkOperations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 list of [business entities](https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntity) + associated with the shop. Use this query to retrieve business entities for + assigning to markets, managing payment providers per entity, or viewing entity + attribution on orders. + + Each shop can have multiple business entities with one designated as primary. + To identify the primary entity in the query results, set the [`primary`](https://shopify.dev/docs/api/admin-graphql/latest/queries/businessEntities#returns-BusinessEntity.fields.primary) + field to `true`. + + Learn more about [managing multiple legal entities](https://shopify.dev/docs/apps/build/markets/multiple-entities). + """ + businessEntities: [BusinessEntity!]! + + """ + Returns a Business Entity by ID. + """ + businessEntity( + """ + The ID of the Business Entity to return. Returns the primary Business Entity if not provided. + """ + id: ID + ): BusinessEntity + + """ + Returns a `DeliveryCarrierService` resource by ID. + """ + carrierService( + """ + The ID of the `DeliveryCarrierService` to return. + """ + id: ID! + ): DeliveryCarrierService + + """ + A paginated list of carrier services configured for the shop. Carrier services + provide real-time shipping rates from external providers like FedEx, UPS, or + custom shipping solutions. Use the `query` parameter to filter results by + attributes such as active status. + """ + carrierServices( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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! + + """ + Returns a `CashTrackingSession` resource by ID. + """ + cashTrackingSession( + """ + The ID of the `CashTrackingSession` to return. + """ + id: ID! + ): CashTrackingSession + + """ + Returns a shop's cash tracking sessions for locations with a POS Pro subscription. + + Tip: To query for cash tracking sessions in bulk, you can + [perform a bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/queries). + """ + cashTrackingSessions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): Catalog + + """ + Returns the most recent catalog operations for the shop. + """ + catalogOperations: [ResourceOperation!]! + + """ + Returns a paginated list of catalogs for the shop. Catalogs control which + products are published and how they're priced in different contexts, such as + international markets (Canada vs. United States), B2B company locations + (different branches of the same business), or specific sales channels (such as + online store vs. POS). + + Filter catalogs by [`type`](https://shopify.dev/docs/api/admin-graphql/latest/queries/catalogs#arguments-type) and use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/catalogs#arguments-query) + argument to search and filter by additional criteria. + + Learn more about [Shopify Catalogs](https://shopify.dev/docs/apps/build/markets/catalogs-different-markets). + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` resource by ID. + """ + channel( + """ + The ID of the `Channel` to return. + """ + id: ID! + ): Channel + + """ + Returns active [channels](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) + where merchants sell products and collections. Each channel is an + authenticated link to an external platform such as marketplaces, social media + platforms, online stores, or point-of-sale systems. + """ + 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! + + """ + Returns the visual customizations for checkout for a given [checkout profile](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile). + + To update checkout branding settings, use the [`checkoutBrandingUpsert`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/checkoutBrandingUpsert) + mutation. Learn more about [customizing checkout's + appearance](https://shopify.dev/docs/apps/build/checkout/styling). + """ + checkoutBranding( + """ + A globally-unique identifier. + """ + checkoutProfileId: ID! + ): CheckoutBranding + + """ + Returns a [`CheckoutProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutProfile). Checkout profiles define the branding settings and UI extensions for a store's + checkout experience. Stores can have one published profile that renders on + their live checkout and multiple draft profiles for testing customizations in + the checkout editor. + """ + checkoutProfile( + """ + The ID of the checkout profile. + """ + id: ID! + ): CheckoutProfile + + """ + 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! + + """ + Returns a [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes) resource by ID. + """ + codeDiscountNode( + """ + The ID of the `DiscountCodeNode` to return. + """ + id: ID! + ): DiscountCodeNode + + """ + Retrieves a [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + by its discount code. The search is case-insensitive, enabling you to find + discounts regardless of how customers enter the code. + + Returns a [`DiscountCodeNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeNode) that contains the underlying discount details, which could be a basic [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount), + a ["Buy X Get Y" (BXGY) discount](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y), + a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping), + or an [app-provided discount](https://help.shopify.com/manual/discounts/discount-types/discounts-with-apps). + + Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts). + """ + codeDiscountNodeByCode( + """ + The case-insensitive code of the `DiscountCodeNode` to return. + """ + code: String! + ): DiscountCodeNode + + """ + Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). + """ + codeDiscountNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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.") + + """ + 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! + ): Collection + + """ + Retrieves a collection by its unique handle identifier. Handles provide a + URL-friendly way to reference collections and are commonly used in storefront + URLs and navigation. + + For example, a collection with the title "Summer Sale" might have the handle + `summer-sale`, allowing you to fetch it directly without knowing the internal ID. + + Use `CollectionByHandle` to: + - Fetch collections for storefront display and navigation + - Build collection-based URLs and routing systems + - Validate collection existence before displaying content + + Handles are automatically generated from collection titles but can be + customized by merchants for SEO and branding purposes. + + Learn more about [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionByHandle( + """ + The handle of the collection. + """ + handle: String! + ): Collection @deprecated(reason: "Use `collectionByIdentifier` instead.") + + """ + Return a collection by an identifier. + """ + collectionByIdentifier( + """ + The identifier of the collection. + """ + identifier: CollectionIdentifierInput! + ): Collection + + """ + Lists all rules that can be used to create 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! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + ): Count + + """ + Returns a `Comment` resource by ID. + """ + comment( + """ + The ID of the `Comment` to return. + """ + id: ID! + ): Comment + + """ + List of the shop's comments. + """ + comments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 | + | 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 + + """ + Returns a `Company` resource by ID. + """ + company( + """ + The ID of the `Company` to return. + """ + id: ID! + ): Company + + """ + Returns a `CompanyContact` resource by ID. + """ + companyContact( + """ + The ID of the `CompanyContact` to return. + """ + id: ID! + ): CompanyContact + + """ + Returns a `CompanyContactRole` resource by ID. + """ + companyContactRole( + """ + The ID of the `CompanyContactRole` to return. + """ + id: ID! + ): CompanyContactRole + + """ + Returns a `CompanyLocation` resource by ID. + """ + companyLocation( + """ + The ID of the `CompanyLocation` to return. + """ + id: ID! + ): CompanyLocation + + """ + A paginated list of [`CompanyLocation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation) + objects for B2B customers. Company locations represent individual branches or offices of a + [`Company`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Company) + where B2B orders can be placed. + + Each location can have its own billing and shipping addresses, tax settings, [`PaymentTerms`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms), and [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) + assignments with custom pricing. Use the query parameter to search locations + by name or other attributes. + + Learn more about [managing company locations](https://shopify.dev/docs/apps/build/b2b/manage-client-company-locations). + """ + companyLocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + 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! + ): Customer + + """ + Returns a `CustomerAccountPage` resource by ID. + """ + customerAccountPage( + """ + The ID of the `CustomerAccountPage` to return. + """ + id: ID! + ): CustomerAccountPage + + """ + List of the shop's customer account pages. + """ + customerAccountPages( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + Return a customer by an identifier. + """ + customerByIdentifier( + """ + The identifier of the customer. + """ + identifier: CustomerIdentifierInput! + ): Customer + + """ + Returns the status of a customer merge request job. + """ + customerMergeJobStatus( + """ + The ID of the job performing the customer merge request. + """ + jobId: ID! + ): CustomerMergeRequest + + """ + Returns a preview of a customer merge request. + """ + customerMergePreview( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePreview! + + """ + Returns a CustomerPaymentMethod resource by its ID. + """ + customerPaymentMethod( + """ + The ID of the CustomerPaymentMethod to return. + """ + id: ID! + + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + List of the shop's customer saved searches. + """ + customerSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """ + The ID of the segment. + """ + segmentId: ID + + """ + 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 a `CustomerSegmentMembersQuery` resource by ID. + """ + customerSegmentMembersQuery( + """ + The ID of the `CustomerSegmentMembersQuery` to return. + """ + id: ID! + ): CustomerSegmentMembersQuery + + """ + Whether a member, which is a customer, belongs to a segment. + """ + customerSegmentMembership( + """ + The ID of the customer that has the membership. + """ + customerId: ID! + + """ + The segments to evaluate for the given customer. + """ + segmentIds: [ID!]! + ): SegmentMembershipResponse! + + """ + Returns a list of + [customers](https://shopify.dev/api/admin-graphql/latest/objects/Customer) in + your Shopify store, including key information such as name, email, location, + and purchase history. + Use this query to segment your audience, personalize marketing campaigns, or + analyze customer behavior by applying filters based on location, order + history, marketing preferences and tags. + The `customers` query supports + [pagination](https://shopify.dev/api/usage/pagination-graphql) and [sorting](https://shopify.dev/api/admin-graphql/latest/enums/CustomerSortKeys). + """ + customers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + 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! + ): DeliveryCustomization + + """ + 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! + + """ + Retrieves a [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) by ID. Delivery profiles group shipping settings for specific + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + objects that ship from selected [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + objects to [delivery + zones](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone + with defined rates. + + Learn more about [delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment#whats-a-delivery-profile). + """ + deliveryProfile( + """ + The ID of the DeliveryProfile to return. + """ + id: ID! + ): DeliveryProfile + + """ + Returns a paginated list of [`DeliveryProfile`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProfile) + objects for the shop. Delivery profiles group + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects that share shipping rates and zones. + + Each profile contains [`DeliveryLocationGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryLocationGroup) + objects that organize fulfillment [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + objects and their associated delivery zones. [`DeliveryZone`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone) + objects define geographic regions with specific shipping methods and rates. Use the [`merchantOwnedOnly`](https://shopify.dev/docs/api/admin-graphql/latest/queries/deliveryProfiles#arguments-merchantOwnedOnly) + filter to exclude profiles that third-party apps manage. + + Learn more about [delivery profiles](https://shopify.dev/docs/apps/build/purchase-options/deferred/delivery-and-deferment#whats-a-delivery-profile). + """ + deliveryProfiles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryPromiseParticipantConnection + + """ + Lookup a delivery promise provider. + """ + deliveryPromiseProvider( + """ + The ID of the location associated with the delivery promise provider. + """ + locationId: ID! + ): DeliveryPromiseProvider + + """ + Represents the delivery promise settings for a shop. + """ + deliveryPromiseSettings: DeliveryPromiseSetting! + + """ + Returns the shop-wide shipping settings. + """ + deliverySettings: DeliverySetting + + """ + The total number of discount codes for the shop. Limited to a maximum of 10000 by default. + """ + discountCodesCount( + """ + 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 + + """ + Returns a `DiscountNode` resource by ID. + """ + discountNode( + """ + The ID of the `DiscountNode` to return. + """ + id: ID! + ): 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` | + | 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'` | + | 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` | + | 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` | + | 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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` | + | 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'` | + | 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` | + | 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` | + | 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` | + | 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 + ): Count + + """ + Returns a `DiscountRedeemCodeBulkCreation` resource by ID. + """ + discountRedeemCodeBulkCreation( + """ + The ID of the `DiscountRedeemCodeBulkCreation` to return. + """ + id: ID! + ): DiscountRedeemCodeBulkCreation + + """ + List of the shop's redeemed discount code saved searches. + """ + discountRedeemCodeSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + Returns a `ShopifyPaymentsDispute` resource by ID. + """ + dispute( + """ + The ID of the `ShopifyPaymentsDispute` to return. + """ + id: ID! + ): ShopifyPaymentsDispute + + """ + Returns a `ShopifyPaymentsDisputeEvidence` resource by ID. + """ + disputeEvidence( + """ + The ID of the `ShopifyPaymentsDisputeEvidence` to return. + """ + id: ID! + ): ShopifyPaymentsDisputeEvidence + + """ + All disputes related to the Shop. + """ + 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! + ): Domain + + """ + Retrieves a [draft order](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) by its ID. + A draft order is an order created by a merchant on behalf of their + customers. Draft orders contain all necessary order details (products, pricing, customer information) + but require payment to be accepted before they can be converted into + [completed orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/draftOrderComplete). + + Use the `draftOrder` query to retrieve information associated with the following workflows: + + - Creating orders for phone, in-person, or chat sales + - Sending invoices to customers with secure checkout links + - Managing custom items and additional costs + - Selling products at discount or wholesale rates + - Processing pre-orders and saving drafts for later completion + + A draft order is associated with a + [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + and contains multiple [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem). + Each draft order has a [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder#field-DraftOrder.fields.status), + which indicates its progress through the sales workflow. + """ + draftOrder( + """ + The ID of the `DraftOrder` to return. + """ + id: ID! + ): DraftOrder + + """ + Available delivery options for a [`DraftOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) + based on the provided input. The query returns shipping rates, local delivery + rates, and pickup locations that merchants can choose from when creating draft orders. + + Accepts draft order details including [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) objects, [`MailingAddress`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress) + for shipping, and discounts to determine which delivery methods are available. + Pagination parameters control the number of local pickup options returned. + """ + draftOrderAvailableDeliveryOptions( + """ + The fields for the draft order. + """ + input: DraftOrderAvailableDeliveryOptionsInput! + + """ + The 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! + + """ + 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! + + """ + Returns a `DraftOrderTag` resource by ID. + """ + draftOrderTag( + """ + The ID of the `DraftOrderTag` to return. + """ + id: ID! + ): 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + ): Count + + """ + Retrieves a single event by ID. Events chronicle activities in your store such + as resource creation, updates, or staff comments. The query returns an + [`Event`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Event) + interface of type [`BasicEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BasicEvent) or [`CommentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CommentEvent). + """ + event( + """ + The ID of the event. + """ + id: ID! + ): Event + + """ + A paginated list of events that chronicle activities in the store. + [`Event`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Event) + is an interface implemented by types such as [`BasicEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/BasicEvent) and [`CommentEvent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CommentEvent) + that track actions such as creating + [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article) + objects, fulfilling + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + objects, adding + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + objects, or staff comments on timelines. + + The query supports filtering and sorting to help you find specific events or audit store activity over time. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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 | float | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Returns the access policy for a finance app . + """ + financeAppAccessPolicy: FinanceAppAccessPolicy! + + """ + Returns the KYC information for the shop's Shopify Payments account, used in embedded finance apps. + """ + financeKycInformation: FinanceKycInformation + + """ + Retrieves a [`Fulfillment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment) by its ID. A fulfillment is a record that the merchant has completed their + work required for one or more line items in an + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). It + includes tracking information, [`LineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem) + objects, and the status of the fulfillment. + + Use this query to track the progress of shipped items, view tracking details, + or check [fulfillment events](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent) + for example when a package is out for delivery or delivered. + """ + fulfillment( + """ + The ID of the Fulfillment to return. + """ + id: ID! + ): Fulfillment + + """ + The fulfillment constraint rules that belong to a shop. + """ + fulfillmentConstraintRules: [FulfillmentConstraintRule!]! + + """ + Returns a `FulfillmentOrder` resource by ID. + """ + fulfillmentOrder( + """ + The ID of the `FulfillmentOrder` to return. + """ + id: ID! + ): FulfillmentOrder + + """ + The paginated list of all fulfillment orders. + The returned fulfillment orders are filtered according to the + [fulfillment order access scopes](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder#api-access-scopes) + granted to the app. + + Use this query to retrieve fulfillment orders assigned to merchant-managed locations, + third-party fulfillment service locations, or all kinds of locations together. + + For fetching only the fulfillment orders assigned to the app's locations, use the + [assignedFulfillmentOrders](https://shopify.dev/api/admin-graphql/2024-07/objects/queryroot#connection-assignedfulfillmentorders) + connection. + """ + fulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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! + + """ + Returns a [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) by its ID. The service can manage inventory, process fulfillment requests, and + provide tracking details through callback endpoints or directly calling + Shopify's APIs. + + When you register a fulfillment service, Shopify automatically creates an associated [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) + where fulfillment order's can be assigned to be processed. + + Learn more about [building fulfillment service apps](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services). + """ + fulfillmentService( + """ + The ID of the FulfillmentService to return. + """ + id: ID! + ): FulfillmentService + + """ + Retrieves a [`GiftCard`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) by its ID. Returns the gift card's balance, transaction history, [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) + information, and whether it's enabled. + + Additional fields include the initial value, expiration date, deactivation + timestamp (if applicable), and the associated + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) if + the gift card was purchased by a customer through checkout. Gift cards that + merchants create manually won't have an associated order. + """ + giftCard( + """ + The ID of the GiftCard to return. + """ + id: ID! + ): GiftCard + + """ + The configuration for the shop's gift cards. + """ + giftCardConfiguration: GiftCardConfiguration! + + """ + Returns a paginated list of [`GiftCard`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) + objects issued for the shop. + + You can filter gift cards by attributes such as status, last characters of the + code, balance status, and other values using the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/giftCards#arguments-query) + parameter. You can also apply [`SavedSearch`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SavedSearch) + objects to filter results. + """ + giftCards( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + The total number of gift cards issued for the shop. 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` | + | 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` | + | 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 + ): Count + + """ + Returns an + [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) + object by ID. + """ + inventoryItem( + """ + The ID of the `InventoryItem` to return. + """ + id: ID! + ): InventoryItem + + """ + Returns a list of inventory items. + """ + inventoryItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): InventoryLevel + + """ + Returns the shop's inventory configuration, including all inventory quantity + names. Quantity names represent different [inventory states](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps#inventory-states) + that merchants use to track inventory. + """ + inventoryProperties: InventoryProperties! + + """ + Retrieves an [`InventoryShipment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipment) by ID. Returns tracking details, [`InventoryShipmentLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipmentLineItem) + objects with quantities, and the shipment's current [`InventoryShipmentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/InventoryShipmentStatus). + """ + inventoryShipment( + """ + The ID of the inventory shipment. + """ + id: ID! + ): InventoryShipment + + """ + Returns an [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer) by ID. Inventory transfers track the movement of inventory between locations, + including origin and destination details, [`InventoryTransferLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) + objects, quantities, and [`InventoryTransferStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/InventoryTransferStatus) values. + """ + inventoryTransfer( + """ + The ID of the inventory transfer. + """ + id: ID! + ): InventoryTransfer + + """ + Returns a paginated list of [`InventoryTransfer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransfer) + objects between locations. Transfers track the movement of [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) + objects between [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) objects. + + Supports filtering transfers using query parameters and sorting by various + criteria. Use the connection's edges to access transfer details including [`InventoryTransferLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryTransferLineItem) + objects, quantities, and shipment status. + """ + inventoryTransfers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes. + """ + job( + """ + ID of the job to query. + """ + id: ID! + ): Job + + """ + Retrieves a [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location) by its ID. Locations are physical places where merchants store inventory, such + as warehouses, retail stores, or fulfillment centers. + + Each location tracks inventory levels, fulfillment capabilities, and address + information. Active locations can stock products and fulfill orders based on + their configuration settings. + """ + location( + """ + The ID of the location to return. If no ID is provided, the primary location of the Shop is returned. + """ + id: ID + ): Location + + """ + Return a location by an identifier. + """ + locationByIdentifier( + """ + The identifier of the location. + """ + identifier: LocationIdentifierInput! + ): Location + + """ + A paginated list of inventory locations where merchants can stock + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + items and fulfill + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) items. + + Returns only active locations by default. Use the [`includeInactive`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-includeInactive) + argument to retrieve deactivated locations that can no longer stock inventory + or fulfill orders. Use the [`includeLegacy`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-includeLegacy) + argument to include locations that [`FulfillmentService`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService) + apps manage. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations#arguments-query) + argument to filter by location attributes like name, address, and whether + local pickup is enabled. + """ + locations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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! + + """ + Returns a `Market` resource by ID. + """ + market( + """ + The ID of the `Market` to return. + """ + id: ID! + ): Market + + """ + Returns the applicable market for a customer based on where they are in the world. + """ + marketByGeography( + """ + The code for the country where the customer is. + """ + countryCode: CountryCode! + ): Market @deprecated(reason: "This `market_by_geography` field will be removed in a future version of the API.") + + """ + A resource that can have localized values for different markets. + """ + marketLocalizableResource( + """ + Find a market localizable resource by ID. + """ + resourceId: ID! + ): MarketLocalizableResource + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResources( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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!]! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketLocalizableResourceConnection! + + """ + 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!] = [] + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + ): MarketingActivity + + """ + Returns a `MarketingEvent` resource by ID. + """ + marketingEvent( + """ + The ID of the `MarketingEvent` to return. + """ + id: ID! + ): MarketingEvent + + """ + A list of marketing events associated with the marketing app. + """ + marketingEvents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 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 + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The resolved values for a buyer signal. + """ + marketsResolvedValues( + """ + The buyer signal. + """ + buyerSignal: BuyerSignalInput! + ): MarketsResolvedValues! + + """ + Returns a `Menu` resource by ID. + """ + menu( + """ + The ID of the `Menu` to return. + """ + id: ID! + ): Menu + + """ + Retrieves navigation menus. Menus organize content into hierarchical + navigation structures that merchants can display in the online store (for + example, in headers, footers, and sidebars) and customer accounts. + + Each [`Menu`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Menu) + contains a handle for identification, a title for display, and a collection of [`MenuItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MenuItem) + objects that can be nested up to 3 levels deep. Default menus have protected + handles that can't be modified. + """ + menus( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + Retrieves a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) by its identifier. You can identify a definition using either its owner type, + namespace, and key, or its global ID. + + Use this query to inspect a definition's configuration, including its data + type, validations, access settings, and the count of [metafields](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) using it. + """ + metafieldDefinition( + """ + The ID of the MetafieldDefinition to return. + """ + id: ID @deprecated(reason: "This field will be removed in a future version. Use the identifier input instead.") + + """ + The identifier of the MetafieldDefinition to return. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinition + + """ + The available metafield types that you can use when creating [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition) + objects. Each type specifies what kind of data it stores (such as boolean, + color, date, or references), its category, and which validations it supports. + + For a list of supported types and their capabilities, refer to the [metafield + types documentation](https://shopify.dev/docs/apps/metafields/types). + """ + metafieldDefinitionTypes: [MetafieldDefinitionType!]! + + """ + Returns a list of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.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! + + """ + Retrieves a single [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) + by its global ID. [Metaobjects](https://shopify.dev/docs/apps/build/custom-data#what-are-metaobjects) + store custom structured data based on defined schemas. The returned metaobject + includes its fields with values, display name, handle, and associated metadata + like update timestamps and capabilities. + """ + metaobject( + """ + The ID of the metaobject to return. + """ + id: ID! + ): Metaobject + + """ + Retrieves a [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) by its handle and type. Handles are unique identifiers within a metaobject type. + """ + metaobjectByHandle( + """ + The identifier of the metaobject to return. + """ + handle: MetaobjectHandleInput! + ): Metaobject + + """ + Retrieves a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) by its global ID. Metaobject definitions provide the structure and fields for metaobjects. + + The definition includes field configurations, access settings, display + preferences, and capabilities that determine how [metaobjects](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) + of this type behave across the Shopify platform. + """ + metaobjectDefinition( + """ + The ID of the metaobject to return. + """ + id: ID! + ): MetaobjectDefinition + + """ + Retrieves a [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) by its type. The type serves as a unique identifier that distinguishes one + metaobject definition from another. + """ + metaobjectDefinitionByType( + """ + The type of the metaobject definition to return. + """ + type: String! + ): MetaobjectDefinition + + """ + Returns a paginated list of all [`MetaobjectDefinition`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetaobjectDefinition) + objects configured for the store. Metaobject definitions provide the schema + for creating custom data structures composed of individual fields. Each + definition specifies the field types, access permissions, and capabilities for [`Metaobject`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metaobject) + entries of that type. Use this query to discover available metaobject types + before creating or querying metaobject entries. + + Learn more about [managing metaobjects](https://shopify.dev/docs/apps/build/custom-data/metaobjects/manage-metaobjects). + """ + metaobjectDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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! + + """ + Return a mobile platform application by its ID. + """ + mobilePlatformApplication( + """ + ID of the mobile platform app. + """ + id: ID! + ): MobilePlatformApplication + + """ + List the mobile platform applications. + """ + mobilePlatformApplications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Returns a specific node (any object that implements the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) by ID, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + This field is commonly used for refetching an object. + """ + node( + """ + The ID of the `Node` to return. + """ + id: ID! + ): Node + + """ + Returns the list of nodes (any objects that implement the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) with the given IDs, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + """ + nodes( + """ + The IDs of the Nodes to return. + """ + ids: [ID!]! + ): [Node]! + + """ + The shop's online store channel. + """ + onlineStore: OnlineStore! + + """ + The `order` query retrieves an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/order) by + its ID. This query provides access to comprehensive order information such as + customer details, line items, financial data, and fulfillment status. + + Use the `order` query to retrieve information associated with the following processes: + + - [Order management and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + - [Financial reporting](https://help.shopify.com/manual/finance) + - [Customer purchase history](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports) + and [transaction analysis](https://shopify.dev/docs/apps/launch/billing/view-charges-earnings#transaction-data-through-the-graphql-admin-api) + - [Shipping](https://shopify.dev/docs/apps/build/checkout/delivery-shipping) and [inventory management](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps) + + You can only retrieve the last 60 days worth of orders from a store by + default. If you want to access older orders, then you need to [request access to all + orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). + + For large order datasets, consider using [bulk operations](https://shopify.dev/docs/api/usage/bulk-operations/queries). + Bulk operations handle pagination automatically and allow you to retrieve data + asynchronously without being constrained by API rate limits. + Learn more about [creating orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate) + and [building order management + apps](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + order( + """ + The ID of the `Order` to return. + """ + id: ID! + ): Order + + """ + Return an order by an identifier. + """ + orderByIdentifier( + """ + The identifier of the order. + """ + identifier: OrderIdentifierInput! + ): Order + + """ + Returns a `OrderEditSession` resource by ID. + """ + orderEditSession( + """ + The ID of the `OrderEditSession` to return. + """ + id: ID! + ): OrderEditSession + + """ + Retrieves the status of a deferred payment by its payment reference ID. Use + this query to monitor the processing status of payments that are initiated + through payment mutations. Deferred payments are called [payment + terms](https://shopify.dev/docs/apps/build/checkout/payments/payment-terms) in the API. + + The query returns an [`OrderPaymentStatus`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderPaymentStatus) + object that includes the current payment status, any error messages, and + associated transactions. Poll this query to track [asynchronous payment + processing](https://shopify.dev/docs/apps/build/payments/processing) after + initiating a deferred payment. + """ + orderPaymentStatus( + """ + ID of the order for which the payment was initiated. + """ + orderId: ID! + + """ + 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! + + """ + 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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` | + | 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 + ): Count + + """ + Returns a `Page` resource by ID. + """ + page( + """ + The ID of the `Page` to return. + """ + id: ID! + ): Page + + """ + A paginated list of pages from the online store. + [`Page`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Page) + objects are content pages that merchants create to provide information to + customers, such as "About Us", "Contact", or policy pages. + + The query supports filtering with a [search + query](https://shopify.dev/docs/api/usage/search-syntax) and sorting by + various criteria. Advanced filtering is available through saved searches using the [`savedSearchId`](https://shopify.dev/docs/api/admin-graphql/latest/queries/pages#arguments-savedSearchId) argument. + """ + pages( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + + """ + The payment customization. + """ + paymentCustomization( + """ + The ID of the payment customization. + """ + id: ID! + ): PaymentCustomization + + """ + 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! + + """ + The list of payment terms templates eligible for all shops and users. + """ + paymentTermsTemplates( + """ + The payment terms type to filter the payment terms templates list. + """ + paymentTermsType: PaymentTermsType + ): [PaymentTermsTemplate!]! + + """ + The number of pendings orders. Limited to a maximum of 10000. + """ + pendingOrdersCount: Count + + """ + Returns a `PointOfSaleDevice` resource by ID. + """ + pointOfSaleDevice( + """ + The ID of the `PointOfSaleDevice` to return. + """ + id: ID! + ): PointOfSaleDevice + + """ + Returns a [`PriceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/PriceList) by ID. You can use price lists to specify either fixed prices or adjusted + relative prices that override initial + [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) prices. + + Price lists enable contextual pricing for the [`Catalog`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) + they are associated to. Each price list can define fixed prices for specific [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + objects or percentage-based adjustments relative to other prices. + """ + priceList( + """ + The ID of the `PriceList` to return. + """ + id: ID! + ): PriceList + + """ + All price lists for a shop. + """ + priceLists( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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.") + + """ + Privacy related settings for a shop. + """ + privacySettings: PrivacySettings! + + """ + Retrieves a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) by its ID. + A product is an item that a merchant can sell in their store. + + Use the `product` query when you need to: + + - Access essential product data (for example, title, description, price, images, SEO metadata, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants and product options. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + product( + """ + The ID of the `Product` to return. + """ + id: ID! + ): Product + + """ + Retrieves a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + using its handle. A handle is a unique, URL-friendly string that Shopify + automatically generates from the product's title. + + Returns `null` if no product exists with the specified handle. + """ + productByHandle( + """ + A unique string that identifies the product. Handles are automatically + generated based on the product's title, and are always lowercase. Whitespace + and special characters are replaced with a hyphen: `-`. If there are + multiple consecutive whitespace or special characters, then they're replaced + with a single hyphen. Whitespace or special characters at the beginning are + removed. If a duplicate product title is used, then the handle is + auto-incremented by one. For example, if you had two products called + `Potion`, then their handles would be `potion` and `potion-1`. After a + product has been created, changing the product title doesn't update the handle. + """ + handle: String! + ): Product @deprecated(reason: "Use `productByIdentifier` instead.") + + """ + Return a product by an identifier. + """ + productByIdentifier( + """ + The identifier of the product. + """ + identifier: ProductIdentifierInput! + ): Product + + """ + Returns the product duplicate job. + """ + productDuplicateJob( + """ + An ID of a product duplicate job to fetch. + """ + id: ID! + ): ProductDuplicateJob! + + """ + Returns a ProductFeed resource by ID. + """ + productFeed( + """ + The ID of the ProductFeed to return. + """ + id: ID! + ): ProductFeed + + """ + The product feeds for the shop. + """ + productFeeds( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + Returns a ProductOperation resource by ID. + + This can be used to query the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), using + the ID that was returned + [when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously) + by the + [ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + + The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + + The `product` field provides the details of the created or updated product. + + For the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), the + `userErrors` field provides mutation errors that occurred during the operation. + """ + productOperation( + """ + The ID of the `ProductOperation` to return. + """ + id: ID! + ): ProductOperation + + """ + Retrieves product resource feedback for the currently authenticated app, + providing insights into product data quality, completeness, and optimization + opportunities. This feedback helps apps guide merchants toward better product + listings and improved store performance. + + For example, an SEO app might receive feedback indicating that certain + products lack meta descriptions or have suboptimal titles, enabling the app to + provide specific recommendations for improving search visibility and + conversion rates. + + Use `ProductResourceFeedback` to: + - Display product optimization recommendations to merchants + - Identify data quality issues across product catalogs + - Build product improvement workflows and guided experiences + - Track progress on product listing completeness and quality + - Implement automated product auditing and scoring systems + - Generate reports on catalog health and optimization opportunities + - Provide contextual suggestions within product editing interfaces + + The feedback system evaluates products against various criteria including SEO + best practices, required fields, media quality, and sales channel + requirements. Each feedback item includes specific details about the issue, + suggested improvements, and priority levels. + + Feedback is app-specific and reflects the particular focus of your application + - marketing apps receive different insights than inventory management apps. + The system continuously updates as merchants make changes, providing real-time + guidance for product optimization. + + This resource is particularly valuable for apps that help merchants improve + their product listings, optimize for search engines, or enhance their overall + catalog quality. The feedback enables proactive suggestions rather than + reactive problem-solving. + + Learn more about [product optimization](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + """ + productResourceFeedback( + """ + The product associated with the resource feedback. + """ + id: ID! + ): ProductResourceFeedback + + """ + Returns a list of the shop's product saved searches. + """ + productSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 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 + + """ + 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 + + """ + Retrieves a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) by its ID. + + A product variant is a specific version of a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariant` query when you need to: + + - Access essential product variant data (for example, title, price, image, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants that are part of a bundle or selling plan. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariant( + """ + The ID of the `ProductVariant` to return. + """ + id: ID! + ): ProductVariant + + """ + Return a product variant by an identifier. + """ + productVariantByIdentifier( + """ + The identifier of the product variant. + """ + identifier: ProductVariantIdentifierInput! + ): ProductVariant + + """ + Retrieves a list of [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + associated with a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + + A product variant is a specific version of a product that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariants` query when you need to: + + - Search for product variants by attributes such as SKU, barcode, or inventory quantity. + - Filter product variants by attributes, such as whether they're gift cards or have custom metafields. + - Fetch product variants for bulk operations, such as updating prices or inventory. + - Preload data for product variants, such as inventory items, selected options, or associated products. + + The `productVariants` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + to handle large product catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/productVariants#arguments-savedSearchId) + for frequently used product variant queries. + + The `productVariants` query returns product variants with their associated metadata, including: + + - Basic product variant information (for example, title, SKU, barcode, price, and inventory) + - Media attachments (for example, images and videos) + - Associated products, selling plans, bundles, and metafields + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + + """ + 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 + + """ + 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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` | + | 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 + ): Count + + """ + The list of publicly-accessible Admin API versions, including supported + versions, the release candidate, and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """ + Retrieves a [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) by [`ID`](https://shopify.dev/docs/api/usage/gids). + + Returns `null` if the publication doesn't exist. + """ + publication( + """ + The ID of the Publication to return. + """ + id: ID! + ): Publication + + """ + Returns a paginated list of [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + + Filter publications by [`CatalogType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/CatalogType). + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.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! + + """ + Count of publications. Limited to a maximum of 10000 by default. + """ + publicationsCount( + """ + Filter publications by catalog type. + """ + catalogType: CatalogType + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. + """ + publishedProductsCount( + """ + The maximum number of products to count. + """ + limit: Int = 10000 + + """ + The ID of the publication that the products are published to. + """ + publicationId: ID! + ): Count + + """ + Retrieves a [refund](https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund) by its ID. + A refund represents a financial record of money returned to a customer from an order. + It provides a comprehensive view of all refunded amounts, transactions, and restocking + instructions associated with returning products or correcting order issues. + + Use the `refund` query to retrieve information associated with the following workflows: + + - Displaying refund details in order management interfaces + - Building customer service tools for reviewing refund history + - Creating reports on refunded amounts and reasons + - Auditing refund transactions and payment gateway records + - Tracking inventory impacts from refunded items + + A refund is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and includes [refund line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem) + that specify which items were refunded. Each refund processes through + [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) + that handle the actual money transfer back to the customer. + """ + refund( + """ + The ID of the Refund to return. + """ + id: ID! + ): Refund + + """ + Retrieves a return by its ID. A return represents the intent of a buyer to ship one or more items from an + order back to a merchant or a third-party fulfillment location. + + Use the `return` query to retrieve information associated with the following workflows: + + - [Managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + - [Processing exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges) + - [Tracking reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders) + + A return is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). + Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), + which indicates the state of the return. + """ + return( + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + of the return to retrieve. + """ + id: ID! + ): Return + + """ + Calculates the financial outcome of a + [`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) + without creating it. Use this query to preview return costs before initiating + the actual return process. + + The calculation provides detailed breakdowns of refund amounts, taxes, [`RestockingFee`](https://shopify.dev/docs/api/admin-graphql/latest/objects/RestockingFee) + charges, return shipping fees, and order-level discount adjustments based on the [`FulfillmentLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentLineItem) + objects that customers select for return. + + Learn more about building for [return management](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). + """ + returnCalculate( + """ + The input fields for calculating a return. + """ + input: CalculateReturnInput! + ): CalculatedReturn + + """ + Returns the full library of available return reason definitions. + + Use this query to retrieve the standardized return reasons available for creating returns. + Filter by IDs or handles to get specific definitions. + + Only non-deleted reasons should be shown to customers when creating new returns. + Deleted reasons have been replaced with better alternatives and are no longer recommended. + However, they remain valid options and may still appear on existing returns. + """ + returnReasonDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/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! + + """ + Returns a `ReturnableFulfillment` resource by ID. + """ + returnableFulfillment( + """ + The ID of the `ReturnableFulfillment` to return. + """ + id: ID! + ): 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! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ReturnableFulfillmentConnection! + + """ + Lookup a reverse delivery by ID. + """ + reverseDelivery( + """ + The ID of the ReverseDelivery to return. + """ + id: ID! + ): ReverseDelivery + + """ + Lookup a reverse fulfillment order by ID. + """ + reverseFulfillmentOrder( + """ + The ID of the reverse fulfillment order to return. + """ + id: ID! + ): ReverseFulfillmentOrder + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + A list of script tags. + """ + scriptTags( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): 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 + ): 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! + ): 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!]! + + """ + Returns a Shop Pay payment request receipt. + """ + shopPayPaymentRequestReceipt( + """ + Unique identifier of the payment request receipt. + """ + token: String! + ): ShopPayPaymentRequestReceipt + + """ + Returns a list of Shop Pay payment request receipts. + """ + 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 + + """ + Retrieves a [staff + member](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) + by ID. If no ID is provided, the query returns the staff member that's making + the request. A staff member is a user who can access the Shopify admin to + manage store operations. + + Provides staff member details such as email, name, and shop owner status. When + querying the current user (with or without an ID), additional [private data](https://shopify.dev/docs/api/admin-graphql/latest/queries/staffMember#returns-StaffMember.fields.privateData) + becomes available. + """ + staffMember( + """ + The ID of the staff member to return. If no ID is provided, then the staff member making the query (if any) is returned. + """ + id: ID + ): StaffMember + + """ + Returns a paginated list of [`StaffMember`](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) + objects for the shop. Staff members are users who can access the Shopify admin + to manage store operations. + + Supports filtering by account type, email, and name, with an option to sort + results. The query returns a [`StaffMemberConnection`](https://shopify.dev/docs/api/admin-graphql/latest/connections/StaffMemberConnection) + for [cursor-based + pagination](https://shopify.dev/docs/api/usage/pagination-graphql). + """ + staffMembers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): StoreCreditAccount + + """ + Returns a `SubscriptionBillingAttempt` resource by ID. + """ + subscriptionBillingAttempt( + """ + The ID of the `SubscriptionBillingAttempt` to return. + """ + id: ID! + ): SubscriptionBillingAttempt + + """ + Returns subscription billing attempts on a store. + """ + subscriptionBillingAttempts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + The last `n` 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! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + ): 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! + ): SubscriptionDraft + + """ + Access to Shopify's [standardized product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) + for categorizing products. The [`Taxonomy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Taxonomy) + organizes products into a hierarchical tree structure with categories, + attributes, and values. + + Query categories using search terms, or navigate the hierarchy by requesting + children, siblings, or descendants of specific categories. Each [`TaxonomyCategory`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyCategory) + includes its position in the tree, parent-child relationships, and associated + attributes for that product category. + """ + taxonomy: Taxonomy + + """ + Transactions representing a movement of money between customers and the shop. + Each transaction records the amount, payment method, processing details, and the associated + [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). + + Positive amounts indicate customer payments to the merchant. Negative amounts + represent refunds from the merchant to the customer. Use the [`query`](https://shopify.dev/docs/api/admin-graphql/latest/queries/tenderTransactions#arguments-query) + parameter to filter transactions by attributes such as transaction ID, + processing date, and point-of-sale device ID. + """ + tenderTransactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + ): OnlineStoreTheme + + """ + Returns a paginated list of [`OnlineStoreTheme`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme) + objects for the online store. Themes control the appearance and layout of the storefront. + + You can filter themes by [`role`](https://shopify.dev/docs/api/admin-graphql/latest/queries/themes#arguments-roles) + to find specific theme types, such as `MAIN` for the published theme and + `UNPUBLISHED` for draft themes. + """ + themes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Retrieves a resource that has translatable fields. Returns the resource's [`Translation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Translation) + objects for different locales and markets, along with the original [`TranslatableContent`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableContent) + and digest values needed to register new translations. Provides access to + existing translations, translatable content with digest hashes for translation + registration, and nested translatable resources like [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) objects or [`Metafield`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield) objects. + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translatableResource( + """ + Find a translatable resource by ID. + """ + resourceId: ID! + ): TranslatableResource + + """ + Returns a paginated list of [`TranslatableResource`](https://shopify.dev/docs/api/admin-graphql/latest/objects/TranslatableResource) + objects for a specific resource type. Each resource provides translatable + content and digest values needed for the [`translationsRegister`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/translationsRegister) mutation. + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + + Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). + """ + translatableResources( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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! + + """ + 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!]! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): TranslatableResourceConnection! + + """ + Returns a `UrlRedirect` resource by ID. + """ + urlRedirect( + """ + The ID of the `UrlRedirect` to return. + """ + id: ID! + ): UrlRedirect + + """ + Returns a `UrlRedirectImport` resource by ID. + """ + urlRedirectImport( + """ + The ID of the `UrlRedirectImport` to return. + """ + id: ID! + ): UrlRedirectImport + + """ + A list of the shop's URL redirect saved searches. + """ + urlRedirectSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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! + + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + ): Count + + """ + Validation available on the shop. + """ + validation( + """ + The ID of the validation. + """ + id: ID! + ): Validation + + """ + 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! + + """ + Returns a + [web pixel](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by ID. + """ + webPixel( + """ + The ID of the `WebPixel` object to return. + """ + id: ID + ): WebPixel + + """ + The web presences for the shop. + """ + webPresences( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + Returns a webhook subscription by ID. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscription( + """ + The ID of the `WebhookSubscription` to return. + """ + id: ID! + ): WebhookSubscription + + """ + Retrieves a paginated list of webhook subscriptions created using the API for the current app and shop. + + > Note: Returns only shop-scoped subscriptions, not app-scoped subscriptions configured in TOML files. + + Subscription details include event topics, endpoint URIs, filtering rules, + field inclusion settings, and metafield namespace permissions. Results support + cursor-based pagination that you can filter by topic, format, or custom search criteria. + + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscriptions( + """ + The elements that come after the specified [cursor](https://shopify.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 { + """ + 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: 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! +} + +""" +An agreement between the merchant and customer to refund all or a portion of the order. +""" +type RefundAgreement implements SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The refund associated with the agreement. + """ + refund: Refund! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundEdge!]! + + """ + A list of nodes that are contained in RefundEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Refund!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `refundCreate` mutation. +""" +type RefundCreatePayload { + """ + The order associated with the created refund. + """ + order: Order + + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Represents a refunded duty. +""" +type RefundDuty { + """ + The amount of a refunded duty in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The duty associated with this refunded duty. + """ + originalDuty: Duty +} + +""" +The input fields required to reimburse duties on a refund. +""" +input RefundDutyInput { + """ + The ID of the duty in the refund. + """ + dutyId: ID! + + """ + The type of refund for this duty. + """ + refundType: RefundDutyRefundType +} + +""" +The type of refund to perform for a particular refund duty. +""" +enum RefundDutyRefundType { + """ + The duty is 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 { + """ + The position 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 { + """ + 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! + + """ + 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 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 { + """ + A globally-unique ID. + """ + id: ID + + """ + The `LineItem` resource associated to the refunded line item. + """ + lineItem: LineItem! + + """ + The inventory restock location. + """ + location: Location + + """ + The price of a refunded line item. + """ + price: Money! @deprecated(reason: "Use `priceSet` instead.") + + """ + The price of a refunded line item in shop and presentment currencies. + """ + priceSet: MoneyBag! + + """ + The quantity of a refunded line item. + """ + quantity: Int! + + """ + The type of restock for the refunded line item. + """ + restockType: RefundLineItemRestockType! + + """ + Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund. + """ + restocked: Boolean! + + """ + The subtotal price of a refunded line item. + """ + subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") + + """ + The subtotal price of a refunded line item in shop and presentment currencies. + """ + subtotalSet: MoneyBag! + + """ + The total tax charged on a refunded line item. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax charged on a refunded line item in shop and presentment currencies. + """ + totalTaxSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundLineItems. +""" +type RefundLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundLineItemEdge!]! + + """ + A list of nodes that are contained in RefundLineItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [RefundLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundLineItem and a cursor during pagination. +""" +type RefundLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundLineItemEdge. + """ + node: RefundLineItem! +} + +""" +The input fields required to reimburse line items on a refund. +""" +input RefundLineItemInput { + """ + The ID of the line item in the refund. + """ + lineItemId: ID! + + """ + The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. + """ + locationId: ID + + """ + 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 { + """ + 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 { + """ + The refund is to original payment methods. + """ + ORIGINAL_PAYMENT_METHODS + + """ + The refund is to store credit. + """ + STORE_CREDIT +} + +""" +The input fields for processing the financial outcome of a refund. +""" +input RefundMethodInput @oneOf { + """ + The details of the refund to store credit. + """ + storeCreditRefund: StoreCreditRefundInput +} + +""" +The financial transfer details for a return outcome that results in a refund. +""" +type RefundReturnOutcome { + """ + The total monetary value to be refunded in shop and presentment currencies. + """ + amount: MoneyBag! + + """ + A list of suggested refund methods. + """ + suggestedRefundMethods: [SuggestedRefundMethod!]! + + """ + A list of suggested order transactions. + """ + suggestedTransactions: [SuggestedOrderTransaction!]! +} + +""" +The input fields for the shipping cost to refund. +""" +input RefundShippingInput { + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The `ShippingLine` resource associated to the refunded shipping line item. + """ + shippingLine: ShippingLine! + + """ + The subtotal amount of the refund shipping line in shop and presentment currencies. + """ + subtotalAmountSet: MoneyBag! + + """ + The tax amount of the refund shipping line in shop and presentment currencies. + """ + taxAmountSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundShippingLines. +""" +type RefundShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundShippingLineEdge!]! + + """ + A list of nodes that are contained in RefundShippingLineEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [RefundShippingLine!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundShippingLine and a cursor during pagination. +""" +type RefundShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of RefundShippingLineEdge. + """ + node: RefundShippingLine! +} + +""" +A condition checking the visitor's region. +""" +type RegionsCondition { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The regions that comprise the market. + """ + regions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 Authorize.net customer payment profile. +""" +input RemoteAuthorizeNetCustomerPaymentProfileInput { + """ + The customerPaymentProfileId value from the Authorize.net API. Starting on 2025, + customer_payment_profile_id will become mandatory for all API versions. + """ + customerPaymentProfileId: String + + """ + The customerProfileId value from the Authorize.net API. + """ + customerProfileId: String! +} + +""" +The input fields for a remote Braintree customer payment profile. +""" +input RemoteBraintreePaymentMethodInput { + """ + The `customer_id` value from the Braintree API. + """ + customerId: String! + + """ + The `payment_method_token` value from the Braintree API. Starting on 2025, + payment_method_token will become mandatory for all API versions. + """ + paymentMethodToken: String +} + +""" +The input fields for a remote stripe payment method. +""" +input RemoteStripePaymentMethodInput { + """ + The customer_id value from the Stripe API. + """ + customerId: String! + + """ + The payment_method_id value from the Stripe API. Starting on 2025, + payment_method_id will become mandatory for all API versions. + """ + paymentMethodId: String +} + +""" +Return type for `removeFromReturn` mutation. +""" +type RemoveFromReturnPayload { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The resolved price inclusivity attributes. +""" +type ResolvedPriceInclusivity { + """ + Whether duties are included in the price. + """ + dutiesIncluded: Boolean! + + """ + Whether taxes are included in the price. + """ + taxesIncluded: Boolean! +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +resource, with 1 or more actions to take. For example, you could use an alert to +indicate that you're not charging taxes on some product variants. +They can optionally have a specific icon and be dismissed by merchants. +""" +type ResourceAlert { + """ + Buttons in the alert that link to related information. + For example, _Edit variants_. + """ + actions: [ResourceAlertAction!]! + + """ + The secondary text in the alert that includes further information or instructions about how to solve a problem. + """ + content: HTML! + + """ + Unique identifier that appears when an alert is manually closed by the merchant. + Most alerts can't be manually closed. + """ + dismissibleHandle: String + + """ + An icon that's optionally displayed with the alert. + """ + icon: ResourceAlertIcon + + """ + Indication of how important the alert is. + """ + severity: ResourceAlertSeverity! + + """ + The primary text in the alert that includes information or describes the problem. + """ + title: String! +} + +""" +An action associated to a resource alert, such as editing variants. +""" +type ResourceAlertAction { + """ + Whether the action appears as a button or as a link. + """ + primary: Boolean! + + """ + Resource for the action to show. + """ + show: String + + """ + The text for the button in the alert. For example, _Edit variants_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +The available icons for resource alerts. +""" +enum ResourceAlertIcon { + """ + A checkmark inside a circle. + """ + CHECKMARK_CIRCLE + + """ + A lowercase `i` inside a circle. + """ + INFORMATION_CIRCLE +} + +""" +The possible severity levels for a resource alert. +""" +enum ResourceAlertSeverity { + """ + Indicates a 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 { + """ + Feedback from an app about the steps a merchant needs to take to set up the app on their store. + """ + appFeedback: [AppFeedback!]! @deprecated(reason: "Use `details` instead.") + + """ + List of AppFeedback detailing issues regarding a resource. + """ + details: [AppFeedback!]! + + """ + Summary of resource feedback pertaining to the resource. + """ + summary: String! +} + +""" +The input fields for a resource feedback object. +""" +input ResourceFeedbackCreateInput { + """ + The date and time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + If the feedback state is `requires_action`, then you can send a string message + that communicates the action to be taken by the merchant. + The string must be a single message up to 100 characters long and must end with a period. + You need to adhere to the message formatting rules or your requests will fail: + - `[Explanation of the problem]. [Suggested action].` + + **Examples:** + - `[Your app name]` isn't connected. Connect your account to use this sales channel. `[Learn more]` + - `[Your app name]` isn't configured. Agree to the terms and conditions to use this app. `[Learn more]` + Both `Your app name` and `Learn more` (a button which directs merchants to + your app) are automatically populated in the Shopify admin. + """ + messages: [String!] + + """ + The state of the feedback and whether it requires merchant action. + """ + state: ResourceFeedbackState! +} + +""" +The state of the resource feedback. +""" +enum ResourceFeedbackState { + """ + No action required from merchant. + """ + ACCEPTED + + """ + The merchant needs to resolve an issue with the resource. + """ + REQUIRES_ACTION +} + +""" +Represents a merchandising background operation interface. +""" +interface ResourceOperation { + """ + A globally-unique ID. + """ + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """ + Represents a rows objects within this background operation. + """ + rowCount: RowCount + + """ + The status of this operation. + """ + status: ResourceOperationStatus! +} + +""" +Represents the state of this catalog operation. +""" +enum ResourceOperationStatus { + """ + Operation 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 { + """ + The channel the resource publication is published to. + """ + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. + If false, then the resource publication is neither published nor scheduled to be published. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + If the product isn't published, then this field returns an epoch timestamp. + """ + publishDate: DateTime! + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublications. +""" +type ResourcePublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationEdge!]! + + """ + A list of nodes that are contained in ResourcePublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublication and a cursor during pagination. +""" +type ResourcePublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationEdge. + """ + node: ResourcePublication! +} + +""" +A resource publication represents information about the publication of a resource. +Unlike `ResourcePublication`, an instance of `ResourcePublicationV2` can't be +unpublished. It must either be published or scheduled to be published. + +See [ResourcePublication](/api/admin-graphql/latest/objects/ResourcePublication) for more context. +""" +type ResourcePublicationV2 { + """ + Whether the resource publication is published. If true, then the resource publication is published to the publication. + If false, then the resource publication is staged to be published to the publication. + """ + isPublished: Boolean! + + """ + The publication the resource publication is published to. + """ + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + """ + publishDate: DateTime + + """ + The resource published to the publication. + """ + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublicationV2s. +""" +type ResourcePublicationV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationV2Edge!]! + + """ + A list of nodes that are contained in ResourcePublicationV2Edge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublicationV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination. +""" +type ResourcePublicationV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ResourcePublicationV2Edge. + """ + node: ResourcePublicationV2! +} + +""" +A restocking fee is a fee captured as part of a return to cover the costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type RestockingFee implements Fee { + """ + The amount of the restocking fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! + + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +The input fields for a restocking fee. +""" +input RestockingFeeInput { + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +Information about product is restricted for a given resource. +""" +type RestrictedForResource { + """ + Returns true when the product is restricted for the given resource. + """ + restricted: Boolean! + + """ + Restriction reason for the given resource. + """ + restrictedReason: String! +} + +""" +The `Return` object represents the intent of a buyer to ship one or more items from an order back to a merchant +or a third-party fulfillment location. A return is associated with an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). +Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), +which indicates the state of the return. + +Use the `Return` object to capture the financial, logistical, +and business intent of a return. For example, you can identify eligible items for a return and issue customers +a refund for returned items on behalf of the merchant. + +Learn more about providing a +[return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) +for merchants. You can also manage [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges), +[reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), +and [reverse deliveries](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) +on behalf of merchants. +""" +type Return implements Node { + """ + The date and time when the return was closed. + """ + closedAt: DateTime + + """ + The date and time when the return was created. + """ + createdAt: DateTime! + + """ + Additional information about the declined return. + """ + decline: ReturnDecline + + """ + The exchange line items attached to the return. + """ + exchangeLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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 + ): ReturnLineItemTypeConnection! + + """ + 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 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 + ): SuggestedReturnFinancialOutcome + + """ + A suggested refund for the return. + """ + suggestedRefund( + """ + 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 { + """ + 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 { + """ + The ID of the return that's being approved. + """ + id: ID! + + """ + Notify the customer when a return request is approved. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false + + """ + When `true` the return will be created in an unprocessed state; returns must + subsequently be processed via Return Processing APIs in order to take further + action on them. Creating returns in an unprocessed state will soon be the + default behavior. After July 1st, 2025, this field is only available to + merchants who have created exchanges or returns with fees using API up that + date. It will be ignored otherwise. + """ + unprocessed: Boolean = false @deprecated(reason: "This field is temporary to support the transition to Returns Processing APIs.") +} + +""" +Return type for `returnApproveRequest` mutation. +""" +type ReturnApproveRequestPayload { + """ + The approved return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnCancel` mutation. +""" +type ReturnCancelPayload { + """ + The canceled return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnClose` mutation. +""" +type ReturnClosePayload { + """ + The closed return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type for paginating through multiple Returns. +""" +type ReturnConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnEdge!]! + + """ + A list of nodes that are contained in ReturnEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Return!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `returnCreate` mutation. +""" +type ReturnCreatePayload { + """ + The created return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Additional information about why a merchant declined the customer's return request. +""" +type ReturnDecline { + """ + The notification message sent to the customer about their declined return request. + Maximum length: 500 characters. + """ + note: String + + """ + The reason the customer's return request was declined. + """ + reason: ReturnDeclineReason! +} + +""" +The reason why the merchant declined a customer's return request. +""" +enum ReturnDeclineReason { + """ + The return 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 { + """ + 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! + + """ + 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 { + """ + The declined return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type which holds one Return and a cursor during pagination. +""" +type ReturnEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnEdge. + """ + node: Return! +} + +""" +Possible error codes that can be returned by `ReturnUserError`. +""" +enum ReturnErrorCode { + """ + 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 { + """ + 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! + + """ + 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 { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + The fulfillment line item from which items are returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity that can be processed. + """ + processableQuantity: Int! + + """ + The quantity that has been processed. + """ + processedQuantity: Int! + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The quantity that can be refunded. + """ + refundableQuantity: Int! + + """ + The quantity that was refunded. + """ + refundedQuantity: Int! + + """ + The restocking fee for the return line item. + """ + restockingFee: RestockingFee + + """ + The reason for returning the item. + """ + returnReason: ReturnReason! @deprecated(reason: "Use `returnReasonDefinition` instead. This field will be removed in the future.") + + """ + The standardized reason for why the item is being returned. + """ + returnReasonDefinition: ReturnReasonDefinition + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The total weight of the item. + """ + totalWeight: Weight + + """ + The quantity that has't been processed. + """ + unprocessedQuantity: Int! + + """ + The total line price after all discounts on the line item, including both line + item level discounts and code-based line item discounts, are applied. + """ + withCodeDiscountedTotalPriceSet: MoneyBag! +} + +""" +The input fields for a return line item. +""" +input ReturnLineItemInput { + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """ + 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 + + """ + 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 { + """ + The quantity of the associated return line item to be removed. + """ + quantity: Int! + + """ + The ID of the return line item to remove. + """ + returnLineItemId: ID! +} + +""" +Return type for `returnLineItemRemoveFromReturn` mutation. +""" +type ReturnLineItemRemoveFromReturnPayload { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return line item of any type. +""" +interface ReturnLineItemType implements Node { + """ + A note from the customer that describes the item to be returned. Maximum length: 300 characters. + """ + customerNote: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The quantity that can be processed. + """ + processableQuantity: Int! + + """ + The quantity that has been processed. + """ + processedQuantity: Int! + + """ + The quantity being returned. + """ + quantity: Int! + + """ + The quantity that can be refunded. + """ + refundableQuantity: Int! + + """ + The quantity that was refunded. + """ + refundedQuantity: Int! + + """ + The reason for returning the item. + """ + returnReason: ReturnReason! @deprecated(reason: "Use `returnReasonDefinition` instead. This field will be removed in the future.") + + """ + The standardized reason for why the item is being returned. + """ + returnReasonDefinition: ReturnReasonDefinition + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """ + The quantity that has't been processed. + """ + unprocessedQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnLineItemTypes. +""" +type ReturnLineItemTypeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnLineItemTypeEdge!]! + + """ + A list of nodes that are contained in ReturnLineItemTypeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReturnLineItemType!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnLineItemType and a cursor during pagination. +""" +type ReturnLineItemTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnLineItemTypeEdge. + """ + node: ReturnLineItemType! +} + +""" +The financial transfer details for the return outcome. +""" +union ReturnOutcomeFinancialTransfer = InvoiceReturnOutcome | RefundReturnOutcome + +""" +The input fields for an exchange line item. +""" +input ReturnProcessExchangeLineItemInput { + """ + The ID of the exchange line item. + """ + id: ID! + + """ + The quantity of the exchange line item. + """ + quantity: Int! +} + +""" +The input fields for the financial transfer for the return. +""" +input ReturnProcessFinancialTransferInput @oneOf { + """ + Issue a refund for the return. + """ + issueRefund: ReturnProcessRefundInput +} + +""" +The input fields for processing a return. +""" +input ReturnProcessInput { + """ + The 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! + + """ + The return line items list to be handled. + """ + returnLineItems: [ReturnProcessReturnLineItemInput!] = [] + + """ + ID of the tip line item. + """ + tipLineId: ID +} + +""" +Return type for `returnProcess` mutation. +""" +type ReturnProcessPayload { + """ + The processed return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for the refund for the return. +""" +input ReturnProcessRefundInput { + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false + + """ + The order transactions for the refund. + """ + orderTransactions: [ReturnRefundOrderTransactionInput!]! + + """ + A list of instructions to process the financial outcome of the refund. + """ + refundMethods: [RefundMethodInput!] = [] +} + +""" +The input fields for a return line item. +""" +input ReturnProcessReturnLineItemInput { + """ + The dispositions for the return line item. + """ + dispositions: [ReverseFulfillmentOrderDisposeInput!] + + """ + The ID of the return line item. + """ + id: ID! + + """ + The quantity of the return line item. + """ + quantity: Int! +} + +""" +Filter line items based on processing status. +""" +enum ReturnProcessingStatusFilterInput { + """ + 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 { + """ + 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 { + """ + Whether the return reason has been removed from taxonomy. + + Deleted reasons should not be presented to customers when creating new returns, but may still + appear on existing returns that were created before the reason was deleted. This field enables + graceful deprecation of return reasons without breaking historical data. + """ + deleted: Boolean! + + """ + A unique, human-readable, stable identifier for the return reason. + + Example values include "arrived-late", "comfort", "too-tight", "color-too-bright", and "quality". + The handle remains consistent across API versions and localizations, making it suitable for programmatic use. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The localized, user-facing name of the return reason. + + This field returns the reason name in the requested locale, automatically falling back to + English if no translation is available. Use this field when displaying return reasons to + customers or merchants. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple ReturnReasonDefinitions. +""" +type ReturnReasonDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnReasonDefinitionEdge!]! + + """ + A list of nodes that are contained in ReturnReasonDefinitionEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReturnReasonDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnReasonDefinition and a cursor during pagination. +""" +type ReturnReasonDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnReasonDefinitionEdge. + """ + node: ReturnReasonDefinition! +} + +""" +The set of valid sort keys for the ReturnReasonDefinition query. +""" +enum ReturnReasonDefinitionSortKeys { + """ + Sort by the `handle` value. + """ + HANDLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The input fields to refund a return. +""" +input ReturnRefundInput { + """ + 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! + + """ + A list of return line items to refund. + """ + returnRefundLineItems: [ReturnRefundLineItemInput!]! +} + +""" +The input fields for a return refund line item. +""" +input ReturnRefundLineItemInput { + """ + The quantity of the return line item to be refunded. + """ + quantity: Int! + + """ + The ID of the return line item to be refunded. + """ + returnLineItemId: ID! +} + +""" +The input fields to create order transactions when refunding a return. +""" +input ReturnRefundOrderTransactionInput { + """ + The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. + """ + parentId: ID! + + """ + The amount of money for the transaction in the presentment currency of the order. + """ + transactionAmount: MoneyInput! +} + +""" +Return type for `returnRefund` mutation. +""" +type ReturnRefundPayload { + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnReopen` mutation. +""" +type ReturnReopenPayload { + """ + The reopened return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for requesting a return. +""" +input ReturnRequestInput { + """ + The ID of the order that's being returned. + """ + orderId: ID! + + """ + The line items that are being handled in the return. + """ + returnLineItems: [ReturnRequestLineItemInput!]! + + """ + The return shipping fee to capture. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for a return line item. +""" +input ReturnRequestLineItemInput { + """ + 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! + + """ + 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 +} + +""" +Return type for `returnRequest` mutation. +""" +type ReturnRequestPayload { + """ + The requested return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +A return shipping fee is a fee captured as part of a return to cover the costs of shipping the return. +""" +type ReturnShippingFee implements Fee { + """ + The amount of the return shipping fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +The input fields for a return shipping fee. +""" +input ReturnShippingFeeInput { + """ + The value of the fee as a fixed amount in the presentment currency of the order. + """ + amount: MoneyInput! +} + +""" +The status of a return. +""" +enum ReturnStatus { + """ + The return has been canceled. + """ + CANCELED + + """ + The return has been completed. + """ + CLOSED + + """ + The return 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 { + """ + The error code. + """ + code: ReturnErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +A delivered order that's eligible to be returned to the merchant. Provides the +items from completed fulfillments that customers can select when initiating a return. + +Use returnable fulfillments to determine which items are eligible for return +before creating a +[`Return`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) with the [`returnCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnCreate) +mutation. The line items show quantities that are available for return. + +Learn more about [building return management workflows](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management). +""" +type ReturnableFulfillment implements Node { + """ + The fulfillment that the returnable fulfillment refers to. + """ + fulfillment: Fulfillment! + + """ + The unique ID of the Returnable Fulfillment. + """ + id: ID! + + """ + The list of returnable fulfillment line items. + """ + returnableFulfillmentLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReturnableFulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillment and a cursor during pagination. +""" +type ReturnableFulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentEdge. + """ + node: ReturnableFulfillment! +} + +""" +A returnable fulfillment line item. +""" +type ReturnableFulfillmentLineItem { + """ + The fulfillment line item that can be returned. + """ + fulfillmentLineItem: FulfillmentLineItem! + + """ + The quantity available to be returned. + """ + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillmentLineItems. +""" +type ReturnableFulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReturnableFulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillmentLineItem and a cursor during pagination. +""" +type ReturnableFulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReturnableFulfillmentLineItemEdge. + """ + node: ReturnableFulfillmentLineItem! +} + +""" +A reverse delivery is a post-fulfillment object that represents a buyer sending a package to a merchant. +For example, a buyer requests a return, and a merchant sends the buyer a shipping label. +The reverse delivery contains the context of the items sent back, how they're being sent back +(for example, a shipping label), and the current state of the delivery (tracking information). +""" +type ReverseDelivery implements Node { + """ + The deliverable associated with the reverse delivery. + """ + deliverable: ReverseDeliveryDeliverable + + """ + The ID of the reverse delivery. + """ + id: ID! + + """ + The reverse delivery line items attached to the reverse delivery. + """ + reverseDeliveryLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReverseDelivery!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `reverseDeliveryCreateWithShipping` mutation. +""" +type ReverseDeliveryCreateWithShippingPayload { + """ + The created reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The delivery method and artifacts associated with a reverse delivery. +""" +union ReverseDeliveryDeliverable = ReverseDeliveryShippingDeliverable + +""" +An auto-generated type which holds one ReverseDelivery and a cursor during pagination. +""" +type ReverseDeliveryEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryEdge. + """ + node: ReverseDelivery! +} + +""" +The input fields for a reverse label. +""" +input ReverseDeliveryLabelInput { + """ + The URL of the label file. If a label file was uploaded to be attached to the + delivery, then provide the temporary staged URL. + """ + fileUrl: URL! +} + +""" +The return label file information for a reverse delivery. +""" +type ReverseDeliveryLabelV2 { + """ + The date and time when the reverse delivery label was created. + """ + createdAt: DateTime! + + """ + A public link that can be used to download the label image. + """ + publicFileUrl: URL + + """ + The date and time when the reverse delivery label was updated. + """ + updatedAt: DateTime! +} + +""" +The details about a reverse delivery line item. +""" +type ReverseDeliveryLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The expected number of units. + """ + quantity: Int! + + """ + The corresponding reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItem: ReverseFulfillmentOrderLineItem! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveryLineItems. +""" +type ReverseDeliveryLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseDeliveryLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseDeliveryLineItem and a cursor during pagination. +""" +type ReverseDeliveryLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseDeliveryLineItemEdge. + """ + node: ReverseDeliveryLineItem! +} + +""" +The input fields for a reverse delivery line item. +""" +input ReverseDeliveryLineItemInput { + """ + The quantity of the item to be included in the delivery. + """ + quantity: Int! + + """ + The ID of the related reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! +} + +""" +A reverse shipping deliverable that may include a label and tracking information. +""" +type ReverseDeliveryShippingDeliverable { + """ + The return label attached to the reverse delivery. + """ + label: ReverseDeliveryLabelV2 + + """ + The information to track the reverse delivery. + """ + tracking: ReverseDeliveryTrackingV2 +} + +""" +Return type for `reverseDeliveryShippingUpdate` mutation. +""" +type ReverseDeliveryShippingUpdatePayload { + """ + The updated reverse delivery. + """ + reverseDelivery: ReverseDelivery + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The input fields for tracking information about a return delivery. +""" +input ReverseDeliveryTrackingInput { + """ + The tracking number for the label. + """ + number: String + + """ + The tracking URL for the carrier. If the carrier isn't supported by Shopify, + then provide the tracking URL of the delivery. + """ + url: URL +} + +""" +Represents the information used to track a reverse delivery. +""" +type ReverseDeliveryTrackingV2 { + """ + The provider of the tracking information, in a human-readable format for display purposes. + """ + carrierName: String + + """ + The identifier used by the courier to identify the shipment. + """ + number: String + + """ + The URL to track a shipment. + """ + url: URL +} + +""" +A group of one or more items in a return that will be processed at a fulfillment service. +There can be more than one reverse fulfillment order for a return at a given location. +""" +type ReverseFulfillmentOrder implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of reverse fulfillment order line items for the reverse fulfillment order. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseFulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to dispose a reverse fulfillment order line item. +""" +input ReverseFulfillmentOrderDisposeInput { + """ + The 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 + + """ + The quantity of the reverse fulfillment order line item to dispose. + """ + quantity: Int! + + """ + The ID of the reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! +} + +""" +Return type for `reverseFulfillmentOrderDispose` mutation. +""" +type ReverseFulfillmentOrderDisposePayload { + """ + The disposed reverse fulfillment order line items. + """ + reverseFulfillmentOrderLineItems: [ReverseFulfillmentOrderLineItem!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The details of the arrangement of an item. +""" +type ReverseFulfillmentOrderDisposition implements Node { + """ + The date and time when the disposition was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location where the disposition occurred. + """ + location: Location + + """ + The number of disposed units. + """ + quantity: Int! + + """ + The final arrangement of an item. + """ + type: ReverseFulfillmentOrderDispositionType! +} + +""" +The final arrangement of an item from a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderDispositionType { + """ + An item that was 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderEdge. + """ + node: ReverseFulfillmentOrder! +} + +""" +The details about a reverse fulfillment order line item. +""" +type ReverseFulfillmentOrderLineItem implements Node { + """ + The dispositions of the item. + """ + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + The corresponding fulfillment line item for a reverse fulfillment order line item. + """ + fulfillmentLineItem: FulfillmentLineItem + + """ + A globally-unique ID. + """ + id: ID! + + """ + The total number of units to be processed. + """ + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrderLineItems. +""" +type ReverseFulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReverseFulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrderLineItem and a cursor during pagination. +""" +type ReverseFulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ReverseFulfillmentOrderLineItemEdge. + """ + node: ReverseFulfillmentOrderLineItem! +} + +""" +The status of a reverse fulfillment order. +""" +enum ReverseFulfillmentOrderStatus { + """ + The reverse fulfillment order has been canceled. + """ + CANCELED + + """ + The reverse fulfillment order has been completed. + """ + CLOSED + + """ + The reverse fulfillment order is in progress. + """ + OPEN +} + +""" +The third-party confirmation of a reverse fulfillment order. +""" +type ReverseFulfillmentOrderThirdPartyConfirmation { + """ + The status of the reverse fulfillment order third-party confirmation. + """ + status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! +} + +""" +The status of a reverse fulfillment order third-party confirmation. +""" +enum ReverseFulfillmentOrderThirdPartyConfirmationStatus { + """ + The reverse fulfillment order was accepted by the fulfillment service. + """ + ACCEPTED + + """ + The reverse fulfillment order cancelation was accepted by the fulfillment service. + """ + CANCEL_ACCEPTED + + """ + The reverse fulfillment order cancelation was rejected by the fulfillment service. + """ + CANCEL_REJECTED + + """ + The reverse fulfillment order is awaiting acceptance by the fulfillment service. + """ + PENDING_ACCEPTANCE + + """ + The reverse fulfillment order is awaiting cancelation by the fulfillment service. + """ + PENDING_CANCELATION + + """ + The reverse fulfillment order was rejected by the fulfillment service. + """ + REJECTED +} + +""" +List of possible values for a RiskAssessment result. +""" +enum RiskAssessmentResult { + """ + Indicates a high likelihood that the order is fraudulent. + """ + HIGH + + """ + Indicates a 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 { + """ + A description of the fact. + """ + description: String! + + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! +} + +""" +List of possible values for a RiskFact sentiment. +""" +enum RiskFactSentiment { + """ + A 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 { + """ + Estimated number of rows contained within this background operation. + """ + count: Int! + + """ + Whether the operation exceeds max number of reportable rows. + """ + exceedsMax: Boolean! +} + +""" +SEO information. +""" +type SEO { + """ + SEO Description. + """ + description: String + + """ + SEO Title. + """ + title: String +} + +""" +The input fields for SEO information. +""" +input SEOInput { + """ + SEO 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 { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +The possible order action types for a sale. +""" +enum SaleActionType { + """ + A purchase or charge. + """ + ORDER + + """ + A removal or return. + """ + RETURN + + """ + 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 { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the additional fee. + """ + name: String! + + """ + The price of the additional fee. + """ + price: MoneyBag! + + """ + A list of taxes charged on the additional fee. + """ + taxLines: [TaxLine!]! +} + +""" +An auto-generated type for paginating through multiple Sales. +""" +type SaleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SaleEdge!]! + + """ + A list of nodes that are contained in SaleEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Sale!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Sale and a cursor during pagination. +""" +type SaleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SaleEdge. + """ + node: Sale! +} + +""" +The possible line types for a sale record. One of the possible order line types +for a sale is an adjustment. Sales adjustments occur when a refund is issued for +a line item that is either more or less than the total value of the line item. +Examples are restocking fees and goodwill payments. When this happens, Shopify +produces a sales agreement with sale records for each line item that is returned +or refunded and an additional sale record for the adjustment (for example, a +restocking fee). The sales records for the returned or refunded items represent +the reversal of the original line item sale value. The additional adjustment +sale record represents the difference between the original total value of all +line items that were refunded, and the actual amount refunded. +""" +enum SaleLineType { + """ + 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 { + """ + The portion of the total tax amount on the related sale that comes from the associated tax line. + """ + amount: MoneyBag! + + """ + The unique ID for the sale tax. + """ + id: ID! + + """ + The tax line associated with the sale. + """ + taxLine: TaxLine! +} + +""" +A contract between a merchant and a customer to do business. Shopify creates a +sales agreement whenever an order is placed, edited, or refunded. A sales +agreement has one or more sales records, which provide itemized details about +the initial agreement or subsequent changes made to the order. For example, when +a customer places an order, Shopify creates the order, generates a sales +agreement, and records a sale for each line item purchased in the order. A sale +record is specific to a type of order line. Order lines can represent different +things such as a purchased product, a tip added by a customer, shipping costs +collected at checkout, and more. +""" +interface SalesAgreement { + """ + The application that created the agreement. + """ + app: App + + """ + The date and time at which the agreement occured. + """ + happenedAt: DateTime! + + """ + The unique ID for the agreement. + """ + id: ID! + + """ + The reason the agremeent was created. + """ + reason: OrderActionType! + + """ + The sales associated with the agreement. + """ + sales( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SalesAgreementEdge!]! + + """ + A list of nodes that are contained in SalesAgreementEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SalesAgreement!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SalesAgreement and a cursor during pagination. +""" +type SalesAgreementEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SalesAgreementEdge. + """ + node: SalesAgreement! +} + +""" +A representation of a search query in the Shopify admin used on resource index +views. Preserves complex queries with search terms and filters, enabling +merchants to quickly access frequently used data views. For example, a saved +search can be applied to the product index table to filter products. The query +string combines free-text search terms with structured filters to narrow results +based on resource attributes. + +The search applies to a specific resource type such as [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer), +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order), or [`Collection`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) objects. +""" +type SavedSearch implements LegacyInteroperability & Node { + """ + The filters of a saved search. + """ + filters: [SearchFilter!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The name of a saved search. + """ + name: String! + + """ + The query string of a saved search. This includes search terms and filters. + """ + query: String! + + """ + The type of resource this saved search is searching in. + """ + resourceType: SearchResultType! + + """ + The search terms of a saved search. + """ + searchTerms: String! +} + +""" +An auto-generated type for paginating through multiple SavedSearches. +""" +type SavedSearchConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SavedSearchEdge!]! + + """ + A list of nodes that are contained in SavedSearchEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SavedSearch!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields to create a saved search. +""" +input SavedSearchCreateInput { + """ + 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 { + """ + The saved search that was created. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to delete a saved search. +""" +input SavedSearchDeleteInput { + """ + ID of the saved search to delete. + """ + id: ID! +} + +""" +Return type for `savedSearchDelete` mutation. +""" +type SavedSearchDeletePayload { + """ + The ID of the saved search that was deleted. + """ + deletedSavedSearchId: ID + + """ + The shop of the saved search that was deleted. + """ + shop: Shop! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one SavedSearch and a cursor during pagination. +""" +type SavedSearchEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SavedSearchEdge. + """ + node: SavedSearch! +} + +""" +The input fields to update a saved search. +""" +input SavedSearchUpdateInput { + """ + ID of the saved search to update. + """ + id: ID! + + """ + A descriptive name of the saved search. + """ + name: String + + """ + The query string of a saved search. This included search terms and filters. + """ + query: String +} + +""" +Return type for `savedSearchUpdate` mutation. +""" +type SavedSearchUpdatePayload { + """ + The saved search that was updated. + """ + savedSearch: SavedSearch + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The set of valid sort keys for the ScheduledChange query. +""" +enum ScheduledChangeSortKeys { + """ + Sort by the `expected_at` value. + """ + EXPECTED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Script discount applications capture the intentions of a discount that +was created by a Shopify Script for an order's line item or shipping line. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + The description of the application as defined by the Script. + """ + description: String! @deprecated(reason: "Use `title` instead.") + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """ + How the discount amount is distributed on the discounted lines. + """ + targetSelection: DiscountApplicationTargetSelection! + + """ + Whether the discount is applied on line items or shipping lines. + """ + targetType: DiscountApplicationTargetType! + + """ + The title of the application as defined by the Script. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + +A script tag represents remote JavaScript code that is loaded into the pages of +a shop's storefront or the **Order status** page of checkout. +""" +type ScriptTag implements LegacyInteroperability & Node { + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script will be served as is. + """ + cache: Boolean! + + """ + The date and time when the script tag was created. + """ + createdAt: DateTime! + + """ + The page or pages on the online store that the script should be included. + """ + displayScope: ScriptTagDisplayScope! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The URL to the remote script. + """ + src: URL! + + """ + The date and time when the script tag was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple ScriptTags. +""" +type ScriptTagConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ScriptTagEdge!]! + + """ + A list of nodes that are contained in ScriptTagEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ScriptTag!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `scriptTagCreate` mutation. +""" +type ScriptTagCreatePayload { + """ + The script tag that was created. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `scriptTagDelete` mutation. +""" +type ScriptTagDeletePayload { + """ + The ID of the deleted script tag. + """ + deletedScriptTagId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The page or pages on the online store where the script should be included. +""" +enum ScriptTagDisplayScope { + """ + Include the script on both the web storefront and the Order status page. + """ + ALL @deprecated(reason: "`ALL` is deprecated. Use `ONLINE_STORE` instead.\n") + + """ + Include the script only on the 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 { + """ + The position 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 { + """ + 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 { + """ + The script tag that was updated. + """ + scriptTag: ScriptTag + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter in a search query represented by a key value pair. +""" +type SearchFilter { + """ + The key of the search filter. + """ + key: String! + + """ + The value of the search filter. + """ + value: String! +} + +""" +A list of search filters along with their specific options in value and label pair for filtering. +""" +type SearchFilterOptions { + """ + A list of options that can be use to filter product availability. + """ + productAvailability: [FilterOption!]! +} + +""" +Represents an individual result returned from a search. +""" +type SearchResult { + """ + Returns the search result description text. + """ + description: String + + """ + Returns the Image resource presented to accompany a search result. + """ + image: Image + + """ + Returns the resource represented by the search result. + """ + reference: Node! + + """ + Returns the resource title. + """ + title: String! + + """ + Returns the absolute URL to the resource in the search result. + """ + url: URL! +} + +""" +The connection type for SearchResult. +""" +type SearchResultConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SearchResultEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + resultsAfterCount: Int! @deprecated(reason: "The provided information is not accurate.") +} + +""" +An auto-generated type which holds one SearchResult and a cursor during pagination. +""" +type SearchResultEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SearchResultEdge. + """ + node: SearchResult! +} + +""" +Specifies the type of resources to be returned from a search. +""" +enum SearchResultType { + """ + 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 + 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 { + """ + The date and time when the segment was added to the store. + """ + creationDate: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date and time when the segment was last updated. + """ + lastEditDate: DateTime! + + """ + The name of the segment. + """ + name: String! + + """ + A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers. + """ + query: String! +} + +""" +A filter that takes a value that's associated with an object. For example, the +`tags` field is associated with the +[`Customer`](/api/admin-graphql/latest/objects/Customer) object. +""" +type SegmentAssociationFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The statistics of a given attribute. +""" +type SegmentAttributeStatistics { + """ + The average of a given attribute. + """ + average: Float! + + """ + The sum of a given attribute. + """ + sum: Float! +} + +""" +A filter with a Boolean value that's been added to a segment query. +""" +type SegmentBooleanFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple Segments. +""" +type SegmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentEdge!]! + + """ + A list of nodes that are contained in SegmentEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Segment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `segmentCreate` mutation. +""" +type SegmentCreatePayload { + """ + The newly created segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A filter with a date value that's been added to a segment query. +""" +type SegmentDateFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentDelete` mutation. +""" +type SegmentDeletePayload { + """ + ID of the deleted segment. + """ + deletedSegmentId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Segment and a cursor during pagination. +""" +type SegmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentEdge. + """ + node: Segment! +} + +""" +Categorical filter options for building customer segments using predefined value +sets like countries, subscription statuses, or order frequencies. + +For example, a "Customer Location" enum filter provides options like "United States," "Canada," and "United Kingdom." + +Use this object to: +- Access available categorical filter options +- Understand filter capabilities and constraints +- Build user interfaces for segment creation + +Includes localized display names, indicates whether multiple values can be +selected, and provides technical query names for API operations. +""" +type SegmentEnumFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter that's used to segment customers based on the date that an event +occured. For example, the `product_bought` event filter allows you to segment +customers based on what products they've bought. +""" +type SegmentEventFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The parameters for an event segment filter. + """ + parameters: [SegmentEventFilterParameter!]! + + """ + The query name of the filter. + """ + queryName: String! + + """ + The return value type for an event segment filter. + """ + returnValueType: String! +} + +""" +The parameters for an event segment filter. +""" +type SegmentEventFilterParameter { + """ + Whether the parameter accepts a list of values. + """ + acceptsMultipleValues: Boolean! + + """ + The localized description of the parameter. + """ + localizedDescription: String! + + """ + The localized name of the parameter. + """ + localizedName: String! + + """ + The parameter maximum value range. + """ + maxRange: Float + + """ + The parameter minimum value range. + """ + minRange: Float + + """ + Whether the parameter is optional. + """ + optional: Boolean! + + """ + The type of the parameter. + """ + parameterType: String! + + """ + The query name of the parameter. + """ + queryName: String! +} + +""" +The filters used in segment queries associated with a shop. +""" +interface SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentFilters. +""" +type SegmentFilterConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentFilterEdge!]! + + """ + A list of nodes that are contained in SegmentFilterEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentFilter!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentFilter and a cursor during pagination. +""" +type SegmentFilterEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentFilterEdge. + """ + node: SegmentFilter! +} + +""" +A filter with a double-precision, floating-point value that's been added to a segment query. +""" +type SegmentFloatFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + The maximum range a filter can have. + """ + maxRange: Float + + """ + The minimum range a filter can have. + """ + minRange: Float + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +A filter with an integer that's been added to a segment query. +""" +type SegmentIntegerFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + The maximum range a filter can have. + """ + maxRange: Float + + """ + The minimum range a filter can have. + """ + minRange: Float + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +The response type for the `segmentMembership` object. +""" +type SegmentMembership { + """ + A Boolean that indicates whether or not the customer in the query is a member + of the segment, which is identified using the `segmentId`. + """ + isMember: Boolean! + + """ + A `segmentId` that's used for testing membership. + """ + segmentId: ID! +} + +""" +A list of maps that contain `segmentId` IDs and `isMember` Booleans. The maps represent segment memberships. +""" +type SegmentMembershipResponse { + """ + The membership status for the given list of segments. + """ + memberships: [SegmentMembership!]! +} + +""" +A segment and its corresponding saved search. +For example, you can use `SegmentMigration` to retrieve the segment ID that corresponds to a saved search ID. +""" +type SegmentMigration { + """ + A globally-unique ID. + """ + id: ID! + + """ + The ID of the saved search. + """ + savedSearchId: ID! + + """ + The ID of the segment. + """ + segmentId: ID +} + +""" +An auto-generated type for paginating through multiple SegmentMigrations. +""" +type SegmentMigrationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentMigrationEdge!]! + + """ + A list of nodes that are contained in SegmentMigrationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentMigration!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentMigration and a cursor during pagination. +""" +type SegmentMigrationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentMigrationEdge. + """ + node: SegmentMigration! +} + +""" +The set of valid sort keys for the Segment query. +""" +enum SegmentSortKeys { + """ + Sort by the `creation_date` value. + """ + CREATION_DATE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `last_edit_date` value. + """ + LAST_EDIT_DATE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The statistics of a given segment. +""" +type SegmentStatistics { + """ + The statistics of a given attribute. + """ + attributeStatistics( + """ + The attribute that statistics are retrieved for. + """ + attributeName: String! + ): SegmentAttributeStatistics! +} + +""" +A filter with a string that's been added to a segment query. +""" +type SegmentStringFilter implements SegmentFilter { + """ + The localized name of the filter. + """ + localizedName: String! + + """ + Whether a file can have multiple values for a single customer. + """ + multiValue: Boolean! + + """ + The query name of the filter. + """ + queryName: String! +} + +""" +Return type for `segmentUpdate` mutation. +""" +type SegmentUpdatePayload { + """ + The updated segment. + """ + segment: Segment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A list of suggested values associated with an individual segment. A +segment is a group of members, such as customers, that meet specific +criteria. +""" +type SegmentValue { + """ + The localized version of the value's name. This name is displayed to the merchant. + """ + localizedValue: String! + + """ + The name of the query associated with the suggestion. + """ + queryName: String! +} + +""" +An auto-generated type for paginating through multiple SegmentValues. +""" +type SegmentValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentValueEdge!]! + + """ + A list of nodes that are contained in SegmentValueEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentValue!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentValue and a cursor during pagination. +""" +type SegmentValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SegmentValueEdge. + """ + node: SegmentValue! +} + +""" +Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors. +""" +type SelectedOption { + """ + The product option’s name. + """ + name: String! + + """ + The product option’s value object. + """ + optionValue: ProductOptionValue! + + """ + The product option’s value. + """ + value: String! +} + +""" +The input fields for the selected variant option of the combined listing. +""" +input SelectedVariantOptionInput { + """ + The 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 { + """ + 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! + + """ + A customer-facing description of the selling plan. + + If your store supports multiple currencies, then don't include + country-specific pricing content, such as "Buy monthly, get 10$ CAD off". This + field won't be converted to reflect different currencies. + """ + name: String! + + """ + The values of all options available on the selling plan. Selling plans are + grouped together in Liquid when they're created by the same app, and have the + same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + Relative position of the selling plan for display. A lower position will be displayed before a higher position. + """ + position: Int + + """ + Selling plan pricing details. + """ + pricingPolicies: [SellingPlanPricingPolicy!]! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Specifies the date when delivery or fulfillment is completed by a merchant for a given time cycle. You can also +define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who +start their subscription inside the cutoff period. + +Some example scenarios where anchors can be useful to implement advanced delivery behavior: +- A merchant starts fulfillment on a specific date every month. +- A merchant wants to bill the 1st of every quarter. +- A customer expects their delivery every Tuesday. + +For more details, see [About Selling Plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors). +""" +type SellingPlanAnchor { + """ + The cutoff day for the anchor. Specifies a buffer period before the anchor date for orders to be included in a + delivery or fulfillment cycle. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + """ + cutoffDay: Int + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int! + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType! +} + +""" +The input fields required to create or update a selling plan anchor. +""" +input SellingPlanAnchorInput { + """ + 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 { + """ + 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 = SellingPlanFixedBillingPolicy | SellingPlanRecurringBillingPolicy + +""" +The input fields that are required to create or update a billing policy type. +""" +input SellingPlanBillingPolicyInput { + """ + The fixed billing policy details. + """ + fixed: SellingPlanFixedBillingPolicyInput + + """ + The recurring billing policy details. + """ + recurring: SellingPlanRecurringBillingPolicyInput +} + +""" +The category of the selling plan. For the `OTHER` category, + you must fill out our [request form](https://docs.google.com/forms/d/e/1FAIpQLSeU18Xmw0Q61V8wdH-dfGafFqIBfRchQKUO8WAF3yJTvgyyZQ/viewform), + where we'll review your request for a new purchase option. +""" +enum SellingPlanCategory { + """ + The selling plan is for anything not in one of the other categories. + """ + OTHER + + """ + The selling plan is for pre-orders. + """ + PRE_ORDER + + """ + The selling plan is for subscriptions. + """ + SUBSCRIPTION + + """ + The selling plan is for try before you buy purchases. + """ + TRY_BEFORE_YOU_BUY +} + +""" +The amount charged at checkout when the full amount isn't charged at checkout. +""" +type SellingPlanCheckoutCharge { + """ + The charge type for the checkout charge. + """ + type: SellingPlanCheckoutChargeType! + + """ + The charge value for the checkout charge. + """ + value: SellingPlanCheckoutChargeValue! +} + +""" +The input fields that are required to create or update a checkout charge. +""" +input SellingPlanCheckoutChargeInput { + """ + The checkout charge type defined by the policy. + """ + type: SellingPlanCheckoutChargeType + + """ + The checkout charge value defined by the policy. + """ + value: SellingPlanCheckoutChargeValueInput +} + +""" +The percentage value of the price used for checkout charge. +""" +type SellingPlanCheckoutChargePercentageValue { + """ + The percentage value of the price used for checkout charge. + """ + percentage: Float! +} + +""" +The checkout charge when the full amount isn't charged at checkout. +""" +enum SellingPlanCheckoutChargeType { + """ + The checkout charge is a percentage of the product or variant price. + """ + PERCENTAGE + + """ + The checkout charge is a fixed price amount. + """ + PRICE +} + +""" +The portion of the price to be charged at checkout. +""" +union SellingPlanCheckoutChargeValue = MoneyV2 | SellingPlanCheckoutChargePercentageValue + +""" +The input fields required to create or update an checkout charge value. +""" +input SellingPlanCheckoutChargeValueInput { + """ + The fixed value for an checkout charge. + """ + fixedValue: Decimal + + """ + The percentage value. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple SellingPlans. +""" +type SellingPlanConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanEdge!]! + + """ + A list of nodes that are contained in SellingPlanEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlan!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver +every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, +pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanDeliveryPolicy = SellingPlanFixedDeliveryPolicy | SellingPlanRecurringDeliveryPolicy + +""" +The input fields that are required to create or update a delivery policy. +""" +input SellingPlanDeliveryPolicyInput { + """ + The fixed delivery policy details. + """ + fixed: SellingPlanFixedDeliveryPolicyInput + + """ + The recurring delivery policy details. + """ + recurring: SellingPlanRecurringDeliveryPolicyInput +} + +""" +An auto-generated type which holds one SellingPlan and a cursor during pagination. +""" +type SellingPlanEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanEdge. + """ + node: SellingPlan! +} + +""" +The fixed selling plan billing policy defines how much of the price of the product will be billed to customer +at checkout. If there is an outstanding balance, it determines when it will be paid. +""" +type SellingPlanFixedBillingPolicy { + """ + The checkout charge when the full amount isn't charged at checkout. + """ + checkoutCharge: SellingPlanCheckoutCharge! + + """ + The exact time when to capture the full payment. + """ + remainingBalanceChargeExactTime: DateTime + + """ + The period after remaining_balance_charge_trigger, before capturing the full payment. Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """ + When to capture payment for amount due. + """ + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger! +} + +""" +The input fields required to create or update a fixed billing policy. +""" +input SellingPlanFixedBillingPolicyInput { + """ + 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 { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + A buffer period for orders to be included in next fulfillment anchor. + """ + cutoff: Int + + """ + The date and time when the fulfillment should trigger. + """ + fulfillmentExactTime: DateTime + + """ + What triggers the fulfillment. The value must be one of ANCHOR, ASAP, EXACT_TIME, or UNKNOWN. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger! + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanFixedDeliveryPolicyIntent! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields required to create or update a fixed delivery policy. +""" +input SellingPlanFixedDeliveryPolicyInput { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + 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 { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behavior of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanFixedDeliveryPolicyPreAnchorBehavior { + """ + Orders placed can be fulfilled / delivered immediately. Orders placed inside a + cutoff can be fulfilled / delivered at the next anchor. + """ + ASAP + + """ + Orders placed can be fulfilled / delivered at the next anchor date. + Orders placed inside a cutoff will skip the next anchor and can be fulfilled / + delivered at the following anchor. + """ + NEXT +} + +""" +Represents the pricing policy of a subscription or deferred purchase option selling plan. +The selling plan fixed pricing policy works with the billing and delivery policy +to determine the final price. Discounts are divided among fulfillments. +For example, a subscription with a $10 discount and two deliveries will have a $5 +discount applied to each delivery. +""" +type SellingPlanFixedPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + The date and time when the fixed selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a fixed selling plan pricing policy. +""" +input SellingPlanFixedPricingPolicyInput { + """ + 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 +} + +""" +Describes what triggers fulfillment. +""" +enum SellingPlanFulfillmentTrigger { + """ + Use the anchor values to calculate fulfillment date. + """ + ANCHOR + + """ + As soon as possible. + """ + ASAP + + """ + At an exact time defined by the fulfillment_exact_time field. + """ + EXACT_TIME + + """ + Unknown. Usually to be determined in the future. + """ + UNKNOWN +} + +""" +A selling method that defines how products can be sold through purchase options +like subscriptions, pre-orders, or try-before-you-buy. Groups one or more [`SellingPlan`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan) +objects that share the same selling method and options. + +The group provides buyer-facing labels and merchant-facing descriptions for the +selling method. Associates +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and [`ProductVariant`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +objects with selling plan groups to offer them through these purchase options. + +> Caution: +> Selling plan groups and their associated records are automatically deleted 48 +hours after a merchant uninstalls the +[`App`](https://shopify.dev/docs/api/admin-graphql/latest/objects/App) that +created them. Back up these records if you need to restore them later. +""" +type SellingPlanGroup implements HasPublishedTranslations & Node { + """ + The ID for app, exposed in Liquid and product JSON. + """ + appId: String + + """ + Whether the given product is directly associated to the selling plan group. + """ + appliesToProduct( + """ + The ID of the product. + """ + productId: ID! + ): Boolean! + + """ + Whether the given product variant is directly associated to the selling plan group. + """ + appliesToProductVariant( + """ + The ID of the product. + """ + productVariantId: ID! + ): Boolean! + + """ + Whether any of the product variants of the given product are associated to the selling plan group. + """ + appliesToProductVariants( + """ + The ID of the product. + """ + productId: ID! + ): Boolean! + + """ + The date and time when the selling plan group was created. + """ + createdAt: DateTime! + + """ + The merchant-facing description of the selling plan group. + """ + description: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The merchant-facing label of the selling plan group. + """ + merchantCode: String! + + """ + The buyer-facing label of the selling plan group. + """ + name: String! + + """ + The values of all options available on the selling plan group. Selling plans + are grouped together in Liquid when they're created by the same app, and have + the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + The relative position of the selling plan group for display. + """ + position: Int + + """ + Product variants associated to the selling plan group. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! + + """ + A count of product variants associated to the selling plan group. + """ + productVariantsCount( + """ + The ID of the product to scope the count to. + """ + productId: ID + ): Count + + """ + Products associated to the selling plan group. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + ): [Translation!]! +} + +""" +Return type for `sellingPlanGroupAddProductVariants` mutation. +""" +type SellingPlanGroupAddProductVariantsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupAddProducts` mutation. +""" +type SellingPlanGroupAddProductsPayload { + """ + The updated selling plan group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type for paginating through multiple SellingPlanGroups. +""" +type SellingPlanGroupConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanGroupEdge!]! + + """ + A list of nodes that are contained in SellingPlanGroupEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlanGroup!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `sellingPlanGroupCreate` mutation. +""" +type SellingPlanGroupCreatePayload { + """ + The created selling plan group object. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupDelete` mutation. +""" +type SellingPlanGroupDeletePayload { + """ + The ID of the deleted selling plan group object. + """ + deletedSellingPlanGroupId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. +""" +type SellingPlanGroupEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of SellingPlanGroupEdge. + """ + node: SellingPlanGroup! +} + +""" +The input fields required to create or update a selling plan group. +""" +input SellingPlanGroupInput { + """ + 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!] + + """ + List of selling plans to update. + """ + sellingPlansToUpdate: [SellingPlanInput!] +} + +""" +Return type for `sellingPlanGroupRemoveProductVariants` mutation. +""" +type SellingPlanGroupRemoveProductVariantsPayload { + """ + The removed product variant ids. + """ + removedProductVariantIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `sellingPlanGroupRemoveProducts` mutation. +""" +type SellingPlanGroupRemoveProductsPayload { + """ + The removed product ids. + """ + removedProductIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +The input fields for resource association with a Selling Plan Group. +""" +input SellingPlanGroupResourceInput { + """ + The IDs of the Products to add to the Selling Plan Group. + """ + productIds: [ID!] + + """ + The IDs of the Variants to add to the Selling Plan Group. + """ + productVariantIds: [ID!] +} + +""" +The set of valid sort keys for the SellingPlanGroup query. +""" +enum SellingPlanGroupSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Return type for `sellingPlanGroupUpdate` mutation. +""" +type SellingPlanGroupUpdatePayload { + """ + The IDs of the deleted Subscription Plans. + """ + deletedSellingPlanIds: [ID!] + + """ + The updated Selling Plan Group. + """ + sellingPlanGroup: SellingPlanGroup + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Represents a selling plan group custom error. +""" +type SellingPlanGroupUserError implements DisplayableError { + """ + The error code. + """ + code: SellingPlanGroupUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `SellingPlanGroupUserError`. +""" +enum SellingPlanGroupUserErrorCode { + """ + 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 { + """ + 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 + + """ + 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 { + """ + Day interval. + """ + DAY + + """ + Month interval. + """ + MONTH + + """ + Week interval. + """ + WEEK + + """ + Year interval. + """ + YEAR +} + +""" +The selling plan inventory policy. +""" +type SellingPlanInventoryPolicy { + """ + When to reserve inventory for the order. + """ + reserve: SellingPlanReserve! +} + +""" +The input fields required to create or update an inventory policy. +""" +input SellingPlanInventoryPolicyInput { + """ + When to reserve inventory for the order. The value must be ON_FULFILLMENT or ON_SALE. + """ + reserve: SellingPlanReserve +} + +""" +Represents the type of pricing associated to the selling plan (for example, a $10 or 20% discount that is set +for a limited period or that is fixed for the duration of the subscription). Selling plan pricing policies and +associated records (selling plan groups, selling plans, billing policy, and delivery policy) are deleted 48 +hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need +to restore them later. +""" +union SellingPlanPricingPolicy = SellingPlanFixedPricingPolicy | SellingPlanRecurringPricingPolicy + +""" +Represents a selling plan pricing policy adjustment type. +""" +enum SellingPlanPricingPolicyAdjustmentType { + """ + 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 = MoneyV2 | SellingPlanPricingPolicyPercentageValue + +""" +Represents selling plan pricing policy common fields. +""" +interface SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! +} + +""" +The input fields required to create or update a selling plan pricing policy. +""" +input SellingPlanPricingPolicyInput { + """ + 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 { + """ + The percentage value. + """ + percentage: Float! +} + +""" +The input fields required to create or update a pricing policy adjustment value. +""" +input SellingPlanPricingPolicyValueInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The date and time when the selling plan delivery policy was created. + """ + createdAt: DateTime! + + """ + Number of days which represent a buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent! + + """ + The delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval! + + """ + The number of intervals between deliveries. + """ + intervalCount: Int! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior! +} + +""" +The input fields to create or update a recurring delivery policy. +""" +input SellingPlanRecurringDeliveryPolicyInput { + """ + The 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 { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanRecurringDeliveryPolicyPreAnchorBehavior { + """ + The orders placed can be fulfilled or delivered immediately. The orders placed + inside a cutoff can be fulfilled or delivered at the next anchor. + """ + ASAP + + """ + The orders placed can be fulfilled or delivered at the next anchor date. + The orders placed inside a cutoff will skip the next anchor and can be fulfilled or + delivered at the following anchor. + """ + NEXT +} + +""" +Represents a recurring selling plan pricing policy. It applies after the fixed +pricing policy. By using the afterCycle parameter, you can specify the cycle +when the recurring pricing policy comes into effect. Recurring pricing policies +are not available for deferred purchase options. +""" +type SellingPlanRecurringPricingPolicy implements SellingPlanPricingPolicyBase { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + Cycle after which this pricing policy applies. + """ + afterCycle: Int + + """ + The date and time when the recurring selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a recurring selling plan pricing policy. +""" +input SellingPlanRecurringPricingPolicyInput { + """ + 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 +} + +""" +When to capture the payment for the remaining amount due. +""" +enum SellingPlanRemainingBalanceChargeTrigger { + """ + 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 { + """ + Reserve inventory when order is fulfilled. + """ + ON_FULFILLMENT + + """ + Reserve inventory at time of sale. + """ + ON_SALE +} + +""" +A server pixel stores configuration for streaming customer interactions to an EventBridge or PubSub endpoint. +""" +type ServerPixel implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The current state of this server pixel. + """ + status: ServerPixelStatus + + """ + Address of the EventBridge or PubSub endpoint. + """ + webhookEndpointAddress: String +} + +""" +Return type for `serverPixelCreate` mutation. +""" +type ServerPixelCreatePayload { + """ + The new server pixel. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Return type for `serverPixelDelete` mutation. +""" +type ServerPixelDeletePayload { + """ + The ID of the server pixel that was deleted, if one was deleted. + """ + deletedServerPixelId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +The current state of a server pixel. +""" +enum ServerPixelStatus { + """ + This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. + """ + CONNECTED + + """ + This server pixel is disconnected: 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 { + """ + Sort by the `id` value. + """ + ID +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum ShippingDiscountClass { + """ + Combined as a shipping discount. + """ + SHIPPING +} + +""" +The shipping method that customers select for an order. Includes pricing +details, carrier information, and any applied discounts or taxes. +""" +type ShippingLine { + """ + A reference to the carrier service that provided the rate. + Present when the rate was computed by a third-party carrier service. + """ + carrierIdentifier: String + + """ + A reference to the shipping method. + """ + code: String + + """ + The current shipping price after applying refunds, after applying discounts. + If the parent `order.taxesIncluded`` field is true, then this price includes + taxes. Otherwise, this field is the pre-tax price. + """ + currentDiscountedPriceSet: MoneyBag! + + """ + Whether the shipping line is custom or not. + """ + custom: Boolean! + + """ + The general classification of the delivery method. + """ + deliveryCategory: String + + """ + The discounts that have been allocated to the shipping line. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The pre-tax shipping price with discounts applied. + As of API version 2024-07, this will be calculated including cart level discounts, such as the free shipping discount. + """ + discountedPrice: MoneyV2! @deprecated(reason: "Use `discountedPriceSet` instead.") + + """ + The shipping price after applying discounts. If the parent order.taxesIncluded + field is true, then this price includes taxes. If not, it's the pre-tax price. + As of API version 2024-07, this will be calculated including cart level discounts, such as the free shipping discount. + """ + discountedPriceSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID + + """ + Whether the shipping line has been removed. + """ + isRemoved: Boolean! + + """ + The shipping price without any discounts applied. If the parent + order.taxesIncluded field is true, then this price includes taxes. Otherwise, + this field is the pre-tax price. + """ + originalPrice: MoneyV2! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The shipping price without any discounts applied. If the parent + order.taxesIncluded field is true, then this price includes taxes. Otherwise, + this field is the pre-tax price. + """ + originalPriceSet: MoneyBag! + + """ + The phone number at the shipping address. + """ + phone: String + + """ + Returns the price of the shipping line. + """ + price: Money! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + The fulfillment service requested for the shipping method. + Present if the shipping method requires processing by a third party fulfillment service. + """ + requestedFulfillmentService: FulfillmentService @deprecated(reason: "requestedFulfillmentService is no longer in use. Order routing does not use the requestedFulfillmentService during order and fulfillment order creation.") + + """ + A unique identifier for the shipping rate. The format can change without notice and isn't meant to be shown to users. + """ + shippingRateHandle: String + + """ + Returns the rate source for the shipping line. + """ + source: String + + """ + The TaxLine objects connected to this shipping line. + """ + taxLines: [TaxLine!]! + + """ + Returns the title of the shipping line. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple ShippingLines. +""" +type ShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShippingLineEdge!]! + + """ + A list of nodes that are contained in ShippingLineEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShippingLine!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShippingLine and a cursor during pagination. +""" +type ShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShippingLineEdge. + """ + node: ShippingLine! +} + +""" +The input fields for specifying the shipping details for the draft order. + +> Note: +> A custom shipping line includes a title and price with `shippingRateHandle` +set to `nil`. A shipping line with a carrier-provided shipping rate (currently +set via the Shopify admin) includes the shipping rate handle. +""" +input ShippingLineInput { + """ + Price of the shipping rate in shop currency. + """ + price: Money @deprecated(reason: "`priceWithCurrency` should be used instead, where currencies can be specified.") + + """ + Price of the shipping rate with currency. If provided, `price` will be ignored. + """ + priceWithCurrency: MoneyInput + + """ + A unique identifier for the shipping rate. + """ + shippingRateHandle: String + + """ + Title of the shipping rate. + """ + title: String +} + +""" +A sale associated with a shipping charge. +""" +type ShippingLineSale implements Sale { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The unique ID for the sale. + """ + id: ID! + + """ + The line type assocated with the sale. + """ + lineType: SaleLineType! + + """ + The number of units either ordered or intended to be returned. + """ + quantity: Int + + """ + The shipping line item for the associated sale. `shippingLine` is not available if the `SaleActionType` is a return. + """ + shippingLine: ShippingLine + + """ + All individual taxes associated with the sale. + """ + taxes: [SaleTax!]! + + """ + The total sale amount after taxes and discounts. + """ + totalAmount: MoneyBag! + + """ + The total discounts allocated to the sale after taxes. + """ + totalDiscountAmountAfterTaxes: MoneyBag! + + """ + The total discounts allocated to the sale before taxes. + """ + totalDiscountAmountBeforeTaxes: MoneyBag! + + """ + The total amount of taxes for the sale. + """ + totalTaxAmount: MoneyBag! +} + +""" +Return type for `shippingPackageDelete` mutation. +""" +type ShippingPackageDeletePayload { + """ + The ID of the deleted shipping package. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shippingPackageMakeDefault` mutation. +""" +type ShippingPackageMakeDefaultPayload { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Type of a shipping package. +""" +enum ShippingPackageType { + """ + A shipping box. + """ + BOX + + """ + 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 { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A shipping option associated with order delivery that includes pricing and service information. +""" +type ShippingRate { + """ + Human-readable unique identifier for this shipping rate. + """ + handle: String! + + """ + The cost associated with the shipping rate. + """ + price: MoneyV2! + + """ + The name of the shipping rate. + """ + title: String! +} + +""" +Represents the shipping costs refunded on the Refund. +""" +type ShippingRefund { + """ + The monetary value of the shipping fees to be refunded. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The monetary value of the shipping fees to be refunded in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The maximum amount of shipping fees currently refundable. + """ + maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") + + """ + The maximum amount of shipping fees currently refundable in shop and presentment currencies. + """ + maximumRefundableSet: MoneyBag! + + """ + The monetary value of the tax allocated to shipping fees to be refunded. + """ + tax: Money! @deprecated(reason: "Use `taxSet` instead.") + + """ + The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies. + """ + taxSet: MoneyBag! +} + +""" +The input fields that are required to reimburse shipping costs. +""" +input ShippingRefundInput { + """ + The monetary value of the shipping fees to be reimbursed. + """ + amount: Money + + """ + Whether a full refund is provided. + """ + fullRefund: Boolean +} + +""" +The central configuration and settings hub for a Shopify store. Access business +information, operational preferences, feature availability, and store-wide +settings that control how the shop operates. + +Includes core business details like the shop name, contact emails, billing +address, and currency settings. The shop configuration determines customer +account requirements, available sales channels, enabled features, payment +settings, and policy documents. Also provides access to shop-level resources +such as staff members, fulfillment services, navigation settings, and storefront access tokens. +""" +type Shop implements HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """ + Account owner information. + """ + accountOwner: StaffMember! + + """ + A list of the shop's active alert messages that appear in the Shopify admin. + """ + alerts: [ShopAlert!]! + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategories: [ProductCategory!]! @deprecated(reason: "Use `allProductCategoriesList` instead.") + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategoriesList: [TaxonomyCategory!]! + + """ + The token required to query the shop's reports or dashboards. + """ + analyticsToken: String! @deprecated(reason: "Not supported anymore.") + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders( + """ + The 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!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.assignedFulfillmentOrders` instead. Details: https:\/\/shopify.dev\/changelog\/moving-the-shop-assignedfulfillmentorders-connection-to-queryroot") + + """ + The list of sales channels not currently installed on the shop. + """ + availableChannelApps( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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! + + """ + 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.") + + """ + A list of tags that have been added to draft orders. + """ + draftOrderTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! + + """ + The shop owner's email address. + Shopify will use this email address to communicate with the shop owner. + """ + email: String! + + """ + The presentment currencies enabled for the shop. + """ + enabledPresentmentCurrencies: [CurrencyCode!]! + + """ + The entitlements for a shop. + """ + entitlements: EntitlementsType! + + """ + The set of features enabled for the shop. + """ + features: ShopFeatures! + + """ + The paginated list of merchant-managed and third-party fulfillment orders. + """ + fulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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! + + """ + 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 shop's .myshopify.com domain name. + """ + myshopifyDomain: String! + + """ + The shop's name. + """ + name: String! + + """ + The shop's settings related to navigation. + """ + navigationSettings: [NavigationItem!]! + + """ + The prefix that appears before order numbers. + """ + orderNumberFormatPrefix: String! + + """ + The suffix that appears after order numbers. + """ + orderNumberFormatSuffix: String! + + """ + A list of tags that have been added to orders. + """ + orderTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + Sort type. + """ + sort: ShopTagSort = ALPHABETICAL + ): StringConnection! + + """ + A list of the shop's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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.") + + """ + The list of types added to products. + """ + productTypes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTypes` instead.") + + """ + List of the shop's product variants. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.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` | + | 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 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.") + + """ + 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` | + | 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + ): [Translation!]! + + """ + The shop's unit system for weights and measures. + """ + unitSystem: UnitSystem! + + """ + The date and time when the shop was last updated. + """ + updatedAt: DateTime! + + """ + The URL of the shop's online store. + """ + url: URL! + + """ + The shop's primary unit of weight for products and shipping. + """ + weightUnit: WeightUnit! +} + +""" +An address for a shop. +""" +type ShopAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The name of the company or organization. + """ + company: String + + """ + Whether the address coordinates are valid. + """ + coordinatesValidated: Boolean! + + """ + The name of the country. + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """ + The first name. + """ + firstName: String @deprecated(reason: "Always null in this context.") + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """ + Whether to include the company in the formatted address. + """ + withCompany: Boolean = true + ): [String!]! + + """ + A comma-separated list of the values for city, province, and country. + """ + formattedArea: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name. + """ + lastName: String @deprecated(reason: "Always null in this context.") + + """ + The latitude coordinate of the address. + """ + latitude: Float + + """ + The longitude coordinate of the address. + """ + longitude: Float + + """ + The full name, based on firstName and lastName. + """ + name: String @deprecated(reason: "Always null in this context.") + + """ + A phone number associated with the address. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The region of the address, such as the province, state, or district. + """ + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """ + The zip or postal code of the address. + """ + zip: String +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +setting, with an action to take. For example, you could show an alert to ask the +merchant to enter their billing information to activate Shopify Plus. +""" +type ShopAlert { + """ + The text for the button in the alert that links to related information. For example, _Add credit card_. + """ + action: ShopAlertAction! + + """ + A description of the alert and further information, such as whether the merchant will be charged. + """ + description: String! +} + +""" +An action associated to a shop alert, such as adding a credit card. +""" +type ShopAlertAction { + """ + The text for the button in the alert. For example, _Add credit card_. + """ + title: String! + + """ + The target URL that the button links to. + """ + url: URL! +} + +""" +Billing preferences for the shop. +""" +type ShopBillingPreferences { + """ + The currency the shop uses to pay for apps and services. + """ + currency: CurrencyCode! +} + +""" +Possible branding of a shop. +Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin. +""" +enum ShopBranding { + """ + Shop has 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 { + DISABLED + OPTIONAL + REQUIRED +} + +""" +Represents the feature set available to the shop. +Most fields specify whether a feature is enabled for a shop, and some fields return information +related to specific features. +""" +type ShopFeatures { + """ + Whether a shop has access to Avalara AvaTax. + """ + avalaraAvatax: Boolean! + + """ + The branding of the shop, which influences its look and feel in the Shopify admin. + """ + branding: ShopBranding! + + """ + Represents the Bundles feature configuration for the shop. + """ + bundles: BundlesFeature! + + """ + Whether a shop's online store can have CAPTCHA protection. + """ + captcha: Boolean! + + """ + Whether a shop's online store can have CAPTCHA protection for domains not managed by Shopify. + """ + captchaExternalDomains: Boolean! @deprecated(reason: "No longer required for external domains") + + """ + Represents the cart transform feature configuration for the shop. + """ + cartTransform: CartTransformFeature! + + """ + Whether the delivery profiles functionality is enabled for this shop. + """ + deliveryProfiles: Boolean! @deprecated(reason: "Delivery profiles are now 100% enabled across Shopify.") + + """ + Whether a shop has access to the Google Analytics dynamic remarketing feature. + """ + dynamicRemarketing: Boolean! + + """ + Whether a shop can be migrated to use Shopify subscriptions. + """ + eligibleForSubscriptionMigration: Boolean! + + """ + Whether a shop is configured properly to sell subscriptions. + """ + eligibleForSubscriptions: Boolean! + + """ + Whether a shop can create gift cards. + """ + giftCards: Boolean! + + """ + Whether a shop displays Harmonized System codes on products. This is used for customs when shipping + internationally. + """ + harmonizedSystemCode: Boolean! + + """ + Whether a shop can enable international domains. + """ + internationalDomains: Boolean! @deprecated(reason: "All shops have international domains through Shopify Markets.") + + """ + Whether a shop can enable international price overrides. + """ + internationalPriceOverrides: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop can enable international price rules. + """ + internationalPriceRules: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop has enabled a legacy subscription gateway to handle older subscriptions. + """ + legacySubscriptionGatewayEnabled: Boolean! + + """ + Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial + or don't have a storefront. + """ + liveView: Boolean! + + """ + Whether a shop has access to the onboarding visual. + """ + onboardingVisual: Boolean! @deprecated(reason: "No longer supported.") + + """ + Whether a shop is configured to sell subscriptions with PayPal Express. + """ + paypalExpressSubscriptionGatewayStatus: PaypalExpressSubscriptionsGatewayStatus! + + """ + Whether a shop has access to all reporting features. + """ + reports: Boolean! + + """ + Whether a shop has ever had subscription products. + """ + sellsSubscriptions: Boolean! + + """ + Whether the shop has a Shopify Plus subscription. + """ + shopifyPlus: Boolean! @deprecated(reason: "Use Shop.plan.shopifyPlus instead.") + + """ + Whether to show metrics in the Shopify admin. Metrics are hidden for new merchants until they become meaningful. + """ + showMetrics: Boolean! + + """ + Whether a shop has an online store. + """ + storefront: Boolean! + + """ + Whether a shop is eligible for Unified Markets. + """ + unifiedMarkets: Boolean! + + """ + Whether a shop is using Shopify Balance. + """ + usingShopifyBalance: Boolean! +} + +""" +A locale that's been enabled on a shop. +""" +type ShopLocale { + """ + The locale ISO code. + """ + locale: String! + + """ + The market web presences that use the locale. + """ + marketWebPresences: [MarketWebPresence!]! + + """ + The human-readable locale name. + """ + name: String! + + """ + Whether the locale is the default locale for the shop. + """ + primary: Boolean! + + """ + Whether the locale is visible to buyers. + """ + published: Boolean! +} + +""" +Return type for `shopLocaleDisable` mutation. +""" +type ShopLocaleDisablePayload { + """ + ISO code of the locale that was deleted. + """ + locale: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `shopLocaleEnable` mutation. +""" +type ShopLocaleEnablePayload { + """ + ISO code of the locale that was enabled. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for a shop locale. +""" +input ShopLocaleInput { + """ + 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!] + + """ + Whether the locale is published. Only published locales are visible to the buyer. + """ + published: Boolean +} + +""" +Return type for `shopLocaleUpdate` mutation. +""" +type ShopLocaleUpdatePayload { + """ + The locale that was updated. + """ + shopLocale: ShopLocale + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Shop Pay Installments payment details related to a transaction. +""" +type ShopPayInstallmentsPaymentDetails implements BasePaymentDetails { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +Represents a Shop Pay payment request. +""" +type ShopPayPaymentRequest { + """ + The discounts for the payment request order. + """ + discounts: [ShopPayPaymentRequestDiscount!] + + """ + The line items for the payment request. + """ + lineItems: [ShopPayPaymentRequestLineItem!]! + + """ + The presentment currency for the payment request. + """ + presentmentCurrency: CurrencyCode! + + """ + The delivery method type for the payment request. + """ + selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType! + + """ + The shipping address for the payment request. + """ + shippingAddress: ShopPayPaymentRequestContactField + + """ + The shipping lines for the payment request. + """ + shippingLines: [ShopPayPaymentRequestShippingLine!]! + + """ + The subtotal amount for the payment request. + """ + subtotal: MoneyV2! + + """ + The total amount for the payment request. + """ + total: MoneyV2! + + """ + The total shipping price for the payment request. + """ + totalShippingPrice: ShopPayPaymentRequestTotalShippingPrice + + """ + The total tax for the payment request. + """ + totalTax: MoneyV2 +} + +""" +Represents a contact field for a Shop Pay payment request. +""" +type ShopPayPaymentRequestContactField { + """ + The first address line of the contact field. + """ + address1: String! + + """ + The second address line of the contact field. + """ + address2: String + + """ + The city of the contact field. + """ + city: String! + + """ + The company name of the contact field. + """ + companyName: String + + """ + The country of the contact field. + """ + countryCode: String! + + """ + The email of the contact field. + """ + email: String + + """ + The first name of the contact field. + """ + firstName: String! + + """ + The last name of the contact field. + """ + lastName: String! + + """ + The phone number of the contact field. + """ + phone: String + + """ + The postal code of the contact field. + """ + postalCode: String + + """ + The province of the contact field. + """ + provinceCode: String +} + +""" +Represents the delivery method type for a Shop Pay payment request. +""" +enum ShopPayPaymentRequestDeliveryMethodType { + """ + The delivery method type is pickup. + """ + PICKUP + + """ + The delivery method type is shipping. + """ + SHIPPING +} + +""" +Represents a discount for a Shop Pay payment request. +""" +type ShopPayPaymentRequestDiscount { + """ + The amount of the discount. + """ + amount: MoneyV2! + + """ + The label of the discount. + """ + label: String! +} + +""" +Represents an image for a Shop Pay payment request line item. +""" +type ShopPayPaymentRequestImage { + """ + The alt text of the image. + """ + alt: String + + """ + The source URL of the image. + """ + url: String! +} + +""" +Represents a line item for a Shop Pay payment request. +""" +type ShopPayPaymentRequestLineItem { + """ + The final item price for the line item. + """ + finalItemPrice: MoneyV2! + + """ + The final line price for the line item. + """ + finalLinePrice: MoneyV2! + + """ + The image of the line item. + """ + image: ShopPayPaymentRequestImage + + """ + The item discounts for the line item. + """ + itemDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The label of the line item. + """ + label: String! + + """ + The line discounts for the line item. + """ + lineDiscounts: [ShopPayPaymentRequestDiscount!] + + """ + The original item price for the line item. + """ + originalItemPrice: MoneyV2 + + """ + The original line price for the line item. + """ + originalLinePrice: MoneyV2 + + """ + The quantity of the line item. + """ + quantity: Int! + + """ + Whether the line item requires shipping. + """ + requiresShipping: Boolean + + """ + The SKU of the line item. + """ + sku: String +} + +""" +The receipt of Shop Pay payment request session submission. +""" +type ShopPayPaymentRequestReceipt { + """ + The date and time when the payment request receipt was created. + """ + createdAt: DateTime! + + """ + The order that's associated with the payment request receipt. + """ + order: Order + + """ + The shop pay payment request object. + """ + paymentRequest: ShopPayPaymentRequest! + + """ + The status of the payment request session submission. + """ + processingStatus: ShopPayPaymentRequestReceiptProcessingStatus! + + """ + The source identifier provided in the `ShopPayPaymentRequestSessionCreate` mutation. + """ + sourceIdentifier: String! + + """ + The token of the receipt, initially returned by an `ShopPayPaymentRequestSessionSubmit` mutation. + """ + token: String! +} + +""" +An auto-generated type for paginating through multiple ShopPayPaymentRequestReceipts. +""" +type ShopPayPaymentRequestReceiptConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopPayPaymentRequestReceiptEdge!]! + + """ + A list of nodes that are contained in ShopPayPaymentRequestReceiptEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ShopPayPaymentRequestReceipt!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopPayPaymentRequestReceipt and a cursor during pagination. +""" +type ShopPayPaymentRequestReceiptEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopPayPaymentRequestReceiptEdge. + """ + node: ShopPayPaymentRequestReceipt! +} + +""" +The processing status of a Shop Pay payment request. +Represents the different states a payment request can be in during its lifecycle, +from initial creation through to completion or failure. +""" +type ShopPayPaymentRequestReceiptProcessingStatus { + """ + A standardized error code, independent of the payment provider. + """ + errorCode: ShopPayPaymentRequestReceiptProcessingStatusErrorCode + + """ + The message of the payment request receipt. + """ + message: String + + """ + The state of the payment request receipt. + """ + state: ShopPayPaymentRequestReceiptProcessingStatusState! +} + +""" +A standardized error code, independent of the payment provider. +""" +enum ShopPayPaymentRequestReceiptProcessingStatusErrorCode { + """ + The 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 + + """ + 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 { + """ + 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents a shipping line for a Shop Pay payment request. +""" +type ShopPayPaymentRequestShippingLine { + """ + The amount for the shipping line. + """ + amount: MoneyV2! + + """ + The code of the shipping line. + """ + code: String! + + """ + The label of the shipping line. + """ + label: String! +} + +""" +Represents a shipping total for a Shop Pay payment request. +""" +type ShopPayPaymentRequestTotalShippingPrice { + """ + The discounts for the shipping total. + """ + discounts: [ShopPayPaymentRequestDiscount!]! + + """ + The final total for the shipping line. + """ + finalTotal: MoneyV2! + + """ + The original total for the shipping line. + """ + originalTotal: MoneyV2 +} + +""" +The shop's billing plan and subscription details. Indicates the plan tier (such +as Basic, Advanced, or Plus), whether the shop has a Shopify Plus subscription, +and if it's a dev store for testing. +""" +type ShopPlan { + """ + The name of the shop's billing plan. + """ + displayName: String! @deprecated(reason: "Use `publicDisplayName` instead.") + + """ + Whether the shop is a partner development shop for testing purposes. + """ + partnerDevelopment: Boolean! + + """ + The public display name of the shop's billing plan. Possible values are: + Advanced, Agentic, Agentic Enterprise, Basic, Development, Grow, Inactive, + Lite, Other, Paused, Plus, Plus Trial, Retail, Shop Component, Shopify + Finance, Staff Business, Starter, and Trial. + """ + publicDisplayName: String! + + """ + Whether the shop has a Shopify Plus subscription. + """ + shopifyPlus: Boolean! +} + +""" +Policy that a merchant has configured for their store, such as their refund or privacy policy. +""" +type ShopPolicy implements HasPublishedTranslations & Node { + """ + The text of the policy. The maximum size is 512kb. + """ + body: HTML! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was created. + """ + createdAt: Date! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The translated title of the policy. For example, Refund Policy or Politique de remboursement. + """ + title: String! + + """ + The published translations associated with the resource. + """ + translations( + """ + Filters translations locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The shop policy type. + """ + type: ShopPolicyType! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the policy was last modified. + """ + updatedAt: Date! + + """ + The public URL of the policy. + """ + url: URL! +} + +""" +Possible error codes that can be returned by `ShopPolicyUserError`. +""" +enum ShopPolicyErrorCode { + """ + The input value is too big. + """ + TOO_BIG +} + +""" +The input fields required to update a policy. +""" +input ShopPolicyInput { + """ + Policy text, maximum size of 512kb. + """ + body: String! + + """ + The shop policy type. + """ + type: ShopPolicyType! +} + +""" +Available shop policy types. +""" +enum ShopPolicyType { + """ + 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 { + """ + The shop policy that has been updated. + """ + shopPolicy: ShopPolicy + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopPolicyUserError!]! +} + +""" +An error that occurs during the execution of a shop policy mutation. +""" +type ShopPolicyUserError implements DisplayableError { + """ + The error code. + """ + code: ShopPolicyErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `shopResourceFeedbackCreate` mutation. +""" +type ShopResourceFeedbackCreatePayload { + """ + The shop feedback that's created. + """ + feedback: AppFeedback + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopResourceFeedbackCreate`. +""" +type ShopResourceFeedbackCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopResourceFeedbackCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopResourceFeedbackCreateUserError`. +""" +enum ShopResourceFeedbackCreateUserErrorCode { + """ + The 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 { + """ + Maximum number of locations allowed. + """ + locationLimit: Int! + + """ + Maximum number of product options allowed. + """ + maxProductOptions: Int! + + """ + The maximum number of variants allowed per product. + """ + maxProductVariants: Int! + + """ + Whether the shop has reached the limit of the number of URL redirects it can make for resources. + """ + redirectLimitReached: Boolean! +} + +""" +Possible sort of tags. +""" +enum ShopTagSort { + """ + Alphabetical sort. + """ + ALPHABETICAL + + """ + Popularity sort. + """ + POPULAR +} + +""" +A Shopify Function. +""" +type ShopifyFunction { + """ + The API type of the Shopify Function. + """ + apiType: String! + + """ + The API version of the Shopify Function. + """ + apiVersion: String! + + """ + The app that owns the Shopify Function. + """ + app: App! + + """ + The App Bridge information for the Shopify Function. + """ + appBridge: FunctionsAppBridge! + + """ + The client ID of the app that owns the Shopify Function. + """ + appKey: String! + + """ + The description of the Shopify Function. + """ + description: String + + """ + The handle of the Shopify Function. + """ + handle: String! + + """ + The ID of the Shopify Function. + """ + id: String! + + """ + The input query of the Shopify Function. + """ + inputQuery: String + + """ + The title of the Shopify Function. + """ + title: String! + + """ + If the Shopify Function uses the creation UI in the Admin. + """ + useCreationUi: Boolean! +} + +""" +An auto-generated type for paginating through multiple ShopifyFunctions. +""" +type ShopifyFunctionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyFunctionEdge!]! + + """ + A list of nodes that are contained in ShopifyFunctionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShopifyFunction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyFunction and a cursor during pagination. +""" +type ShopifyFunctionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyFunctionEdge. + """ + node: ShopifyFunction! +} + +""" +Financial account information for merchants using Shopify Payments. Tracks +current balances across all supported currencies, payout schedules, and [`ShopifyPaymentsBalanceTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction) records. + +The account includes configuration details such as [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount) +objects for receiving [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) +transfers, statement descriptors that appear on customer credit card statements, and the [`ShopifyPaymentsPayoutSchedule`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSchedule) +that determines when funds transfer to your bank. Access balance transactions to +review individual charges, refunds, and adjustments that affect your account +balance. Query payouts to track money movement between your Shopify Payments +balance and bank accounts. +""" +type ShopifyPaymentsAccount implements Node @accessRestricted(reason: "Requires the `read_shopify_payments` or `read_shopify_payments_accounts` approval scope.") { + """ + The name of the account opener. + """ + accountOpenerName: String + + """ + Whether the Shopify Payments setup is completed. + """ + activated: Boolean! + + """ + Current balances in all currencies for the account. + """ + balance: [MoneyV2!]! + + """ + A list of balance transactions associated with the shop. + """ + balanceTransactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 { + """ + Line 1 of the address. + """ + addressLine1: String + + """ + Line 2 of the address. + """ + addressLine2: String + + """ + The address city. + """ + city: String + + """ + The address country. + """ + country: String + + """ + The address postal code. + """ + postalCode: String + + """ + The address state/province/zone. + """ + zone: String +} + +""" +The adjustment order object. +""" +type ShopifyPaymentsAdjustmentOrder { + """ + The amount of the adjustment order. + """ + amount: MoneyV2! + + """ + The fee of the adjustment order. + """ + fees: MoneyV2! + + """ + The link to the adjustment order. + """ + link: URL! + + """ + The name of the adjustment order. + """ + name: String! + + """ + The net of the adjustment order. + """ + net: MoneyV2! + + """ + The ID of the order transaction. + """ + orderTransactionId: BigInt! +} + +""" +The order associated to the balance transaction. +""" +type ShopifyPaymentsAssociatedOrder { + """ + The ID of the associated order. + """ + id: ID! + + """ + The name of the associated order. + """ + name: String! +} + +""" +A transaction that contributes to a Shopify Payments account balance. Records +money movement from charges, refunds, payouts, adjustments, or other payment +activities. Includes the gross amount, processing fees, and resulting net amount +that affects the account balance. Links to the source of the transaction and associated [`ShopifyPaymentsPayout`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout) +details, with optional references to +[`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +objects or adjustment reasons when applicable. +""" +type ShopifyPaymentsBalanceTransaction implements Node { + """ + The reason for the adjustment that's associated with the transaction. + If the source_type isn't an adjustment, the value will be null. + """ + adjustmentReason: String + + """ + The adjustment orders associated to the transaction. + """ + adjustmentsOrders: [ShopifyPaymentsAdjustmentOrder!]! + + """ + The amount contributing to the balance transaction. + """ + amount: MoneyV2! + + """ + The associated order for the balance transaction. + """ + associatedOrder: ShopifyPaymentsAssociatedOrder + + """ + Payout assoicated with the transaction. + """ + associatedPayout: ShopifyPaymentsBalanceTransactionAssociatedPayout! + + """ + The fee amount contributing to the balance transaction. + """ + fee: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The net amount contributing to the merchant's balance. + """ + net: MoneyV2! + + """ + The ID of the resource leading to the transaction. + """ + sourceId: BigInt + + """ + The id of the + [Order Transaction](https://shopify.dev/docs/admin-api/rest/reference/orders/transaction) + + that resulted in this balance transaction. + """ + sourceOrderTransactionId: BigInt + + """ + The source type of the balance transaction. + """ + sourceType: ShopifyPaymentsSourceType + + """ + Wether the tranaction was created in test mode. + """ + test: Boolean! + + """ + The date and time when the balance transaction was processed. + """ + transactionDate: DateTime! + + """ + The type of transaction. + """ + type: ShopifyPaymentsTransactionType! +} + +""" +The payout associated with a balance transaction. +""" +type ShopifyPaymentsBalanceTransactionAssociatedPayout { + """ + The ID of the payout associated with the balance transaction. + """ + id: ID + + """ + The status of the payout associated with the balance transaction. + """ + status: ShopifyPaymentsBalanceTransactionPayoutStatus +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBalanceTransactions. +""" +type ShopifyPaymentsBalanceTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBalanceTransactionEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBalanceTransactionEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsBalanceTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBalanceTransaction and a cursor during pagination. +""" +type ShopifyPaymentsBalanceTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBalanceTransactionEdge. + """ + node: ShopifyPaymentsBalanceTransaction! +} + +""" +The payout status of the balance transaction. +""" +enum ShopifyPaymentsBalanceTransactionPayoutStatus { + """ + The 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 { + """ + 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 + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBankAccountEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBankAccountEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsBankAccount!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination. +""" +type ShopifyPaymentsBankAccountEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsBankAccountEdge. + """ + node: ShopifyPaymentsBankAccount! +} + +""" +The bank account status. +""" +enum ShopifyPaymentsBankAccountStatus { + """ + A 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 { + """ + 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 { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +The charge descriptors for a payments account. +""" +type ShopifyPaymentsDefaultChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. +""" +type ShopifyPaymentsDispute implements LegacyInteroperability & Node { + """ + The total amount disputed by the cardholder. + """ + amount: MoneyV2! + + """ + The evidence associated with the dispute. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence! + + """ + The deadline for evidence submission. + """ + evidenceDueBy: Date + + """ + The date when evidence was sent. Returns null if evidence hasn't yet been sent. + """ + evidenceSentOn: Date + + """ + The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. + """ + finalizedOn: Date + + """ + A globally-unique ID. + """ + id: ID! + + """ + The date when this dispute was initiated. + """ + initiatedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The order that contains the charge that's under dispute. + """ + order: Order + + """ + The reason of the dispute. + """ + reasonDetails: ShopifyPaymentsDisputeReasonDetails! + + """ + The current state of the dispute. + """ + status: DisputeStatus! + + """ + Indicates if this dispute is still in the inquiry phase or has turned into a chargeback. + """ + type: DisputeType! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsDisputes. +""" +type ShopifyPaymentsDisputeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsDisputeEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsDisputeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsDispute!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination. +""" +type ShopifyPaymentsDisputeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsDisputeEdge. + """ + node: ShopifyPaymentsDispute! +} + +""" +The evidence associated with the dispute. +""" +type ShopifyPaymentsDisputeEvidence implements Node { + """ + The activity logs associated with the dispute evidence. + """ + accessActivityLog: String + + """ + The billing address that's provided by the customer. + """ + billingAddress: MailingAddress + + """ + The cancellation policy disclosure associated with the dispute evidence. + """ + cancellationPolicyDisclosure: String + + """ + The cancellation policy file associated with the dispute evidence. + """ + cancellationPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The cancellation rebuttal associated with the dispute evidence. + """ + cancellationRebuttal: String + + """ + The customer communication file associated with the dispute evidence. + """ + customerCommunicationFile: ShopifyPaymentsDisputeFileUpload + + """ + The customer's email address. + """ + customerEmailAddress: String + + """ + The customer's first name. + """ + customerFirstName: String + + """ + The customer's last name. + """ + customerLastName: String + + """ + The customer purchase ip for this dispute evidence. + """ + customerPurchaseIp: String + + """ + The dispute associated with the evidence. + """ + dispute: ShopifyPaymentsDispute! + + """ + The file uploads associated with the dispute evidence. + """ + disputeFileUploads: [ShopifyPaymentsDisputeFileUpload!]! + + """ + The fulfillments associated with the dispute evidence. + """ + fulfillments: [ShopifyPaymentsDisputeFulfillment!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The product description for this dispute evidence. + """ + productDescription: String + + """ + The refund policy disclosure associated with the dispute evidence. + """ + refundPolicyDisclosure: String + + """ + The refund policy file associated with the dispute evidence. + """ + refundPolicyFile: ShopifyPaymentsDisputeFileUpload + + """ + The refund refusal explanation associated with dispute evidence. + """ + refundRefusalExplanation: String + + """ + The service documentation file associated with the dispute evidence. + """ + serviceDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + The mailing address for shipping that's provided by the customer. + """ + shippingAddress: MailingAddress + + """ + The shipping documentation file associated with the dispute evidence. + """ + shippingDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """ + Whether the dispute evidence is submitted. + """ + submitted: Boolean! + + """ + The uncategorized file associated with the dispute evidence. + """ + uncategorizedFile: ShopifyPaymentsDisputeFileUpload + + """ + The uncategorized text for the dispute evidence. + """ + uncategorizedText: String +} + +""" +The possible dispute evidence file types. +""" +enum ShopifyPaymentsDisputeEvidenceFileType { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Whether to delete this file upload. + """ + destroy: Boolean = false + + """ + The ID of the file upload to be updated. + """ + id: ID! +} + +""" +The fulfillment associated with dispute evidence. +""" +type ShopifyPaymentsDisputeFulfillment implements Node { + """ + A globally-unique ID. + """ + id: ID! + + """ + The shipping carrier for this fulfillment. + """ + shippingCarrier: String + + """ + The shipping date for this fulfillment. + """ + shippingDate: Date + + """ + The shipping tracking number for this fulfillment. + """ + shippingTrackingNumber: String +} + +""" +The reason for the dispute provided by the cardholder's bank. +""" +enum ShopifyPaymentsDisputeReason { + """ + The 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 { + """ + The raw code provided by the payment network. + """ + networkReasonCode: String + + """ + The reason for the dispute provided by the cardholder's banks. + """ + reason: ShopifyPaymentsDisputeReason! +} + +""" +Presents all Shopify Payments information related to an extended authorization. +""" +type ShopifyPaymentsExtendedAuthorization { + """ + The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment. + """ + extendedAuthorizationExpiresAt: DateTime! + + """ + The time after which capture will incur an additional fee. + """ + standardAuthorizationExpiresAt: DateTime! +} + +""" +The charge descriptors for a Japanese payments account. +""" +type ShopifyPaymentsJpChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """ + The default charge statement descriptor. + """ + default: String + + """ + The charge statement descriptor in kana. + """ + kana: String @deprecated(reason: "This field is deprecated and will be removed in a future release.") + + """ + The charge statement descriptor in kanji. + """ + kanji: String @deprecated(reason: "This field is deprecated and will be removed in a future release.") + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A MerchantCategoryCode (MCC) is a four-digit number listed in ISO 18245 for +retail financial services and used to classify the business by the type of goods +or services it provides. +""" +type ShopifyPaymentsMerchantCategoryCode { + """ + The category of the MCC. + """ + category: String! + + """ + The category label of the MCC. + """ + categoryLabel: String! + + """ + A four-digit number listed in ISO 18245. + """ + code: Int! + + """ + The ID of the MCC. + """ + id: Int! + + """ + The subcategory label of the MCC. + """ + subcategoryLabel: String! +} + +""" +A transfer of funds between a merchant's Shopify Payments balance and their [`ShopifyPaymentsBankAccount`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount). +Provides the [net amount](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout#field-ShopifyPaymentsPayout.fields.net), [issue date](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout#field-ShopifyPaymentsPayout.fields.issuedAt), and current [`ShopifyPaymentsPayoutStatus`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutStatus). + +The payout includes a [`ShopifyPaymentsPayoutSummary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSummary) +that breaks down fees and gross amounts by transaction type, such as charges, +refunds, and adjustments. The [`ShopifyPaymentsPayoutTransactionType`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutTransactionType) +indicates whether funds move into the bank account (deposit) or back to Shopify +Payments (withdrawal). +""" +type ShopifyPaymentsPayout implements LegacyInteroperability & Node { + """ + The bank account for the payout. + """ + bankAccount: ShopifyPaymentsBankAccount @deprecated(reason: "Use `destinationAccount` instead.") + + """ + The business entity associated with the payout. + """ + businessEntity: BusinessEntity! + + """ + A unique trace ID from the financial institution. Use this reference number to track the payout with your provider. + """ + externalTraceId: String + + """ + The total amount and currency of the payout. + """ + gross: MoneyV2! @deprecated(reason: "Use `net` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The exact time when the payout was issued. The payout only contains + balance transactions that were available at this time. + """ + issuedAt: DateTime! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The total amount and currency of the payout. + """ + net: MoneyV2! + + """ + The transfer status of the payout. + """ + status: ShopifyPaymentsPayoutStatus! + + """ + The summary of the payout. + """ + summary: ShopifyPaymentsPayoutSummary! + + """ + The direction of the payout. + """ + transactionType: ShopifyPaymentsPayoutTransactionType! +} + +""" +Return type for `shopifyPaymentsPayoutAlternateCurrencyCreate` mutation. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreatePayload { + """ + The resulting alternate currency payout created. + """ + payout: ShopifyPaymentsToolingProviderPayout + + """ + Whether the alternate currency payout was created successfully. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ShopifyPaymentsPayoutAlternateCurrencyCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopifyPaymentsPayoutAlternateCurrencyCreate`. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreateUserError implements DisplayableError { + """ + The error code. + """ + code: ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Possible error codes that can be returned by `ShopifyPaymentsPayoutAlternateCurrencyCreateUserError`. +""" +enum ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode { + """ + 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 { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsPayoutEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsPayoutEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShopifyPaymentsPayout!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination. +""" +type ShopifyPaymentsPayoutEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of ShopifyPaymentsPayoutEdge. + """ + node: ShopifyPaymentsPayout! +} + +""" +The interval at which payouts are sent to the connected bank account. +""" +enum ShopifyPaymentsPayoutInterval { + """ + Each business day. + """ + DAILY + + """ + 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 { + """ + The interval at which payouts are sent to the connected bank account. + """ + interval: ShopifyPaymentsPayoutInterval! + + """ + The day of the month funds will be paid out. + + The value can be any day of the month from the 1st to the 31st. + If the payment interval is set to monthly, this value will be used. + Payouts scheduled between 29-31st of the month are sent on the last day of shorter months. + """ + monthlyAnchor: Int + + """ + The day of the week funds will be paid out. + + The value can be any weekday from Monday to Friday. + If the payment interval is set to weekly, this value will be used. + """ + weeklyAnchor: DayOfTheWeek +} + +""" +The transfer status of the payout. +""" +enum ShopifyPaymentsPayoutStatus { + """ + The payout has been 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 { + """ + Total fees for all adjustments including disputes. + """ + adjustmentsFee: MoneyV2! + + """ + Total gross amount for all adjustments including disputes. + """ + adjustmentsGross: MoneyV2! + + """ + Total fees for all advances. + """ + advanceFees: MoneyV2! + + """ + Total gross amount for all advances. + """ + advanceGross: MoneyV2! + + """ + Total fees for all charges. + """ + chargesFee: MoneyV2! + + """ + Total gross amount for all charges. + """ + chargesGross: MoneyV2! + + """ + Total fees for all refunds. + """ + refundsFee: MoneyV2! + + """ + Total gross amount for all refunds. + """ + refundsFeeGross: MoneyV2! + + """ + Total fees for all reserved funds. + """ + reservedFundsFee: MoneyV2! + + """ + Total gross amount for all reserved funds. + """ + reservedFundsGross: MoneyV2! + + """ + Total fees for all retried payouts. + """ + retriedPayoutsFee: MoneyV2! + + """ + Total gross amount for all retried payouts. + """ + retriedPayoutsGross: MoneyV2! + + """ + Total amount for all usdc rebate credit balance adjustments. + """ + usdcRebateCreditAmount: MoneyV2! +} + +""" +The possible transaction types for a payout. +""" +enum ShopifyPaymentsPayoutTransactionType { + """ + The payout is a deposit. + """ + DEPOSIT + + """ + The payout is a withdrawal. + """ + WITHDRAWAL +} + +""" +Presents all Shopify Payments specific information related to an order refund. +""" +type ShopifyPaymentsRefundSet { + """ + The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. + """ + acquirerReferenceNumber: String +} + +""" +The possible source types for a balance transaction. +""" +enum ShopifyPaymentsSourceType { + """ + The adjustment 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 { + """ + The type of the identification. + """ + taxIdentificationType: ShopifyPaymentsTaxIdentificationType! + + """ + The value of the identification. + """ + value: String! +} + +""" +The type of tax identification field. +""" +enum ShopifyPaymentsTaxIdentificationType { + """ + 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 { + """ + The balance amount the alternate currency payout was created for. + """ + amount: MoneyV2! + + """ + A timestamp for the arrival of the alternate currency payout. + """ + arrivalDate: DateTime + + """ + A timestamp for the creation of the alternate currency payout. + """ + createdAt: DateTime + + """ + The currency alternate currency payout was created in. + """ + currency: String! + + """ + The remote ID for the alternate currency payout. + """ + remoteId: String! +} + +""" +Presents all Shopify Payments specific information related to an order transaction. +""" +type ShopifyPaymentsTransactionSet { + """ + Contains all fields related to an extended authorization. + """ + extendedAuthorizationSet: ShopifyPaymentsExtendedAuthorization + + """ + Contains all fields related to a refund. + """ + refundSet: ShopifyPaymentsRefundSet +} + +""" +The possible types of transactions. +""" +enum ShopifyPaymentsTransactionType { + """ + The ach_bank_failure_debit_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_FEE + + """ + The ach_bank_failure_debit_reversal_fee transaction type. + """ + ACH_BANK_FAILURE_DEBIT_REVERSAL_FEE + + """ + The 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 agentic_fee_tax_credit transaction type. + """ + AGENTIC_FEE_TAX_CREDIT + + """ + The agentic_fee_tax_credit_reversal transaction type. + """ + AGENTIC_FEE_TAX_CREDIT_REVERSAL + + """ + The agentic_fee_tax_debit transaction type. + """ + AGENTIC_FEE_TAX_DEBIT + + """ + The agentic_fee_tax_debit_reversal transaction type. + """ + AGENTIC_FEE_TAX_DEBIT_REVERSAL + + """ + The anomaly_credit transaction type. + """ + ANOMALY_CREDIT + + """ + The anomaly_credit_reversal transaction type. + """ + ANOMALY_CREDIT_REVERSAL + + """ + The anomaly_debit transaction type. + """ + ANOMALY_DEBIT + + """ + The anomaly_debit_reversal transaction type. + """ + ANOMALY_DEBIT_REVERSAL + + """ + The 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 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 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 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The columns of the table. + """ + columns: [ShopifyqlTableDataColumn!]! + + """ + The rows of the table. + """ + rows: JSON! +} + +""" +Represents a column in a ShopifyQL query response. +""" +type ShopifyqlTableDataColumn { + """ + 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 { + """ + 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 staff member's initials, if available. + """ + initials: [String!] + + """ + Whether the staff member is the shop owner. + """ + isShopOwner: Boolean! + + """ + The staff member's last name. + """ + lastName: String + + """ + The staff member's preferred locale. Locale values use the format `language` + or `language-COUNTRY`, where `language` is a two-letter language code, and + `COUNTRY` is a two-letter country code. For example: `en` or `en-US` + """ + locale: String! + + """ + The staff member's full name. + """ + name: String! + + """ + The staff member's phone number. + """ + phone: String + + """ + The data used to customize the Shopify admin experience for the staff member. + """ + privateData: StaffMemberPrivateData! +} + +""" +An auto-generated type for paginating through multiple StaffMembers. +""" +type StaffMemberConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StaffMemberEdge!]! + + """ + A list of nodes that are contained in StaffMemberEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [StaffMember!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the fallback avatar image for a staff member. This is used only if the staff member has no avatar image. +""" +enum StaffMemberDefaultImage { + """ + Returns a default avatar image for the staff member. + """ + DEFAULT + + """ + Returns a 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 { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """ + The item at the end of StaffMemberEdge. + """ + node: StaffMember! +} + +""" +Represents access permissions for a staff member. +""" +enum StaffMemberPermission { + """ + The staff member can manage and install apps and channels. + """ + APPLICATIONS + + """ + The staff member can manage and install sales channels. + """ + CHANNELS + + """ + The staff member can create and edit customers. + """ + CREATE_AND_EDIT_CUSTOMERS + + """ + The staff member can create and edit gift cards. + """ + CREATE_AND_EDIT_GIFT_CARDS + + """ + The staff member can 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 erase customer private data. + """ + ERASE_CUSTOMER_DATA + + """ + The staff member can export customers. + """ + EXPORT_CUSTOMERS + + """ + The staff member can export gift cards. + """ + EXPORT_GIFT_CARDS + + """ + The staff has the same permissions as the [store owner](https://shopify.dev/en/manual/your-account/staff-accounts/staff-permissions#store-owner-permissions) + with some exceptions, such as modifying the account billing or deleting staff accounts. + """ + FULL @deprecated(reason: "Use the list of the staff member's explicit permissions returned in the `StaffMember.permissions.userPermissions` field instead of `full` permission.") + + """ + The staff member can view, create, issue, and export gift cards to a CSV file. + """ + GIFT_CARDS + + """ + The staff member can view and modify links and navigation menus. + """ + LINKS + + """ + The staff member can create, update, and delete locations where inventory is stocked or managed. + """ + LOCATIONS + + """ + The staff member can view and create discount codes and automatic discounts, and export discounts to a CSV file. + """ + MARKETING + + """ + The staff member can view, create, and automate marketing campaigns. + """ + MARKETING_SECTION + + """ + The staff member can merge customers. + """ + MERGE_CUSTOMERS + + """ + The staff member can view, create, update, delete, and cancel orders, and + receive order notifications. The staff member can still create draft orders + without this permission. + """ + ORDERS + + """ + The staff member can view the Overview and Live view pages, which include + sales information, and other shop and sales channels data. + """ + OVERVIEWS + + """ + The staff member can view, create, update, publish, and delete blog posts and pages. + """ + PAGES + + """ + The staff member can pay for an order by using a vaulted card. + """ + PAY_ORDERS_BY_VAULTED_CARD + + """ + The staff member can view the preferences and configuration of a shop. + """ + PREFERENCES + + """ + The staff member can view, create, import, and update products, collections, and inventory. + """ + PRODUCTS + + """ + The staff member can view and create all reports, which includes sales information and other shop data. + """ + REPORTS + + """ + The staff member can request customer private data. + """ + REQUEST_CUSTOMER_DATA + + """ + The staff member can view, update, and publish themes. + """ + THEMES + + """ + The staff member can view and create translations. + """ + TRANSLATIONS @deprecated(reason: "Unused.") + + """ + 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 { + """ + The URL to the staff member's account settings page. + """ + accountSettingsUrl: URL! + + """ + The date and time when the staff member was created. + """ + createdAt: DateTime! + + """ + Access permissions for the staff member. + """ + permissions: [StaffMemberPermission!]! @deprecated(reason: "There's no alternative field to use instead.") +} + +""" +The set of valid sort keys for the StaffMembers query. +""" +enum StaffMembersSortKeys { + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `first_name` value. + """ + FIRST_NAME + + """ + Sort by the `id` value. + """ + ID + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The POST HTTP method. + """ + POST + + """ + The PUT HTTP method. + """ + PUT +} + +""" +The input fields for generating staged upload targets. +""" +input StagedUploadInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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! +} + +""" +Describes a capability that is enabled on a Metaobject Definition. +""" +type StandardMetaobjectCapabilityTemplate { + """ + The type of capability that's enabled for the metaobject definition. + """ + capabilityType: MetaobjectCapabilityType! +} + +""" +Return type for `standardMetaobjectDefinitionEnable` mutation. +""" +type StandardMetaobjectDefinitionEnablePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The product taxonomy node associated with the standardized product type. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +A store credit account contains a monetary balance that can be redeemed at checkout for purchases in the shop. +The account is held in the specified currency and has an owner that cannot be transferred. + +The account balance is redeemable at checkout only when the owner is +authenticated via [new customer accounts +authentication](https://shopify.dev/docs/api/customer). +""" +type StoreCreditAccount implements Node { + """ + 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! + + """ + 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` | + | 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The amount to debit the store credit account. + """ + debitAmount: MoneyInput! +} + +""" +Return type for `storeCreditAccountDebit` mutation. +""" +type StoreCreditAccountDebitPayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 = OrderTransaction + +""" +The input fields to process a refund to store credit. +""" +input StoreCreditRefundInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the storefront access token to delete. + """ + id: ID! +} + +""" +Return type for `storefrontAccessTokenDelete` mutation. +""" +type StorefrontAccessTokenDeletePayload { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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! +} + +""" +Represents an applied code discount. +""" +type SubscriptionAppliedCodeDiscount { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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! +} + +""" +An auto-generated type for paginating through multiple SubscriptionBillingAttempts. +""" +type SubscriptionBillingAttemptConnection { + """ + 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 { + """ + 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 { + """ + The position 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! +} + +""" +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 { + """ + The amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + There was an error during the payment authentication. + """ + AUTHENTICATION_ERROR + + """ + Payment method was canceled by buyer. + """ + BUYER_CANCELED_PAYMENT_METHOD + + """ + Card number was incorrect. + """ + CARD_NUMBER_INCORRECT + + """ + Customer is invalid. + """ + CUSTOMER_INVALID + + """ + Customer was not found. + """ + CUSTOMER_NOT_FOUND + + """ + 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 + + """ + Insufficient funds. + """ + INSUFFICIENT_FUNDS + + """ + Not enough inventory found. + """ + INSUFFICIENT_INVENTORY + + """ + The billing address is invalid. + """ + INVALID_BILLING_ADDRESS + + """ + The billing agreement ID or the transaction ID for the customer's payment method is invalid. + """ + INVALID_CUSTOMER_BILLING_AGREEMENT + + """ + Payment method is invalid. Please update or create a new payment method. + """ + INVALID_PAYMENT_METHOD + + """ + 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 + + """ + Non-test order limit reached. Use a test payment gateway to place another order. + """ + NON_TEST_ORDER_LIMIT_REACHED + + """ + 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 provider is not enabled. + """ + PAYMENT_PROVIDER_IS_NOT_ENABLED + + """ + Paypal Error General. + """ + PAYPAL_ERROR_GENERAL + + """ + Purchase Type is not supported. + """ + PURCHASE_TYPE_NOT_SUPPORTED + + """ + Gateway is in test mode and attempted to bill a live payment method. + """ + TEST_MODE + + """ + Transient error, try again later. + """ + TRANSIENT_ERROR + + """ + There was an unexpected error during the billing attempt. + """ + UNEXPECTED_ERROR +} + +""" +A base error type that applies to all uncategorized error classes. +""" +type SubscriptionBillingAttemptGenericError implements SubscriptionBillingAttemptProcessingError { + """ + 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 { + """ + 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 +} + +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptInsufficientStockProductVariantsError implements SubscriptionBillingAttemptProcessingError { + """ + 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! +} + +""" +The inventory policy for a billing attempt. +""" +enum SubscriptionBillingAttemptInventoryPolicy { + """ + 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 { + """ + 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.") +} + +""" +An error that prevented a billing attempt. +""" +interface SubscriptionBillingAttemptProcessingError { + """ + The code for the error. + """ + code: SubscriptionBillingAttemptErrorCode! + + """ + An explanation of the error. + """ + message: String! +} + +""" +The set of valid sort keys for the SubscriptionBillingAttempts query. +""" +enum SubscriptionBillingAttemptsSortKeys { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +A subscription billing cycle. +""" +type SubscriptionBillingCycle { + """ + 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 { + """ + 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 { + """ + The billing cycle is billed. + """ + BILLED + + """ + The billing cycle hasn't been billed. + """ + UNBILLED +} + +""" +Return type for `subscriptionBillingCycleBulkCharge` mutation. +""" +type SubscriptionBillingCycleBulkChargePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the subscription contract associated with the billing cycle. + """ + contractId: ID! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Returns a billing cycle by date. + """ + date: DateTime + + """ + Returns a billing cycle by index. + """ + index: Int +} + +""" +Return type for `subscriptionBillingCycleSkip` mutation. +""" +type SubscriptionBillingCycleSkipPayload { + """ + 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 { + """ + 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionBillingCycleUnskip` mutation. +""" +type SubscriptionBillingCycleUnskipPayload { + """ + 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 { + """ + 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +The possible errors for a subscription billing cycle. +""" +type SubscriptionBillingCycleUserError implements DisplayableError { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Sort by the `cycle_index` value. + """ + CYCLE_INDEX + + """ + Sort by the `id` value. + """ + ID +} + +""" +Select subscription billing cycles to be targeted. +""" +enum SubscriptionBillingCyclesTargetSelection { + """ + Target all current and upcoming subscription billing cycles. + """ + ALL +} + +""" +Represents a Subscription Billing Policy. +""" +type SubscriptionBillingPolicy { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! + + """ + 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! +} + +""" +Return type for `subscriptionContractAtomicCreate` mutation. +""" +type SubscriptionContractAtomicCreatePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! + + """ + The next billing date for the subscription contract. + """ + nextBillingDate: DateTime! +} + +""" +Return type for `subscriptionContractCreate` mutation. +""" +type SubscriptionContractCreatePayload { + """ + 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 { + """ + The position 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 { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionContractExpire` mutation. +""" +type SubscriptionContractExpirePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Failed subscription billing attempt. + """ + FAILED + + """ + Successful subscription billing attempt. + """ + SUCCEEDED +} + +""" +Return type for `subscriptionContractPause` mutation. +""" +type SubscriptionContractPausePayload { + """ + 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 { + """ + The price of the product. + """ + currentPrice: Decimal + + """ + The ID of the product variant the subscription line refers to. + """ + productVariantId: ID +} + +""" +Return type for `subscriptionContractProductChange` mutation. +""" +type SubscriptionContractProductChangePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 = 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + The details of the pickup method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOptionInput +} + +""" +Represents the selected pickup option on a subscription contract. +""" +type SubscriptionDeliveryMethodPickupOption { + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The carrier service ID of the shipping option. + """ + carrierServiceId: ID + + """ + 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 = SubscriptionLocalDeliveryOption | SubscriptionPickupOption | SubscriptionShippingOption + +""" +The result of the query to fetch delivery options for the subscription contract. +""" +union SubscriptionDeliveryOptionResult = SubscriptionDeliveryOptionResultFailure | SubscriptionDeliveryOptionResultSuccess + +""" +A failure to find the available delivery options for a subscription contract. +""" +type SubscriptionDeliveryOptionResultFailure { + """ + The reason for the failure. + """ + message: String +} + +""" +The delivery option for a subscription contract. +""" +type SubscriptionDeliveryOptionResultSuccess { + """ + The available delivery options. + """ + deliveryOptions: [SubscriptionDeliveryOption!]! +} + +""" +Represents a Subscription Delivery Policy. +""" +type SubscriptionDeliveryPolicy { + """ + 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 { + """ + 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 = SubscriptionAppliedCodeDiscount | SubscriptionManualDiscount + +""" +Represents what a particular discount reduces from a line price. +""" +type SubscriptionDiscountAllocation { + """ + Allocation amount. + """ + amount: MoneyV2! + + """ + Discount that created the allocation. + """ + discount: SubscriptionDiscount! +} + +""" +An auto-generated type for paginating through multiple SubscriptionDiscounts. +""" +type SubscriptionDiscountConnection { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + The percentage value of the discount. + """ + percentage: Int! +} + +""" +The reason a discount on a subscription draft was rejected. +""" +enum SubscriptionDiscountRejectionReason { + """ + 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 = 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + The current status of the subscription contract. + """ + status: SubscriptionContractSubscriptionStatus +} + +""" +Return type for `subscriptionDraftLineAdd` mutation. +""" +type SubscriptionDraftLineAddPayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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! + + """ + The quantity of the product. + """ + quantity: Int! + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + + Defaults to using the selling plan's current name when not specified. + """ + sellingPlanName: String +} + +""" +The input fields required to update a subscription line on a contract. +""" +input SubscriptionLineUpdateInput { + """ + 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 + + """ + The quantity of the product. + """ + quantity: Int + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + """ + sellingPlanName: String +} + +""" +A local delivery option for a subscription contract. +""" +type SubscriptionLocalDeliveryOption { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The ID of the lines to add to the subscription discount. + """ + add: [ID!] + + """ + The ID of the lines to remove from the subscription discount. + """ + remove: [ID!] +} + +""" +The input fields for the discount value and its distribution. +""" +input SubscriptionManualDiscountValueInput { + """ + 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 +} + +""" +A pickup option to deliver a subscription contract. +""" +type SubscriptionPickupOption { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 = SubscriptionShippingOptionResultFailure | SubscriptionShippingOptionResultSuccess + +""" +Failure determining available shipping options for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultFailure { + """ + Failure reason. + """ + message: String +} + +""" +A shipping option for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultSuccess { + """ + Available shipping options. + """ + shippingOptions: [SubscriptionShippingOption!]! +} + +""" +A suggested transaction. Suggested transaction are usually used in the context of refunds +and exchanges. +""" +type SuggestedOrderTransaction { + """ + 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 +} + +""" +Specifies the kind of the suggested order transaction. +""" +enum SuggestedOrderTransactionKind { + """ + A suggested refund transaction for an order. + """ + SUGGESTED_REFUND +} + +""" +The input fields for an exchange line item. +""" +input SuggestedOutcomeExchangeLineItemInput { + """ + The ID of the exchange line item. + """ + id: ID! + + """ + The quantity of the exchange line item. + """ + quantity: Int! +} + +""" +The input fields for a return line item. +""" +input SuggestedOutcomeReturnLineItemInput { + """ + The ID of the return line item. + """ + id: ID! + + """ + 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 { + """ + 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! + + """ + 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 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 { + """ + 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 { + """ + 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 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 { + """ + 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 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 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + State of the tax app configuration. + """ + state: TaxPartnerState! +} + +""" +Return type for `taxAppConfigure` mutation. +""" +type TaxAppConfigurePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 +} + +""" +Return type for `taxSummaryCreate` mutation. +""" +type TaxSummaryCreatePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + The ID of the category associated with the descendant categories to return. + """ + descendantsOf: ID + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The 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 + ): TaxonomyCategoryConnection! +} + +""" +A Shopify product taxonomy attribute. +""" +type TaxonomyAttribute implements Node { + """ + 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 { + """ + 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 = TaxonomyAttribute | TaxonomyChoiceListAttribute | TaxonomyMeasurementAttribute + +""" +An auto-generated type for paginating through multiple TaxonomyCategoryAttributes. +""" +type TaxonomyCategoryAttributeConnection { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 = TenderTransactionCreditCardDetails + +""" +An auto-generated type which holds one TenderTransaction and a cursor during pagination. +""" +type TenderTransactionEdge { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Return type for `themeDuplicate` mutation. +""" +type ThemeDuplicatePayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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! +} + +""" +Transaction fee related to an order transaction. +""" +type TransactionFee implements Node { + """ + 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 { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `expires_at` value. + """ + EXPIRES_AT +} + +""" +Return type for `transactionVoid` mutation. +""" +type TransactionVoidPayload { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + ): [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 + + """ + Filters by outdated translations. + """ + outdated: Boolean + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple TranslatableResources. +""" +type TranslatableResourceConnection { + """ + 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 { + """ + The position 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The quantity unit for the unit price measurement. + """ + quantityUnit: UnitPriceMeasurementMeasuredUnit + + """ + The quantity value for the unit price measurement. + """ + quantityValue: Float + + """ + The reference unit for the unit price measurement. + """ + referenceUnit: UnitPriceMeasurementMeasuredUnit + + """ + The reference value for the unit price measurement. + """ + referenceValue: Int +} + +""" +The accepted types of unit of measurement. +""" +enum UnitPriceMeasurementMeasuredType { + """ + Unit of measurements representing 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + The alt text associated to the media. + """ + alt: String + + """ + Specifies the media to update. + """ + id: ID! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Invalid search string. + """ + INVALID_SEARCH_ARGUMENT +} + +""" +An auto-generated type for paginating through multiple UrlRedirects. +""" +type UrlRedirectConnection { + """ + 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 { + """ + The created redirect. + """ + urlRedirect: UrlRedirect + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectUserError!]! +} + +""" +Return type for `urlRedirectDelete` mutation. +""" +type UrlRedirectDeletePayload { + """ + 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 { + """ + The position 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 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 { + """ + 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 { + """ + 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 { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ValidationUserError!]! + + """ + The created validation. + """ + validation: Validation +} + +""" +Return type for `validationDelete` mutation. +""" +type ValidationDeletePayload { + """ + 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 { + """ + The position 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 { + """ + Sort by the `id` value. + """ + ID +} + +""" +The input fields required to update a validation. +""" +input ValidationUpdateInput { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Specifies the product option value by ID. + """ + id: ID + + """ + 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 + + """ + Specifies the product option by name. + """ + optionName: String +} + +""" +Represents a credit card payment instrument. +""" +type VaultCreditCard { + """ + 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! +} + +""" +Represents a paypal billing agreement payment instrument. +""" +type VaultPaypalBillingAgreement { + """ + Whether the paypal billing agreement is inactive. + """ + inactive: Boolean! + + """ + The paypal account name. + """ + name: String! + + """ + The paypal account email address. + """ + paypalAccountEmail: String! +} + +""" +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 { + """ + 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 { + """ + 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! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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!]! + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + The position 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 = WebhookEventBridgeEndpoint | WebhookHttpEndpoint | WebhookPubSubEndpoint + +""" +The supported formats for webhook subscriptions. +""" +enum WebhookSubscriptionFormat { + JSON + XML +} + +""" +The input fields for a webhook subscription. +""" +input WebhookSubscriptionInput { + """ + 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!] + + """ + 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 { + """ + 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 { + """ + 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 { + """ + 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 + + """ + 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 + + """ + 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/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 + + """ + 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_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/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/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 `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 `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/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_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 + + """ + 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 + + """ + 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 + + """ + 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 `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 { + """ + 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 { + """ + 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 { + """ + 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 { + """ + Metric system unit of mass. + """ + GRAMS + + """ + 1 kilogram equals 1000 grams. + """ + KILOGRAMS + + """ + Imperial system unit of mass. + """ + OUNCES + + """ + 1 pound equals 16 ounces. + """ + POUNDS +}