diff --git a/auth/service/service/service.go b/auth/service/service/service.go index 3d6693951..8b52f4100 100644 --- a/auth/service/service/service.go +++ b/auth/service/service/service.go @@ -5,7 +5,11 @@ import ( "net/http" "time" + "github.com/tidepool-org/platform/customerio" "github.com/tidepool-org/platform/mailer" + "github.com/tidepool-org/platform/oura/jotform" + "github.com/tidepool-org/platform/oura/shopify" + "github.com/tidepool-org/platform/user" userClient "github.com/tidepool-org/platform/user/client" @@ -37,6 +41,10 @@ import ( dexcomProvider "github.com/tidepool-org/platform/dexcom/provider" "github.com/tidepool-org/platform/errors" "github.com/tidepool-org/platform/events" + jotformAPI "github.com/tidepool-org/platform/oura/jotform/api" + shopifyAPI "github.com/tidepool-org/platform/oura/shopify/api" + shopifyClient "github.com/tidepool-org/platform/oura/shopify/client" + "github.com/tidepool-org/platform/log" oauthProvider "github.com/tidepool-org/platform/oauth/provider" "github.com/tidepool-org/platform/platform" @@ -64,21 +72,24 @@ func (c *confirmationClientConfig) Load() error { type Service struct { *serviceService.Service domain string + appValidator *appvalidate.Validator + authClient *Client authStore *authStoreMongo.Store - workStructuredStore *workStoreStructuredMongo.Store + confirmationClient confirmationClient.ClientWithResponsesInterface + customerIOClient *customerio.Client dataClient dataClient.Client dataSourceClient *dataSourceClient.Client - confirmationClient confirmationClient.ClientWithResponsesInterface - taskClient task.Client - workClient *workService.Client - providerFactory *providerFactory.Factory - authClient *Client - userEventsHandler events.Runner deviceCheck apple.DeviceCheck - appValidator *appvalidate.Validator partnerSecrets *appvalidate.PartnerSecrets + providerFactory *providerFactory.Factory + shopifyClient shopify.Client + taskClient task.Client twiistServiceAccountAuthorizer auth.ServiceAccountAuthorizer + userEventsHandler events.Runner + userClient user.Client consentService consent.Service + workClient *workService.Client + workStructuredStore *workStoreStructuredMongo.Store } func New() *Service { @@ -134,6 +145,9 @@ func (s *Service) Initialize(provider application.Provider) error { if err := s.initializeAuthClient(); err != nil { return err } + if err := s.initializeUserClient(); err != nil { + return err + } if err := s.initializeConsentService(); err != nil { return err } @@ -152,6 +166,12 @@ func (s *Service) Initialize(provider application.Provider) error { if err := s.initializeTwiistServiceAccountAuthorizer(); err != nil { return err } + if err := s.initializeCustomerIOClient(); err != nil { + return err + } + if err := s.initializeShopifyClient(); err != nil { + return err + } if err := s.initializeRouter(); err != nil { return err } @@ -253,6 +273,87 @@ func (s *Service) terminateDomain() { } } +func (s *Service) initializeUserClient() error { + s.Logger().Debug("Initializing user client") + var err error + s.userClient, err = userClient.NewDefaultClient(userClient.Params{ + ConfigReporter: s.ConfigReporter(), + Logger: s.Logger(), + UserAgent: s.UserAgent(), + }) + if err != nil { + return errors.Wrap(err, "unable to create user client") + } + return nil +} + +func (s *Service) initializeShopifyClient() error { + shopifyConfig := shopify.ClientConfig{} + if err := envconfig.Process("", &shopifyConfig); err != nil { + return errors.Wrap(err, "unable to load shopify config") + } + + var err error + s.shopifyClient, err = shopifyClient.New(context.Background(), shopifyConfig) + if err != nil { + return errors.Wrap(err, "unable to create shopify client") + } + + return nil +} +func (s *Service) initializeCustomerIOClient() error { + customerIOConfig := customerio.Config{} + if err := envconfig.Process("", &customerIOConfig); err != nil { + return errors.Wrap(err, "unable to load customerio config") + } + + var err error + s.customerIOClient, err = customerio.NewClient(customerIOConfig, s.Logger()) + if err != nil { + return errors.Wrap(err, "unable to create customerio client") + } + + return nil +} + +func (s *Service) createJotformRouter() (*jotformAPI.Router, error) { + jotformConfig := jotform.Config{} + if err := envconfig.Process("", &jotformConfig); err != nil { + return nil, errors.Wrap(err, "unable to load jotform config") + } + + webhookProcessor, err := jotform.NewWebhookProcessor(jotformConfig, s.Logger(), s.consentService, s.customerIOClient, s.userClient, s.shopifyClient) + if err != nil { + return nil, errors.Wrap(err, "unable to create jotform webhook processor") + } + + jotformRouter, err := jotformAPI.NewRouter(webhookProcessor) + if err != nil { + return nil, errors.Wrap(err, "unable to create jotform router") + } + + return jotformRouter, nil +} + +func (s *Service) createShopifyRouter() (*shopifyAPI.Router, error) { + fulfillmentEventProcessor, err := shopify.NewFulfillmentEventProcessor(s.Logger(), s.customerIOClient, s.shopifyClient, s.AuthServiceClient()) + if err != nil { + return nil, errors.Wrap(err, "unable to create fulfillment event processor") + } + + ordersCreateEventProcessor, err := shopify.NewOrdersCreateEventProcessor(s.Logger(), s.customerIOClient) + if err != nil { + return nil, errors.Wrap(err, "unable to create orders create event processor") + } + + shopifyRouter, err := shopifyAPI.NewRouter(fulfillmentEventProcessor, ordersCreateEventProcessor) + if err != nil { + return nil, errors.Wrap(err, "unable to create shopify router") + } + + return shopifyRouter, nil +} + func (s *Service) initializeRouter() error { s.Logger().Debug("Creating api router") @@ -275,9 +376,23 @@ func (s *Service) initializeRouter() error { return errors.Wrap(err, "unable to create consent router") } + s.Logger().Debug("Creating jotform router") + + jotformRouter, err := s.createJotformRouter() + if err != nil { + return errors.Wrap(err, "unable to create jotform router") + } + + s.Logger().Debug("Creating shopify router") + + shopifyRouter, err := s.createShopifyRouter() + if err != nil { + return errors.Wrap(err, "unable to create shopify router") + } + s.Logger().Debug("Initializing routers") - if err = s.API().InitializeRouters(apiRouter, v1Router, consentV1Router); err != nil { + if err = s.API().InitializeRouters(apiRouter, v1Router, consentV1Router, jotformRouter, shopifyRouter); err != nil { return errors.Wrap(err, "unable to initialize routers") } @@ -362,16 +477,6 @@ func (s *Service) initializeConsentService() error { return errors.Wrap(err, "unable to create bddp sharer") } - s.Logger().Debug("Initializing user client") - usrClient, err := userClient.NewDefaultClient(userClient.Params{ - ConfigReporter: s.ConfigReporter(), - Logger: s.Logger(), - UserAgent: s.UserAgent(), - }) - if err != nil { - return errors.Wrap(err, "unable to create user client") - } - s.Logger().Debug("Initializing mailer") mailr, err := mailer.Client() if err != nil { @@ -379,7 +484,7 @@ func (s *Service) initializeConsentService() error { } s.Logger().Debug("Initializing consent mailer") - consentMailer, err := consentService.NewConsentMailer(mailr, usrClient, s.Logger()) + consentMailer, err := consentService.NewConsentMailer(mailr, s.userClient, s.Logger()) if err != nil { return errors.Wrap(err, "unable to create consent mailer") } diff --git a/customerio/client.go b/customerio/client.go new file mode 100644 index 000000000..7e64f94cf --- /dev/null +++ b/customerio/client.go @@ -0,0 +1,96 @@ +package customerio + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "net/http" + + "github.com/tidepool-org/platform/client" + "github.com/tidepool-org/platform/errors" + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/request" +) + +type Client struct { + appClient *client.Client + trackClient *client.Client + config Config + logger log.Logger + httpClient *http.Client +} + +type Config struct { + AppAPIBaseURL string `envconfig:"TIDEPOOL_CUSTOMERIO_APP_API_BASE_URL" default:"https://api.customer.io"` + AppAPIKey string `envconfig:"TIDEPOOL_CUSTOMERIO_APP_API_KEY"` + SiteID string `envconfig:"TIDEPOOL_CUSTOMERIO_SITE_ID"` + TrackAPIBaseURL string `envconfig:"TIDEPOOL_CUSTOMERIO_TRACK_API_BASE_URL" default:"https://track.customer.io"` + TrackAPIKey string `envconfig:"TIDEPOOL_CUSTOMERIO_TRACK_API_KEY"` +} + +func NewClient(config Config, logger log.Logger) (*Client, error) { + errorParser := newErrorResponseParser() + + appClient, err := client.NewWithErrorParser(&client.Config{ + Address: config.AppAPIBaseURL, + }, errorParser) + if err != nil { + return nil, errors.Wrap(err, "failed to create app API client") + } + + trackClient, err := client.NewWithErrorParser(&client.Config{ + Address: config.TrackAPIBaseURL, + }, errorParser) + if err != nil { + return nil, errors.Wrap(err, "failed to create track API client") + } + + return &Client{ + appClient: appClient, + trackClient: trackClient, + config: config, + logger: logger, + httpClient: http.DefaultClient, + }, nil +} + +// appAPIAuthMutator returns a request mutator for App API authentication (Bearer token) +func (c *Client) appAPIAuthMutator() *request.HeaderMutator { + return request.NewHeaderMutator("Authorization", fmt.Sprintf("Bearer %s", c.config.AppAPIKey)) +} + +// trackAPIAuthMutator returns a request mutator for Track API authentication (Basic auth) +func (c *Client) trackAPIAuthMutator() *request.HeaderMutator { + auth := c.config.SiteID + ":" + c.config.TrackAPIKey + basicAuth := "Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + return request.NewHeaderMutator("Authorization", basicAuth) +} + +// errorResponseParser implements client.ErrorResponseParser for Customer.io API errors +type errorResponseParser struct{} + +func newErrorResponseParser() *errorResponseParser { + return &errorResponseParser{} +} + +func (p *errorResponseParser) ParseErrorResponse(ctx context.Context, res *http.Response, req *http.Request) error { + var errResp errorResponse + if err := json.NewDecoder(res.Body).Decode(&errResp); err != nil { + return nil + } + + if len(errResp.Errors) > 0 { + return errors.Newf("API error (status %d): %s", res.StatusCode, errResp.Errors[0].Message) + } + + return nil +} + +type errorResponse struct { + Errors []struct { + Reason string `json:"reason,omitempty"` + Field string `json:"field,omitempty"` + Message string `json:"message,omitempty"` + } `json:"errors,omitempty"` +} diff --git a/customerio/customer.go b/customerio/customer.go new file mode 100644 index 000000000..8f656ab7b --- /dev/null +++ b/customerio/customer.go @@ -0,0 +1,118 @@ +package customerio + +import ( + "context" + "net/http" + + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/request" +) + +const ( + IDTypeCIOID IDType = "cio_id" + IDTypeUserID IDType = "id" +) + +type IDType string + +type Customer struct { + Identifiers `json:",inline"` + Attributes `json:",inline"` +} + +type Attributes struct { + Phase1 string `json:"phase1,omitempty"` + UserID string `json:"user_id"` + + OuraSizingKitDiscountCode string `json:"oura_sizing_kit_discount_code,omitempty"` + OuraRingDiscountCode string `json:"oura_ring_discount_code,omitempty"` + OuraParticipantID string `json:"oura_participant_id,omitempty"` + + Update bool `json:"_update,omitempty"` +} + +type customerResponse struct { + Customer struct { + ID string + Identifiers Identifiers `json:"identifiers"` + Attributes Attributes `json:"attributes"` + } `json:"customer"` +} + +type FindCustomersResponse struct { + Identifiers []Identifiers `json:"identifiers"` +} + +type entityRequest struct { + Type string `json:"type"` + Identifiers map[string]string `json:"identifiers"` + Action string `json:"action"` + Attributes Attributes `json:"attributes,omitempty"` +} + +func (c *Client) GetCustomer(ctx context.Context, cid string, typ IDType) (*Customer, error) { + ctx = log.NewContextWithLogger(ctx, c.logger) + url := c.appClient.ConstructURL("v1", "customers", cid, "attributes") + + mutators := []request.RequestMutator{ + request.NewParameterMutator("id_type", string(typ)), + c.appAPIAuthMutator(), + } + + c.logger.WithField("cid", cid).WithField("url", url).Debug("fetching customer") + + var response customerResponse + if err := c.appClient.RequestDataWithHTTPClient(ctx, http.MethodGet, url, mutators, nil, &response, nil, c.httpClient); err != nil { + if request.IsErrorResourceNotFound(err) { + return nil, nil + } + return nil, err + } + + return &Customer{ + Identifiers: response.Customer.Identifiers, + Attributes: response.Customer.Attributes, + }, nil +} + +func (c *Client) FindCustomers(ctx context.Context, filter map[string]any) (*FindCustomersResponse, error) { + ctx = log.NewContextWithLogger(ctx, c.logger) + url := c.appClient.ConstructURL("v1", "customers") + + mutators := []request.RequestMutator{ + c.appAPIAuthMutator(), + } + + c.logger.WithField("url", url).WithField("filter", filter).Debug("finding customer") + + var response FindCustomersResponse + if err := c.appClient.RequestDataWithHTTPClient(ctx, http.MethodPost, url, mutators, filter, &response, nil, c.httpClient); err != nil { + return nil, err + } + + return &response, nil +} + +func (c *Client) UpdateCustomer(ctx context.Context, customer Customer) error { + ctx = log.NewContextWithLogger(ctx, c.logger) + url := c.trackClient.ConstructURL("api", "v2", "entity") + + // Prepare the request body + reqBody := entityRequest{ + Type: "person", + Identifiers: map[string]string{"cio_id": customer.CID}, + Action: "identify", + Attributes: customer.Attributes, + } + reqBody.Attributes.Update = true + + mutators := []request.RequestMutator{ + c.trackAPIAuthMutator(), + } + + if err := c.trackClient.RequestDataWithHTTPClient(ctx, http.MethodPost, url, mutators, reqBody, nil, nil, c.httpClient); err != nil { + return err + } + + return nil +} diff --git a/customerio/event.go b/customerio/event.go new file mode 100644 index 000000000..db25b1f1f --- /dev/null +++ b/customerio/event.go @@ -0,0 +1,30 @@ +package customerio + +import ( + "context" + "net/http" + + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/request" +) + +type Event struct { + Name string `json:"name"` + ID string `json:"id"` + Data any `json:"data"` +} + +func (c *Client) SendEvent(ctx context.Context, cid string, event Event) error { + ctx = log.NewContextWithLogger(ctx, c.logger) + url := c.trackClient.ConstructURL("api", "v1", "customers", cid, "events") + + mutators := []request.RequestMutator{ + c.trackAPIAuthMutator(), + } + + if err := c.trackClient.RequestDataWithHTTPClient(ctx, http.MethodPost, url, mutators, event, nil, nil, c.httpClient); err != nil { + return err + } + + return nil +} diff --git a/customerio/segment.go b/customerio/segment.go new file mode 100644 index 000000000..5f8cb5b1f --- /dev/null +++ b/customerio/segment.go @@ -0,0 +1,55 @@ +package customerio + +import ( + "context" + "net/http" + + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/request" +) + +type Identifiers struct { + Email string `json:"email"` + ID string `json:"id"` + CID string `json:"cio_id"` +} + +type segmentMembershipResponse struct { + Identifiers []Identifiers `json:"identifiers"` + IDs []string `json:"ids"` + Next string `json:"next,omitempty"` +} + +func (c *Client) ListCustomersInSegment(ctx context.Context, segmentID string) ([]Identifiers, error) { + ctx = log.NewContextWithLogger(ctx, c.logger) + var allIdentifiers []Identifiers + start := "" + + for { + url := c.appClient.ConstructURL("v1", "segments", segmentID, "membership") + + mutators := []request.RequestMutator{ + c.appAPIAuthMutator(), + } + + // Add pagination parameter if available + if start != "" { + mutators = append(mutators, request.NewParameterMutator("start", start)) + } + + var response segmentMembershipResponse + if err := c.appClient.RequestDataWithHTTPClient(ctx, http.MethodGet, url, mutators, nil, &response, nil, c.httpClient); err != nil { + return nil, err + } + + allIdentifiers = append(allIdentifiers, response.Identifiers...) + + // Check if there are more pages + if response.Next == "" { + break + } + start = response.Next + } + + return allIdentifiers, nil +} diff --git a/genqlient.yaml b/genqlient.yaml new file mode 100644 index 000000000..e0957492d --- /dev/null +++ b/genqlient.yaml @@ -0,0 +1,14 @@ +# See https://github.com/Khan/genqlient/blob/main/docs/genqlient.yaml for detailed documentation. +schema: ./oura/shopify/schema/shopify.graphql +operations: +- "./oura/shopify/client/*.go" +generated: ./oura/shopify/generated/generated.go +bindings: + DateTime: + type: time.Time + UnsignedInt64: + type: string + Decimal: + type: string +use_struct_references: true +optional: pointer_omitempty \ No newline at end of file diff --git a/go.mod b/go.mod index fcb2c4dc0..c7f114f21 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gowebpki/jcs v1.0.1 github.com/hashicorp/go-uuid v1.0.3 + github.com/jotform/jotform-api-go/v2 v2.0.0-20220216084719-035fd932c865 github.com/kelseyhightower/envconfig v1.4.0 github.com/lestrrat-go/jwx/v2 v2.1.4 github.com/mitchellh/go-homedir v1.1.0 @@ -34,13 +35,13 @@ require ( go.mongodb.org/mongo-driver v1.17.3 go.uber.org/fx v1.23.0 go.uber.org/mock v0.5.2 - golang.org/x/crypto v0.36.0 + golang.org/x/crypto v0.41.0 golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 golang.org/x/lint v0.0.0-20241112194109-818c5a804067 golang.org/x/oauth2 v0.28.0 - golang.org/x/sync v0.12.0 - golang.org/x/text v0.23.0 - golang.org/x/tools v0.31.0 + golang.org/x/sync v0.16.0 + golang.org/x/text v0.28.0 + golang.org/x/tools v0.36.0 google.golang.org/grpc v1.71.0 gopkg.in/yaml.v2 v2.4.0 syreclabs.com/go/faker v1.2.3 @@ -48,9 +49,14 @@ require ( require ( codeberg.org/go-pdf/fpdf v0.11.1 // indirect + github.com/Khan/genqlient v0.8.2-0.20251119064104-5b0aabc933fa // indirect + github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/alexflint/go-arg v1.5.1 // indirect + github.com/alexflint/go-scalar v1.2.0 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/canhlinh/svg2png v0.0.0-20201124065332-6ba87c82371f // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudevents/sdk-go/protocol/kafka_sarama/v2 v2.15.2 // indirect @@ -109,6 +115,7 @@ require ( github.com/segmentio/asm v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/ugorji/go/codec v1.2.12 // indirect + github.com/vektah/gqlparser/v2 v2.5.19 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect @@ -118,10 +125,10 @@ require ( go.uber.org/dig v1.18.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect + golang.org/x/mod v0.27.0 // indirect + golang.org/x/net v0.43.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/term v0.34.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect google.golang.org/protobuf v1.36.5 // indirect diff --git a/go.sum b/go.sum index 4034e852d..8036152b9 100644 --- a/go.sum +++ b/go.sum @@ -3,11 +3,22 @@ codeberg.org/go-pdf/fpdf v0.11.1/go.mod h1:Y0DGRAdZ0OmnZPvjbMp/1bYxmIPxm0ws4tfoP github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/IBM/sarama v1.45.1 h1:nY30XqYpqyXOXSNoe2XCgjj9jklGM1Ye94ierUb1jQ0= github.com/IBM/sarama v1.45.1/go.mod h1:qifDhA3VWSrQ1TjSMyxDl3nYL3oX2C83u+G6L79sq4w= +github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs= +github.com/Khan/genqlient v0.8.1/go.mod h1:R2G6DzjBvCbhjsEajfRjbWdVglSH/73kSivC9TLWVjU= +github.com/Khan/genqlient v0.8.2-0.20251119064104-5b0aabc933fa h1:8e31xGzag/9cLq3LO7SKlSXEcvQiN1d4quamOjDzoc4= +github.com/Khan/genqlient v0.8.2-0.20251119064104-5b0aabc933fa/go.mod h1:guUHwMi8ByjIvs3TyAPM+V9ryaW305CtK7+aCeP2Jzc= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/alexflint/go-arg v1.5.1 h1:nBuWUCpuRy0snAG+uIJ6N0UvYxpxA0/ghA/AaHxlT8Y= +github.com/alexflint/go-arg v1.5.1/go.mod h1:A7vTJzvjoaSTypg4biM5uYNTkJ27SkNTArtYXnlqVO8= +github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw= +github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= github.com/ant0ine/go-json-rest v3.3.2+incompatible h1:nBixrkLFiDNAW0hauKDLc8yJI6XfrQumWvytE1Hk14E= github.com/ant0ine/go-json-rest v3.3.2+incompatible/go.mod h1:q6aCt0GfU6LhpBsnZ/2U+mwe+0XB5WStbmwyoPfc+sk= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= @@ -18,7 +29,10 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/canhlinh/svg2png v0.0.0-20201124065332-6ba87c82371f h1:Km7aXA1/+77OZ6mq8VV/QJ9nP6y4OUwxj+GQ5nW7X5Y= github.com/canhlinh/svg2png v0.0.0-20201124065332-6ba87c82371f/go.mod h1:u13M4umOwLc1fTX2itKxGff/6S+YWc7l15kJGtm2IJY= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -37,6 +51,7 @@ github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+Zlfu github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dvsekhvalnov/jose2go v1.8.0 h1:LqkkVKAlHFfH9LOEl5fe4p/zL02OhWE7pCufMBG2jLA= github.com/dvsekhvalnov/jose2go v1.8.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= @@ -116,6 +131,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jotform/jotform-api-go/v2 v2.0.0-20220216084719-035fd932c865 h1:s/ZhV8gjiS///H7S/qm1iI/6YhMNx91t76S+61Q9tNU= +github.com/jotform/jotform-api-go/v2 v2.0.0-20220216084719-035fd932c865/go.mod h1:VgH1fhSKgJgeRtI9FkzACcW+v3ZZQHVHxXQqX1fBnQM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= @@ -205,6 +222,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -232,6 +250,8 @@ github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/vektah/gqlparser/v2 v2.5.19 h1:bhCPCX1D4WWzCDvkPl4+TP1N8/kLrWnp43egplt7iSg= +github.com/vektah/gqlparser/v2 v2.5.19/go.mod h1:y7kvl5bBlDeuWIvLtA9849ncyvx6/lj06RsMrEjVy3U= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -278,6 +298,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= +golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= golang.org/x/lint v0.0.0-20241112194109-818c5a804067 h1:adDmSQyFTCiv19j015EGKJBoaa7ElV0Q1Wovb/4G7NA= @@ -287,6 +309,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -297,6 +321,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= +golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -304,6 +330,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -320,11 +348,15 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= +golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -332,6 +364,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= +golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -341,6 +375,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/oura/events.go b/oura/events.go new file mode 100644 index 000000000..f84d035bf --- /dev/null +++ b/oura/events.go @@ -0,0 +1,33 @@ +package oura + +const ( + OuraEligibilitySurveyCompletedEventType = "oura_eligibility_survey_completed" + OuraSizingKitOrderedEventType = "oura_sizing_kit_ordered" + OuraSizingKitDeliveredEventType = "oura_sizing_kit_delivered" + OuraRingOrderedEventType = "oura_ring_ordered" + OuraRingDeliveredEventType = "oura_ring_delivered" +) + +type OuraEligibilitySurveyCompletedData struct { + OuraEligibilitySurveyID string `json:"oura_eligibility_survey_id"` + OuraEligibilitySurveyEligible bool `json:"oura_eligibility_survey_eligible"` + OuraSizingKitDiscountCode string `json:"oura_sizing_kit_discount_code,omitempty"` +} + +type OuraSizingKitOrderedData struct { + OuraSizingKitDiscountCode string `json:"oura_sizing_kit_discount_code"` +} + +type OuraSizingKitDeliveredData struct { + OuraSizingKitDiscountCode string `json:"oura_sizing_kit_discount_code"` + OuraRingDiscountCode string `json:"oura_ring_discount_code"` +} + +type OuraRingOrderedData struct { + OuraRingDiscountCode string `json:"oura_ring_discount_code"` +} +type OuraRingDeliveredData struct { + OuraRingDiscountCode string `json:"oura_ring_discount_code"` + OuraAccountLinkingToken string `json:"oura_account_linking_token"` + OuraAccountLinkingTokenExpirationTime int64 `json:"oura_account_linking_token_expiration_time"` +} diff --git a/oura/jotform/api/router.go b/oura/jotform/api/router.go new file mode 100644 index 000000000..4633faa8e --- /dev/null +++ b/oura/jotform/api/router.go @@ -0,0 +1,57 @@ +package api + +import ( + "fmt" + "net/http" + + "github.com/ant0ine/go-json-rest/rest" + + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/oura/jotform" + "github.com/tidepool-org/platform/request" +) + +const ( + multipartMaxMemory = 1000000 // 1MB +) + +type Router struct { + webhookProcessor *jotform.WebhookProcessor +} + +func NewRouter(webhookProcessor *jotform.WebhookProcessor) (*Router, error) { + return &Router{ + webhookProcessor: webhookProcessor, + }, nil +} + +func (r *Router) Routes() []*rest.Route { + return []*rest.Route{ + rest.Post("/v1/partners/jotform/submission", r.HandleJotformSubmission), + } +} + +func (r *Router) HandleJotformSubmission(res rest.ResponseWriter, req *rest.Request) { + ctx := req.Context() + responder := request.MustNewResponder(res, req) + + if err := req.ParseMultipartForm(multipartMaxMemory); err != nil { + responder.Error(http.StatusInternalServerError, fmt.Errorf("unable to parse form data")) + return + } + + submissionID := req.PostFormValue("submissionID") + if len(submissionID) == 0 { + responder.Error(http.StatusBadRequest, fmt.Errorf("missing submission ID")) + return + } + + err := r.webhookProcessor.ProcessSubmission(req.Context(), submissionID) + if err != nil { + log.LoggerFromContext(ctx).WithError(err).Error("unable to process submission") + responder.Error(http.StatusInternalServerError, err) + return + } + + responder.Empty(http.StatusOK) +} diff --git a/oura/jotform/jotform_suite_test.go b/oura/jotform/jotform_suite_test.go new file mode 100644 index 000000000..f5bc4a831 --- /dev/null +++ b/oura/jotform/jotform_suite_test.go @@ -0,0 +1,11 @@ +package jotform_test + +import ( + "testing" + + "github.com/tidepool-org/platform/test" +) + +func TestSuite(t *testing.T) { + test.Test(t) +} diff --git a/oura/jotform/oura.go b/oura/jotform/oura.go new file mode 100644 index 000000000..1072417c7 --- /dev/null +++ b/oura/jotform/oura.go @@ -0,0 +1,18 @@ +package jotform + +import ( + "time" + + "github.com/tidepool-org/platform/structure/validator" +) + +type OuraEligibilitySurvey struct { + DateOfBirth string + Name string +} + +func (o *OuraEligibilitySurvey) Validate(v *validator.Validator) { + eighteenYearsAgo := time.Now().AddDate(-18, 0, 0) + v.String("dateOfBirth", &o.DateOfBirth).NotEmpty().AsTime(time.DateTime).Before(eighteenYearsAgo) + v.String("name", &o.Name).NotEmpty() +} diff --git a/oura/jotform/submission.go b/oura/jotform/submission.go new file mode 100644 index 000000000..bbd008699 --- /dev/null +++ b/oura/jotform/submission.go @@ -0,0 +1,134 @@ +package jotform + +import ( + "encoding/json" + "fmt" +) + +type SubmissionResponse struct { + ResponseCode int `json:"responseCode"` + Content Content `json:"content"` +} + +type Content struct { + ID string `json:"id"` + Answers Answers `json:"answers"` +} + +type Answer interface { + Name() string + Answer() string +} + +type BaseAnswer struct { + NameField string `json:"name"` + Order string `json:"order"` + Text string `json:"text"` + Type string `json:"type"` + Sublabels string `json:"sublabels,omitempty"` +} + +type ControlTextbox struct { + BaseAnswer + AnswerField string `json:"answer"` +} + +func (c ControlTextbox) Name() string { + return c.NameField +} + +func (c ControlTextbox) Answer() string { + return c.AnswerField +} + +type ControlFullname struct { + BaseAnswer + AnswerField map[string]string `json:"answer"` + PrettyFormat string `json:"prettyFormat"` +} + +func (c ControlFullname) Name() string { + return c.NameField +} + +func (c ControlFullname) Answer() string { + return c.PrettyFormat +} + +type ControlDateTime struct { + BaseAnswer + AnswerField DateTimeAnswerField `json:"answer"` + PrettyFormat string `json:"prettyFormat"` +} + +func (c ControlDateTime) Name() string { + return c.NameField +} + +func (c ControlDateTime) Answer() string { + return c.AnswerField.DateTime +} + +type DateTimeAnswerField struct { + Year string `json:"year"` + Month string `json:"month"` + Day string `json:"day"` + DateTime string `json:"datetime"` +} + +type Answers map[string]Answer + +func (a Answers) GetAnswerTextByName(name string) string { + answer, ok := a[name] + if !ok { + return "" + } + return answer.Answer() +} + +// UnmarshalJSON implements custom unmarshaling for AnswersMap +func (a *Answers) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + *a = make(map[string]Answer) + + for key, rawMsg := range raw { + var typeInfo struct { + Type string `json:"type"` + } + if err := json.Unmarshal(rawMsg, &typeInfo); err != nil { + return fmt.Errorf("failed to unmarshal type for key %s: %w", key, err) + } + + var answer Answer + switch typeInfo.Type { + case "control_textbox": + var ct ControlTextbox + if err := json.Unmarshal(rawMsg, &ct); err != nil { + return fmt.Errorf("failed to unmarshal ControlTextbox for key %s: %w", key, err) + } + answer = ct + case "control_fullname": + var cf ControlFullname + if err := json.Unmarshal(rawMsg, &cf); err != nil { + return fmt.Errorf("failed to unmarshal ControlFullname for key %s: %w", key, err) + } + answer = cf + case "control_datetime": + var cd ControlDateTime + if err := json.Unmarshal(rawMsg, &cd); err != nil { + return fmt.Errorf("failed to unmarshal ControlDateTime for key %s: %w", key, err) + } + answer = cd + default: + continue + } + + (*a)[answer.Name()] = answer + } + + return nil +} diff --git a/oura/jotform/test/fixtures/customer.json b/oura/jotform/test/fixtures/customer.json new file mode 100644 index 000000000..82773a708 --- /dev/null +++ b/oura/jotform/test/fixtures/customer.json @@ -0,0 +1,36 @@ +{ + "customer": { + "id": "01234567890", + "identifiers": { + "cio_id": "cio_0987654321", + "email": "james.jellyfish@tidepool.org", + "id": "1aacb960-430c-4081-8b3b-a32688807dc5" + }, + "attributes": { + "Opted In": "Y", + "Recent Data": "Y", + "cio_id": "cio_0987654321", + "created_at": "1750853383", + "email": "james.jellyfish@tidepool.org", + "id": "1aacb960-430c-4081-8b3b-a32688807dc5", + "oura_participant_id": "06336454-cf65-11f0-b3af-fac742a1f967", + "oura_ring_discount_code": "4NSG9996R26C", + "oura_sizing_kit_discount_code": "K25Y7999BGM4" + }, + "timestamps": { + "Opted In": 1750853452, + "Recent Data": 1750853452, + "cio_id": 1750853452, + "created_at": 1750853452, + "email": 0, + "id": 1750853452, + "oura_discount_code": 1764073477, + "oura_participant_id": 1764669325, + "oura_ring_discount_code": 1764669325, + "oura_sizing_kit_discount_code": 1764669325, + "ring_submitted_date": 1750854043 + }, + "unsubscribed": false, + "devices": [] + } +} \ No newline at end of file diff --git a/oura/jotform/test/fixtures/submission.json b/oura/jotform/test/fixtures/submission.json new file mode 100644 index 000000000..e66131b96 --- /dev/null +++ b/oura/jotform/test/fixtures/submission.json @@ -0,0 +1,87 @@ +{ + "responseCode": 200, + "message": "success", + "content": { + "id": "6410095903544943563", + "form_id": "253343950262051", + "ip": "130.204.74.53", + "created_at": "2025-12-08 08:26:30", + "status": "ACTIVE", + "new": "0", + "flag": "0", + "notes": "", + "updated_at": null, + "answers": { + "1": { + "name": "heading", + "order": "1", + "text": "Form", + "type": "control_head" + }, + "2": { + "name": "submit2", + "order": "8", + "text": "Submit", + "type": "control_button" + }, + "3": { + "name": "name", + "order": "2", + "sublabels": "{\"prefix\":\"Prefix\",\"first\":\"First Name\",\"middle\":\"Middle Name\",\"last\":\"Last Name\",\"suffix\":\"Suffix\"}", + "text": "Name", + "type": "control_fullname", + "answer": { + "first": "James", + "last": "Jellyfish" + }, + "prettyFormat": "James Jellyfish" + }, + "4": { + "name": "userId", + "order": "4", + "text": "userId", + "type": "control_textbox", + "answer": "1aacb960-430c-4081-8b3b-a32688807dc5" + }, + "5": { + "name": "participantId", + "order": "5", + "text": "participantId", + "type": "control_textbox", + "answer": "06336454-cf65-11f0-b3af-fac742a1f967" + }, + "8": { + "name": "eligible", + "order": "6", + "text": "eligible", + "type": "control_textbox", + "answer": "true" + }, + "9": { + "name": "dateOfBirth", + "order": "3", + "sublabels": "{\"day\":\"Day\",\"month\":\"Month\",\"year\":\"Year\",\"last\":\"Last Name\",\"hour\":\"Hour\",\"minutes\":\"Minutes\",\"litemode\":\"Date\"}", + "text": "Date Of Birth", + "timeFormat": "AM/PM", + "type": "control_datetime", + "answer": { + "year": "1988", + "month": "11", + "day": "22", + "datetime": "1988-11-22 00:00:00" + }, + "prettyFormat": "1989-11-22" + }, + "10": { + "name": "truevalue", + "order": "7", + "text": "trueValue", + "type": "control_textbox", + "answer": "true" + } + } + }, + "duration": "64.92ms", + "info": null, + "limit-left": 983 +} \ No newline at end of file diff --git a/oura/jotform/test/fixtures/submission_participant_mismatch.json b/oura/jotform/test/fixtures/submission_participant_mismatch.json new file mode 100644 index 000000000..445d8ce01 --- /dev/null +++ b/oura/jotform/test/fixtures/submission_participant_mismatch.json @@ -0,0 +1,87 @@ +{ + "responseCode": 200, + "message": "success", + "content": { + "id": "6410095903544943563", + "form_id": "253343950262051", + "ip": "130.204.74.53", + "created_at": "2025-12-08 08:26:30", + "status": "ACTIVE", + "new": "0", + "flag": "0", + "notes": "", + "updated_at": null, + "answers": { + "1": { + "name": "heading", + "order": "1", + "text": "Form", + "type": "control_head" + }, + "2": { + "name": "submit2", + "order": "8", + "text": "Submit", + "type": "control_button" + }, + "3": { + "name": "name", + "order": "2", + "sublabels": "{\"prefix\":\"Prefix\",\"first\":\"First Name\",\"middle\":\"Middle Name\",\"last\":\"Last Name\",\"suffix\":\"Suffix\"}", + "text": "Name", + "type": "control_fullname", + "answer": { + "first": "James", + "last": "Jellyfish" + }, + "prettyFormat": "James Jellyfish" + }, + "4": { + "name": "userId", + "order": "4", + "text": "userId", + "type": "control_textbox", + "answer": "1aacb960-430c-4081-8b3b-a32688807dc5" + }, + "5": { + "name": "participantId", + "order": "5", + "text": "participantId", + "type": "control_textbox", + "answer": "0123456789" + }, + "8": { + "name": "eligible", + "order": "6", + "text": "eligible", + "type": "control_textbox", + "answer": "true" + }, + "9": { + "name": "dateOfBirth", + "order": "3", + "sublabels": "{\"day\":\"Day\",\"month\":\"Month\",\"year\":\"Year\",\"last\":\"Last Name\",\"hour\":\"Hour\",\"minutes\":\"Minutes\",\"litemode\":\"Date\"}", + "text": "Date Of Birth", + "timeFormat": "AM/PM", + "type": "control_datetime", + "answer": { + "year": "1988", + "month": "11", + "day": "22", + "datetime": "1988-11-22 00:00:00" + }, + "prettyFormat": "1989-11-22" + }, + "10": { + "name": "truevalue", + "order": "7", + "text": "trueValue", + "type": "control_textbox", + "answer": "true" + } + } + }, + "duration": "64.92ms", + "info": null, + "limit-left": 983 +} \ No newline at end of file diff --git a/oura/jotform/webhook.go b/oura/jotform/webhook.go new file mode 100644 index 000000000..73a49130d --- /dev/null +++ b/oura/jotform/webhook.go @@ -0,0 +1,239 @@ +package jotform + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + + "github.com/tidepool-org/platform/consent" + "github.com/tidepool-org/platform/customerio" + "github.com/tidepool-org/platform/errors" + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/oura" + "github.com/tidepool-org/platform/oura/shopify" + "github.com/tidepool-org/platform/page" + "github.com/tidepool-org/platform/pointer" + "github.com/tidepool-org/platform/structure/validator" + "github.com/tidepool-org/platform/user" +) + +const ( + EligibleField = "eligible" + NameField = "name" + DateOfBirthField = "dateOfBirth" + + UserIDField = "userId" + ParticipantIDField = "participantId" +) + +type WebhookProcessor struct { + config Config + + logger log.Logger + + consentService consent.Service + customerIOClient *customerio.Client + shopifyClient shopify.Client + userClient user.Client +} + +type Config struct { + BaseURL string `envconfig:"TIDEPOOL_OURA_JOTFORM_BASE_URL"` + APIKey string `envconfig:"TIDEPOOL_OURA_JOTFORM_API_KEY"` +} + +func NewWebhookProcessor(config Config, logger log.Logger, consentService consent.Service, customerIOClient *customerio.Client, userClient user.Client, shopifyClient shopify.Client) (*WebhookProcessor, error) { + return &WebhookProcessor{ + config: config, + + logger: logger, + + consentService: consentService, + customerIOClient: customerIOClient, + shopifyClient: shopifyClient, + userClient: userClient, + }, nil +} + +func (w *WebhookProcessor) ProcessSubmission(ctx context.Context, submissionID string) error { + logger := w.logger.WithField("submission", submissionID) + submission, err := w.getSubmission(ctx, submissionID) + if err != nil { + return errors.Wrap(err, "failed to get submission") + } + if submission.Content.Answers == nil { + logger.Warn("submission has no answers") + return nil + } + identifiers, err := w.validateUser(ctx, submissionID, submission.Content.Answers) + if err != nil { + logger.WithError(err).Warn("user is invalid") + return nil + } else if identifiers == nil { + logger.Warn("invalid user") + return nil + } + + return w.handleSurveyCompleted(ctx, *identifiers, submission) +} + +// validateUser validates the user id by comparing the participant id from the submission with the participant id from customer.io +// this is required because jotform webhooks are not signed or authenticated +func (w *WebhookProcessor) validateUser(ctx context.Context, submissionID string, answers Answers) (*customerio.Identifiers, error) { + logger := w.logger.WithField("submission", submissionID) + + userID := answers.GetAnswerTextByName(UserIDField) + if userID == "" { + logger.Debugf("submission has no user id") + return nil, nil + } + + participantID := answers.GetAnswerTextByName(ParticipantIDField) + if participantID == "" { + logger.Debugf("submission has no participant id") + return nil, nil + } + + customer, err := w.customerIOClient.GetCustomer(ctx, userID, customerio.IDTypeUserID) + if err != nil { + return nil, errors.Wrapf(err, "unable to get customer with id %s", userID) + } + + if customer == nil { + return nil, errors.Newf("customer with id %s not found", userID) + } + if customer.OuraParticipantID != participantID { + return nil, errors.Newf("participant id mismatch for user with id %s", userID) + } + + usr, err := w.userClient.Get(ctx, userID) + if err != nil { + return nil, errors.Wrap(err, "unable to get user") + } + if usr == nil { + return nil, errors.New("user not found") + } + + return &customer.Identifiers, nil +} + +func (w *WebhookProcessor) getSubmission(ctx context.Context, submissionID string) (*SubmissionResponse, error) { + url := fmt.Sprintf("%s/v1/submission/%s", w.config.BaseURL, submissionID) + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return nil, errors.Wrap(err, "failed to create request: %w") + } + + // Add authorization header + req.Header.Set("APIKEY", w.config.APIKey) + req.Header.Set("Content-Type", "application/json") + + resp, err := http.DefaultClient.Do(req) + if err != nil { + return nil, errors.Wrap(err, "failed to execute request: %w") + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return nil, errors.Newf("unexpected status code: %d", resp.StatusCode) + } + + var response SubmissionResponse + if err := json.NewDecoder(resp.Body).Decode(&response); err != nil { + return nil, errors.Wrap(err, "failed to decode response") + } + + // Sometimes the jotform webhook returns a 200 http response with a non-200 response code in the body + if response.ResponseCode != http.StatusOK { + return nil, errors.Newf("unexpected response code: %d", response.ResponseCode) + } + + return &response, nil +} + +func (w *WebhookProcessor) handleSurveyCompleted(ctx context.Context, identifiers customerio.Identifiers, submission *SubmissionResponse) error { + surveyCompletedData := oura.OuraEligibilitySurveyCompletedData{ + OuraEligibilitySurveyID: submission.Content.ID, + OuraEligibilitySurveyEligible: submission.Content.Answers.GetAnswerTextByName(EligibleField) == "true", + } + + if surveyCompletedData.OuraEligibilitySurveyEligible { + if err := w.ensureConsentRecordExists(ctx, identifiers.ID, submission); err != nil { + w.logger.WithField("submission", submission.Content.ID).WithError(err).Warn("unable to ensure consent record exists") + return err + } + + surveyCompletedData.OuraSizingKitDiscountCode = shopify.RandomDiscountCode() + err := w.shopifyClient.CreateDiscountCode(ctx, shopify.DiscountCodeInput{ + Title: shopify.OuraSizingKitDiscountCodeTitle, + Code: surveyCompletedData.OuraSizingKitDiscountCode, + ProductID: shopify.OuraSizingKitProductID, + }) + if err != nil { + return errors.Wrap(err, "unable to create oura ring discount code") + } + } + + surveyCompleted := customerio.Event{ + Name: oura.OuraEligibilitySurveyCompletedEventType, + ID: surveyCompletedData.OuraEligibilitySurveyID, + Data: surveyCompletedData, + } + + err := w.customerIOClient.SendEvent(ctx, identifiers.ID, surveyCompleted) + if err != nil { + return errors.Wrap(err, "unable to send sizing kit delivered event") + } + + return nil +} + +func (w *WebhookProcessor) ensureConsentRecordExists(ctx context.Context, userID string, submission *SubmissionResponse) error { + logger := w.logger.WithField("submission", submission.Content.ID) + + survey := OuraEligibilitySurvey{ + DateOfBirth: submission.Content.Answers.GetAnswerTextByName(DateOfBirthField), + Name: submission.Content.Answers.GetAnswerTextByName(NameField), + } + + v := validator.New(w.logger) + survey.Validate(v) + if err := v.Error(); err != nil { + logger.WithError(err).Warn("consent survey is invalid") + return nil + } + + filter := consent.NewRecordFilter() + filter.Latest = pointer.FromAny(true) + filter.Status = pointer.FromAny(consent.RecordStatusActive) + filter.Type = pointer.FromAny(consent.TypeBigDataDonationProject) + filter.Version = pointer.FromAny(1) + + pagination := page.NewPagination() + + records, err := w.consentService.ListConsentRecords(ctx, userID, filter, pagination) + if err != nil { + return errors.Wrap(err, "unable to list consent records") + } + + if records.Count > 0 { + logger.WithField("userId", userID).Info("consent record already exists") + return nil + } + + create := consent.NewRecordCreate() + create.AgeGroup = consent.AgeGroupEighteenOrOver + create.GrantorType = consent.GrantorTypeOwner + create.OwnerName = survey.Name + create.Type = consent.TypeBigDataDonationProject + create.Version = 1 + + _, err = w.consentService.CreateConsentRecord(ctx, userID, create) + if err != nil { + return errors.Wrap(err, "unable to create consent record") + } + + return nil +} diff --git a/oura/jotform/webhook_test.go b/oura/jotform/webhook_test.go new file mode 100644 index 000000000..1b11154e2 --- /dev/null +++ b/oura/jotform/webhook_test.go @@ -0,0 +1,298 @@ +package jotform_test + +import ( + "context" + "net/http" + "net/http/httptest" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gstruct" + "go.uber.org/mock/gomock" + + "github.com/tidepool-org/platform/customerio" + + "github.com/tidepool-org/platform/oura/shopify" + ouraTest "github.com/tidepool-org/platform/oura/test" + + "github.com/tidepool-org/platform/consent" + "github.com/tidepool-org/platform/page" + storeStructuredMongo "github.com/tidepool-org/platform/store/structured/mongo" + "github.com/tidepool-org/platform/user" + + consentTest "github.com/tidepool-org/platform/consent/test" + "github.com/tidepool-org/platform/log" + logTest "github.com/tidepool-org/platform/log/test" + "github.com/tidepool-org/platform/oura/jotform" + shopfiyTest "github.com/tidepool-org/platform/oura/shopify/test" + userTest "github.com/tidepool-org/platform/user/test" +) + +var _ = Describe("WebhookProcessor", func() { + var ( + ctx context.Context + processor *jotform.WebhookProcessor + logger log.Logger + + consentCtrl *gomock.Controller + consentService *consentTest.MockService + + shopifyCtrl *gomock.Controller + shopifyClnt *shopfiyTest.MockClient + + userCtrl *gomock.Controller + userClient *userTest.MockClient + + appAPIServer *httptest.Server + appAPIResponses *ouraTest.StubResponses + + trackAPIServer *httptest.Server + trackAPIResponses *ouraTest.StubResponses + + jotformServer *httptest.Server + jotformResponses *ouraTest.StubResponses + ) + + BeforeEach(func() { + ctx = context.Background() + logger = logTest.NewLogger() + + consentCtrl = gomock.NewController(GinkgoT()) + consentService = consentTest.NewMockService(consentCtrl) + + userCtrl = gomock.NewController(GinkgoT()) + userClient = userTest.NewMockClient(userCtrl) + + jotformResponses = ouraTest.NewStubResponses() + jotformServer = ouraTest.NewStubServer(jotformResponses) + jotformConfig := jotform.Config{ + BaseURL: jotformServer.URL, + } + + appAPIResponses = ouraTest.NewStubResponses() + appAPIServer = ouraTest.NewStubServer(appAPIResponses) + trackAPIResponses = ouraTest.NewStubResponses() + trackAPIServer = ouraTest.NewStubServer(trackAPIResponses) + customerIOConfig := customerio.Config{ + AppAPIBaseURL: appAPIServer.URL, + TrackAPIBaseURL: trackAPIServer.URL, + } + customerIOClient, err := customerio.NewClient(customerIOConfig, logger) + Expect(err).ToNot(HaveOccurred()) + + shopifyCtrl = gomock.NewController(GinkgoT()) + shopifyClnt = shopfiyTest.NewMockClient(shopifyCtrl) + + processor, err = jotform.NewWebhookProcessor(jotformConfig, logger, consentService, customerIOClient, userClient, shopifyClnt) + Expect(err).ToNot(HaveOccurred()) + }) + + AfterEach(func() { + jotformServer.Close() + appAPIServer.Close() + trackAPIServer.Close() + consentCtrl.Finish() + userCtrl.Finish() + shopifyCtrl.Finish() + }) + + Context("ProcessSubmission", func() { + It("should successfully process an eligible submission and create consent record", func() { + submissionID := "6410095903544943563" + userID := "1aacb960-430c-4081-8b3b-a32688807dc5" + + submission, err := ouraTest.LoadFixture("./test/fixtures/submission.json") + Expect(err).ToNot(HaveOccurred()) + + jotformResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/submission/"+submissionID)}, + ouraTest.Response{StatusCode: http.StatusOK, Body: submission}, + ) + + customer, err := ouraTest.LoadFixture("./test/fixtures/customer.json") + Expect(err).ToNot(HaveOccurred()) + + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/customers/"+userID+"/attributes")}, + ouraTest.Response{StatusCode: http.StatusOK, Body: customer}, + ) + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+userID+"/events")}, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + usr := &user.User{UserID: &userID} + userClient.EXPECT().Get(gomock.Any(), userID).Return(usr, nil) + + consentService.EXPECT().ListConsentRecords(gomock.Any(), userID, gomock.Any(), gomock.Any()). + Do(func(ctx context.Context, userID string, filter *consent.RecordFilter, pagination *page.Pagination) { + Expect(filter.Type).To(PointTo(Equal("big_data_donation_project"))) + Expect(filter.Version).To(PointTo(Equal(1))) + Expect(filter.Latest).To(PointTo(Equal(true))) + }). + Return(&storeStructuredMongo.ListResult[consent.Record]{ + Count: 0, + }, nil) + + consentService.EXPECT().CreateConsentRecord(gomock.Any(), userID, gomock.Any()). + Do(func(ctx context.Context, userID string, create *consent.RecordCreate) { + Expect(create).ToNot(BeNil()) + Expect(create.Type).To(Equal("big_data_donation_project")) + Expect(create.Version).To(Equal(1)) + Expect(create.OwnerName).To(Equal("James Jellyfish")) + Expect(create.AgeGroup).To(Equal(consent.AgeGroupEighteenOrOver)) + Expect(create.GrantorType).To(Equal(consent.GrantorTypeOwner)) + }). + Return(&consent.Record{ + ID: "1234567890", + UserID: userID, + Status: consent.RecordStatusActive, + AgeGroup: consent.AgeGroupEighteenOrOver, + OwnerName: "James Jellyfish", + GrantorType: "owner", + Type: "big_data_donation_project", + Version: 1, + }, nil) + + shopifyClnt.EXPECT(). + CreateDiscountCode(gomock.Any(), gomock.Any()). + Do(func(ctx context.Context, input shopify.DiscountCodeInput) error { + Expect(input.Title).To(Equal("Oura Sizing Kit Discount Code")) + Expect(len(input.Code)).To(BeNumerically(">=", 12)) + //Expect(input.ProductID).To(Equal("9122899853526")) + return nil + }) + + err = processor.ProcessSubmission(ctx, submissionID) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process an eligible submission and not attempt to create consent record if one already exists", func() { + submissionID := "6410095903544943563" + userID := "1aacb960-430c-4081-8b3b-a32688807dc5" + + submission, err := ouraTest.LoadFixture("./test/fixtures/submission.json") + Expect(err).ToNot(HaveOccurred()) + + jotformResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/submission/"+submissionID)}, + ouraTest.Response{StatusCode: http.StatusOK, Body: submission}, + ) + + customer, err := ouraTest.LoadFixture("./test/fixtures/customer.json") + Expect(err).ToNot(HaveOccurred()) + + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/customers/"+userID+"/attributes")}, + ouraTest.Response{StatusCode: http.StatusOK, Body: customer}, + ) + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+userID+"/events")}, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + usr := &user.User{UserID: &userID} + userClient.EXPECT().Get(gomock.Any(), userID).Return(usr, nil) + + consentService.EXPECT().ListConsentRecords(gomock.Any(), userID, gomock.Any(), gomock.Any()). + Do(func(ctx context.Context, userID string, filter *consent.RecordFilter, pagination *page.Pagination) { + Expect(filter.Type).To(PointTo(Equal("big_data_donation_project"))) + Expect(filter.Version).To(PointTo(Equal(1))) + Expect(filter.Latest).To(PointTo(Equal(true))) + }). + Return(&storeStructuredMongo.ListResult[consent.Record]{ + Count: 1, + Data: []consent.Record{{ + ID: "1234567890", + UserID: userID, + Status: consent.RecordStatusActive, + AgeGroup: consent.AgeGroupEighteenOrOver, + OwnerName: "James Jellyfish", + GrantorType: "owner", + Type: "big_data_donation_project", + Version: 1, + }}, + }, nil) + + shopifyClnt.EXPECT(). + CreateDiscountCode(gomock.Any(), gomock.Any()). + Do(func(ctx context.Context, input shopify.DiscountCodeInput) error { + Expect(input.Title).To(Equal("Oura Sizing Kit Discount Code")) + Expect(len(input.Code)).To(BeNumerically(">=", 12)) + //Expect(input.ProductID).To(Equal("9122899853526")) + return nil + }) + + err = processor.ProcessSubmission(ctx, submissionID) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process an eligible submission and not return error if the customer doesn't exist", func() { + submissionID := "6410095903544943563" + userID := "1aacb960-430c-4081-8b3b-a32688807dc5" + + submission, err := ouraTest.LoadFixture("./test/fixtures/submission.json") + Expect(err).ToNot(HaveOccurred()) + + jotformResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/submission/"+submissionID)}, + ouraTest.Response{StatusCode: http.StatusOK, Body: submission}, + ) + + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/customers/"+userID+"/attributes")}, + ouraTest.Response{StatusCode: http.StatusNotFound}, + ) + + err = processor.ProcessSubmission(ctx, submissionID) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process an eligible submission and not return error if the customer doesn't have the correct participant id", func() { + submissionID := "6410095903544943563" + userID := "1aacb960-430c-4081-8b3b-a32688807dc5" + + submission, err := ouraTest.LoadFixture("./test/fixtures/submission_participant_mismatch.json") + Expect(err).ToNot(HaveOccurred()) + + jotformResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/submission/"+submissionID)}, + ouraTest.Response{StatusCode: http.StatusOK, Body: submission}, + ) + + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/customers/"+userID+"/attributes")}, + ouraTest.Response{StatusCode: http.StatusNotFound}, + ) + + err = processor.ProcessSubmission(ctx, submissionID) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process an eligible submission and not return error if the user doesn't exist", func() { + submissionID := "6410095903544943563" + userID := "1aacb960-430c-4081-8b3b-a32688807dc5" + + submission, err := ouraTest.LoadFixture("./test/fixtures/submission.json") + Expect(err).ToNot(HaveOccurred()) + + jotformResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/submission/"+submissionID)}, + ouraTest.Response{StatusCode: http.StatusOK, Body: submission}, + ) + + customer, err := ouraTest.LoadFixture("./test/fixtures/customer.json") + Expect(err).ToNot(HaveOccurred()) + + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ouraTest.NewRequestMethodAndPathMatcher(http.MethodGet, "/v1/customers/"+userID+"/attributes")}, + ouraTest.Response{StatusCode: http.StatusOK, Body: customer}, + ) + + userClient.EXPECT().Get(gomock.Any(), userID).Return(nil, nil) + + err = processor.ProcessSubmission(ctx, submissionID) + Expect(err).ToNot(HaveOccurred()) + }) + }) +}) diff --git a/oura/shopify/api/router.go b/oura/shopify/api/router.go new file mode 100644 index 000000000..0c3653e36 --- /dev/null +++ b/oura/shopify/api/router.go @@ -0,0 +1,67 @@ +package api + +import ( + "net/http" + + "github.com/ant0ine/go-json-rest/rest" + + "github.com/tidepool-org/platform/oura/shopify" + "github.com/tidepool-org/platform/request" +) + +type Router struct { + fulfillmentEventProcessor *shopify.FulfillmentEventProcessor + ordersCreateEventProcessor *shopify.OrdersCreateEventProcessor +} + +func NewRouter(fulfillmentEventProcessor *shopify.FulfillmentEventProcessor, ordersCreateEventProcessor *shopify.OrdersCreateEventProcessor) (*Router, error) { + return &Router{ + fulfillmentEventProcessor: fulfillmentEventProcessor, + ordersCreateEventProcessor: ordersCreateEventProcessor, + }, nil +} + +func (r *Router) Routes() []*rest.Route { + return []*rest.Route{ + rest.Post("/v1/partners/shopify/fulfillment", r.HandleFulfillmentEvent), + rest.Post("/v1/partners/shopify/orders/create", r.HandleOrdersCreateEvent), + } +} + +func (r *Router) HandleFulfillmentEvent(res rest.ResponseWriter, req *rest.Request) { + ctx := req.Context() + responder := request.MustNewResponder(res, req) + + event := shopify.FulfillmentEvent{} + if err := request.DecodeRequestBody(req.Request, &event); err != nil { + responder.Error(http.StatusBadRequest, err) + return + } + + if err := r.fulfillmentEventProcessor.Process(ctx, event); err != nil { + responder.Error(http.StatusInternalServerError, err) + return + } + + responder.Empty(http.StatusOK) + return +} + +func (r *Router) HandleOrdersCreateEvent(res rest.ResponseWriter, req *rest.Request) { + ctx := req.Context() + responder := request.MustNewResponder(res, req) + + event := shopify.OrdersCreateEvent{} + if err := request.DecodeRequestBody(req.Request, &event); err != nil { + responder.Error(http.StatusBadRequest, err) + return + } + + if err := r.ordersCreateEventProcessor.Process(ctx, event); err != nil { + responder.Error(http.StatusInternalServerError, err) + return + } + + responder.Empty(http.StatusOK) + return +} diff --git a/oura/shopify/client.go b/oura/shopify/client.go new file mode 100644 index 000000000..55f46079b --- /dev/null +++ b/oura/shopify/client.go @@ -0,0 +1,26 @@ +package shopify + +import "context" + +type ClientConfig struct { + StoreID string `envconfig:"TIDEPOOL_OURA_SHOPIFY_STORE_ID"` + ClientID string `envconfig:"TIDEPOOL_OURA_SHOPIFY_CLIENT_ID"` + ClientSecret string `envconfig:"TIDEPOOL_OURA_SHOPIFY_CLIENT_SECRET"` +} + +//go:generate mockgen -source=client.go -destination=./test/client.go -package=test Client +type Client interface { + CreateDiscountCode(ctx context.Context, discountCodeInput DiscountCodeInput) error + GetDeliveredProducts(ctx context.Context, orderID string) (*DeliveredProducts, error) +} + +type DiscountCodeInput struct { + Title string + Code string + ProductID string +} + +type DeliveredProducts struct { + IDs []string `json:"products"` + DiscountCode string `json:"discount_code"` +} diff --git a/oura/shopify/client/auth.go b/oura/shopify/client/auth.go new file mode 100644 index 000000000..6f6ade08f --- /dev/null +++ b/oura/shopify/client/auth.go @@ -0,0 +1,26 @@ +package client + +import ( + "net/http" + + "golang.org/x/oauth2" +) + +type authedTransport struct { + tokenSource oauth2.TokenSource + wrapped http.RoundTripper +} + +func newAuthedTransport(tokenSource oauth2.TokenSource, wrapped http.RoundTripper) *authedTransport { + return &authedTransport{tokenSource, wrapped} +} + +func (t *authedTransport) RoundTrip(req *http.Request) (*http.Response, error) { + token, err := t.tokenSource.Token() + if err != nil { + return nil, err + } + + req.Header.Set("X-Shopify-Access-Token", token.AccessToken) + return t.wrapped.RoundTrip(req) +} diff --git a/oura/shopify/client/client.go b/oura/shopify/client/client.go new file mode 100644 index 000000000..6ff0e938e --- /dev/null +++ b/oura/shopify/client/client.go @@ -0,0 +1,34 @@ +package client + +import ( + "context" + "fmt" + "net/http" + + "github.com/Khan/genqlient/graphql" + "golang.org/x/oauth2/clientcredentials" + + "github.com/tidepool-org/platform/oura/shopify" +) + +type defaultClient struct { + gql graphql.Client +} + +func New(ctx context.Context, cfg shopify.ClientConfig) (shopify.Client, error) { + oauthConfig := clientcredentials.Config{ + ClientID: cfg.ClientID, + ClientSecret: cfg.ClientSecret, + TokenURL: fmt.Sprintf("https://%s.myshopify.com/admin/oauth/access_token", cfg.StoreID), + } + + httpClient := http.Client{ + Transport: newAuthedTransport(oauthConfig.TokenSource(ctx), http.DefaultTransport), + } + + endpoint := fmt.Sprintf("https://%s.myshopify.com/admin/api/2025-10/graphql.json", cfg.StoreID) + + return &defaultClient{ + gql: graphql.NewClient(endpoint, &httpClient), + }, nil +} diff --git a/oura/shopify/client/discount.go b/oura/shopify/client/discount.go new file mode 100644 index 000000000..707d7e4d0 --- /dev/null +++ b/oura/shopify/client/discount.go @@ -0,0 +1,81 @@ +package client + +import ( + "context" + "errors" + "fmt" + "log/slog" + "time" + + "github.com/tidepool-org/platform/oura/shopify" + "github.com/tidepool-org/platform/oura/shopify/generated" + "github.com/tidepool-org/platform/pointer" +) + +//go:generate go run github.com/Khan/genqlient +var _ = `# @genqlient +mutation CreateDiscountCode($basicCodeDiscount: DiscountCodeBasicInput!) { + discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) { + codeDiscountNode { + id + codeDiscount { + ... on DiscountCodeBasic { + title + codes(first: 1) { + nodes { + code + } + } + } + } + } + userErrors { + field + message + } + } +} +` + +func (c *defaultClient) CreateDiscountCode(ctx context.Context, discountCodeInput shopify.DiscountCodeInput) error { + input := pointer.FromAny(generated.DiscountCodeBasicInput{ + Title: pointer.FromAny(discountCodeInput.Title), + AppliesOncePerCustomer: pointer.FromAny(true), + Code: pointer.FromAny(discountCodeInput.Code), + UsageLimit: pointer.FromAny(1), + Context: pointer.FromAny(generated.DiscountContextInput{ + All: pointer.FromAny(generated.DiscountBuyerSelectionAll), + }), + CustomerGets: pointer.FromAny(generated.DiscountCustomerGetsInput{ + Value: pointer.FromAny(generated.DiscountCustomerGetsValueInput{ + Percentage: pointer.FromAny(float64(1)), + }), + Items: pointer.FromAny(generated.DiscountItemsInput{ + Products: pointer.FromAny(generated.DiscountProductsInput{ + ProductsToAdd: []string{fmt.Sprintf("gid://shopify/Product/%s", discountCodeInput.ProductID)}, + }), + }), + }), + MinimumRequirement: pointer.FromAny(generated.DiscountMinimumRequirementInput{ + Quantity: pointer.FromAny(generated.DiscountMinimumQuantityInput{ + GreaterThanOrEqualToQuantity: pointer.FromAny("1"), + }), + }), + StartsAt: pointer.FromAny(time.Now()), + }) + + resp, err := generated.CreateDiscountCode(ctx, c.gql, input) + if err != nil { + return err + } + + userErrors := resp.DiscountCodeBasicCreate.UserErrors + if len(userErrors) > 0 { + for _, e := range userErrors { + slog.Error("user error", "field", e.Field, "message", e.Message) + } + return errors.New("user errors") + } + + return nil +} diff --git a/oura/shopify/client/order.go b/oura/shopify/client/order.go new file mode 100644 index 000000000..85d3166a0 --- /dev/null +++ b/oura/shopify/client/order.go @@ -0,0 +1,79 @@ +package client + +import ( + "context" + "strings" + + "github.com/tidepool-org/platform/oura/shopify" + "github.com/tidepool-org/platform/oura/shopify/generated" + "github.com/tidepool-org/platform/pointer" +) + +const ( + productGIDPrefix = "gid://shopify/Product/" +) + +//go:generate go run github.com/Khan/genqlient +var _ = `# @genqlient +query GetOrder($identifier: OrderIdentifierInput!) { + orderByIdentifier(identifier: $identifier) { + discountCode + fulfillments(first: 10) { + deliveredAt + displayStatus + fulfillmentLineItems(first: 10) { + nodes { + lineItem { + product { + id + } + } + } + } + } + id + } +} +` + +func (c *defaultClient) GetDeliveredProducts(ctx context.Context, orderID string) (*shopify.DeliveredProducts, error) { + resp, err := generated.GetOrder(ctx, c.gql, &generated.OrderIdentifierInput{ + Id: pointer.FromAny(orderID), + }) + if err != nil { + return nil, err + } + if resp.GetOrderByIdentifier() == nil { + return nil, nil + } + ids := make([]string, 0) + for _, fulfillment := range resp.GetOrderByIdentifier().Fulfillments { + if fulfillment == nil { + continue + } + + lineItems := fulfillment.GetFulfillmentLineItems() + if lineItems == nil { + continue + } + for _, lineItem := range lineItems.GetNodes() { + if lineItem == nil || lineItem.GetLineItem() == nil { + continue + } + id := lineItem.GetLineItem().GetProduct().GetId() + if strings.HasPrefix(id, productGIDPrefix) { + id = strings.TrimPrefix(id, productGIDPrefix) + } + ids = append(ids, id) + } + } + + var discountCode string + if resp.GetOrderByIdentifier().GetDiscountCode() != nil { + discountCode = *resp.GetOrderByIdentifier().GetDiscountCode() + } + return &shopify.DeliveredProducts{ + IDs: ids, + DiscountCode: discountCode, + }, nil +} diff --git a/oura/shopify/discount.go b/oura/shopify/discount.go new file mode 100644 index 000000000..8645ea093 --- /dev/null +++ b/oura/shopify/discount.go @@ -0,0 +1,21 @@ +package shopify + +import "crypto/rand" + +const ( + //OuraSizingKitProductID = "9122899853526" + //OuraRingProductID = "9112952373462" + + OuraSizingKitProductID = "15536573219203" // Todd's test gstore + OuraSizingKitDiscountCodeTitle = "Oura Sizing Kit Discount Code" + + OuraRingProductID = "15496765964675" // Todd's test store + OuraRingDiscountCodeTitle = "Oura Ring Discount Code" + + DiscountCodeLength = 12 +) + +func RandomDiscountCode() string { + code := rand.Text() + return code[:DiscountCodeLength] +} diff --git a/oura/shopify/fulfillment.go b/oura/shopify/fulfillment.go new file mode 100644 index 000000000..f886813e7 --- /dev/null +++ b/oura/shopify/fulfillment.go @@ -0,0 +1,185 @@ +package shopify + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/tidepool-org/platform/auth" + "github.com/tidepool-org/platform/customerio" + "github.com/tidepool-org/platform/errors" + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/oura" + "github.com/tidepool-org/platform/pointer" +) + +const ( + ouraAccountLinkingTokenPath = "/v1/oauth/oura" +) + +var ( + productIDToOuraDiscountAttribute = map[string]string{ + OuraSizingKitProductID: "oura_sizing_kit_discount_code", + OuraRingProductID: "oura_ring_discount_code", + } +) + +type FulfillmentEvent struct { + ID int64 `json:"id"` + OrderID int64 `json:"order_id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + Service *string `json:"service"` + UpdatedAt time.Time `json:"updated_at"` + TrackingCompany string `json:"tracking_company"` + ShipmentStatus *string `json:"shipment_status"` + LocationID *int64 `json:"location_id"` + Email string `json:"email"` + TrackingNumber string `json:"tracking_number"` + TrackingNumbers []string `json:"tracking_numbers"` + TrackingURL string `json:"tracking_url"` + TrackingURLs []string `json:"tracking_urls"` + Name string `json:"name"` + AdminGraphQLAPIID string `json:"admin_graphql_api_id"` +} + +type FulfillmentEventProcessor struct { + logger log.Logger + + customerIOClient *customerio.Client + restrictedTokenClient auth.RestrictedTokenAccessor + shopifyClient Client +} + +func NewFulfillmentEventProcessor(logger log.Logger, customerIOClient *customerio.Client, shopifyClient Client, restrictedTokenClient auth.RestrictedTokenAccessor) (*FulfillmentEventProcessor, error) { + return &FulfillmentEventProcessor{ + logger: logger, + customerIOClient: customerIOClient, + restrictedTokenClient: restrictedTokenClient, + shopifyClient: shopifyClient, + }, nil +} + +func (f *FulfillmentEventProcessor) Process(ctx context.Context, event FulfillmentEvent) error { + logger := f.logger.WithField("fulfillmentId", event.ID) + if event.ShipmentStatus == nil || !strings.EqualFold(*event.ShipmentStatus, "delivered") { + logger.Warn("ignoring non-delivery fulfillment event") + return nil + } + + orderId := fmt.Sprintf("gid://shopify/Order/%d", event.OrderID) + deliveredProducts, err := f.shopifyClient.GetDeliveredProducts(ctx, orderId) + if err != nil { + return err + } + if deliveredProducts == nil || len(deliveredProducts.IDs) == 0 { + logger.Info("ignoring fulfillment event with no delivered products") + return nil + } else if len(deliveredProducts.IDs) > 1 { + logger.Warn("ignoring fulfillment event with multiple delivered products") + return nil + } + + deliveredProductID := deliveredProducts.IDs[0] + logger = logger.WithField("orderId", orderId).WithField("productId", deliveredProductID) + + attribute, ok := productIDToOuraDiscountAttribute[deliveredProductID] + if !ok { + logger.Warn("unable to find discount attribute for delivered product") + return nil + } + + customers, err := f.customerIOClient.FindCustomers(ctx, map[string]any{ + "filter": map[string]any{ + "and": []any{ + map[string]any{ + "attribute": map[string]any{ + "field": attribute, + "operator": "eq", + "value": deliveredProducts.DiscountCode, + }, + }, + }, + }, + }) + if err != nil { + logger.WithError(err).Warn("unable to find customers") + return nil + } + + if len(customers.Identifiers) == 0 { + logger.Warn("no customers found for delivered products") + return nil + } else if len(customers.Identifiers) > 1 { + userIds := make([]string, 0, len(customers.Identifiers)) + for _, id := range customers.Identifiers { + userIds = append(userIds, id.ID) + } + logger.WithField("userIds", userIds).Warn("multiple customers found for delivered products") + return nil + } + + switch deliveredProductID { + case OuraSizingKitProductID: + if err := f.onSizingKitDelivered(ctx, customers.Identifiers[0], event, deliveredProducts.DiscountCode); err != nil { + logger.WithError(err).Warn("unable to send sizing kit delivered event") + return err + } + case OuraRingProductID: + if err := f.onRingDelivered(ctx, customers.Identifiers[0], event, deliveredProducts.DiscountCode); err != nil { + logger.WithError(err).Warn("unable to send ring delivered event") + return err + } + default: + logger.Warn("ignoring fulfillment event for unknown product") + } + + return nil +} + +func (f *FulfillmentEventProcessor) onSizingKitDelivered(ctx context.Context, identifiers customerio.Identifiers, event FulfillmentEvent, sizingKitDiscountCode string) error { + discountCode := RandomDiscountCode() + err := f.shopifyClient.CreateDiscountCode(ctx, DiscountCodeInput{ + Title: OuraRingDiscountCodeTitle, + Code: discountCode, + ProductID: OuraRingProductID, + }) + if err != nil { + return errors.Wrap(err, "unable to create oura discount code") + } + + sizingKitDelivered := customerio.Event{ + Name: oura.OuraSizingKitDeliveredEventType, + ID: fmt.Sprintf("%d", event.ID), + Data: oura.OuraSizingKitDeliveredData{ + OuraRingDiscountCode: discountCode, + OuraSizingKitDiscountCode: sizingKitDiscountCode, + }, + } + + return f.customerIOClient.SendEvent(ctx, identifiers.ID, sizingKitDelivered) +} + +func (f *FulfillmentEventProcessor) onRingDelivered(ctx context.Context, identifiers customerio.Identifiers, event FulfillmentEvent, ringDiscountCode string) error { + create := auth.NewRestrictedTokenCreate() + create.Paths = pointer.FromAny([]string{ouraAccountLinkingTokenPath}) + create.ExpirationTime = pointer.FromTime(time.Now().Add(time.Hour * 24 * 30)) + + token, err := f.restrictedTokenClient.CreateUserRestrictedToken(ctx, identifiers.ID, create) + if err != nil { + return errors.Wrap(err, "unable to create restricted token") + } + + ringDelivered := customerio.Event{ + Name: oura.OuraRingDeliveredEventType, + ID: fmt.Sprintf("%d", event.ID), + Data: oura.OuraRingDeliveredData{ + OuraRingDiscountCode: ringDiscountCode, + OuraAccountLinkingToken: token.ID, + OuraAccountLinkingTokenExpirationTime: token.ExpirationTime.Unix(), + }, + } + + return f.customerIOClient.SendEvent(ctx, identifiers.ID, ringDelivered) +} diff --git a/oura/shopify/fulfillment_test.go b/oura/shopify/fulfillment_test.go new file mode 100644 index 000000000..3aa334fbb --- /dev/null +++ b/oura/shopify/fulfillment_test.go @@ -0,0 +1,228 @@ +package shopify_test + +import ( + "context" + "fmt" + "math/rand" + "net/http" + "net/http/httptest" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "go.uber.org/mock/gomock" + + "github.com/tidepool-org/platform/customerio" + + "github.com/tidepool-org/platform/auth" + authTest "github.com/tidepool-org/platform/auth/test" + + "github.com/tidepool-org/platform/pointer" + + "github.com/tidepool-org/platform/oura/shopify" + + "github.com/tidepool-org/platform/log" + logTest "github.com/tidepool-org/platform/log/test" + shopfiyTest "github.com/tidepool-org/platform/oura/shopify/test" + ouraTest "github.com/tidepool-org/platform/oura/test" +) + +var _ = Describe("FulfillmentEventProcessor", func() { + var ( + ctx context.Context + processor *shopify.FulfillmentEventProcessor + logger log.Logger + + authClientCtrl *gomock.Controller + authClient *authTest.MockClient + + shopifyCtrl *gomock.Controller + shopifyClnt *shopfiyTest.MockClient + + appAPIServer *httptest.Server + appAPIResponses *ouraTest.StubResponses + + trackAPIServer *httptest.Server + trackAPIResponses *ouraTest.StubResponses + ) + + BeforeEach(func() { + ctx = context.Background() + logger = logTest.NewLogger() + + appAPIResponses = ouraTest.NewStubResponses() + appAPIServer = ouraTest.NewStubServer(appAPIResponses) + + trackAPIResponses = ouraTest.NewStubResponses() + trackAPIServer = ouraTest.NewStubServer(trackAPIResponses) + + customerIOConfig := customerio.Config{ + AppAPIBaseURL: appAPIServer.URL, + TrackAPIBaseURL: trackAPIServer.URL, + } + customerIOClient, err := customerio.NewClient(customerIOConfig, logger) + Expect(err).ToNot(HaveOccurred()) + + shopifyCtrl = gomock.NewController(GinkgoT()) + shopifyClnt = shopfiyTest.NewMockClient(shopifyCtrl) + + authClientCtrl = gomock.NewController(GinkgoT()) + authClient = authTest.NewMockClient(authClientCtrl) + + processor, err = shopify.NewFulfillmentEventProcessor(logger, customerIOClient, shopifyClnt, authClient) + Expect(err).ToNot(HaveOccurred()) + }) + + AfterEach(func() { + Expect(trackAPIResponses.UnmatchedResponses()).To(Equal(0)) + Expect(appAPIResponses.UnmatchedResponses()).To(Equal(0)) + + appAPIServer.Close() + trackAPIServer.Close() + authClientCtrl.Finish() + shopifyCtrl.Finish() + }) + + Context("Process", func() { + It("should successfully process a sizing kit delivery", func() { + id := "1aacb960-430c-4081-8b3b-a32688807dc5" + sizingKitDiscountCode := shopify.RandomDiscountCode() + + event := shopify.FulfillmentEvent{ + ID: 9876543, + ShipmentStatus: pointer.FromAny("delivered"), + OrderID: rand.Int63n(999999999999), + } + + shopifyClnt.EXPECT(). + GetDeliveredProducts(gomock.Any(), fmt.Sprintf("gid://shopify/Order/%d", event.OrderID)). + Return(&shopify.DeliveredProducts{ + IDs: []string{shopify.OuraSizingKitProductID}, + DiscountCode: sizingKitDiscountCode, + }, nil) + + customers, err := ouraTest.LoadFixture("./test/fixtures/customers.json") + Expect(err).ToNot(HaveOccurred()) + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/v1/customers"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "filter": { + "and": [ + { + "attribute": { + "field": "oura_sizing_kit_discount_code", + "operator": "eq", + "value": "` + sizingKitDiscountCode + `" + } + } + ] + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: customers}, + ) + + shopifyClnt.EXPECT(). + CreateDiscountCode(gomock.Any(), gomock.Any()). + Do(func(ctx context.Context, input shopify.DiscountCodeInput) error { + Expect(input.Title).To(Equal(shopify.OuraRingDiscountCodeTitle)) + Expect(len(input.Code)).To(BeNumerically(">=", 12)) + Expect(input.ProductID).To(Equal(shopify.OuraRingProductID)) + + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+id+"/events"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "name": "oura_sizing_kit_delivered", + "id": "` + fmt.Sprintf("%d", event.ID) + `", + "data": { + "oura_ring_discount_code": "` + input.Code + `", + "oura_sizing_kit_discount_code": "` + sizingKitDiscountCode + `" + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + return nil + }). + Return(nil) + + err = processor.Process(ctx, event) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process a ring delivery", func() { + id := "1aacb960-430c-4081-8b3b-a32688807dc5" + discountCode := shopify.RandomDiscountCode() + + event := shopify.FulfillmentEvent{ + ID: 9876543, + ShipmentStatus: pointer.FromAny("delivered"), + OrderID: rand.Int63n(999999999999), + } + + shopifyClnt.EXPECT(). + GetDeliveredProducts(gomock.Any(), fmt.Sprintf("gid://shopify/Order/%d", event.OrderID)). + Return(&shopify.DeliveredProducts{ + IDs: []string{shopify.OuraRingProductID}, + DiscountCode: discountCode, + }, nil) + + customers, err := ouraTest.LoadFixture("./test/fixtures/customers.json") + Expect(err).ToNot(HaveOccurred()) + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/v1/customers"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "filter": { + "and": [ + { + "attribute": { + "field": "oura_ring_discount_code", + "operator": "eq", + "value": "` + discountCode + `" + } + } + ] + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: customers}, + ) + + tokenID := authTest.RandomRestrictedTokenID() + tokenExpirationTime := time.Now().Add(time.Hour * 24 * 30) + token := auth.RestrictedToken{ + ID: tokenID, + UserID: id, + Paths: pointer.FromAny([]string{"/v1/oauth/oura"}), + ExpirationTime: tokenExpirationTime, + CreatedTime: time.Now(), + } + authClient.EXPECT(). + CreateUserRestrictedToken(gomock.Any(), id, gomock.Any()). + Return(&token, nil) + + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+id+"/events"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "name": "oura_ring_delivered", + "id": "` + fmt.Sprintf("%d", event.ID) + `", + "data": { + "oura_ring_discount_code": "` + discountCode + `", + "oura_account_linking_token": "` + tokenID + `", + "oura_account_linking_token_expiration_time": ` + fmt.Sprintf("%d", tokenExpirationTime.Unix()) + ` + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + err = processor.Process(ctx, event) + Expect(err).ToNot(HaveOccurred()) + }) + }) +}) diff --git a/oura/shopify/generated/generated.go b/oura/shopify/generated/generated.go new file mode 100644 index 000000000..dd6ca1a82 --- /dev/null +++ b/oura/shopify/generated/generated.go @@ -0,0 +1,1198 @@ +// Code generated by github.com/Khan/genqlient, DO NOT EDIT. + +package generated + +import ( + "context" + "encoding/json" + "fmt" + "time" + + "github.com/Khan/genqlient/graphql" +) + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload includes the requested fields of the GraphQL type DiscountCodeBasicCreatePayload. +// The GraphQL type's documentation follows. +// +// Return type for `discountCodeBasicCreate` mutation. +type CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload struct { + // The discount code that was created. + CodeDiscountNode *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode `json:"codeDiscountNode"` + // The list of errors that occurred from executing the mutation. + UserErrors []*CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError `json:"userErrors"` +} + +// GetCodeDiscountNode returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload.CodeDiscountNode, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload) GetCodeDiscountNode() *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode { + return v.CodeDiscountNode +} + +// GetUserErrors returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload.UserErrors, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload) GetUserErrors() []*CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError { + return v.UserErrors +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode includes the requested fields of the GraphQL type DiscountCodeNode. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode struct { + // A globally-unique ID. + Id string `json:"id"` + // The underlying code discount object. + CodeDiscount CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode `json:"-"` +} + +// GetId returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode.Id, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode) GetId() string { + return v.Id +} + +// GetCodeDiscount returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode.CodeDiscount, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode) GetCodeDiscount() CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode { + return v.CodeDiscount +} + +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode) UnmarshalJSON(b []byte) error { + + if string(b) == "null" { + return nil + } + + var firstPass struct { + *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode + CodeDiscount json.RawMessage `json:"codeDiscount"` + graphql.NoUnmarshalJSON + } + firstPass.CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode = v + + err := json.Unmarshal(b, &firstPass) + if err != nil { + return err + } + + { + dst := &v.CodeDiscount + src := firstPass.CodeDiscount + if len(src) != 0 && string(src) != "null" { + err = __unmarshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode( + src, dst) + if err != nil { + return fmt.Errorf( + "unable to unmarshal CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode.CodeDiscount: %w", err) + } + } + } + return nil +} + +type __premarshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode struct { + Id string `json:"id"` + + CodeDiscount json.RawMessage `json:"codeDiscount"` +} + +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode) MarshalJSON() ([]byte, error) { + premarshaled, err := v.__premarshalJSON() + if err != nil { + return nil, err + } + return json.Marshal(premarshaled) +} + +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode) __premarshalJSON() (*__premarshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode, error) { + var retval __premarshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode + + retval.Id = v.Id + { + + dst := &retval.CodeDiscount + src := v.CodeDiscount + var err error + *dst, err = __marshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode( + &src) + if err != nil { + return nil, fmt.Errorf( + "unable to marshal CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNode.CodeDiscount: %w", err) + } + } + return &retval, nil +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode includes the requested fields of the GraphQL interface DiscountCode. +// +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode is implemented by the following types: +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping +// The GraphQL type's documentation follows. +// +// 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. +type CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode interface { + implementsGraphQLInterfaceCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode() + // GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values). + GetTypename() *string +} + +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp) implementsGraphQLInterfaceCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode() { +} +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic) implementsGraphQLInterfaceCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode() { +} +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy) implementsGraphQLInterfaceCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode() { +} +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping) implementsGraphQLInterfaceCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode() { +} + +func __unmarshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode(b []byte, v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode) error { + if string(b) == "null" { + return nil + } + + var tn struct { + TypeName string `json:"__typename"` + } + err := json.Unmarshal(b, &tn) + if err != nil { + return err + } + + switch tn.TypeName { + case "DiscountCodeApp": + *v = new(CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp) + return json.Unmarshal(b, *v) + case "DiscountCodeBasic": + *v = new(CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic) + return json.Unmarshal(b, *v) + case "DiscountCodeBxgy": + *v = new(CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy) + return json.Unmarshal(b, *v) + case "DiscountCodeFreeShipping": + *v = new(CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping) + return json.Unmarshal(b, *v) + case "": + return fmt.Errorf( + "response was missing DiscountCode.__typename") + default: + return fmt.Errorf( + `unexpected concrete type for CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode: "%v"`, tn.TypeName) + } +} + +func __marshalCreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode(v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode) ([]byte, error) { + + var typename string + switch v := (*v).(type) { + case *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp: + typename = "DiscountCodeApp" + + result := struct { + TypeName string `json:"__typename"` + *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp + }{typename, v} + return json.Marshal(result) + case *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic: + typename = "DiscountCodeBasic" + + result := struct { + TypeName string `json:"__typename"` + *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic + }{typename, v} + return json.Marshal(result) + case *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy: + typename = "DiscountCodeBxgy" + + result := struct { + TypeName string `json:"__typename"` + *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy + }{typename, v} + return json.Marshal(result) + case *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping: + typename = "DiscountCodeFreeShipping" + + result := struct { + TypeName string `json:"__typename"` + *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping + }{typename, v} + return json.Marshal(result) + case nil: + return []byte("null"), nil + default: + return nil, fmt.Errorf( + `unexpected concrete type for CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCode: "%T"`, v) + } +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp includes the requested fields of the GraphQL type DiscountCodeApp. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp struct { + Typename *string `json:"__typename"` +} + +// GetTypename returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp.Typename, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeApp) GetTypename() *string { + return v.Typename +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic includes the requested fields of the GraphQL type DiscountCodeBasic. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic struct { + Typename *string `json:"__typename"` + // The discount's name that displays to merchants in the Shopify admin and to customers. + Title string `json:"title"` + // A list codes that customers can use to redeem the discount. + Codes *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection `json:"codes"` +} + +// GetTypename returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic.Typename, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic) GetTypename() *string { + return v.Typename +} + +// GetTitle returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic.Title, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic) GetTitle() string { + return v.Title +} + +// GetCodes returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic.Codes, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasic) GetCodes() *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection { + return v.Codes +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection includes the requested fields of the GraphQL type DiscountRedeemCodeConnection. +// The GraphQL type's documentation follows. +// +// An auto-generated type for paginating through multiple DiscountRedeemCodes. +type CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection struct { + // 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 []*CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode `json:"nodes"` +} + +// GetNodes returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection.Nodes, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnection) GetNodes() []*CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode { + return v.Nodes +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode includes the requested fields of the GraphQL type DiscountRedeemCode. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode struct { + // The code that a customer can use at checkout to receive a discount. + Code string `json:"code"` +} + +// GetCode returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode.Code, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBasicCodesDiscountRedeemCodeConnectionNodesDiscountRedeemCode) GetCode() string { + return v.Code +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy includes the requested fields of the GraphQL type DiscountCodeBxgy. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy struct { + Typename *string `json:"__typename"` +} + +// GetTypename returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy.Typename, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeBxgy) GetTypename() *string { + return v.Typename +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping includes the requested fields of the GraphQL type DiscountCodeFreeShipping. +// The GraphQL type's documentation follows. +// +// 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 CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping struct { + Typename *string `json:"__typename"` +} + +// GetTypename returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping.Typename, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadCodeDiscountNodeDiscountCodeNodeCodeDiscountDiscountCodeFreeShipping) GetTypename() *string { + return v.Typename +} + +// CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError includes the requested fields of the GraphQL type DiscountUserError. +// The GraphQL type's documentation follows. +// +// An error that occurs during the execution of a discount mutation. +type CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError struct { + // The path to the input field that caused the error. + Field []string `json:"field"` + // The error message. + Message string `json:"message"` +} + +// GetField returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError.Field, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError) GetField() []string { + return v.Field +} + +// GetMessage returns CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError.Message, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayloadUserErrorsDiscountUserError) GetMessage() string { + return v.Message +} + +// CreateDiscountCodeResponse is returned by CreateDiscountCode on success. +type CreateDiscountCodeResponse struct { + // 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 *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload `json:"discountCodeBasicCreate"` +} + +// GetDiscountCodeBasicCreate returns CreateDiscountCodeResponse.DiscountCodeBasicCreate, and is useful for accessing the field via an interface. +func (v *CreateDiscountCodeResponse) GetDiscountCodeBasicCreate() *CreateDiscountCodeDiscountCodeBasicCreateDiscountCodeBasicCreatePayload { + return v.DiscountCodeBasicCreate +} + +// The input fields for the value of the discount and how it is applied. +type DiscountAmountInput struct { + // The value of the discount. + Amount *string `json:"amount,omitempty"` + // 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 *bool `json:"appliesOnEachItem,omitempty"` +} + +// GetAmount returns DiscountAmountInput.Amount, and is useful for accessing the field via an interface. +func (v *DiscountAmountInput) GetAmount() *string { return v.Amount } + +// GetAppliesOnEachItem returns DiscountAmountInput.AppliesOnEachItem, and is useful for accessing the field via an interface. +func (v *DiscountAmountInput) GetAppliesOnEachItem() *bool { return v.AppliesOnEachItem } + +// All buyers are eligible for the discount. +type DiscountBuyerSelection string + +const ( + // All buyers are eligible for the discount. + DiscountBuyerSelectionAll DiscountBuyerSelection = "ALL" +) + +var AllDiscountBuyerSelection = []DiscountBuyerSelection{ + DiscountBuyerSelectionAll, +} + +// 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. +type DiscountCodeBasicInput struct { + // 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 `json:"combinesWith,omitempty"` + // The discount's name that displays to merchants in the Shopify admin and to customers. + Title *string `json:"title,omitempty"` + // The date and time when the discount becomes active and is available to customers. + StartsAt *time.Time `json:"startsAt,omitempty"` + // 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 *time.Time `json:"endsAt,omitempty"` + // Whether a customer can only use the discount once. + AppliesOncePerCustomer *bool `json:"appliesOncePerCustomer,omitempty"` + // The code that customers use to apply the discount. + Code *string `json:"code,omitempty"` + // The maximum number of times that a customer can use the discount. + // For discounts with unlimited usage, specify `null`. + UsageLimit *int `json:"usageLimit,omitempty"` + // 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 `json:"context,omitempty"` + // The minimum subtotal or quantity of items that are required for the discount to be applied. + MinimumRequirement *DiscountMinimumRequirementInput `json:"minimumRequirement,omitempty"` + // The items in the order that qualify for the discount, their quantities, and the total value of the discount. + CustomerGets *DiscountCustomerGetsInput `json:"customerGets,omitempty"` + // 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 `json:"recurringCycleLimit,omitempty"` +} + +// GetCombinesWith returns DiscountCodeBasicInput.CombinesWith, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetCombinesWith() *DiscountCombinesWithInput { return v.CombinesWith } + +// GetTitle returns DiscountCodeBasicInput.Title, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetTitle() *string { return v.Title } + +// GetStartsAt returns DiscountCodeBasicInput.StartsAt, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetStartsAt() *time.Time { return v.StartsAt } + +// GetEndsAt returns DiscountCodeBasicInput.EndsAt, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetEndsAt() *time.Time { return v.EndsAt } + +// GetAppliesOncePerCustomer returns DiscountCodeBasicInput.AppliesOncePerCustomer, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetAppliesOncePerCustomer() *bool { return v.AppliesOncePerCustomer } + +// GetCode returns DiscountCodeBasicInput.Code, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetCode() *string { return v.Code } + +// GetUsageLimit returns DiscountCodeBasicInput.UsageLimit, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetUsageLimit() *int { return v.UsageLimit } + +// GetContext returns DiscountCodeBasicInput.Context, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetContext() *DiscountContextInput { return v.Context } + +// GetMinimumRequirement returns DiscountCodeBasicInput.MinimumRequirement, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetMinimumRequirement() *DiscountMinimumRequirementInput { + return v.MinimumRequirement +} + +// GetCustomerGets returns DiscountCodeBasicInput.CustomerGets, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetCustomerGets() *DiscountCustomerGetsInput { return v.CustomerGets } + +// GetRecurringCycleLimit returns DiscountCodeBasicInput.RecurringCycleLimit, and is useful for accessing the field via an interface. +func (v *DiscountCodeBasicInput) GetRecurringCycleLimit() *int { return v.RecurringCycleLimit } + +// The input fields for collections attached to a discount. +type DiscountCollectionsInput struct { + // Specifies list of collection ids to add. + Add []string `json:"add"` + // Specifies list of collection ids to remove. + Remove []string `json:"remove"` +} + +// GetAdd returns DiscountCollectionsInput.Add, and is useful for accessing the field via an interface. +func (v *DiscountCollectionsInput) GetAdd() []string { return v.Add } + +// GetRemove returns DiscountCollectionsInput.Remove, and is useful for accessing the field via an interface. +func (v *DiscountCollectionsInput) GetRemove() []string { return v.Remove } + +// The input fields to determine which discount classes the discount can combine with. +type DiscountCombinesWithInput struct { + // Whether the discount combines with the + // [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + // class. + ProductDiscounts *bool `json:"productDiscounts,omitempty"` + // Whether the discount combines with the + // [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + // class. + OrderDiscounts *bool `json:"orderDiscounts,omitempty"` + // Whether the discount combines + // with the + // [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + // class. + ShippingDiscounts *bool `json:"shippingDiscounts,omitempty"` +} + +// GetProductDiscounts returns DiscountCombinesWithInput.ProductDiscounts, and is useful for accessing the field via an interface. +func (v *DiscountCombinesWithInput) GetProductDiscounts() *bool { return v.ProductDiscounts } + +// GetOrderDiscounts returns DiscountCombinesWithInput.OrderDiscounts, and is useful for accessing the field via an interface. +func (v *DiscountCombinesWithInput) GetOrderDiscounts() *bool { return v.OrderDiscounts } + +// GetShippingDiscounts returns DiscountCombinesWithInput.ShippingDiscounts, and is useful for accessing the field via an interface. +func (v *DiscountCombinesWithInput) GetShippingDiscounts() *bool { return v.ShippingDiscounts } + +// The input fields for the buyers who can use this discount. +type DiscountContextInput struct { + // All buyers are eligible for this discount. + All *DiscountBuyerSelection `json:"all,omitempty"` + // The list of customer IDs to add or remove from the list of customers. + Customers *DiscountCustomersInput `json:"customers,omitempty"` + // The list of customer segment IDs to add or remove from the list of customer segments. + CustomerSegments *DiscountCustomerSegmentsInput `json:"customerSegments,omitempty"` +} + +// GetAll returns DiscountContextInput.All, and is useful for accessing the field via an interface. +func (v *DiscountContextInput) GetAll() *DiscountBuyerSelection { return v.All } + +// GetCustomers returns DiscountContextInput.Customers, and is useful for accessing the field via an interface. +func (v *DiscountContextInput) GetCustomers() *DiscountCustomersInput { return v.Customers } + +// GetCustomerSegments returns DiscountContextInput.CustomerSegments, and is useful for accessing the field via an interface. +func (v *DiscountContextInput) GetCustomerSegments() *DiscountCustomerSegmentsInput { + return v.CustomerSegments +} + +// Specifies the items that will be discounted, the quantity of items that will be discounted, and the value of discount. +type DiscountCustomerGetsInput struct { + // The quantity of items discounted and the discount value. + Value *DiscountCustomerGetsValueInput `json:"value,omitempty"` + // The IDs of the items that the customer gets. The items can be either collections or products. + Items *DiscountItemsInput `json:"items,omitempty"` + // Whether the discount applies on regular one-time-purchase items. + AppliesOnOneTimePurchase *bool `json:"appliesOnOneTimePurchase,omitempty"` + // 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 *bool `json:"appliesOnSubscription,omitempty"` +} + +// GetValue returns DiscountCustomerGetsInput.Value, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsInput) GetValue() *DiscountCustomerGetsValueInput { return v.Value } + +// GetItems returns DiscountCustomerGetsInput.Items, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsInput) GetItems() *DiscountItemsInput { return v.Items } + +// GetAppliesOnOneTimePurchase returns DiscountCustomerGetsInput.AppliesOnOneTimePurchase, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsInput) GetAppliesOnOneTimePurchase() *bool { + return v.AppliesOnOneTimePurchase +} + +// GetAppliesOnSubscription returns DiscountCustomerGetsInput.AppliesOnSubscription, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsInput) GetAppliesOnSubscription() *bool { return v.AppliesOnSubscription } + +// The input fields for the quantity of items discounted and the discount value. +type DiscountCustomerGetsValueInput struct { + // The quantity of the items that are discounted and the discount value. + DiscountOnQuantity *DiscountOnQuantityInput `json:"discountOnQuantity,omitempty"` + // The percentage value of the discount. Value must be between 0.00 - 1.00. + // + // Note: BXGY doesn't support percentage. + Percentage *float64 `json:"percentage,omitempty"` + // The value of the discount. + // + // Note: BXGY doesn't support discountAmount. + DiscountAmount *DiscountAmountInput `json:"discountAmount,omitempty"` +} + +// GetDiscountOnQuantity returns DiscountCustomerGetsValueInput.DiscountOnQuantity, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsValueInput) GetDiscountOnQuantity() *DiscountOnQuantityInput { + return v.DiscountOnQuantity +} + +// GetPercentage returns DiscountCustomerGetsValueInput.Percentage, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsValueInput) GetPercentage() *float64 { return v.Percentage } + +// GetDiscountAmount returns DiscountCustomerGetsValueInput.DiscountAmount, and is useful for accessing the field via an interface. +func (v *DiscountCustomerGetsValueInput) GetDiscountAmount() *DiscountAmountInput { + return v.DiscountAmount +} + +// The input fields for which customer segments to add to or remove from the discount. +type DiscountCustomerSegmentsInput struct { + // A list of customer segments to add to the current list of customer segments. + Add []string `json:"add"` + // A list of customer segments to remove from the current list of customer segments. + Remove []string `json:"remove"` +} + +// GetAdd returns DiscountCustomerSegmentsInput.Add, and is useful for accessing the field via an interface. +func (v *DiscountCustomerSegmentsInput) GetAdd() []string { return v.Add } + +// GetRemove returns DiscountCustomerSegmentsInput.Remove, and is useful for accessing the field via an interface. +func (v *DiscountCustomerSegmentsInput) GetRemove() []string { return v.Remove } + +// The input fields for which customers to add to or remove from the discount. +type DiscountCustomersInput struct { + // A list of customers to add to the current list of customers who can use the discount. + Add []string `json:"add"` + // A list of customers to remove from the current list of customers who can use the discount. + Remove []string `json:"remove"` +} + +// GetAdd returns DiscountCustomersInput.Add, and is useful for accessing the field via an interface. +func (v *DiscountCustomersInput) GetAdd() []string { return v.Add } + +// GetRemove returns DiscountCustomersInput.Remove, and is useful for accessing the field via an interface. +func (v *DiscountCustomersInput) GetRemove() []string { return v.Remove } + +// The input fields for how the discount will be applied. Currently, only percentage off is supported. +type DiscountEffectInput struct { + // The percentage value of the discount. Value must be between 0.00 - 1.00. + Percentage *float64 `json:"percentage,omitempty"` + // The value of the discount. + Amount *string `json:"amount,omitempty"` +} + +// GetPercentage returns DiscountEffectInput.Percentage, and is useful for accessing the field via an interface. +func (v *DiscountEffectInput) GetPercentage() *float64 { return v.Percentage } + +// GetAmount returns DiscountEffectInput.Amount, and is useful for accessing the field via an interface. +func (v *DiscountEffectInput) GetAmount() *string { return v.Amount } + +// The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID. +type DiscountItemsInput struct { + // 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 `json:"products,omitempty"` + // The collections that are attached to a discount. + Collections *DiscountCollectionsInput `json:"collections,omitempty"` + // Whether all items should be selected for the discount. Not supported for Buy X get Y discounts. + All *bool `json:"all,omitempty"` +} + +// GetProducts returns DiscountItemsInput.Products, and is useful for accessing the field via an interface. +func (v *DiscountItemsInput) GetProducts() *DiscountProductsInput { return v.Products } + +// GetCollections returns DiscountItemsInput.Collections, and is useful for accessing the field via an interface. +func (v *DiscountItemsInput) GetCollections() *DiscountCollectionsInput { return v.Collections } + +// GetAll returns DiscountItemsInput.All, and is useful for accessing the field via an interface. +func (v *DiscountItemsInput) GetAll() *bool { return v.All } + +// The input fields for the minimum quantity required for the discount. +type DiscountMinimumQuantityInput struct { + // The minimum quantity of items that's required for the discount to be applied. + GreaterThanOrEqualToQuantity *string `json:"greaterThanOrEqualToQuantity,omitempty"` +} + +// GetGreaterThanOrEqualToQuantity returns DiscountMinimumQuantityInput.GreaterThanOrEqualToQuantity, and is useful for accessing the field via an interface. +func (v *DiscountMinimumQuantityInput) GetGreaterThanOrEqualToQuantity() *string { + return v.GreaterThanOrEqualToQuantity +} + +// The input fields for the minimum quantity or subtotal required for a discount. +type DiscountMinimumRequirementInput struct { + // The minimum required quantity. + Quantity *DiscountMinimumQuantityInput `json:"quantity,omitempty"` + // The minimum required subtotal. + Subtotal *DiscountMinimumSubtotalInput `json:"subtotal,omitempty"` +} + +// GetQuantity returns DiscountMinimumRequirementInput.Quantity, and is useful for accessing the field via an interface. +func (v *DiscountMinimumRequirementInput) GetQuantity() *DiscountMinimumQuantityInput { + return v.Quantity +} + +// GetSubtotal returns DiscountMinimumRequirementInput.Subtotal, and is useful for accessing the field via an interface. +func (v *DiscountMinimumRequirementInput) GetSubtotal() *DiscountMinimumSubtotalInput { + return v.Subtotal +} + +// The input fields for the minimum subtotal required for a discount. +type DiscountMinimumSubtotalInput struct { + // The minimum subtotal that's required for the discount to be applied. + GreaterThanOrEqualToSubtotal *string `json:"greaterThanOrEqualToSubtotal,omitempty"` +} + +// GetGreaterThanOrEqualToSubtotal returns DiscountMinimumSubtotalInput.GreaterThanOrEqualToSubtotal, and is useful for accessing the field via an interface. +func (v *DiscountMinimumSubtotalInput) GetGreaterThanOrEqualToSubtotal() *string { + return v.GreaterThanOrEqualToSubtotal +} + +// The input fields for the quantity of items discounted and the discount value. +type DiscountOnQuantityInput struct { + // The quantity of items that are discounted. + Quantity *string `json:"quantity,omitempty"` + // The percentage value of the discount. + Effect *DiscountEffectInput `json:"effect,omitempty"` +} + +// GetQuantity returns DiscountOnQuantityInput.Quantity, and is useful for accessing the field via an interface. +func (v *DiscountOnQuantityInput) GetQuantity() *string { return v.Quantity } + +// GetEffect returns DiscountOnQuantityInput.Effect, and is useful for accessing the field via an interface. +func (v *DiscountOnQuantityInput) GetEffect() *DiscountEffectInput { return v.Effect } + +// 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. +type DiscountProductsInput struct { + // The IDs of the products to add as prerequisites or as eligible items for a discount. + ProductsToAdd []string `json:"productsToAdd"` + // The IDs of the products to remove as prerequisites or as eligible items for a discount. + ProductsToRemove []string `json:"productsToRemove"` + // The IDs of the product variants to add as prerequisites or as eligible items for a discount. + ProductVariantsToAdd []string `json:"productVariantsToAdd"` + // The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + ProductVariantsToRemove []string `json:"productVariantsToRemove"` +} + +// GetProductsToAdd returns DiscountProductsInput.ProductsToAdd, and is useful for accessing the field via an interface. +func (v *DiscountProductsInput) GetProductsToAdd() []string { return v.ProductsToAdd } + +// GetProductsToRemove returns DiscountProductsInput.ProductsToRemove, and is useful for accessing the field via an interface. +func (v *DiscountProductsInput) GetProductsToRemove() []string { return v.ProductsToRemove } + +// GetProductVariantsToAdd returns DiscountProductsInput.ProductVariantsToAdd, and is useful for accessing the field via an interface. +func (v *DiscountProductsInput) GetProductVariantsToAdd() []string { return v.ProductVariantsToAdd } + +// GetProductVariantsToRemove returns DiscountProductsInput.ProductVariantsToRemove, and is useful for accessing the field via an interface. +func (v *DiscountProductsInput) GetProductVariantsToRemove() []string { + return v.ProductVariantsToRemove +} + +// The display status of a fulfillment. +type FulfillmentDisplayStatus string + +const ( + // Displayed as **Attempted delivery**. + FulfillmentDisplayStatusAttemptedDelivery FulfillmentDisplayStatus = "ATTEMPTED_DELIVERY" + // Displayed as **Canceled**. + FulfillmentDisplayStatusCanceled FulfillmentDisplayStatus = "CANCELED" + // Displayed as **Confirmed**. + FulfillmentDisplayStatusConfirmed FulfillmentDisplayStatus = "CONFIRMED" + // Displayed as **Delayed**. + FulfillmentDisplayStatusDelayed FulfillmentDisplayStatus = "DELAYED" + // Displayed as **Delivered**. + FulfillmentDisplayStatusDelivered FulfillmentDisplayStatus = "DELIVERED" + // Displayed as **Failure**. + FulfillmentDisplayStatusFailure FulfillmentDisplayStatus = "FAILURE" + // Displayed as **Fulfilled**. + FulfillmentDisplayStatusFulfilled FulfillmentDisplayStatus = "FULFILLED" + // Displayed as **Picked up by carrier**. + FulfillmentDisplayStatusCarrierPickedUp FulfillmentDisplayStatus = "CARRIER_PICKED_UP" + // Displayed as **In transit**. + FulfillmentDisplayStatusInTransit FulfillmentDisplayStatus = "IN_TRANSIT" + // Displayed as **Label printed**. + FulfillmentDisplayStatusLabelPrinted FulfillmentDisplayStatus = "LABEL_PRINTED" + // Displayed as **Label purchased**. + FulfillmentDisplayStatusLabelPurchased FulfillmentDisplayStatus = "LABEL_PURCHASED" + // Displayed as **Label voided**. + FulfillmentDisplayStatusLabelVoided FulfillmentDisplayStatus = "LABEL_VOIDED" + // Displayed as **Marked as fulfilled**. + FulfillmentDisplayStatusMarkedAsFulfilled FulfillmentDisplayStatus = "MARKED_AS_FULFILLED" + // Displayed as **Not delivered**. + FulfillmentDisplayStatusNotDelivered FulfillmentDisplayStatus = "NOT_DELIVERED" + // Displayed as **Out for delivery**. + FulfillmentDisplayStatusOutForDelivery FulfillmentDisplayStatus = "OUT_FOR_DELIVERY" + // Displayed as **Ready for pickup**. + FulfillmentDisplayStatusReadyForPickup FulfillmentDisplayStatus = "READY_FOR_PICKUP" + // Displayed as **Picked up**. + FulfillmentDisplayStatusPickedUp FulfillmentDisplayStatus = "PICKED_UP" + // Displayed as **Submitted**. + FulfillmentDisplayStatusSubmitted FulfillmentDisplayStatus = "SUBMITTED" +) + +var AllFulfillmentDisplayStatus = []FulfillmentDisplayStatus{ + FulfillmentDisplayStatusAttemptedDelivery, + FulfillmentDisplayStatusCanceled, + FulfillmentDisplayStatusConfirmed, + FulfillmentDisplayStatusDelayed, + FulfillmentDisplayStatusDelivered, + FulfillmentDisplayStatusFailure, + FulfillmentDisplayStatusFulfilled, + FulfillmentDisplayStatusCarrierPickedUp, + FulfillmentDisplayStatusInTransit, + FulfillmentDisplayStatusLabelPrinted, + FulfillmentDisplayStatusLabelPurchased, + FulfillmentDisplayStatusLabelVoided, + FulfillmentDisplayStatusMarkedAsFulfilled, + FulfillmentDisplayStatusNotDelivered, + FulfillmentDisplayStatusOutForDelivery, + FulfillmentDisplayStatusReadyForPickup, + FulfillmentDisplayStatusPickedUp, + FulfillmentDisplayStatusSubmitted, +} + +// GetOrderOrderByIdentifierOrder includes the requested fields of the GraphQL type Order. +// The GraphQL type's documentation follows. +// +// 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 GetOrderOrderByIdentifierOrder struct { + // The discount code used for an order. Returns `null` if no discount code was applied. + DiscountCode *string `json:"discountCode"` + // A list of shipments for the order. Fulfillments represent the physical shipment of products to customers. + Fulfillments []*GetOrderOrderByIdentifierOrderFulfillmentsFulfillment `json:"fulfillments"` + // A globally-unique ID. + Id string `json:"id"` +} + +// GetDiscountCode returns GetOrderOrderByIdentifierOrder.DiscountCode, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrder) GetDiscountCode() *string { return v.DiscountCode } + +// GetFulfillments returns GetOrderOrderByIdentifierOrder.Fulfillments, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrder) GetFulfillments() []*GetOrderOrderByIdentifierOrderFulfillmentsFulfillment { + return v.Fulfillments +} + +// GetId returns GetOrderOrderByIdentifierOrder.Id, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrder) GetId() string { return v.Id } + +// GetOrderOrderByIdentifierOrderFulfillmentsFulfillment includes the requested fields of the GraphQL type Fulfillment. +// The GraphQL type's documentation follows. +// +// 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 GetOrderOrderByIdentifierOrderFulfillmentsFulfillment struct { + // The date that this fulfillment was delivered. + DeliveredAt *time.Time `json:"deliveredAt"` + // Human readable display status for this fulfillment. + DisplayStatus *FulfillmentDisplayStatus `json:"displayStatus"` + // List of the fulfillment's line items. + FulfillmentLineItems *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection `json:"fulfillmentLineItems"` +} + +// GetDeliveredAt returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillment.DeliveredAt, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillment) GetDeliveredAt() *time.Time { + return v.DeliveredAt +} + +// GetDisplayStatus returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillment.DisplayStatus, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillment) GetDisplayStatus() *FulfillmentDisplayStatus { + return v.DisplayStatus +} + +// GetFulfillmentLineItems returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillment.FulfillmentLineItems, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillment) GetFulfillmentLineItems() *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection { + return v.FulfillmentLineItems +} + +// GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection includes the requested fields of the GraphQL type FulfillmentLineItemConnection. +// The GraphQL type's documentation follows. +// +// An auto-generated type for paginating through multiple FulfillmentLineItems. +type GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection struct { + // 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 []*GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem `json:"nodes"` +} + +// GetNodes returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection.Nodes, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnection) GetNodes() []*GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem { + return v.Nodes +} + +// GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem includes the requested fields of the GraphQL type FulfillmentLineItem. +// The GraphQL type's documentation follows. +// +// Represents a line item from an order that's included in a fulfillment. +type GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem struct { + // The associated order's line item. + LineItem *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem `json:"lineItem"` +} + +// GetLineItem returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem.LineItem, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItem) GetLineItem() *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem { + return v.LineItem +} + +// GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem includes the requested fields of the GraphQL type LineItem. +// The GraphQL type's documentation follows. +// +// 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 GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem struct { + // The Product object associated with this line item's variant. + Product *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct `json:"product"` +} + +// GetProduct returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem.Product, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItem) GetProduct() *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct { + return v.Product +} + +// GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct includes the requested fields of the GraphQL type Product. +// The GraphQL type's documentation follows. +// +// 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 GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct struct { + // A globally-unique ID. + Id string `json:"id"` +} + +// GetId returns GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct.Id, and is useful for accessing the field via an interface. +func (v *GetOrderOrderByIdentifierOrderFulfillmentsFulfillmentFulfillmentLineItemsFulfillmentLineItemConnectionNodesFulfillmentLineItemLineItemProduct) GetId() string { + return v.Id +} + +// GetOrderResponse is returned by GetOrder on success. +type GetOrderResponse struct { + // Return an order by an identifier. + OrderByIdentifier *GetOrderOrderByIdentifierOrder `json:"orderByIdentifier"` +} + +// GetOrderByIdentifier returns GetOrderResponse.OrderByIdentifier, and is useful for accessing the field via an interface. +func (v *GetOrderResponse) GetOrderByIdentifier() *GetOrderOrderByIdentifierOrder { + return v.OrderByIdentifier +} + +// The input fields for identifying a order. +type OrderIdentifierInput struct { + // The ID of the order. + Id *string `json:"id,omitempty"` + // The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the order. + CustomId *UniqueMetafieldValueInput `json:"customId,omitempty"` +} + +// GetId returns OrderIdentifierInput.Id, and is useful for accessing the field via an interface. +func (v *OrderIdentifierInput) GetId() *string { return v.Id } + +// GetCustomId returns OrderIdentifierInput.CustomId, and is useful for accessing the field via an interface. +func (v *OrderIdentifierInput) GetCustomId() *UniqueMetafieldValueInput { return v.CustomId } + +// The input fields that identify a unique valued metafield. +type UniqueMetafieldValueInput struct { + // The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + Namespace *string `json:"namespace,omitempty"` + // The key for the metafield. + Key string `json:"key"` + // The value of the metafield. + Value string `json:"value"` +} + +// GetNamespace returns UniqueMetafieldValueInput.Namespace, and is useful for accessing the field via an interface. +func (v *UniqueMetafieldValueInput) GetNamespace() *string { return v.Namespace } + +// GetKey returns UniqueMetafieldValueInput.Key, and is useful for accessing the field via an interface. +func (v *UniqueMetafieldValueInput) GetKey() string { return v.Key } + +// GetValue returns UniqueMetafieldValueInput.Value, and is useful for accessing the field via an interface. +func (v *UniqueMetafieldValueInput) GetValue() string { return v.Value } + +// __CreateDiscountCodeInput is used internally by genqlient +type __CreateDiscountCodeInput struct { + BasicCodeDiscount *DiscountCodeBasicInput `json:"basicCodeDiscount,omitempty"` +} + +// GetBasicCodeDiscount returns __CreateDiscountCodeInput.BasicCodeDiscount, and is useful for accessing the field via an interface. +func (v *__CreateDiscountCodeInput) GetBasicCodeDiscount() *DiscountCodeBasicInput { + return v.BasicCodeDiscount +} + +// __GetOrderInput is used internally by genqlient +type __GetOrderInput struct { + Identifier *OrderIdentifierInput `json:"identifier,omitempty"` +} + +// GetIdentifier returns __GetOrderInput.Identifier, and is useful for accessing the field via an interface. +func (v *__GetOrderInput) GetIdentifier() *OrderIdentifierInput { return v.Identifier } + +// The mutation executed by CreateDiscountCode. +const CreateDiscountCode_Operation = ` +mutation CreateDiscountCode ($basicCodeDiscount: DiscountCodeBasicInput!) { + discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) { + codeDiscountNode { + id + codeDiscount { + __typename + ... on DiscountCodeBasic { + title + codes(first: 1) { + nodes { + code + } + } + } + } + } + userErrors { + field + message + } + } +} +` + +func CreateDiscountCode( + ctx_ context.Context, + client_ graphql.Client, + basicCodeDiscount *DiscountCodeBasicInput, +) (data_ *CreateDiscountCodeResponse, err_ error) { + req_ := &graphql.Request{ + OpName: "CreateDiscountCode", + Query: CreateDiscountCode_Operation, + Variables: &__CreateDiscountCodeInput{ + BasicCodeDiscount: basicCodeDiscount, + }, + } + + data_ = &CreateDiscountCodeResponse{} + resp_ := &graphql.Response{Data: data_} + + err_ = client_.MakeRequest( + ctx_, + req_, + resp_, + ) + + return data_, err_ +} + +// The query executed by GetOrder. +const GetOrder_Operation = ` +query GetOrder ($identifier: OrderIdentifierInput!) { + orderByIdentifier(identifier: $identifier) { + discountCode + fulfillments(first: 10) { + deliveredAt + displayStatus + fulfillmentLineItems(first: 10) { + nodes { + lineItem { + product { + id + } + } + } + } + } + id + } +} +` + +func GetOrder( + ctx_ context.Context, + client_ graphql.Client, + identifier *OrderIdentifierInput, +) (data_ *GetOrderResponse, err_ error) { + req_ := &graphql.Request{ + OpName: "GetOrder", + Query: GetOrder_Operation, + Variables: &__GetOrderInput{ + Identifier: identifier, + }, + } + + data_ = &GetOrderResponse{} + resp_ := &graphql.Response{Data: data_} + + err_ = client_.MakeRequest( + ctx_, + req_, + resp_, + ) + + return data_, err_ +} diff --git a/oura/shopify/order.go b/oura/shopify/order.go new file mode 100644 index 000000000..0143ea209 --- /dev/null +++ b/oura/shopify/order.go @@ -0,0 +1,153 @@ +package shopify + +import ( + "context" + "fmt" + + "github.com/tidepool-org/platform/customerio" + "github.com/tidepool-org/platform/log" + "github.com/tidepool-org/platform/oura" +) + +type OrdersCreateEvent struct { + ID int64 `json:"id"` + AdminGraphQLAPIID string `json:"admin_graphql_api_id"` + DiscountCodes []DiscountCode `json:"discount_codes"` + LineItems []LineItem `json:"line_items"` +} + +type DiscountCode struct { + Code string `json:"code"` + Type string `json:"type"` + Amount string `json:"amount"` +} + +type LineItem struct { + ID int64 `json:"id"` + AdminGraphQLAPIID string `json:"admin_graphql_api_id"` + ProductID int64 `json:"product_id"` +} + +type OrdersCreateEventProcessor struct { + logger log.Logger + + customerIOClient *customerio.Client +} + +func NewOrdersCreateEventProcessor(logger log.Logger, customerIOClient *customerio.Client) (*OrdersCreateEventProcessor, error) { + return &OrdersCreateEventProcessor{ + logger: logger, + customerIOClient: customerIOClient, + }, nil +} + +func (f *OrdersCreateEventProcessor) Process(ctx context.Context, event OrdersCreateEvent) error { + logger := f.logger.WithField("orderId", event.ID) + + var products []string + for _, lineItem := range event.LineItems { + products = append(products, fmt.Sprintf("%d", lineItem.ProductID)) + } + + if len(products) == 0 { + logger.Info("ignoring orders create event with no products") + return nil + } else if len(products) > 1 { + logger.Warn("ignoring orders create event with multiple products") + return nil + } + + productID := products[0] + logger = logger.WithField("productId", productID) + + attribute, ok := productIDToOuraDiscountAttribute[productID] + if !ok { + logger.Warn("unable to find discount attribute for product") + return nil + } + + var discountCodes []string + for _, discountCode := range event.DiscountCodes { + discountCodes = append(discountCodes, discountCode.Code) + } + + if len(discountCodes) == 0 { + logger.Warn("ignoring orders create event with no discount codes") + return nil + } else if len(discountCodes) > 1 { + logger.Warn("ignoring orders create event with multiple discount codes") + return nil + } + + discountCode := discountCodes[0] + customers, err := f.customerIOClient.FindCustomers(ctx, map[string]any{ + "filter": map[string]any{ + "and": []any{ + map[string]any{ + "attribute": map[string]any{ + "field": attribute, + "operator": "eq", + "value": discountCode, + }, + }, + }, + }, + }) + if err != nil { + logger.WithError(err).Warn("unable to find customers") + return nil + } + + if len(customers.Identifiers) == 0 { + logger.Warn("no customers found for delivered products") + return nil + } else if len(customers.Identifiers) > 1 { + userIds := make([]string, 0, len(customers.Identifiers)) + for _, id := range customers.Identifiers { + userIds = append(userIds, id.ID) + } + logger.WithField("userIds", userIds).Warn("multiple customers found for delivered products") + return nil + } + + switch productID { + case OuraSizingKitProductID: + if err := f.onSizingKitOrdered(ctx, customers.Identifiers[0], discountCode); err != nil { + logger.WithError(err).Warn("unable to send sizing kit ordered event") + return err + } + case OuraRingProductID: + if err := f.onRingOrdered(ctx, customers.Identifiers[0], discountCode); err != nil { + logger.WithError(err).Warn("unable to send ring ordered event") + return err + } + default: + logger.Warn("ignoring orders create event for unknown product") + } + + return nil +} + +func (f *OrdersCreateEventProcessor) onSizingKitOrdered(ctx context.Context, identifiers customerio.Identifiers, discountCode string) error { + sizingKitOrdered := customerio.Event{ + Name: oura.OuraSizingKitOrderedEventType, + ID: discountCode, + Data: oura.OuraSizingKitOrderedData{ + OuraSizingKitDiscountCode: discountCode, + }, + } + + return f.customerIOClient.SendEvent(ctx, identifiers.ID, sizingKitOrdered) +} + +func (f *OrdersCreateEventProcessor) onRingOrdered(ctx context.Context, identifiers customerio.Identifiers, discountCode string) error { + ringOrdered := customerio.Event{ + Name: oura.OuraRingOrderedEventType, + ID: discountCode, + Data: oura.OuraRingOrderedData{ + OuraRingDiscountCode: discountCode, + }, + } + + return f.customerIOClient.SendEvent(ctx, identifiers.ID, ringOrdered) +} diff --git a/oura/shopify/order_test.go b/oura/shopify/order_test.go new file mode 100644 index 000000000..f16248aa2 --- /dev/null +++ b/oura/shopify/order_test.go @@ -0,0 +1,188 @@ +package shopify_test + +import ( + "context" + "fmt" + "math/rand" + "net/http" + "net/http/httptest" + "strconv" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "github.com/tidepool-org/platform/customerio" + + "github.com/tidepool-org/platform/oura/shopify" + + "github.com/tidepool-org/platform/log" + logTest "github.com/tidepool-org/platform/log/test" + ouraTest "github.com/tidepool-org/platform/oura/test" +) + +var _ = Describe("FulfillmentEventProcessor", func() { + var ( + ctx context.Context + processor *shopify.OrdersCreateEventProcessor + logger log.Logger + + appAPIServer *httptest.Server + appAPIResponses *ouraTest.StubResponses + + trackAPIServer *httptest.Server + trackAPIResponses *ouraTest.StubResponses + ) + + BeforeEach(func() { + ctx = context.Background() + logger = logTest.NewLogger() + + appAPIResponses = ouraTest.NewStubResponses() + appAPIServer = ouraTest.NewStubServer(appAPIResponses) + + trackAPIResponses = ouraTest.NewStubResponses() + trackAPIServer = ouraTest.NewStubServer(trackAPIResponses) + + customerIOConfig := customerio.Config{ + AppAPIBaseURL: appAPIServer.URL, + TrackAPIBaseURL: trackAPIServer.URL, + } + customerIOClient, err := customerio.NewClient(customerIOConfig, logger) + Expect(err).ToNot(HaveOccurred()) + + processor, err = shopify.NewOrdersCreateEventProcessor(logger, customerIOClient) + Expect(err).ToNot(HaveOccurred()) + }) + + AfterEach(func() { + Expect(trackAPIResponses.UnmatchedResponses()).To(Equal(0)) + Expect(appAPIResponses.UnmatchedResponses()).To(Equal(0)) + + appAPIServer.Close() + trackAPIServer.Close() + }) + + Context("Process", func() { + It("should successfully process a sizing kit order placements", func() { + id := "1aacb960-430c-4081-8b3b-a32688807dc5" + sizingKitDiscountCode := shopify.RandomDiscountCode() + productId, err := strconv.Atoi(shopify.OuraSizingKitProductID) + Expect(err).ToNot(HaveOccurred()) + + event := shopify.OrdersCreateEvent{ + ID: 9999999999, + AdminGraphQLAPIID: "gid://shopify/Order/9999999999", + DiscountCodes: []shopify.DiscountCode{{ + Code: sizingKitDiscountCode, + Type: "discount", + Amount: "10.00", + }}, + LineItems: []shopify.LineItem{{ + ID: rand.Int63(), + AdminGraphQLAPIID: fmt.Sprintf("gid://shopify/Product/%d", productId), + ProductID: int64(productId), + }}, + } + + customers, err := ouraTest.LoadFixture("./test/fixtures/customers.json") + Expect(err).ToNot(HaveOccurred()) + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/v1/customers"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "filter": { + "and": [ + { + "attribute": { + "field": "oura_sizing_kit_discount_code", + "operator": "eq", + "value": "` + sizingKitDiscountCode + `" + } + } + ] + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: customers}, + ) + + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+id+"/events"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "name": "oura_sizing_kit_ordered", + "id": "` + sizingKitDiscountCode + `", + "data": { + "oura_sizing_kit_discount_code": "` + sizingKitDiscountCode + `" + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + err = processor.Process(ctx, event) + Expect(err).ToNot(HaveOccurred()) + }) + + It("should successfully process a ring order placements", func() { + id := "1aacb960-430c-4081-8b3b-a32688807dc5" + ringDiscountCode := shopify.RandomDiscountCode() + productId, err := strconv.Atoi(shopify.OuraRingProductID) + Expect(err).ToNot(HaveOccurred()) + + event := shopify.OrdersCreateEvent{ + ID: 9999999999, + AdminGraphQLAPIID: "gid://shopify/Order/9999999999", + DiscountCodes: []shopify.DiscountCode{{ + Code: ringDiscountCode, + Type: "discount", + Amount: "10.00", + }}, + LineItems: []shopify.LineItem{{ + ID: rand.Int63(), + AdminGraphQLAPIID: fmt.Sprintf("gid://shopify/Product/%d", productId), + ProductID: int64(productId), + }}, + } + + customers, err := ouraTest.LoadFixture("./test/fixtures/customers.json") + Expect(err).ToNot(HaveOccurred()) + appAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/v1/customers"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "filter": { + "and": [ + { + "attribute": { + "field": "oura_ring_discount_code", + "operator": "eq", + "value": "` + ringDiscountCode + `" + } + } + ] + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: customers}, + ) + + trackAPIResponses.AddResponse( + []ouraTest.RequestMatcher{ + ouraTest.NewRequestMethodAndPathMatcher(http.MethodPost, "/api/v1/customers/"+id+"/events"), + ouraTest.NewRequestJSONBodyMatcher(`{ + "name": "oura_ring_ordered", + "id": "` + ringDiscountCode + `", + "data": { + "oura_ring_discount_code": "` + ringDiscountCode + `" + } + }`), + }, + ouraTest.Response{StatusCode: http.StatusOK, Body: "{}"}, + ) + + err = processor.Process(ctx, event) + Expect(err).ToNot(HaveOccurred()) + }) + }) +}) diff --git a/oura/shopify/schema/shopify.graphql b/oura/shopify/schema/shopify.graphql new file mode 100644 index 000000000..0770d2b13 --- /dev/null +++ b/oura/shopify/schema/shopify.graphql @@ -0,0 +1,93937 @@ +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 + +"""Exposes a URL that specifies the behavior of this scalar.""" +directive @specifiedBy( + """The URL that specifies the behavior of this scalar.""" + url: String! +) on SCALAR + +""" +Direct the client to resolve this field locally, either from the cache or local resolvers. +""" +directive @client( + """ + When true, the client will never use the cache for this value. See + https://www.apollographql.com/docs/react/essentials/local-state/#forcing-resolvers-with-clientalways-true + """ + always: Boolean +) on FIELD | FRAGMENT_DEFINITION | INLINE_FRAGMENT + +""" +Export this locally resolved field as a variable to be used in the remainder of this query. See +https://www.apollographql.com/docs/react/essentials/local-state/#using-client-fields-as-variables +""" +directive @export( + """The variable name to export this field as.""" + as: String! +) on FIELD + +""" +Specify a custom store key for this result. See +https://www.apollographql.com/docs/react/advanced/caching/#the-connection-directive +""" +directive @connection( + """Specify the store key.""" + key: String! + + """ + An array of query argument names to include in the generated custom store key. + """ + filter: [String!] +) on FIELD + +"""A checkout that was abandoned by the customer.""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): AbandonedCheckoutLineItemConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DiscountAllocationConnection! + + """ + 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 +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CustomerVisitProductInfoConnection! + + """The products viewed during the customer abandoned visit.""" + productsViewed( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CustomerVisitProductInfoConnection! + + """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 sent.""" + SENT + + """The marketing activity action has been scheduled for later delivery.""" + SCHEDULED +} + +"""Specifies the email state.""" +enum AbandonmentEmailState { + """The email has not yet been sent.""" + NOT_SENT + + """The email has been sent.""" + SENT + + """The email has been scheduled for later delivery.""" + SCHEDULED +} + +"""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 a marketing activity for the provided ID.""" + MARKETING_ACTIVITY_NOT_FOUND + + """Unable to find delivery status info for the provided ID.""" + DELIVERY_STATUS_INFO_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! +} + +"""Possible account types that a staff member can have.""" +enum AccountType { + """The account can access the Shopify admin.""" + REGULAR + + """The account cannot access the Shopify admin.""" + RESTRICTED + + """The user has not yet accepted the invitation to create an account.""" + INVITED + + """ + The admin has not yet accepted the request to create a collaborator account. + """ + REQUESTED + + """The account of a partner who collaborates with the merchant.""" + COLLABORATOR + + """The account of a partner collaborator team member.""" + COLLABORATOR_TEAM_MEMBER + + """The account can be signed into via a SAML provider.""" + SAML + + """ + The user has not yet accepted the invitation to become the store owner. + """ + INVITED_STORE_OWNER +} + +"""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 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") + + """ + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): AppConnection! + + """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 is Shopify.""" + SHOPIFY + + """Indicates the app developer is a Partner.""" + PARTNER + + """Indicates the app developer works directly for a Merchant.""" + MERCHANT + + """ + 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! +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppSubscriptionSortKeys = CREATED_AT + ): AppSubscriptionConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppTransactionSortKeys = CREATED_AT + ): AppCreditConnection! + + """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 container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """One-time purchases to a shop.""" + oneTimePurchases( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppTransactionSortKeys = CREATED_AT + ): AppPurchaseOneTimeConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppRevenueAttributionRecordSortKeys = CREATED_AT + ): AppRevenueAttributionRecordConnection! + + """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 { + PUBLIC + PRIVATE +} + +"""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 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! +} + +""" +The pricing model for the app subscription. +The pricing model input can be either `appRecurringPricingDetails` or `appUsagePricingDetails`. +""" +input AppPlanInput { + """The pricing details for usage-based billing.""" + appUsagePricingDetails: AppUsagePricingInput + + """The pricing details for recurring billing.""" + appRecurringPricingDetails: AppRecurringPricingInput +} + +""" +Contains the pricing details for the app plan that a merchant has subscribed to within their current billing arrangement. + +This simplified object focuses on the essential pricing information merchants +need to understand their current subscription costs and billing structure. + +Details about subscription management and pricing strategies are available in +the [app billing documentation](https://shopify.dev/docs/apps/launch/billing). +""" +type AppPlanV2 { + """The 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 [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 + + """ + 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 +} + +"""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 { + """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! + + """ + The discount applied to the subscription for a given number of billing intervals. + """ + discount: AppSubscriptionDiscountInput +} + +""" +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 { + """No app found on the access token.""" + MISSING_SOURCE_APP + + """The application cannot be found.""" + APPLICATION_CANNOT_BE_FOUND + + """The requested list of scopes to revoke includes invalid handles.""" + UNKNOWN_SCOPES + + """Required scopes cannot be revoked.""" + CANNOT_REVOKE_REQUIRED_SCOPES + + """Already granted implied scopes cannot be revoked.""" + CANNOT_REVOKE_IMPLIED_SCOPES + + """Cannot revoke optional scopes that haven't been declared.""" + CANNOT_REVOKE_UNDECLARED_SCOPES + + """App is not installed on shop.""" + APP_NOT_INSTALLED +} + +"""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!]! +} + +""" +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 value to be discounted every billing interval.""" + value: AppSubscriptionDiscountValueInput + + """ + 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 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 percentage value of a discount.""" + percentage: Float + + """The monetary value of a discount.""" + amount: Decimal +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppUsageRecordSortKeys = CREATED_AT + ): AppUsageRecordConnection! +} + +""" +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 is pending approval by the merchant.""" + PENDING + + """ + 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 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 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 +} + +"""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 wasn't found.""" + SUBSCRIPTION_NOT_FOUND + + """The trial isn't active.""" + TRIAL_NOT_ACTIVE + + """The app subscription isn't active.""" + SUBSCRIPTION_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 + + """User does not have sufficient permissions to uninstall this app.""" + USER_PERMISSIONS_INSUFFICIENT + + """An error occurred while uninstalling the app.""" + APP_UNINSTALL_ERROR +} + +"""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 +} + +""" +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 article in the blogging system.""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CommentConnection! + + """Count of comments. Limited to a maximum of 10000 by default.""" + commentsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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 container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The date and time (ISO 8601 format) when the 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 an article author in an Article.""" +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 ID of the blog containing the article.""" + blogId: ID + + """ + 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 text of the article's body, complete with HTML markup.""" + body: HTML + + """ + 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 + + """Whether or not the article should be visible.""" + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the article 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 article template is used. + """ + templateSuffix: String + + """The input fields to create or update a metafield.""" + metafields: [MetafieldInput!] + + """ + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. + """ + tags: [String!] + + """The image associated with the article.""" + image: ArticleImageInput + + """The title of the article.""" + title: String! + + """The name of the author of the article.""" + author: AuthorInput! +} + +"""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 + + """Can’t set isPublished to true and also set a future publish date.""" + INVALID_PUBLISH_DATE + + """Must reference or create a blog when creating an article.""" + BLOG_REFERENCE_REQUIRED + + """Image upload failed.""" + UPLOAD_FAILED + + """The input value is blank.""" + BLANK + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is too long.""" + TOO_LONG + + """The input value is already taken.""" + TAKEN + + """The input value is invalid.""" + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """The metafield type is invalid.""" + INVALID_TYPE +} + +"""Return type for `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 ID of the blog containing the article.""" + blogId: ID + + """ + 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 text of the article's body, complete with HTML markup.""" + body: HTML + + """ + 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 + + """Whether or not the article should be visible.""" + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the article 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 article template is used. + """ + templateSuffix: String + + """The input fields to create or update a metafield.""" + metafields: [MetafieldInput!] + + """ + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. + """ + tags: [String!] + + """The image associated with the article.""" + image: ArticleImageInput + + """The title of the article.""" + title: String + + """The name of the author of the article.""" + author: AuthorInput + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false +} + +"""Return type for `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 + + """Can’t set isPublished to true and also set a future publish date.""" + INVALID_PUBLISH_DATE + + """Image upload failed.""" + UPLOAD_FAILED + + """The input value is blank.""" + BLANK + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is too long.""" + TOO_LONG + + """The input value is already taken.""" + TAKEN + + """The input value is invalid.""" + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """The metafield type is invalid.""" + INVALID_TYPE +} + +""" +A 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 `default`.""" + DEFAULT + + """This badge has type `success`.""" + SUCCESS + + """This badge has type `attention`.""" + ATTENTION + + """This badge has type `warning`.""" + WARNING + + """This badge has type `info`.""" + INFO + + """This badge has type `critical`.""" + CRITICAL +} + +"""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 +} + +""" +The valid types of actions a user should be able to perform in an financial app. +""" +enum BankingFinanceAppAccess { + """Read access in the financial app.""" + READ_ACCESS + + """Ability to perform actions that moves money.""" + MOVE_MONEY + + """Indication that the user has restricted money movement.""" + MONEY_MOVEMENT_RESTRICTED + + """ + Indication that the user has blocked money movement due to MFA disabled. + """ + MONEY_MOVEMENT_BLOCKED_MFA +} + +"""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 { + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """Subscription contract does not exist.""" + CONTRACT_NOT_FOUND + + """Origin time cannot be before the contract creation time.""" + ORIGIN_TIME_BEFORE_CONTRACT_CREATION + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED + + """ + 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 + + """ + Origin time needs to be within the selected billing cycle's start and end at date. + """ + ORIGIN_TIME_OUT_OF_RANGE + + """ + 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 + + """Subscription contract is under review.""" + CONTRACT_UNDER_REVIEW + + """Subscription contract cannot be billed once terminated.""" + CONTRACT_TERMINATED + + """Subscription contract cannot be billed if paused.""" + CONTRACT_PAUSED +} + +""" +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 Blog implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """List of the blog's articles.""" + articles( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ArticleConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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 container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A 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 { + """ + A unique, human-friendly string for the blog. If no handle is specified, a + handle will be generated automatically from the blog title. + The handle is customizable and is used by the Liquid templating language to refer to the blog. + """ + handle: String + + """ + The name of the template a blog is using if it's using an alternate template. + Returns `null` if a blog is using the default blog.liquid template. + """ + templateSuffix: String + + """Attaches additional metadata to a store's resources.""" + metafields: [MetafieldInput!] + + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """The title of the blog.""" + title: String! +} + +"""Return type for `blogCreate` mutation.""" +type BlogCreatePayload { + """The blog that was created.""" + blog: Blog + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BlogCreateUserError!]! +} + +"""An error that occurs during the execution of `BlogCreate`.""" +type BlogCreateUserError implements DisplayableError { + """The error code.""" + code: BlogCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `BlogCreateUserError`.""" +enum BlogCreateUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is too long.""" + TOO_LONG + + """The input value isn't included in the list.""" + INCLUSION + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """The metafield type is invalid.""" + INVALID_TYPE +} + +"""Return type for `blogDelete` mutation.""" +type BlogDeletePayload { + """The ID of the deleted blog.""" + deletedBlogId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BlogDeleteUserError!]! +} + +"""An error that occurs during the execution of `BlogDelete`.""" +type BlogDeleteUserError implements DisplayableError { + """The error code.""" + code: BlogDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `BlogDeleteUserError`.""" +enum BlogDeleteUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND +} + +""" +An auto-generated type which holds one Blog and a cursor during pagination. +""" +type BlogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of BlogEdge.""" + node: Blog! +} + +""" +FeedBurner provider details. Any blogs that aren't already integrated with FeedBurner can't use the service. +""" +type BlogFeed { + """Blog feed provider url.""" + location: URL! + + """Blog feed provider path.""" + path: String! +} + +"""The set of valid sort keys for the Blog query.""" +enum BlogSortKeys { + """Sort by the `handle` value.""" + HANDLE + + """Sort by the `id` value.""" + ID + + """Sort by the `title` value.""" + TITLE +} + +"""The input fields to update a blog.""" +input BlogUpdateInput { + """ + A unique, human-friendly string for the blog. If no handle is specified, a + handle will be generated automatically from the blog title. + The handle is customizable and is used by the Liquid templating language to refer to the blog. + """ + handle: String + + """ + The name of the template a blog is using if it's using an alternate template. + Returns `null` if a blog is using the default blog.liquid template. + """ + templateSuffix: String + + """Attaches additional metadata to a store's resources.""" + metafields: [MetafieldInput!] + + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """The title of the blog.""" + title: String + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false + + """Whether to redirect blog posts automatically.""" + redirectArticles: Boolean = false +} + +"""Return type for `blogUpdate` mutation.""" +type BlogUpdatePayload { + """The blog that was updated.""" + blog: Blog + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BlogUpdateUserError!]! +} + +"""An error that occurs during the execution of `BlogUpdate`.""" +type BlogUpdateUserError implements DisplayableError { + """The error code.""" + code: BlogUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `BlogUpdateUserError`.""" +enum BlogUpdateUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """The input value is too long.""" + TOO_LONG + + """The input value isn't included in the list.""" + INCLUSION +} + +"""Possible error codes that can be returned by `BulkMutationUserError`.""" +enum BulkMutationErrorCode { + """ + The operation did not run because another bulk mutation is already running. + [Wait for the operation to finish](https://shopify.dev/api/usage/bulk-operations/imports#wait-for-the-operation-to-finish) + before retrying this operation. + """ + OPERATION_IN_PROGRESS + + """ + The operation did not run because the mutation is invalid. Check your mutation syntax and try again. + """ + INVALID_MUTATION + + """ + The JSONL file submitted via the `stagedUploadsCreate` mutation is invalid. Update the file and try again. + """ + INVALID_STAGED_UPLOAD_FILE + + """ + The JSONL file could not be found. Try [uploading the file](https://shopify.dev/api/usage/bulk-operations/imports#generate-the-uploaded-url-and-parameters) + again, and check that you've entered the URL correctly for the + `stagedUploadPath` mutation argument. + """ + NO_SUCH_FILE + + """ + There was a problem reading the JSONL file. This error might be intermittent, + so you can try performing the same query again. + """ + INTERNAL_FILE_SERVER_ERROR + + """Bulk operations limit reached. Please try again later.""" + LIMIT_REACHED +} + +"""Represents an error that happens during execution of a bulk mutation.""" +type BulkMutationUserError implements DisplayableError { + """The error code.""" + code: BulkMutationErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +An asynchronous 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: [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 query.""" + QUERY + + """The bulk operation is a mutation.""" + MUTATION +} + +"""Represents an error in the input of a mutation.""" +type BulkOperationUserError implements DisplayableError { + """The error code.""" + code: BulkOperationUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `BulkOperationUserError`.""" +enum BulkOperationUserErrorCode { + """A bulk operation is already in progress.""" + OPERATION_IN_PROGRESS + + """The input value is invalid.""" + INVALID + + """Bulk operations limit reached. Please try again later.""" + LIMIT_REACHED +} + +"""Return type for `bulkProductResourceFeedbackCreate` mutation.""" +type BulkProductResourceFeedbackCreatePayload { + """The feedback that's created.""" + feedback: [ProductResourceFeedback!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BulkProductResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `BulkProductResourceFeedbackCreate`. +""" +type BulkProductResourceFeedbackCreateUserError implements DisplayableError { + """The error code.""" + code: BulkProductResourceFeedbackCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `BulkProductResourceFeedbackCreateUserError`. +""" +enum BulkProductResourceFeedbackCreateUserErrorCode { + """ + The operation was attempted on too many feedback objects. The maximum number + of feedback objects that you can operate on is 50. + """ + MAXIMUM_FEEDBACK_LIMIT_EXCEEDED + + """ + The feedback for a later version of this resource was already accepted. + """ + OUTDATED_FEEDBACK + + """The product wasn't found or isn't available to the channel.""" + PRODUCT_NOT_FOUND + + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """The input value needs to be blank.""" + PRESENT + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO +} + +"""The input fields representing the components of a bundle line item.""" +input BundlesDraftOrderBundleLineItemComponentInput { + """The ID of the product variant corresponding to the bundle component.""" + variantId: ID + + """The quantity of the bundle component.""" + quantity: Int! + + """ + The UUID of the bundle component. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String +} + +"""Represents the Bundles feature configuration for the shop.""" +type BundlesFeature { + """Whether a shop is configured properly to sell bundles.""" + eligibleForBundles: Boolean! + + """The reason why a shop is not eligible for bundles.""" + ineligibilityReason: String + + """ + Whether a shop has any fixed bundle products or has a cartTransform function installed. + """ + sellsBundles: Boolean! +} + +""" +Possible error codes that can be returned by `BusinessCustomerUserError`. +""" +enum BusinessCustomerErrorCode { + """An internal error occurred.""" + INTERNAL_ERROR + + """The resource wasn't found.""" + RESOURCE_NOT_FOUND + + """Deleting the resource failed.""" + FAILED_TO_DELETE + + """Missing a required field.""" + REQUIRED + + """The input is empty.""" + NO_INPUT + + """The input is invalid.""" + INVALID_INPUT + + """Unexpected type.""" + UNEXPECTED_TYPE + + """The field value is too long.""" + TOO_LONG + + """The number of resources exceeded the limit.""" + LIMIT_REACHED + + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """The input value is already taken.""" + TAKEN +} + +""" +An error that happens during the execution of a business customer mutation. +""" +type BusinessCustomerUserError implements DisplayableError { + """The error code.""" + code: BusinessCustomerErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Represents a merchant's Business Entity.""" +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! + + """Shopify Payments account information, including balances and payouts.""" + shopifyPaymentsAccount: ShopifyPaymentsAccount +} + +"""Represents the address of a merchant's Business Entity.""" +type BusinessEntityAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The country code of the merchant's Business Entity.""" + countryCode: CountryCode! + + """The region of the address, such as the province, state, or district.""" + province: String + + """The zip or postal code of the address.""" + zip: String +} + +"""Settings describing the behavior of checkout for a B2B buyer.""" +type BuyerExperienceConfiguration { + """Whether to checkout to draft order for merchant review.""" + checkoutToDraft: Boolean! + + """The portion required to be paid at checkout.""" + deposit: DepositConfiguration + + """Whether to allow customers to use editable shipping addresses.""" + editableShippingAddress: Boolean! + + """ + Whether a buyer must pay at checkout or they can also choose to pay + later using net terms. + """ + payNowOnly: Boolean! @deprecated(reason: "Please use `checkoutToDraft`(must be false) and `paymentTermsTemplate`(must be nil) to derive this instead.") + + """Represents the merchant configured payment terms.""" + paymentTermsTemplate: PaymentTermsTemplate +} + +"""The input fields specifying the behavior of checkout for a B2B buyer.""" +input BuyerExperienceConfigurationInput { + """Whether to checkout to draft order for merchant review.""" + checkoutToDraft: Boolean + + """Represents the merchant configured payment terms.""" + paymentTermsTemplateId: ID + + """Whether to allow customers to edit their shipping address at checkout.""" + editableShippingAddress: Boolean + + """The input fields configuring the deposit a B2B buyer.""" + deposit: DepositInput +} + +"""The input fields for a buyer signal.""" +input BuyerSignalInput { + """The country code of the buyer.""" + countryCode: CountryCode! +} + +""" +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!]! + + """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 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CalculatedDiscountApplicationConnection! + + """ + Returns only the new line items being added to the order during the current edit. + """ + addedLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CalculatedLineItemConnection! + + """ + Amount of the order-level discount (doesn't contain any line item discounts) in shop and presentment currencies. + """ + cartDiscountAmountSet: MoneyBag + + """Whether the changes have been applied and saved to the order.""" + committed: Boolean! @deprecated(reason: "CalculatedOrder for committed order edits is being deprecated, and this field will also be removed in a future version. See [changelog](https://shopify.dev/changelog/deprecation-notice-calculatedorder-for-committed-order-edits) for more details.") + + """A globally-unique ID.""" + id: ID! + + """ + Returns all items on the order that existed before starting the edit. + Will include any changes that have been made. + Will not include line items added during the current edit. + """ + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): CalculatedLineItemConnection! + + """The HTML of the customer notification for the order edit.""" + notificationPreviewHtml: HTML + + """The customer notification title.""" + notificationPreviewTitle: String! + + """The order without any changes applied.""" + originalOrder: Order! + + """ + Returns the shipping lines on the order that existed before starting the edit. + Will include any changes that have been made as well as shipping lines added during the current edit. + Returns only the first 250 shipping lines. + """ + shippingLines: [CalculatedShippingLine!]! + + """List of changes made to the order during the current edit.""" + stagedChanges( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderStagedChangeConnection! + + """ + The sum of the quantities for the line items that contribute to the order's subtotal. + """ + subtotalLineItemsQuantity: Int! + + """ + The subtotal of the line items, in shop and presentment currencies, after all + the discounts are applied. The subtotal doesn't include shipping. The + subtotal includes taxes for taxes-included orders and excludes taxes for + taxes-excluded orders. + """ + subtotalPriceSet: MoneyBag + + """Taxes charged for the line item.""" + taxLines: [TaxLine!]! + + """ + Total price of the order less the total amount received from the customer in shop and presentment currencies. + """ + totalOutstandingSet: MoneyBag! + + """ + Total amount of the order (includes taxes and discounts) in shop and presentment currencies. + """ + totalPriceSet: MoneyBag! +} + +""" +The calculated costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type CalculatedRestockingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """A globally-unique ID.""" + id: ID! + + """The value of the fee as a percentage.""" + percentage: Float! +} + +"""A calculated return.""" +type CalculatedReturn { + """A list of calculated exchange line items.""" + exchangeLineItems: [CalculatedExchangeLineItem!]! + + """A globally-unique ID.""" + id: ID! + + """A list of calculated return line items.""" + returnLineItems: [CalculatedReturnLineItem!]! + + """The calculated return shipping fee.""" + returnShippingFee: CalculatedReturnShippingFee +} + +"""A calculated return fee.""" +interface CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """A globally-unique ID.""" + id: ID! +} + +"""A calculated return line item.""" +type CalculatedReturnLineItem { + """The fulfillment line item from which items are returned.""" + fulfillmentLineItem: FulfillmentLineItem! + + """A globally-unique ID.""" + id: ID + + """The quantity being returned.""" + quantity: Int! + + """The restocking fee of the return line item.""" + restockingFee: CalculatedRestockingFee + + """The subtotal of the return line item before order discounts.""" + subtotalBeforeOrderDiscountsSet: MoneyBag! + + """The subtotal of the return line item.""" + subtotalSet: MoneyBag! + + """The total tax of the return line item.""" + totalTaxSet: MoneyBag! +} + +"""The calculated cost of the return shipping.""" +type CalculatedReturnShippingFee implements CalculatedReturnFee { + """ + The calculated amount of the return fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """A globally-unique ID.""" + id: ID! +} + +""" +A discount created by a Shopify script for an order that is being edited. +""" +type CalculatedScriptDiscountApplication implements CalculatedDiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """The level at which the discount was applied.""" + appliedTo: DiscountApplicationLevel! + + """ + The description of discount application. Indicates the reason why the discount was applied. + """ + description: String + + """A globally-unique ID.""" + id: ID! + + """How the discount amount is distributed on the discounted lines.""" + targetSelection: DiscountApplicationTargetSelection! + + """Whether the discount is applied on line items or shipping lines.""" + targetType: DiscountApplicationTargetType! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +A shipping line item involved in order editing that may be newly added or have new changes applied. +""" +type CalculatedShippingLine { + """A globally-unique ID.""" + id: ID + + """ + The price of the shipping line when sold and before applying discounts. This + field includes taxes if `Order.taxesIncluded` is true. Otherwise, this field + doesn't include taxes for the shipping line. + """ + price: MoneyBag! + + """The staged status of the shipping line.""" + stagedStatus: CalculatedShippingLineStagedStatus! + + """The title of the shipping line.""" + title: String! +} + +""" +Represents the staged status of a CalculatedShippingLine on a CalculatedOrder. +""" +enum CalculatedShippingLineStagedStatus { + """The shipping line has no staged changes associated with it.""" + NONE + + """The shipping line was added as part of the current order edit.""" + ADDED + + """The shipping line was removed as part of the current order edit.""" + REMOVED +} + +"""The input fields for exchange line items on a calculated return.""" +input CalculateExchangeLineItemInput { + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID + + """The quantity of the item to be added.""" + quantity: Int! + + """The discount to be applied to the exchange line item.""" + appliedDiscount: ExchangeLineItemAppliedDiscountInput +} + +"""The input fields to calculate return amounts associated with an order.""" +input CalculateReturnInput { + """The ID of the order that will be returned.""" + orderId: ID! + + """The line items from the order to include in the return.""" + returnLineItems: [CalculateReturnLineItemInput!] = [] + + """The exchange line items to add to the order.""" + exchangeLineItems: [CalculateExchangeLineItemInput!] = [] + + """The return shipping fee associated with the return.""" + returnShippingFee: ReturnShippingFeeInput +} + +"""The input fields for return line items on a calculated return.""" +input CalculateReturnLineItemInput { + """The ID of the fulfillment line item to be returned.""" + fulfillmentLineItemId: ID! + + """The restocking fee for the return line item.""" + restockingFee: RestockingFeeInput + + """The quantity of the item to be returned.""" + quantity: Int! +} + +"""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 the `updated_at` value.""" + UPDATED_AT +} + +"""Return type for `carrierServiceUpdate` mutation.""" +type CarrierServiceUpdatePayload { + """The updated carrier service.""" + carrierService: DeliveryCarrierService + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CarrierServiceUpdateUserError!]! +} + +"""An error that occurs during the execution of `CarrierServiceUpdate`.""" +type CarrierServiceUpdateUserError implements DisplayableError { + """The error code.""" + code: CarrierServiceUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CarrierServiceUpdateUserError`. +""" +enum CarrierServiceUpdateUserErrorCode { + """Carrier service update failed.""" + CARRIER_SERVICE_UPDATE_FAILED +} + +""" +A deployed cart transformation function that actively modifies how products +appear and behave in customer carts. Cart transforms enable sophisticated +merchandising strategies by programmatically merging, expanding, or updating +cart line items based on custom business logic. + +Use the `CartTransform` object to: +- Monitor active bundling and cart modification logic +- Track transform function deployment status and configuration +- Manage error handling behavior for cart processing failures +- Coordinate multiple transforms when running complex merchandising strategies +- Analyze transform performance and customer interaction patterns + +Each cart transform links to a specific [Shopify +Function](https://shopify.dev/docs/apps/build/functions) that contains the +actual cart modification logic. The `blockOnFailure` setting determines whether +cart processing should halt when the transform encounters errors, or whether it +should allow customers to proceed with unmodified carts. This flexibility +ensures merchants can balance feature richness with checkout reliability. + +Transform functions operate during cart updates, product additions, and checkout +initiation, providing multiple touchpoints to enhance the shopping experience. +They integrate seamlessly with existing cart APIs while extending functionality +beyond standard product catalog capabilities. + +The function ID connects to your deployed function code, while the configuration +settings control how the transform behaves in different scenarios. Multiple +transforms can work together, processing cart modifications in sequence to +support complex merchandising workflows. + +Learn more about [customized bundles](https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-customized-bundle), +and about the [Cart Transform Function +API](https://shopify.dev/docs/api/functions/latest/cart-transform). +""" +type CartTransform implements HasMetafields & Node { + """Whether a run failure will block cart and checkout operations.""" + blockOnFailure: Boolean! + + """The ID for the Cart Transform function.""" + functionId: String! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +"""An auto-generated type for paginating through multiple CartTransforms.""" +type CartTransformConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CartTransformEdge!]! + + """ + A list of nodes that are contained in CartTransformEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CartTransform!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `cartTransformCreate` mutation.""" +type CartTransformCreatePayload { + """The newly created cart transform function.""" + cartTransform: CartTransform + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CartTransformCreateUserError!]! +} + +"""An error that occurs during the execution of `CartTransformCreate`.""" +type CartTransformCreateUserError implements DisplayableError { + """The error code.""" + code: CartTransformCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformCreateUserError`. +""" +enum CartTransformCreateUserErrorCode { + """Failed to create cart transform due to invalid input.""" + INPUT_INVALID + + """No Shopify Function found for provided function_id.""" + FUNCTION_NOT_FOUND + + """A cart transform function already exists for the provided function_id.""" + FUNCTION_ALREADY_REGISTERED + + """ + Function does not implement the required interface for this cart_transform function. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """Could not create or update metafields.""" + INVALID_METAFIELDS + + """Only one of function_id or function_handle can be provided, not both.""" + MULTIPLE_FUNCTION_IDENTIFIERS + + """Either function_id or function_handle must be provided.""" + MISSING_FUNCTION_IDENTIFIER +} + +"""Return type for `cartTransformDelete` mutation.""" +type CartTransformDeletePayload { + """The globally-unique ID for the deleted cart transform.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CartTransformDeleteUserError!]! +} + +"""An error that occurs during the execution of `CartTransformDelete`.""" +type CartTransformDeleteUserError implements DisplayableError { + """The error code.""" + code: CartTransformDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CartTransformDeleteUserError`. +""" +enum CartTransformDeleteUserErrorCode { + """Could not find cart transform for provided id.""" + NOT_FOUND + + """Unauthorized app scope.""" + UNAUTHORIZED_APP_SCOPE +} + +""" +An auto-generated type which holds one CartTransform and a cursor during pagination. +""" +type CartTransformEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CartTransformEdge.""" + node: CartTransform! +} + +""" +Controls which cart transformation operations apps can perform in your store. +This lets you define exactly what types of cart modifications are allowed based +on your checkout setup and business needs. + +The eligible operations determine what cart transform functions can accomplish, +providing a clear boundary for app capabilities within the store's ecosystem. + +Learn more about [cart transform operations](https://shopify.dev/docs/api/functions/latest/cart-transform#multiple-operations). +""" +type CartTransformEligibleOperations { + """The shop is eligible for expand operations.""" + expandOperation: Boolean! + + """The shop is eligible for merge operations.""" + mergeOperation: Boolean! + + """The shop is eligible for update operations.""" + updateOperation: Boolean! +} + +""" +Provides access to the cart transform feature configuration for the merchant's +store. This wrapper object indicates whether cart transformation capabilities +are enabled and what operations are available. + +For example, when checking if your app can deploy customized bundle features, +you would query this object to confirm cart transforms are supported and review +the eligible operations. + +The feature configuration helps apps determine compatibility before attempting to create transform functions. + +Learn more about [cart transformation](https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransform). +""" +type CartTransformFeature { + """The cart transform operations eligible for the shop.""" + eligibleOperations: CartTransformEligibleOperations! +} + +""" +The rounding adjustment applied to total payment or refund received for an Order involving cash payments. +""" +type CashRoundingAdjustment { + """ + The rounding adjustment that can be applied to totalReceived for an Order + involving cash payments in shop and presentment currencies. Could be a + positive or negative value. Value is 0 if there's no rounding, or for non-cash payments. + """ + paymentSet: MoneyBag! + + """ + The rounding adjustment that can be applied to totalRefunded for an Order + involving cash payments in shop and presentment currencies. Could be a + positive or negative value. Value is 0 if there's no rounding, or for non-cash refunds. + """ + refundSet: MoneyBag! +} + +""" +Tracks an adjustment to the cash in a cash tracking session for a point of sale device over the course of a shift. +""" +type CashTrackingAdjustment implements Node { + """The amount of cash being added or removed.""" + cash: MoneyV2! + + """A globally-unique ID.""" + id: ID! + + """The note entered when the adjustment was made.""" + note: String + + """The staff member who made the adjustment.""" + staffMember: StaffMember! + + """The time when the adjustment was made.""" + time: DateTime! +} + +""" +An auto-generated type for paginating through multiple CashTrackingAdjustments. +""" +type CashTrackingAdjustmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashTrackingAdjustmentEdge!]! + + """ + A list of nodes that are contained in CashTrackingAdjustmentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CashTrackingAdjustment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CashTrackingAdjustment and a cursor during pagination. +""" +type CashTrackingAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CashTrackingAdjustmentEdge.""" + node: CashTrackingAdjustment! +} + +""" +Tracks the balance in a cash drawer for a point of sale device over the course of a shift. +""" +type CashTrackingSession implements Node { + """The adjustments made to the cash drawer during this session.""" + adjustments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AdjustmentsSortKeys = TIME + ): CashTrackingAdjustmentConnection! + + """Whether this session is tracking cash payments.""" + cashTrackingEnabled: Boolean! + + """The cash transactions made during this session.""" + cashTransactions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CashTrackingSessionTransactionsSortKeys = PROCESSED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 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 +} + +""" +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 +} + +""" +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 { + """A globally-unique ID.""" + id: ID! + + """Most recent catalog operations.""" + operations: [ResourceOperation!]! + + """The price list associated with the catalog.""" + priceList: PriceList + + """A group of products and collections that's published to a catalog.""" + publication: Publication + + """The status of the catalog.""" + status: CatalogStatus! + + """The name of the catalog.""" + title: String! +} + +"""An auto-generated type for paginating through multiple Catalogs.""" +type CatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CatalogEdge!]! + + """ + A list of nodes that are contained in CatalogEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Catalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for the context in which the catalog's publishing and pricing rules apply. +""" +input CatalogContextInput { + """The IDs of the markets to associate to the catalog.""" + marketIds: [ID!] + + """The IDs of the company locations to associate to the catalog.""" + companyLocationIds: [ID!] +} + +"""Return type for `catalogContextUpdate` mutation.""" +type CatalogContextUpdatePayload { + """The updated catalog.""" + catalog: Catalog + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CatalogUserError!]! +} + +"""The input fields required to create a catalog.""" +input CatalogCreateInput { + """The name of the catalog.""" + title: String! + + """The status of the catalog.""" + status: CatalogStatus! + + """The context associated with the catalog.""" + context: CatalogContextInput! + + """The ID of the price list to associate to the catalog.""" + priceListId: ID + + """The ID of the publication to associate to the catalog.""" + publicationId: ID +} + +"""Return type for `catalogCreate` mutation.""" +type CatalogCreatePayload { + """The newly created catalog.""" + catalog: Catalog + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CatalogUserError!]! +} + +"""A catalog csv operation represents a CSV file import.""" +type CatalogCsvOperation implements Node & ResourceOperation { + """A globally-unique ID.""" + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """Represents a rows objects within this background operation.""" + rowCount: RowCount + + """The status of this operation.""" + status: ResourceOperationStatus! +} + +"""Return type for `catalogDelete` mutation.""" +type CatalogDeletePayload { + """The ID of the deleted catalog.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CatalogUserError!]! +} + +""" +An auto-generated type which holds one Catalog and a cursor during pagination. +""" +type CatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CatalogEdge.""" + node: Catalog! +} + +"""The set of valid sort keys for the Catalog query.""" +enum CatalogSortKeys { + """Sort by the `id` value.""" + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `title` value.""" + TITLE + + """Sort by the `type` value.""" + TYPE +} + +"""The state of a catalog.""" +enum CatalogStatus { + """The catalog is active.""" + ACTIVE + + """The catalog is archived.""" + ARCHIVED + + """The catalog is in draft.""" + DRAFT +} + +"""The associated catalog's type.""" +enum CatalogType { + """Not associated to a catalog.""" + NONE + + """Catalogs belonging to apps.""" + APP + + """Catalogs belonging to company locations.""" + COMPANY_LOCATION + + """Catalogs belonging to markets.""" + MARKET +} + +"""The input fields used to update a catalog.""" +input CatalogUpdateInput { + """The name of the catalog.""" + title: String + + """The status of the catalog.""" + status: CatalogStatus + + """The context associated with the catalog.""" + context: CatalogContextInput + + """The ID of the price list to associate to the catalog.""" + priceListId: ID + + """The ID of the publication to associate to the catalog.""" + publicationId: ID +} + +"""Return type for `catalogUpdate` mutation.""" +type CatalogUpdatePayload { + """The updated catalog.""" + catalog: Catalog + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CatalogUserError!]! +} + +"""Defines errors encountered while managing a catalog.""" +type CatalogUserError implements DisplayableError { + """The error code.""" + code: CatalogUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `CatalogUserError`.""" +enum CatalogUserErrorCode { + """An app catalog cannot be assigned to a price list.""" + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """Catalog failed to save.""" + CATALOG_FAILED_TO_SAVE + + """The catalog wasn't found.""" + CATALOG_NOT_FOUND + + """A price list cannot be assigned to the primary market.""" + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + Quantity price breaks can be associated only with company location catalogs or + catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_PRICE_BREAKS + + """The catalog can't be associated with more than one market.""" + CANNOT_ADD_MORE_THAN_ONE_MARKET + + """ + A company location catalog outside of a supported plan can only have an archived status. + """ + COMPANY_LOCATION_CATALOG_STATUS_PLAN + + """Context driver already assigned to this catalog.""" + CONTEXT_ALREADY_ASSIGNED_TO_CATALOG + + """ + Cannot save the catalog because the catalog limit for the context was reached. + """ + CONTEXT_CATALOG_LIMIT_REACHED + + """The company location could not be found.""" + COMPANY_LOCATION_NOT_FOUND + + """ + The arguments `contextsToAdd` and `contextsToRemove` must match existing catalog context type. + """ + CONTEXT_DRIVER_MISMATCH + + """A country catalog cannot be assigned to a price list.""" + COUNTRY_CATALOG_PRICE_LIST_ASSIGNMENT + + """A country price list cannot be assigned to a catalog.""" + COUNTRY_PRICE_LIST_ASSIGNMENT + + """The catalog context type is invalid.""" + INVALID_CATALOG_CONTEXT_TYPE + + """A market catalog must have an active status.""" + MARKET_CATALOG_STATUS + + """Market not found.""" + MARKET_NOT_FOUND + + """The catalog's market and price list currencies do not match.""" + MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH + + """Market already belongs to another catalog.""" + MARKET_TAKEN + + """The managed country belongs to another catalog.""" + MANAGED_COUNTRY_BELONGS_TO_ANOTHER_CATALOG + + """Must provide exactly one context type.""" + MUST_PROVIDE_EXACTLY_ONE_CONTEXT_TYPE + + """Price list failed to save.""" + PRICE_LIST_FAILED_TO_SAVE + + """Price list not found.""" + PRICE_LIST_NOT_FOUND + + """The price list is currently being modified. Please try again later.""" + PRICE_LIST_LOCKED + + """Publication not found.""" + PUBLICATION_NOT_FOUND + + """Must have `contexts_to_add` or `contexts_to_remove` argument.""" + REQUIRES_CONTEXTS_TO_ADD_OR_REMOVE + + """Can't perform this action on a catalog of this type.""" + UNSUPPORTED_CATALOG_ACTION + + """Cannot create a catalog for an app.""" + CANNOT_CREATE_APP_CATALOG + + """Cannot modify a catalog for an app.""" + CANNOT_MODIFY_APP_CATALOG + + """Cannot delete a catalog for an app.""" + CANNOT_DELETE_APP_CATALOG + + """Cannot create a catalog for a market.""" + CANNOT_CREATE_MARKET_CATALOG + + """Cannot modify a catalog for a market.""" + CANNOT_MODIFY_MARKET_CATALOG + + """Cannot delete a catalog for a market.""" + CANNOT_DELETE_MARKET_CATALOG + + """Managing this catalog is not supported by your plan.""" + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is blank.""" + BLANK + + """Cannot change context to specified type.""" + INVALID_CONTEXT_CHANGE +} + +""" +A 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """The list of collections published to the channel.""" + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductPublicationConnection! @deprecated(reason: "Use `productPublicationsV3` instead.") + + """ + The list of product publication records for products published to this channel. + """ + productPublicationsV3( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """The list of products published to the channel.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductConnection! + + """ + Retrieves the total count of [`products`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + published to a specific sales channel. Limited to a maximum of 10000 by default. + """ + productsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Whether the channel supports future publishing.""" + supportsFuturePublishing: Boolean! +} + +"""An auto-generated type for paginating through multiple Channels.""" +type ChannelConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ChannelEdge!]! + + """ + A list of nodes that are contained in ChannelEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Channel!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A 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! + + """The publishing destination display name or channel name.""" + displayName: String + + """A globally-unique ID.""" + id: ID! +} + +""" +Creates a unified visual identity for your checkout that keeps customers engaged +and reinforces your brand throughout the purchase process. This comprehensive +branding system lets you control every visual aspect of checkout, from colors +and fonts to layouts and imagery, so your checkout feels like a natural +extension of your store. + +For example, a luxury fashion retailer can configure their checkout with custom +color palettes, premium typography, rounded corners for a softer feel, and +branded imagery that matches their main website aesthetic. + +Use the `Branding` object to: +- Configure comprehensive checkout visual identity +- Coordinate color schemes across all checkout elements +- Apply consistent typography and spacing standards +- Manage background imagery and layout customizations +- Control visibility of various checkout components + +The branding configuration includes design system foundations like color roles, +typography scales, and spacing units, plus specific customizations for sections, +dividers, and interactive elements. This allows merchants to create cohesive +checkout experiences that reinforce their brand identity while maintaining +usability standards. + +Different color schemes can be defined for various contexts, ensuring optimal +contrast and accessibility across different checkout states and customer preferences. +""" +type CheckoutBranding { + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizations + + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystem +} + +"""The container background style.""" +enum CheckoutBrandingBackground { + """The Base background style.""" + BASE + + """The Subdued background style.""" + SUBDUED + + """The Transparent background style.""" + TRANSPARENT +} + +"""Possible values for the background style.""" +enum CheckoutBrandingBackgroundStyle { + """The Solid background style.""" + SOLID + + """The None background style.""" + NONE +} + +"""Possible values for the border.""" +enum CheckoutBrandingBorder { + """The None border.""" + NONE + + """The Block End border.""" + BLOCK_END + + """The Full border.""" + FULL +} + +"""The container border style.""" +enum CheckoutBrandingBorderStyle { + """The Base border style.""" + BASE + + """The Dashed border style.""" + DASHED + + """The Dotted border style.""" + DOTTED +} + +"""The container border width.""" +enum CheckoutBrandingBorderWidth { + """The Base border width.""" + BASE + + """The Large 100 border width.""" + LARGE_100 + + """The Large 200 border width.""" + LARGE_200 + + """The Large border width.""" + LARGE +} + +"""The buttons customizations.""" +type CheckoutBrandingButton { + """The background style used for buttons.""" + background: CheckoutBrandingBackgroundStyle + + """The block padding used for buttons.""" + blockPadding: CheckoutBrandingSpacing + + """The border used for buttons.""" + border: CheckoutBrandingSimpleBorder + + """The corner radius used for buttons.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The inline padding used for buttons.""" + inlinePadding: CheckoutBrandingSpacing + + """The typography used for buttons.""" + typography: CheckoutBrandingTypographyStyle +} + +""" +Defines the color palette specifically for button elements within checkout +branding, including hover states. These color roles ensure buttons maintain +proper contrast and visual hierarchy throughout the checkout experience. + +For example, a sports brand might configure bright accent colors for primary +action buttons, with darker hover states and contrasting text colors that +maintain accessibility standards. + +Use the `ButtonColorRoles` object to: +- Define button color schemes for different states +- Ensure proper contrast for accessibility compliance +- Coordinate button colors with overall brand palette + +Button color roles include background, border, text, icon, accent (for focused +states), and decorative elements, plus specific hover state colors that provide +clear interactive feedback to customers. +""" +type CheckoutBrandingButtonColorRoles { + """The color of accented objects (links and focused state).""" + accent: String + + """The color of the background.""" + background: String + + """The color of borders.""" + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """The colors of the button on hover.""" + hover: CheckoutBrandingColorRoles + + """The color of icons.""" + icon: String + + """The color of text.""" + text: String +} + +"""The input fields to set colors for buttons.""" +input CheckoutBrandingButtonColorRolesInput { + """The color of the background.""" + background: String + + """The color of text.""" + text: String + + """The color of borders.""" + border: String + + """The color of icons.""" + icon: String + + """The color of accented objects (links and focused state).""" + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """The colors of the button on hover.""" + hover: CheckoutBrandingColorRolesInput +} + +"""The input fields used to update the buttons customizations.""" +input CheckoutBrandingButtonInput { + """The background style used for buttons.""" + background: CheckoutBrandingBackgroundStyle + + """The border used for buttons.""" + border: CheckoutBrandingSimpleBorder + + """The corner radius used for buttons.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The block padding used for buttons.""" + blockPadding: CheckoutBrandingSpacing + + """The inline padding used for buttons.""" + inlinePadding: CheckoutBrandingSpacing + + """The typography style used for buttons.""" + typography: CheckoutBrandingTypographyStyleInput +} + +""" +Controls the visibility settings for checkout breadcrumb navigation that shows +customers their progress through the purchase journey. This simple customization +allows merchants to show or hide the breadcrumb trail based on their checkout +flow preferences. + +For example, a single-page checkout experience might hide breadcrumbs to create +a more streamlined appearance, while multi-step checkouts can display them to +help customers understand their progress. + +The visibility setting provides merchants flexibility in how they present +checkout navigation to match their specific user experience strategy. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingBuyerJourney { + """ + An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. +""" +input CheckoutBrandingBuyerJourneyInput { + """ + The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Controls the visibility of cart links displayed during checkout. These links +allow customers to return to their cart or continue shopping. + +For example, an electronics store might hide cart links during final checkout +steps to reduce distractions, or show them prominently to encourage customers to +add accessories before completing their purchase. + +The `CartLink` object provides visibility settings to control when and how these +navigation elements appear based on the merchant's checkout flow strategy. +""" +type CheckoutBrandingCartLink { + """Whether the cart link is visible at checkout.""" + visibility: CheckoutBrandingVisibility +} + +"""Possible values for the cart link content type for the header.""" +enum CheckoutBrandingCartLinkContentType { + """The checkout header content type icon value.""" + ICON + + """The checkout header content type image value.""" + IMAGE + + """The checkout header content type text value.""" + TEXT +} + +""" +The input fields for updating the cart link customizations at checkout. +""" +input CheckoutBrandingCartLinkInput { + """ + The input to update the visibility of cart links in checkout. This hides the + cart icon on one-page and the cart link in the breadcrumbs/buyer journey on + three-page checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Defines the visual styling for checkbox elements throughout the checkout +interface, focusing on corner radius customization. This allows merchants to +align checkbox appearance with their overall design aesthetic. + +For example, a modern minimalist brand might prefer sharp, square checkboxes +while a friendly consumer brand could opt for rounded corners to create a +softer, more approachable feel. + +The corner radius setting ensures checkboxes integrate seamlessly with the +overall checkout design language and brand identity. +""" +type CheckoutBrandingCheckbox { + """The corner radius used for checkboxes.""" + cornerRadius: CheckoutBrandingCornerRadius +} + +"""The input fields used to update the checkboxes customizations.""" +input CheckoutBrandingCheckboxInput { + """The corner radius used for checkboxes.""" + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +Controls spacing customization for the grouped variant of choice list components in checkout forms. + +The `ChoiceList` object contains settings specifically for the 'group' variant +styling through the [`ChoiceListGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceListGroup) +field, which determines the spacing between choice options. +""" +type CheckoutBrandingChoiceList { + """The settings that apply to the 'group' variant of ChoiceList.""" + group: CheckoutBrandingChoiceListGroup +} + +""" +Controls the spacing between options in the 'group' variant of [`ChoiceList`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBrandingChoiceList) components. + +This setting adjusts the vertical spacing between choice options to improve +readability and visual organization. The spacing value helps create clear +separation between options, making it easier for customers to scan and select +from available choices. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingChoiceListGroup { + """The spacing between UI elements in the list.""" + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to update the settings that apply to the 'group' variant of ChoiceList. +""" +input CheckoutBrandingChoiceListGroupInput { + """The spacing between UI elements in the list.""" + spacing: CheckoutBrandingSpacingKeyword +} + +"""The input fields to use to update the choice list customizations.""" +input CheckoutBrandingChoiceListInput { + """The settings that apply to the 'group' variant of ChoiceList.""" + group: CheckoutBrandingChoiceListGroupInput +} + +""" +Defines the global color roles for checkout branding. These semantic colors +maintain consistency across all checkout elements and provide the foundation for +the checkout's visual design system. + +Use global colors to: +- Set brand colors for primary actions and buttons +- Define accent colors for links and interactive elements +- Configure semantic colors for success, warning, and error states +- Apply decorative colors for visual highlights + +For example, a merchant might set their brand blue for primary buttons, green +for success messages, amber for warnings, and red for critical errors, creating +a consistent color language throughout checkout. + +Learn more about [checkout customization](https://shopify.dev/docs/api/admin-graphql/latest/objects/CheckoutBranding). +""" +type CheckoutBrandingColorGlobal { + """A color used for interaction, like links and focus states.""" + accent: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, for example **Pay now**, and secondary buttons, for example **Buy again**. + """ + brand: String + + """ + A semantic color used for components that communicate critical content. For + example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String + + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires + attention. For example, something that might be wrong, but not blocking. + """ + warning: String +} + +""" +The input fields to customize the overall look and feel of the checkout. +""" +input CheckoutBrandingColorGlobalInput { + """ + A semantic color used for components that communicate general, informative content. + """ + info: String + + """ + A semantic color used for components that communicate successful actions or a positive state. + """ + success: String + + """ + A semantic color used for components that display content that requires + attention. For example, something that might be wrong, but not blocking. + """ + warning: String + + """ + A semantic color used for components that communicate critical content. For + example, a blocking error such as the requirement to enter a valid credit card number. + """ + critical: String + + """ + A color that's strongly associated with the merchant. Currently used for + primary buttons, such as **Pay now**, and secondary buttons, such as **Buy again**. + """ + brand: String + + """A color used for interaction, like links and focus states.""" + accent: String + + """ + A color used to highlight certain areas of the user interface. For example, the [`Text`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/components/titles-and-text/text#textprops-propertydetail-appearance) component. + """ + decorative: String +} + +"""A group of colors used together on a surface.""" +type CheckoutBrandingColorRoles { + """The color of accented objects (links and focused state).""" + accent: String + + """The color of the background.""" + background: String + + """The color of borders.""" + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """The color of icons.""" + icon: String + + """The color of text.""" + text: String +} + +"""The input fields for a group of colors used together on a surface.""" +input CheckoutBrandingColorRolesInput { + """The color of the background.""" + background: String + + """The color of text.""" + text: String + + """The color of borders.""" + border: String + + """The color of icons.""" + icon: String + + """The color of accented objects (links and focused state).""" + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String +} + +"""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 +} + +""" +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 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 possible color schemes.""" +enum CheckoutBrandingColorSchemeSelection { + """The TRANSPARENT color scheme selection.""" + TRANSPARENT + + """The COLOR_SCHEME1 color scheme selection.""" + COLOR_SCHEME1 + + """The COLOR_SCHEME2 color scheme selection.""" + COLOR_SCHEME2 + + """The COLOR_SCHEME3 color scheme selection.""" + COLOR_SCHEME3 + + """The COLOR_SCHEME4 color scheme selection.""" + COLOR_SCHEME4 +} + +"""The 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 input fields used to update the color settings for global colors and color schemes. +""" +input CheckoutBrandingColorsInput { + """ + The input to update global colors for customizing the overall look and feel of the user interface. + """ + global: CheckoutBrandingColorGlobalInput + + """ + The input to define color schemes which apply to different areas of the user interface. + """ + schemes: CheckoutBrandingColorSchemesInput +} + +"""The container's divider customizations.""" +type CheckoutBrandingContainerDivider { + """The divider style.""" + borderStyle: CheckoutBrandingBorderStyle + + """The divider width.""" + borderWidth: CheckoutBrandingBorderWidth + + """The divider visibility.""" + visibility: CheckoutBrandingVisibility +} + +"""The input fields used to update a container's divider customizations.""" +input CheckoutBrandingContainerDividerInput { + """The divider style.""" + borderStyle: CheckoutBrandingBorderStyle + + """The divider width.""" + borderWidth: CheckoutBrandingBorderWidth + + """The divider visibility.""" + visibility: CheckoutBrandingVisibility +} + +"""The content container customizations.""" +type CheckoutBrandingContent { + """The content container's divider style and visibility.""" + divider: CheckoutBrandingContainerDivider +} + +"""The input fields used to update the content container customizations.""" +input CheckoutBrandingContentInput { + """Divider style and visibility on the content container.""" + divider: CheckoutBrandingContainerDividerInput +} + +"""The form controls customizations.""" +type CheckoutBrandingControl { + """The border used for form controls.""" + border: CheckoutBrandingSimpleBorder + + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls + inherit colors from their scheme settings (for example, the main section + inherits from `design_system.colors.schemes.scheme1.control` by default). Note + that usage of the `customizations.control.color` setting to customize the form + control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """The corner radius used for form controls.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The label position used for form controls.""" + labelPosition: CheckoutBrandingLabelPosition +} + +"""Colors for form controls.""" +type CheckoutBrandingControlColorRoles { + """The color of accented objects (links and focused state).""" + accent: String + + """The color of the background.""" + background: String + + """The color of borders.""" + border: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """The color of icons.""" + icon: String + + """The colors of selected controls.""" + selected: CheckoutBrandingColorRoles + + """The color of text.""" + text: String +} + +"""The input fields to define colors for form controls.""" +input CheckoutBrandingControlColorRolesInput { + """The color of the background.""" + background: String + + """The color of text.""" + text: String + + """The color of borders.""" + border: String + + """The color of icons.""" + icon: String + + """The color of accented objects (links and focused state).""" + accent: String + + """ + The decorative color for highlighting specific parts of the user interface. + """ + decorative: String + + """The colors of selected controls.""" + selected: CheckoutBrandingColorRolesInput +} + +"""The input fields used to update the form controls customizations.""" +input CheckoutBrandingControlInput { + """ + Set to TRANSPARENT to define transparent form controls. If null, form controls + inherit colors from their scheme settings (for example, the main section + inherits from `design_system.colors.schemes.scheme1.control` by default). Note + that usage of the `customizations.control.color` setting to customize the form + control color is deprecated. + """ + color: CheckoutBrandingColorSelection + + """The corner radius used for form controls.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The border used for form controls.""" + border: CheckoutBrandingSimpleBorder + + """The label position used for form controls.""" + labelPosition: CheckoutBrandingLabelPosition +} + +""" +The options for customizing the corner radius of checkout-related objects. Examples include the primary +button, the name text fields and the sections within the main area (if they have borders). +Refer to this complete [list](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius#fieldswith) +for objects with customizable corner radii. + +The design system defines the corner radius pixel size for each option. Modify the defaults by setting the +[designSystem.cornerRadius](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingDesignSystemInput#field-checkoutbrandingdesignsysteminput-cornerradius) +input fields. +""" +enum CheckoutBrandingCornerRadius { + """The 0px corner radius (square corners).""" + NONE + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.small. + """ + SMALL + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.base. + """ + BASE + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.large. + """ + LARGE +} + +"""Define the pixel size of corner radius options.""" +type CheckoutBrandingCornerRadiusVariables { + """The value in pixels for base corner radii. Example: 5.""" + base: Int + + """The value in pixels for large corner radii. Example: 10.""" + large: Int + + """The value in pixels for small corner radii. Example: 3.""" + small: Int +} + +"""The input fields used to update the corner radius variables.""" +input CheckoutBrandingCornerRadiusVariablesInput { + """ + The value in pixels for small corner radii. It should be greater than zero. Example: 3. + """ + small: Int + + """ + The value in pixels for base corner radii. It should be greater than zero. Example: 5. + """ + base: Int + + """ + The value in pixels for large corner radii. It should be greater than zero. Example: 10. + """ + large: Int +} + +"""A custom font.""" +type CheckoutBrandingCustomFont implements CheckoutBrandingFont { + """Globally unique ID reference to the custom font file.""" + genericFileId: ID + + """The font sources.""" + sources: String + + """The font weight.""" + weight: Int +} + +"""The input fields required to update a custom font group.""" +input CheckoutBrandingCustomFontGroupInput { + """The base font.""" + base: CheckoutBrandingCustomFontInput! + + """The bold font.""" + bold: CheckoutBrandingCustomFontInput! + + """The font loading strategy.""" + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +"""The input fields required to update a font.""" +input CheckoutBrandingCustomFontInput { + """The font weight. Its value should be between 100 and 900.""" + weight: Int! + + """ + A globally-unique ID for a font file uploaded via the Files api. + Allowed font types are .woff and .woff2. + """ + genericFileId: ID! +} + +""" +The customizations that apply to specific components or areas of the user interface. +""" +type CheckoutBrandingCustomizations { + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourney + + """ + The checkout cart link customizations. For example, by setting the visibility + field to `HIDDEN`, you can hide the cart icon in the header for one-page + checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLink + + """The checkboxes customizations.""" + checkbox: CheckoutBrandingCheckbox + + """The choice list customizations.""" + choiceList: CheckoutBrandingChoiceList + + """The content container customizations.""" + content: CheckoutBrandingContent + + """The form controls customizations.""" + control: CheckoutBrandingControl + + """ + The customizations for the page, content, main, and order summary dividers. + For example, by setting the borderStyle to `DOTTED`, you can make these + dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyle + + """The express checkout customizations.""" + expressCheckout: CheckoutBrandingExpressCheckout + + """The favicon image.""" + favicon: CheckoutBrandingImage + + """The footer customizations.""" + footer: CheckoutBrandingFooter + + """The global customizations.""" + global: CheckoutBrandingGlobal + + """The header customizations.""" + header: CheckoutBrandingHeader + + """The Heading Level 1 customizations.""" + headingLevel1: CheckoutBrandingHeadingLevel + + """The Heading Level 2 customizations.""" + headingLevel2: CheckoutBrandingHeadingLevel + + """The Heading Level 3 customizations.""" + headingLevel3: CheckoutBrandingHeadingLevel + + """The main area customizations.""" + main: CheckoutBrandingMain + + """The merchandise thumbnails customizations.""" + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnail + + """The order summary customizations.""" + orderSummary: CheckoutBrandingOrderSummary + + """The primary buttons customizations.""" + primaryButton: CheckoutBrandingButton + + """The secondary buttons customizations.""" + secondaryButton: CheckoutBrandingButton + + """The selects customizations.""" + select: CheckoutBrandingSelect + + """The text fields customizations.""" + textField: CheckoutBrandingTextField +} + +"""The input fields used to update the components customizations.""" +input CheckoutBrandingCustomizationsInput { + """The global customizations.""" + global: CheckoutBrandingGlobalInput + + """The header customizations.""" + header: CheckoutBrandingHeaderInput + + """The Heading Level 1 customizations.""" + headingLevel1: CheckoutBrandingHeadingLevelInput + + """The Heading Level 2 customizations.""" + headingLevel2: CheckoutBrandingHeadingLevelInput + + """The Heading Level 3 customizations.""" + headingLevel3: CheckoutBrandingHeadingLevelInput + + """The footer customizations.""" + footer: CheckoutBrandingFooterInput + + """The main area customizations.""" + main: CheckoutBrandingMainInput + + """The order summary customizations.""" + orderSummary: CheckoutBrandingOrderSummaryInput + + """The form controls customizations.""" + control: CheckoutBrandingControlInput + + """The text fields customizations.""" + textField: CheckoutBrandingTextFieldInput + + """The checkboxes customizations.""" + checkbox: CheckoutBrandingCheckboxInput + + """The selects customizations.""" + select: CheckoutBrandingSelectInput + + """The primary buttons customizations.""" + primaryButton: CheckoutBrandingButtonInput + + """The secondary buttons customizations.""" + secondaryButton: CheckoutBrandingButtonInput + + """The favicon image (must be of PNG format).""" + favicon: CheckoutBrandingImageInput + + """The choice list customizations.""" + choiceList: CheckoutBrandingChoiceListInput + + """The merchandise thumbnails customizations.""" + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnailInput + + """The express checkout customizations.""" + expressCheckout: CheckoutBrandingExpressCheckoutInput + + """The content container customizations.""" + content: CheckoutBrandingContentInput + + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutBrandingBuyerJourneyInput + + """ + The input for checkout cart link customizations. For example, by setting the + visibility field to `HIDDEN`, you can hide the cart icon in the header for + one-page checkout, and the cart link in breadcrumbs in three-page checkout. + """ + cartLink: CheckoutBrandingCartLinkInput + + """ + The input for the page, content, main, and order summary dividers + customizations. For example, by setting the borderStyle to `DOTTED`, you can + make these dividers render as dotted lines. + """ + divider: CheckoutBrandingDividerStyleInput +} + +""" +The design system allows you to set values that represent specific attributes +of your brand like color and font. These attributes are used throughout the user +interface. This brings consistency and allows you to easily make broad design changes. +""" +type CheckoutBrandingDesignSystem { + """The color settings for global colors and color schemes.""" + colors: CheckoutBrandingColors + + """The corner radius variables.""" + cornerRadius: CheckoutBrandingCornerRadiusVariables + + """The typography.""" + typography: CheckoutBrandingTypography +} + +"""The input fields used to update the design system.""" +input CheckoutBrandingDesignSystemInput { + """The color settings for global colors and color schemes.""" + colors: CheckoutBrandingColorsInput + + """The typography.""" + typography: CheckoutBrandingTypographyInput + + """The corner radius variables.""" + cornerRadius: CheckoutBrandingCornerRadiusVariablesInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutBrandingDividerStyle { + """The border style for the divider.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width for the divider.""" + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The input fields used to update the page, content, main and order summary dividers customizations. +""" +input CheckoutBrandingDividerStyleInput { + """The border style for the divider.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width for the divider.""" + borderWidth: CheckoutBrandingBorderWidth +} + +"""The Express Checkout customizations.""" +type CheckoutBrandingExpressCheckout { + """The Express Checkout buttons customizations.""" + button: CheckoutBrandingExpressCheckoutButton +} + +"""The Express Checkout button customizations.""" +type CheckoutBrandingExpressCheckoutButton { + """The corner radius used for the Express Checkout buttons.""" + cornerRadius: CheckoutBrandingCornerRadius +} + +"""The input fields to use to update the express checkout customizations.""" +input CheckoutBrandingExpressCheckoutButtonInput { + """The corner radius used for Express Checkout buttons.""" + cornerRadius: CheckoutBrandingCornerRadius +} + +"""The input fields to use to update the Express Checkout customizations.""" +input CheckoutBrandingExpressCheckoutInput { + """The Express Checkout buttons customizations.""" + button: CheckoutBrandingExpressCheckoutButtonInput +} + +"""A font.""" +interface CheckoutBrandingFont { + """The font sources.""" + sources: String + + """The font weight.""" + weight: Int +} + +""" +A font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +type CheckoutBrandingFontGroup { + """The base font.""" + base: CheckoutBrandingFont + + """The bold font.""" + bold: CheckoutBrandingFont + + """The font loading strategy.""" + loadingStrategy: CheckoutBrandingFontLoadingStrategy + + """The font group name.""" + name: String +} + +""" +The input fields used to update a font group. To learn more about updating fonts, refer to the +[checkoutBrandingUpsert](https://shopify.dev/api/admin-graphql/unstable/mutations/checkoutBrandingUpsert) +mutation and the checkout branding [tutorial](https://shopify.dev/docs/apps/checkout/styling). +""" +input CheckoutBrandingFontGroupInput { + """A Shopify font group.""" + shopifyFontGroup: CheckoutBrandingShopifyFontGroupInput + + """A custom font group.""" + customFontGroup: CheckoutBrandingCustomFontGroupInput +} + +""" +The font loading strategy determines how a font face is displayed after it is loaded or failed to load. +For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display. +""" +enum CheckoutBrandingFontLoadingStrategy { + """The font display strategy is defined by the browser user agent.""" + AUTO + + """Gives the font face a short block period and an infinite swap period.""" + BLOCK + + """ + Gives the font face an extremely small block period and an infinite swap period. + """ + SWAP + + """ + Gives the font face an extremely small block period and a short swap period. + """ + FALLBACK + + """ + Gives the font face an extremely small block period and no swap period. + """ + OPTIONAL +} + +"""The font size.""" +type CheckoutBrandingFontSize { + """The base font size.""" + base: Float + + """The scale ratio used to derive all font sizes such as small and large.""" + ratio: Float +} + +"""The input fields used to update the font size.""" +input CheckoutBrandingFontSizeInput { + """The base font size. Its value should be between 12.0 and 18.0.""" + base: Float + + """ + The scale ratio used to derive all font sizes such as small and large. Its value should be between 1.0 and 1.4. + """ + ratio: Float +} + +"""A container for the footer section customizations.""" +type CheckoutBrandingFooter { + """The footer alignment.""" + alignment: CheckoutBrandingFooterAlignment + + """The selected color scheme of the footer container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The footer content settings.""" + content: CheckoutBrandingFooterContent + + """The divided setting.""" + divided: Boolean + + """The padding of the footer container.""" + padding: CheckoutBrandingSpacingKeyword + + """The footer position.""" + position: CheckoutBrandingFooterPosition +} + +"""Possible values for the footer alignment.""" +enum CheckoutBrandingFooterAlignment { + """The checkout footer alignment Start value.""" + START + + """The checkout footer alignment Center value.""" + CENTER + + """The checkout footer alignment End value.""" + END +} + +"""The footer content customizations.""" +type CheckoutBrandingFooterContent { + """The visibility settings for footer content.""" + visibility: CheckoutBrandingVisibility +} + +"""The input fields for footer content customizations.""" +input CheckoutBrandingFooterContentInput { + """The visibility settings for footer content.""" + visibility: CheckoutBrandingVisibility +} + +"""The input fields when mutating the checkout footer settings.""" +input CheckoutBrandingFooterInput { + """The input field for setting the footer position customizations.""" + position: CheckoutBrandingFooterPosition + + """The divided setting.""" + divided: Boolean + + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutBrandingFooterAlignment + + """The input field for setting the footer content customizations.""" + content: CheckoutBrandingFooterContentInput + + """The selected color scheme of the footer container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The padding of the footer container.""" + padding: CheckoutBrandingSpacingKeyword +} + +"""Possible values for the footer position.""" +enum CheckoutBrandingFooterPosition { + """The End footer position.""" + END + + """The Inline footer position.""" + INLINE +} + +"""The global customizations.""" +type CheckoutBrandingGlobal { + """ + The global corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """The global typography customizations.""" + typography: CheckoutBrandingTypographyStyleGlobal +} + +""" +Possible choices to override corner radius customizations on all applicable objects. Note that this selection +can only be used to set the override to `NONE` (0px). + +For more customizations options, set the [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) +selection on specific objects while leaving the global corner radius unset. +""" +enum CheckoutBrandingGlobalCornerRadius { + """Set the global corner radius override to 0px (square corners).""" + NONE +} + +"""The input fields used to update the global customizations.""" +input CheckoutBrandingGlobalInput { + """ + Select a global corner radius setting that overrides all other [corner radii](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutBrandingGlobalCornerRadius + + """The global typography customizations.""" + typography: CheckoutBrandingTypographyStyleGlobalInput +} + +"""The header customizations.""" +type CheckoutBrandingHeader { + """The header alignment.""" + alignment: CheckoutBrandingHeaderAlignment + + """The background image of the header.""" + banner: CheckoutBrandingImage + + """ + The cart link customizations for 1-page checkout. This field allows to + customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLink + + """The selected color scheme of the header container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The divided setting.""" + divided: Boolean + + """The store logo.""" + logo: CheckoutBrandingLogo + + """The padding of the header container.""" + padding: CheckoutBrandingSpacingKeyword + + """The header position.""" + position: CheckoutBrandingHeaderPosition +} + +"""The possible header alignments.""" +enum CheckoutBrandingHeaderAlignment { + """Start alignment.""" + START + + """Center alignment.""" + CENTER + + """End alignment.""" + END +} + +"""The header cart link customizations.""" +type CheckoutBrandingHeaderCartLink { + """ + The content type for the header back to cart link in 1-page checkout. Setting + this to image will render the custom image provided using the image field on + the header cart_link object. If no image is provided, the default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The image that's used for the header back to cart link in 1-page checkout when the content type is set to image. + """ + image: Image +} + +"""The input fields for header cart link customizations.""" +input CheckoutBrandingHeaderCartLinkInput { + """ + The input for the content type for the header back to cart link in 1-page + checkout. Setting this to image will render the custom image provided using + the image field on the header cart_link object. If no image is provided, the + default cart icon will be used. + """ + contentType: CheckoutBrandingCartLinkContentType + + """ + The input for the image that's used for the header back to cart link in 1-page + checkout when the content type is set to image. + """ + image: CheckoutBrandingImageInput +} + +"""The input fields used to update the header customizations.""" +input CheckoutBrandingHeaderInput { + """The header alignment.""" + alignment: CheckoutBrandingHeaderAlignment + + """The header position.""" + position: CheckoutBrandingHeaderPosition + + """The store logo.""" + logo: CheckoutBrandingLogoInput + + """The background image of the header (must not be of SVG format).""" + banner: CheckoutBrandingImageInput + + """The divided setting.""" + divided: Boolean + + """ + The input for cart link customizations for 1-page checkout. This field allows + to customize the cart icon that renders by default on 1-page checkout. + """ + cartLink: CheckoutBrandingHeaderCartLinkInput + + """The selected color scheme of the header container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The padding of the header container.""" + padding: CheckoutBrandingSpacingKeyword +} + +"""The possible header positions.""" +enum CheckoutBrandingHeaderPosition { + """Inline position.""" + INLINE + + """Secondary inline position.""" + INLINE_SECONDARY + + """Start position.""" + START +} + +"""The heading level customizations.""" +type CheckoutBrandingHeadingLevel { + """The typography customizations used for headings.""" + typography: CheckoutBrandingTypographyStyle +} + +"""The input fields for heading level customizations.""" +input CheckoutBrandingHeadingLevelInput { + """The typography customizations used for headings.""" + typography: CheckoutBrandingTypographyStyleInput +} + +"""A checkout branding image.""" +type CheckoutBrandingImage { + """The image details.""" + image: Image +} + +""" +The input fields used to update a checkout branding image uploaded via the Files API. +""" +input CheckoutBrandingImageInput { + """A globally-unique ID.""" + mediaImageId: ID +} + +"""The input fields used to upsert the checkout branding settings.""" +input CheckoutBrandingInput { + """ + The design system allows you to set values that represent specific attributes + of your brand like color and font. These attributes are used throughout the user + interface. This brings consistency and allows you to easily make broad design changes. + """ + designSystem: CheckoutBrandingDesignSystemInput + + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizationsInput +} + +"""Possible values for the label position.""" +enum CheckoutBrandingLabelPosition { + """The Inside label position.""" + INSIDE + + """The Outside label position.""" + OUTSIDE +} + +"""The store logo customizations.""" +type CheckoutBrandingLogo { + """The logo image.""" + image: Image + + """The maximum width of the logo.""" + maxWidth: Int + + """The visibility of the logo.""" + visibility: CheckoutBrandingVisibility +} + +"""The input fields used to update the logo customizations.""" +input CheckoutBrandingLogoInput { + """The logo image (must not be of SVG format).""" + image: CheckoutBrandingImageInput + + """The maximum width of the logo.""" + maxWidth: Int + + """The visibility of the logo.""" + visibility: CheckoutBrandingVisibility +} + +"""The main container customizations.""" +type CheckoutBrandingMain { + """The background image of the main container.""" + backgroundImage: CheckoutBrandingImage + + """The selected color scheme of the main container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The main container's divider style and visibility.""" + divider: CheckoutBrandingContainerDivider + + """The settings for the main sections.""" + section: CheckoutBrandingMainSection +} + +"""The input fields used to update the main container customizations.""" +input CheckoutBrandingMainInput { + """The selected color scheme for the main container of the checkout.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background image of the main container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """Divider style and visibility on the main container.""" + divider: CheckoutBrandingContainerDividerInput + + """The settings for the main sections.""" + section: CheckoutBrandingMainSectionInput +} + +"""The main sections customizations.""" +type CheckoutBrandingMainSection { + """The background style of the main sections.""" + background: CheckoutBrandingBackground + + """The border for the main sections.""" + border: CheckoutBrandingSimpleBorder + + """The border style of the main sections.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width of the main sections.""" + borderWidth: CheckoutBrandingBorderWidth + + """The selected color scheme of the main sections.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The corner radius of the main sections.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The padding of the main sections.""" + padding: CheckoutBrandingSpacingKeyword + + """The shadow of the main sections.""" + shadow: CheckoutBrandingShadow +} + +"""The input fields used to update the main sections customizations.""" +input CheckoutBrandingMainSectionInput { + """The selected color scheme for the main sections.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The background style of the main sections.""" + background: CheckoutBrandingBackground + + """The corner radius of the main sections.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The border for the main sections.""" + border: CheckoutBrandingSimpleBorder + + """The border style of the main sections.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width of the main sections.""" + borderWidth: CheckoutBrandingBorderWidth + + """The shadow of the main sections.""" + shadow: CheckoutBrandingShadow + + """The padding of the main sections.""" + padding: CheckoutBrandingSpacingKeyword +} + +"""The merchandise thumbnails customizations.""" +type CheckoutBrandingMerchandiseThumbnail { + """The settings for the merchandise thumbnail badge.""" + badge: CheckoutBrandingMerchandiseThumbnailBadge + + """The border used for merchandise thumbnails.""" + border: CheckoutBrandingSimpleBorder + + """The corner radius used for merchandise thumbnails.""" + cornerRadius: CheckoutBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutBrandingObjectFit +} + +"""The merchandise thumbnail badges customizations.""" +type CheckoutBrandingMerchandiseThumbnailBadge { + """The background used for merchandise thumbnail badges.""" + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +"""The merchandise thumbnail badge background.""" +enum CheckoutBrandingMerchandiseThumbnailBadgeBackground { + """The Accent background.""" + ACCENT + + """The Base background.""" + BASE +} + +""" +The input fields used to update the merchandise thumbnail badges customizations. +""" +input CheckoutBrandingMerchandiseThumbnailBadgeInput { + """The background used for merchandise thumbnail badges.""" + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The input fields used to update the merchandise thumbnails customizations. +""" +input CheckoutBrandingMerchandiseThumbnailInput { + """The border used for merchandise thumbnails.""" + border: CheckoutBrandingSimpleBorder + + """The corner radius used for merchandise thumbnails.""" + cornerRadius: CheckoutBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutBrandingObjectFit + + """The settings for the merchandise thumbnail badge.""" + badge: CheckoutBrandingMerchandiseThumbnailBadgeInput +} + +"""Possible values for object fit.""" +enum CheckoutBrandingObjectFit { + """ + The Contain value for fit. The image is scaled to maintain its aspect ratio + while fitting within the containing box. The entire image is made to fill the + box, while preserving its aspect ratio, so the image will be "letterboxed" if + its aspect ratio does not match the aspect ratio of the box. This is the default value. + """ + CONTAIN + + """ + The Cover value for fit. The image is sized to maintain its aspect ratio while + filling the entire containing box. If the image’s aspect ratio does not match + the aspect ratio of the containing box, then the object will be clipped to fit. + """ + COVER +} + +"""The order summary customizations.""" +type CheckoutBrandingOrderSummary { + """The background image of the order summary container.""" + backgroundImage: CheckoutBrandingImage + + """The selected color scheme of the order summary container.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The order summary container's divider style and visibility.""" + divider: CheckoutBrandingContainerDivider + + """The settings for the order summary sections.""" + section: CheckoutBrandingOrderSummarySection +} + +""" +The input fields used to update the order summary container customizations. +""" +input CheckoutBrandingOrderSummaryInput { + """ + The selected color scheme for the order summary container of the checkout. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The background image of the order summary container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """Divider style and visibility on the order summary container.""" + divider: CheckoutBrandingContainerDividerInput + + """The settings for the order summary sections.""" + section: CheckoutBrandingOrderSummarySectionInput +} + +"""The order summary sections customizations.""" +type CheckoutBrandingOrderSummarySection { + """The background style of the order summary sections.""" + background: CheckoutBrandingBackground + + """The border for the order summary sections.""" + border: CheckoutBrandingSimpleBorder + + """The border style of the order summary sections.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width of the order summary sections.""" + borderWidth: CheckoutBrandingBorderWidth + + """The selected color scheme of the order summary sections.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The corner radius of the order summary sections.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The padding of the order summary sections.""" + padding: CheckoutBrandingSpacingKeyword + + """The shadow of the order summary sections.""" + shadow: CheckoutBrandingShadow +} + +""" +The input fields used to update the order summary sections customizations. +""" +input CheckoutBrandingOrderSummarySectionInput { + """The selected color scheme for the order summary sections.""" + colorScheme: CheckoutBrandingColorSchemeSelection + + """The background style of the order summary sections.""" + background: CheckoutBrandingBackground + + """The corner radius of the order summary sections.""" + cornerRadius: CheckoutBrandingCornerRadius + + """The border for the order summary sections.""" + border: CheckoutBrandingSimpleBorder + + """The border style of the order summary sections.""" + borderStyle: CheckoutBrandingBorderStyle + + """The border width of the order summary sections.""" + borderWidth: CheckoutBrandingBorderWidth + + """The shadow of the order summary sections.""" + shadow: CheckoutBrandingShadow + + """The padding of the order summary sections.""" + padding: CheckoutBrandingSpacingKeyword +} + +"""The selects customizations.""" +type CheckoutBrandingSelect { + """The border used for selects.""" + border: CheckoutBrandingBorder + + """The typography customizations used for selects.""" + typography: CheckoutBrandingTypographyStyle +} + +"""The input fields used to update the selects customizations.""" +input CheckoutBrandingSelectInput { + """The border used for selects.""" + border: CheckoutBrandingBorder + + """The typography customizations used for selects.""" + typography: CheckoutBrandingTypographyStyleInput +} + +"""The container shadow.""" +enum CheckoutBrandingShadow { + """The Small 200 shadow.""" + SMALL_200 + + """The Small 100 shadow.""" + SMALL_100 + + """The Base shadow.""" + BASE + + """The Large 100 shadow.""" + LARGE_100 + + """The Large 200 shadow.""" + LARGE_200 +} + +"""A Shopify font.""" +type CheckoutBrandingShopifyFont implements CheckoutBrandingFont { + """The font sources.""" + sources: String + + """The font weight.""" + weight: Int +} + +"""The input fields used to update a Shopify font group.""" +input CheckoutBrandingShopifyFontGroupInput { + """ + The Shopify font name from [the list of available fonts](https://shopify.dev/themes/architecture/settings/fonts#available-fonts), + such as `Alegreya Sans` or `Anonymous Pro`. + """ + name: String! + + """The base font weight.""" + baseWeight: Int + + """The bold font weight.""" + boldWeight: Int + + """The font loading strategy.""" + loadingStrategy: CheckoutBrandingFontLoadingStrategy +} + +"""Possible values for the simple border.""" +enum CheckoutBrandingSimpleBorder { + """The None simple border.""" + NONE + + """The Full simple border.""" + FULL +} + +"""Possible values for the spacing.""" +enum CheckoutBrandingSpacing { + """The None spacing.""" + NONE + + """The Extra Tight spacing.""" + EXTRA_TIGHT + + """The Tight spacing.""" + TIGHT + + """The Base spacing.""" + BASE + + """The Loose spacing.""" + LOOSE + + """The Extra Loose spacing.""" + EXTRA_LOOSE +} + +"""The spacing between UI elements.""" +enum CheckoutBrandingSpacingKeyword { + """The None spacing.""" + NONE + + """The Base spacing.""" + BASE + + """The Small spacing.""" + SMALL + + """The Small 100 spacing.""" + SMALL_100 + + """The Small 200 spacing.""" + SMALL_200 + + """The Small 300 spacing.""" + SMALL_300 + + """The Small 400 spacing.""" + SMALL_400 + + """The Small 500 spacing.""" + SMALL_500 + + """The Large spacing.""" + LARGE + + """The Large 100 spacing.""" + LARGE_100 + + """The Large 200 spacing.""" + LARGE_200 + + """The Large 300 spacing.""" + LARGE_300 + + """The Large 400 spacing.""" + LARGE_400 + + """The Large 500 spacing.""" + LARGE_500 +} + +"""The text fields customizations.""" +type CheckoutBrandingTextField { + """The border used for text fields.""" + border: CheckoutBrandingBorder + + """The typography customizations used for text fields.""" + typography: CheckoutBrandingTypographyStyle +} + +"""The input fields used to update the text fields customizations.""" +input CheckoutBrandingTextFieldInput { + """The border used for text fields.""" + border: CheckoutBrandingBorder + + """The typography customizations used for text fields.""" + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The typography settings used for checkout-related text. Use these settings to customize the +font family and size for primary and secondary text elements. + +Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for further information on typography customization. +""" +type CheckoutBrandingTypography { + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroup + + """A font group used for heading components by default.""" + secondary: CheckoutBrandingFontGroup + + """ + The font size design system (base size in pixels and scaling between different sizes). + """ + size: CheckoutBrandingFontSize +} + +"""The font selection.""" +enum CheckoutBrandingTypographyFont { + """The primary font.""" + PRIMARY + + """The secondary font.""" + SECONDARY +} + +""" +The input fields used to update the typography. Refer to the [typography +tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information on how to set these fields. +""" +input CheckoutBrandingTypographyInput { + """The font size.""" + size: CheckoutBrandingFontSizeInput + + """ + A font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutBrandingFontGroupInput + + """A font group used for heading components by default.""" + secondary: CheckoutBrandingFontGroupInput +} + +"""Possible values for the typography kerning.""" +enum CheckoutBrandingTypographyKerning { + """Base or default kerning.""" + BASE + + """ + Loose kerning, leaving more space than the default in between characters. + """ + LOOSE + + """Extra loose kerning, leaving even more space in between characters.""" + EXTRA_LOOSE +} + +"""Possible values for the typography letter case.""" +enum CheckoutBrandingTypographyLetterCase { + """All letters are is lower case.""" + LOWER + + """No letter casing applied.""" + NONE + + """Capitalize the first letter of each word.""" + TITLE + + """All letters are uppercase.""" + UPPER +} + +""" +Possible choices for the font size. + +Note that the value in pixels of these settings can be customized with the +[typography size](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CheckoutBrandingFontSizeInput) +object. Refer to the [typography tutorial](https://shopify.dev/docs/apps/checkout/styling/customize-typography) +for more information. +""" +enum CheckoutBrandingTypographySize { + """The extra small font size. Example: 10px.""" + EXTRA_SMALL + + """The small font size. Example: 12px.""" + SMALL + + """The base font size. Example: 14px.""" + BASE + + """The medium font size. Example: 16px.""" + MEDIUM + + """The large font size. Example: 19px.""" + LARGE + + """The extra large font size. Example: 21px.""" + EXTRA_LARGE + + """The extra extra large font size. Example: 24px.""" + EXTRA_EXTRA_LARGE +} + +"""The typography customizations.""" +type CheckoutBrandingTypographyStyle { + """The font.""" + font: CheckoutBrandingTypographyFont + + """The kerning.""" + kerning: CheckoutBrandingTypographyKerning + + """The letter case.""" + letterCase: CheckoutBrandingTypographyLetterCase + + """The font size.""" + size: CheckoutBrandingTypographySize + + """The font weight.""" + weight: CheckoutBrandingTypographyWeight +} + +"""The global typography customizations.""" +type CheckoutBrandingTypographyStyleGlobal { + """The kerning.""" + kerning: CheckoutBrandingTypographyKerning + + """The letter case.""" + letterCase: CheckoutBrandingTypographyLetterCase +} + +"""The input fields used to update the global typography customizations.""" +input CheckoutBrandingTypographyStyleGlobalInput { + """The letter case.""" + letterCase: CheckoutBrandingTypographyLetterCase + + """The kerning.""" + kerning: CheckoutBrandingTypographyKerning +} + +"""The input fields used to update the typography customizations.""" +input CheckoutBrandingTypographyStyleInput { + """The font.""" + font: CheckoutBrandingTypographyFont + + """The font size.""" + size: CheckoutBrandingTypographySize + + """The font weight.""" + weight: CheckoutBrandingTypographyWeight + + """The letter case.""" + letterCase: CheckoutBrandingTypographyLetterCase + + """The kerning.""" + kerning: CheckoutBrandingTypographyKerning +} + +"""Possible values for the font weight.""" +enum CheckoutBrandingTypographyWeight { + """The base weight.""" + BASE + + """The bold weight.""" + BOLD +} + +"""Return type for `checkoutBrandingUpsert` mutation.""" +type CheckoutBrandingUpsertPayload { + """Returns the new checkout branding settings.""" + checkoutBranding: CheckoutBranding + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CheckoutBrandingUpsertUserError!]! +} + +"""An error that occurs during the execution of `CheckoutBrandingUpsert`.""" +type CheckoutBrandingUpsertUserError implements DisplayableError { + """The error code.""" + code: CheckoutBrandingUpsertUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CheckoutBrandingUpsertUserError`. +""" +enum CheckoutBrandingUpsertUserErrorCode { + """Unexpected internal error happened.""" + INTERNAL_ERROR +} + +"""Possible visibility states.""" +enum CheckoutBrandingVisibility { + """The Hidden visibility setting.""" + HIDDEN + + """The Visible visibility setting.""" + VISIBLE +} + +""" +A checkout profile defines the branding settings and the UI extensions for a +store's checkout. A checkout profile could be published or draft. A store might +have at most one published checkout profile, which is used to render their live +checkout. The store could also have multiple draft profiles that were created, +previewed, and published using the admin checkout editor. +""" +type CheckoutProfile implements Node { + """The date and time when the checkout profile was created.""" + createdAt: DateTime! + + """The date and time when the checkout profile was last edited.""" + editedAt: DateTime! + + """A globally-unique ID.""" + id: ID! + + """Whether the checkout profile is published or not.""" + isPublished: Boolean! + + """The profile name.""" + name: String! + + """ + Whether the checkout profile Thank You Page and Order Status Page are actively using extensibility or not. + """ + typOspPagesActive: Boolean! + + """The date and time when the checkout profile was last updated.""" + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CheckoutProfiles. +""" +type CheckoutProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CheckoutProfileEdge!]! + + """ + A list of nodes that are contained in CheckoutProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CheckoutProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CheckoutProfile and a cursor during pagination. +""" +type CheckoutProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CheckoutProfileEdge.""" + node: CheckoutProfile! +} + +"""The set of valid sort keys for the CheckoutProfile query.""" +enum CheckoutProfileSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `edited_at` value.""" + EDITED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `is_published` value.""" + IS_PUBLISHED + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The input fields for adding products to the Combined Listing.""" +input ChildProductRelationInput { + """The ID of the child product.""" + childProductId: ID! + + """The parent option values.""" + selectedParentOptionValues: [SelectedVariantOptionInput!]! +} + +"""The set of valid sort keys for the CodeDiscount query.""" +enum CodeDiscountSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `ends_at` value.""" + ENDS_AT + + """Sort by the `id` value.""" + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `starts_at` value.""" + STARTS_AT + + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +""" +The `Collection` object represents a group of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that merchants can organize to make their stores easier to browse and help customers find related products. +Collections serve as the primary way to categorize and display products across +[online stores](https://shopify.dev/docs/apps/build/online-store), +[sales channels](https://shopify.dev/docs/apps/build/sales-channels), and marketing campaigns. + +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 { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + A single-line, text-only description of the collection, stripped of any HTML + tags and formatting that were included in the description. + """ + description( + """Truncates a string after the given length.""" + truncateAt: Int + ): String! + + """ + The description of the collection, including any HTML tags and formatting. + This content is typically displayed to customers, such as on an online store, + depending on the theme. + """ + descriptionHtml: HTML! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """ + Information about the collection that's provided through resource feedback. + """ + feedback: ResourceFeedback + + """ + A unique string that identifies the collection. If a handle isn't specified + when a collection is created, it's automatically generated from the + collection's original title, and typically includes words from the title + separated by hyphens. For example, a collection that was created with the + title `Summer Catalog 2022` might have the handle `summer-catalog-2022`. + + If the title is changed, the handle doesn't automatically change. + + The handle can be used in themes by the Liquid templating language to refer to + the collection, but using the ID is preferred because it never changes. + """ + handle: String! + + """Whether the collection includes the specified product.""" + hasProduct( + """The ID of the product to check.""" + id: ID! + ): Boolean! + + """A globally-unique ID.""" + id: ID! + + """The image associated with the collection.""" + image: Image + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The products that are included in the collection.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT + ): ProductConnection! + + """The number of products in the collection.""" + productsCount: Count + + """ + The 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( + """ + Whether or not to return only the collection publications that are published. + """ + onlyPublished: Boolean = true + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """Whether the resource is published to a specific channel.""" + publishedOnChannel( + """The ID of the channel to check.""" + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! + + """ + Whether the resource is published to a specified + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + publishedOnPublication( + """ + The ID of the publication to check. For example, `id: "gid://shopify/Publication/123"`. + """ + publicationId: ID! + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled to be published. + """ + onlyPublished: Boolean = true + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The 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( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled or staged to be published. + """ + onlyPublished: Boolean = true + + """Filter publications by catalog type.""" + catalogType: CatalogType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationV2Connection! + + """ + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PublicationConnection! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the collection was last modified. + """ + updatedAt: DateTime! +} + +"""Return type for `collectionAddProducts` mutation.""" +type CollectionAddProductsPayload { + """The updated collection. Returns `null` if an error is raised.""" + collection: Collection + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `collectionAddProductsV2` mutation.""" +type CollectionAddProductsV2Payload { + """The asynchronous job adding the products.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CollectionAddProductsV2UserError!]! +} + +""" +An error that occurs during the execution of `CollectionAddProductsV2`. +""" +type CollectionAddProductsV2UserError implements DisplayableError { + """The error code.""" + code: CollectionAddProductsV2UserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CollectionAddProductsV2UserError`. +""" +enum CollectionAddProductsV2UserErrorCode { + """Can't manually add products to a smart collection.""" + CANT_ADD_TO_SMART_COLLECTION + + """Collection doesn't exist.""" + COLLECTION_DOES_NOT_EXIST +} + +"""An auto-generated type for paginating through multiple Collections.""" +type CollectionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionEdge!]! + + """ + A list of nodes that are contained in CollectionEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Collection!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `collectionCreate` mutation.""" +type CollectionCreatePayload { + """The collection that has been created.""" + collection: Collection + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for specifying the collection to delete.""" +input CollectionDeleteInput { + """The ID of the collection to be deleted.""" + id: ID! +} + +"""Return type for `collectionDelete` mutation.""" +type CollectionDeletePayload { + """ + The ID of the collection that was deleted. Returns `null` if the collection doesn't exist. + """ + deletedCollectionId: ID + + """The shop associated with the collection.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +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 { + """The ID of the collection.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the collection. + """ + customId: UniqueMetafieldValueInput + + """The handle of the collection.""" + handle: String +} + +"""The input fields required to create a collection.""" +input CollectionInput { + """The description of the collection, in HTML format.""" + descriptionHtml: String + + """ + A unique human-friendly string for the collection. Automatically generated from the collection's title. + """ + handle: String + + """ + Specifies the collection to update or create a new collection if absent. Required for updating a collection. + """ + id: ID + + """The image associated with the collection.""" + image: ImageInput + + """ + Initial list of collection products. Only valid with `collectionCreate` and without rules. + """ + products: [ID!] + + """The rules used to assign products to the collection.""" + ruleSet: CollectionRuleSetInput + + """The theme template used when viewing the collection in a store.""" + templateSuffix: String + + """The order in which the collection's products are sorted.""" + sortOrder: CollectionSortOrder + + """The title of the collection. Required for creating a new collection.""" + title: String + + """The metafields to associate with the collection.""" + metafields: [MetafieldInput!] + + """SEO information for the collection.""" + seo: SEOInput + + """ + Indicates whether a redirect is required after a new handle has been provided. + If true, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false +} + +""" +Represents the publication status and settings for a collection across different +sales channels. This tracks where collections are published, when they were +published, and any channel-specific configuration. + +For example, a "Holiday Gifts" collection might be published to the online store +and Facebook Shop but not to the POS channel, with different publication dates +for each channel based on marketing strategy. + +Use `CollectionPublication` to: +- Track collection visibility across multiple sales channels +- Manage channel-specific collection settings and availability +- Monitor publication history and timing for collections +- Control where collections appear in customer-facing channels +- Implement channel-specific collection management workflows + +Each publication record includes the channel information, publication status, +and timing details. This enables merchants to control collection visibility +strategically across their sales channels. + +Collections can have different publication settings per channel, allowing for +targeted marketing and inventory management. For instance, wholesale collections +might only be published to B2B channels while retail collections appear in +consumer-facing channels. + +The publication system integrates with Shopify's broader channel management, +ensuring collections appear consistently across the merchant's sales ecosystem +while respecting channel-specific rules and permissions. + +Learn more about [sales channel management](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). +""" +type CollectionPublication { + """The channel where the collection will be published.""" + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """The collection to be published on the publication.""" + collection: Collection! + + """Whether the publication is published or not.""" + isPublished: Boolean! + + """The publication where the collection will be published.""" + publication: Publication! + + """The date that the publication was or is going to be published.""" + publishDate: DateTime! +} + +""" +An auto-generated type for paginating through multiple CollectionPublications. +""" +type CollectionPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CollectionPublicationEdge!]! + + """ + A list of nodes that are contained in CollectionPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CollectionPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CollectionPublication and a cursor during pagination. +""" +type CollectionPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CollectionPublicationEdge.""" + node: CollectionPublication! +} + +""" +The input fields for publications to which a collection will be published. +""" +input CollectionPublicationInput { + """The ID of the publication.""" + publicationId: ID +} + +""" +The input fields for specifying a collection to publish and the sales channels to publish it to. +""" +input CollectionPublishInput { + """The collection to create or update publications for.""" + id: ID! + + """The channels where the collection will be published.""" + collectionPublications: [CollectionPublicationInput!]! +} + +"""Return type for `collectionPublish` mutation.""" +type CollectionPublishPayload { + """The published collection.""" + collection: Collection + + """The channels where the collection has been published.""" + collectionPublications: [CollectionPublication!] + + """The shop associated with the collection.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `collectionRemoveProducts` mutation.""" +type CollectionRemoveProductsPayload { + """The asynchronous job removing the products.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `collectionReorderProducts` mutation.""" +type CollectionReorderProductsPayload { + """The asynchronous job reordering the products.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CollectionReorderProductsUserError!]! +} + +"""Errors related to order customer removal.""" +type CollectionReorderProductsUserError implements DisplayableError { + """The error code.""" + code: CollectionReorderProductsUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CollectionReorderProductsUserError`. +""" +enum CollectionReorderProductsUserErrorCode { + """Products are currently being reordered. Please try again later.""" + TOO_MANY_ATTEMPTS_TO_REORDER_PRODUCTS + + """ + The collection was not found. Please check the collection ID and try again. + """ + COLLECTION_NOT_FOUND + + """ + The collection is not manually sorted. Can't reorder products unless collection is manually sorted. + """ + MANUALLY_SORTED_COLLECTION + + """The move is invalid.""" + INVALID_MOVE +} + +"""Represents at rule that's used to assign products to a collection.""" +type CollectionRule { + """ + The attribute that the rule focuses on. For example, `title` or `product_type`. + """ + column: CollectionRuleColumn! + + """The value that the operator is applied to. For example, `Hats`.""" + condition: String! + + """The value that the operator is applied to.""" + conditionObject: CollectionRuleConditionObject + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! +} + +"""Specifies the taxonomy category to used for the condition.""" +type CollectionRuleCategoryCondition { + """The taxonomy category used as condition.""" + value: TaxonomyCategory! +} + +""" +Specifies the attribute of a product being used to populate the smart collection. +""" +enum CollectionRuleColumn { + """ + The [`tag`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.tags) attribute. + """ + TAG + + """ + The [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.title) attribute. + """ + TITLE + + """ + The [`type`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productType) attribute. + """ + TYPE + + """ + The [`product_taxonomy_node_id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productCategory) attribute. + """ + PRODUCT_TAXONOMY_NODE_ID + + """ + This rule type is designed to dynamically include products in a 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 + + """ + The [`vendor`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.vendor) attribute. + """ + VENDOR + + """ + The [`variant_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.price) attribute. + """ + VARIANT_PRICE + + """ + An attribute evaluated based on the `compare_at_price` attribute of the product's variants. + With `is_set` relation, the rule matches products with at least one variant with `compare_at_price` set. + With `is_not_set` relation, the rule matches matches products with at least one variant with `compare_at_price` not set. + """ + IS_PRICE_REDUCED + + """ + The [`variant_compare_at_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.compareAtPrice) attribute. + """ + VARIANT_COMPARE_AT_PRICE + + """ + The [`variant_weight`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryItem.measurement.weight) attribute. + """ + VARIANT_WEIGHT + + """ + The [`variant_inventory`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryQuantity) attribute. + """ + VARIANT_INVENTORY + + """ + The [`variant_title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.title) attribute. + """ + VARIANT_TITLE + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + PRODUCT_METAFIELD_DEFINITION + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + VARIANT_METAFIELD_DEFINITION +} + +"""Specifies object for the condition of the rule.""" +union CollectionRuleConditionObject = CollectionRuleCategoryCondition | CollectionRuleMetafieldCondition | CollectionRuleProductCategoryCondition | CollectionRuleTextCondition + +""" +Defines the available columns and relationships that can be used when creating +rules for 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 type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! + + """The value that the operator is applied to. For example, `Hats`.""" + condition: String! + + """ + The object ID that points to additional attributes for the collection rule. + This is only required when using metafield definition rules. + """ + conditionObjectId: ID +} + +""" +Identifies a metafield definition used as a rule for the 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 collection to create or update publications for.""" + id: ID! + + """The channels where the collection is published.""" + collectionPublications: [CollectionPublicationInput!]! +} + +"""Return type for `collectionUnpublish` mutation.""" +type CollectionUnpublishPayload { + """The collection that has been unpublished.""" + collection: Collection + + """The shop associated with the collection.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `collectionUpdate` mutation.""" +type CollectionUpdatePayload { + """The updated collection.""" + collection: Collection + + """The asynchronous job updating the products based on the new rule set.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A string containing a hexadecimal representation of a color. + +For example, "#6A8D48". +""" +scalar Color + +"""The data type of a column.""" +enum ColumnDataType { + """Represents an unspecified data type.""" + UNSPECIFIED + + """Represents a monetary value.""" + MONEY + + """Represents a percentage value.""" + PERCENT + + """Represents an integer value.""" + INTEGER + + """Represents a floating point value.""" + FLOAT + + """Represents a decimal value.""" + DECIMAL + + """Represents a string value.""" + STRING + + """Represents a boolean value.""" + BOOLEAN + + """Represents a timestamp value in seconds.""" + TIMESTAMP + + """Represents a minute-level timestamp value.""" + MINUTE_TIMESTAMP + + """Represents a hour-level timestamp value.""" + HOUR_TIMESTAMP + + """Represents a day-level timestamp value.""" + DAY_TIMESTAMP + + """Represents a week-level timestamp value.""" + WEEK_TIMESTAMP + + """Represents a month-level timestamp value.""" + MONTH_TIMESTAMP + + """Represents a quarter-level timestamp value.""" + QUARTER_TIMESTAMP + + """Represents a year-level timestamp value.""" + YEAR_TIMESTAMP + + """Represents a day of week value.""" + DAY_OF_WEEK + + """Represents an hour of day value.""" + HOUR_OF_DAY + + """Represents an identity value.""" + IDENTITY + + """Represents a month of year value.""" + MONTH_OF_YEAR + + """Represents a week of year value.""" + WEEK_OF_YEAR + + """Represents a second-level timestamp value.""" + SECOND_TIMESTAMP + + """Represents an array of values.""" + ARRAY + + """Represents a duration in milliseconds.""" + MILLISECOND_DURATION + + """Represents a duration in seconds.""" + SECOND_DURATION + + """Represents a duration in minutes.""" + MINUTE_DURATION + + """Represents a duration in hours.""" + HOUR_DURATION + + """Represents a duration in days.""" + DAY_DURATION +} + +"""A combined listing of products.""" +type CombinedListing { + """A list of child products in the combined listing.""" + combinedListingChildren( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CombinedListingChildConnection! + + """The parent product.""" + parentProduct: Product! +} + +"""A child of a combined listing.""" +type CombinedListingChild { + """The parent variant.""" + parentVariant: ProductVariant! + + """The child product.""" + product: Product! +} + +""" +An auto-generated type for paginating through multiple CombinedListingChildren. +""" +type CombinedListingChildConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CombinedListingChildEdge!]! + + """ + A list of nodes that are contained in CombinedListingChildEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CombinedListingChild!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CombinedListingChild and a cursor during pagination. +""" +type CombinedListingChildEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CombinedListingChildEdge.""" + node: CombinedListingChild! +} + +"""The role of the combined listing.""" +enum CombinedListingsRole { + """The product is the parent of a combined listing.""" + PARENT + + """The product is the child of a combined listing.""" + CHILD +} + +"""Return type for `combinedListingUpdate` mutation.""" +type CombinedListingUpdatePayload { + """The parent product.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CombinedListingUpdateUserError!]! +} + +"""An error that occurs during the execution of `CombinedListingUpdate`.""" +type CombinedListingUpdateUserError implements DisplayableError { + """The error code.""" + code: CombinedListingUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CombinedListingUpdateUserError`. +""" +enum CombinedListingUpdateUserErrorCode { + """Unable to add duplicated products.""" + CANNOT_HAVE_DUPLICATED_PRODUCTS + + """Unable to add a product that is a parent.""" + CANNOT_HAVE_PARENT_AS_CHILD + + """Option values cannot be repeated.""" + CANNOT_HAVE_REPEATED_OPTION_VALUES + + """Unable to add products with repeated options.""" + CANNOT_HAVE_REPEATED_OPTIONS + + """Unable to add options values that are already in use.""" + CANT_ADD_OPTIONS_VALUES_IF_ALREADY_EXISTS + + """Combined listings feature is not enabled.""" + COMBINED_LISTINGS_NOT_ENABLED + + """Cannot perform edit and remove on same products.""" + EDIT_AND_REMOVE_ON_SAME_PRODUCTS + + """Unable to add products.""" + FAILED_TO_ADD_PRODUCTS + + """Unable to remove products.""" + FAILED_TO_REMOVE_PRODUCTS + + """Unable to update products.""" + FAILED_TO_UPDATE_PRODUCTS + + """ + An option linked to a metafield cannot be linked to a different metafield. + """ + LINKED_METAFIELD_CANNOT_BE_CHANGED + + """Linked metafield value missing from `optionsAndValues` field.""" + LINKED_METAFIELD_VALUE_MISSING + + """The same metafield cannot be linked to multiple options.""" + LINKED_METAFIELDS_CANNOT_BE_REPEATED + + """Linked options are currently not supported for this shop.""" + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """The optionsAndValues field is required for this operation.""" + MISSING_OPTION_VALUES + + """Selected option values cannot be empty.""" + MUST_HAVE_SELECTED_OPTION_VALUES + + """Unable to add products with blank option names.""" + OPTION_NAME_CANNOT_BE_BLANK + + """Option name contains invalid characters.""" + OPTION_NAME_CONTAINS_INVALID_CHARACTERS + + """Option does not exist.""" + OPTION_NOT_FOUND + + """All child products must include the same options.""" + OPTIONS_MUST_BE_EQUAL_TO_THE_OTHER_COMPONENTS + + """Unable to update options with blank option values.""" + OPTION_VALUES_CANNOT_BE_BLANK + + """Unable to update options with no option values.""" + OPTION_VALUES_CANNOT_BE_EMPTY + + """ + The options_and_values field must contain all option values used in the combined listing. + """ + OPTION_VALUES_MUST_BE_COMPLETE + + """Parent product cannot be a combined listing child.""" + PARENT_PRODUCT_CANNOT_BE_COMBINED_LISTING_CHILD + + """ + Unable to update components for a product that isn't a combined listing. + """ + PARENT_PRODUCT_MUST_BE_A_COMBINED_LISTING + + """ + The combined listing parent product must have a product category to use linked metafield options. + """ + PARENT_PRODUCT_MUST_HAVE_CATEGORY + + """Parent product not found.""" + PARENT_PRODUCT_NOT_FOUND + + """Unable to add a product that is already a child.""" + PRODUCT_IS_ALREADY_A_CHILD + + """Failed to remove mebmership due to invalid input.""" + PRODUCT_MEMBERSHIP_NOT_FOUND + + """Unable to add products that do not exist.""" + PRODUCT_NOT_FOUND + + """The title cannot be longer than 255 characters.""" + TITLE_TOO_LONG + + """ + You have reached the maximum number of variants across all products for an individual combined listing. + """ + TOO_MANY_VARIANTS + + """ + You have reached the maximum number of products that can be added to an individual combined listing. + """ + TOO_MANY_PRODUCTS + + """An unexpected error occurred.""" + UNEXPECTED_ERROR +} + +"""A comment on an article.""" +type Comment implements HasEvents & Node { + """The article associated with the comment.""" + article: Article + + """The comment’s author.""" + author: CommentAuthor! + + """The content of the comment.""" + body: String! + + """The content of the comment, complete with HTML formatting.""" + bodyHtml: HTML! + + """The date and time when the comment was created.""" + createdAt: DateTime! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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.""" +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! +} + +""" +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 action that occured.""" + action: String! + + """The name of the app that created the event.""" + appTitle: String + + """The attachments associated with the comment event.""" + attachments: [CommentEventAttachment!]! + + """Whether the event was created by an app.""" + attributeToApp: Boolean! + + """Whether the event was caused by an admin user.""" + attributeToUser: Boolean! + + """The name of the user that authored the comment event.""" + author: StaffMember! + + """ + Whether the comment event can be deleted. If true, then the comment event can be deleted. + """ + canDelete: Boolean! + + """ + Whether the comment event can be edited. If true, then the comment event can be edited. + """ + canEdit: Boolean! + + """The date and time when the event was created.""" + createdAt: DateTime! + + """Whether the event is critical.""" + criticalAlert: Boolean! + + """ + Whether the comment event has been edited. If true, then the comment event has been edited. + """ + edited: Boolean! + + """ + The object reference associated with the comment event. For example, a product or discount). + """ + embed: CommentEventEmbed + + """A globally-unique ID.""" + id: ID! + + """Human readable text that describes the event.""" + message: FormattedString! + + """The raw body of the comment event.""" + rawMessage: String! + + """The parent subject to which the comment event belongs.""" + subject: CommentEventSubject +} + +"""A file attachment associated to a comment event.""" +type CommentEventAttachment { + """ + The file extension of the comment event attachment, indicating the file format. + """ + fileExtension: String + + """A globally-unique ID.""" + id: ID! + + """The image attached to the comment event.""" + image: Image + + """The filename of the comment event attachment.""" + name: String! + + """The size of the attachment.""" + size: Int! + + """The URL of the attachment.""" + url: URL! +} + +"""The main embed of a comment event.""" +union CommentEventEmbed = Customer | DraftOrder | InventoryTransfer | Order | Product | ProductVariant + +"""The subject line of a comment event.""" +interface CommentEventSubject { + """ + Whether the timeline subject has a timeline comment. If true, then a timeline comment exists. + """ + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! +} + +"""Return type for `commentNotSpam` mutation.""" +type CommentNotSpamPayload { + """The comment that was marked as not spam.""" + comment: Comment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CommentNotSpamUserError!]! +} + +"""An error that occurs during the execution of `CommentNotSpam`.""" +type CommentNotSpamUserError implements DisplayableError { + """The error code.""" + code: CommentNotSpamUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CommentNotSpamUserError`. +""" +enum CommentNotSpamUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND +} + +"""Possible comment policies for a blog.""" +enum CommentPolicy { + """Readers can post comments to blog articles without moderation.""" + AUTO_PUBLISHED + + """Readers cannot post comments to blog articles.""" + CLOSED + + """ + Readers can post comments to blog articles, but comments must be moderated before they appear. + """ + MODERATED +} + +"""The set of valid sort keys for the Comment query.""" +enum CommentSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID +} + +"""Return type for `commentSpam` mutation.""" +type CommentSpamPayload { + """The comment that was marked as spam.""" + comment: Comment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CommentSpamUserError!]! +} + +"""An error that occurs during the execution of `CommentSpam`.""" +type CommentSpamUserError implements DisplayableError { + """The error code.""" + code: CommentSpamUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `CommentSpamUserError`.""" +enum CommentSpamUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND +} + +"""The status of a comment.""" +enum CommentStatus { + """The comment is marked as spam.""" + SPAM + + """The comment has been removed.""" + REMOVED + + """The comment is published.""" + PUBLISHED + + """The comment is unapproved.""" + UNAPPROVED + + """The comment is pending approval.""" + PENDING +} + +"""Return type for `companiesDelete` mutation.""" +type CompaniesDeletePayload { + """A list of IDs of the deleted companies.""" + deletedCompanyIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyContactRoleSortKeys = ID + ): CompanyContactRoleConnection! + + """The list of contacts in the company.""" + contacts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyContactSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyContactConnection! + + """The number of contacts that belong to the company.""" + contactsCount: Count + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify. + """ + createdAt: DateTime! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company became the customer. + """ + customerSince: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """The role proposed by default for a contact at the company.""" + defaultRole: CompanyContactRole + + """The list of the company's draft orders.""" + draftOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): DraftOrderConnection! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A unique externally-supplied ID for the company.""" + externalId: String + + """Whether the merchant added a timeline comment to the company.""" + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! + + """ + The lifetime duration of the company, since it became a customer of the shop. Examples: `2 days`, `3 months`, `1 year`. + """ + lifetimeDuration: String! + + """The list of locations in the company.""" + locations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyLocationSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyLocationConnection! + + """The number of locations that belong to the company.""" + locationsCount: Count + + """The main contact for the company.""" + mainContact: CompanyContact + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The name of the company.""" + name: String! + + """A note about the company.""" + note: String + + """The list of the company's orders.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = ID + ): OrderConnection! + + """ + The total number of orders placed for this company, across all its locations. + """ + ordersCount: Count + + """The total amount spent by this company, across all its locations.""" + totalSpent: MoneyV2! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified. + """ + updatedAt: DateTime! +} + +"""Represents a billing or shipping address for a company location.""" +type CompanyAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String! + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The name of the company.""" + companyName: String! + + """The name of the country.""" + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company address was created. + """ + createdAt: DateTime! + + """The first name of the recipient.""" + firstName: String + + """The formatted version of the address.""" + formattedAddress( + """Whether to include the recipient's name in the formatted address.""" + withName: Boolean = false + + """Whether to include the company name in the formatted address.""" + withCompanyName: Boolean = true + ): [String!]! + + """A comma-separated list of the values for city, province, and country.""" + formattedArea: String + + """A globally-unique ID.""" + id: ID! + + """The last name of the recipient.""" + lastName: String + + """ + A unique phone number for the customer. + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """The identity of the recipient e.g. 'Receiving Department'.""" + recipient: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company address was last updated. + """ + updatedAt: DateTime! + + """The zip or postal code of the address.""" + zip: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + zoneCode: String +} + +"""Return type for `companyAddressDelete` mutation.""" +type CompanyAddressDeletePayload { + """The ID of the deleted address.""" + deletedAddressId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields to create or update the address of a company location. +""" +input CompanyAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The zip or postal code of the address.""" + zip: String + + """The identity of the recipient e.g. 'Receiving Department'.""" + recipient: String + + """The first name of the recipient.""" + firstName: String + + """The last name of the recipient.""" + lastName: String + + """ + A phone number for the recipient. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The alphanumeric code for the region of the address, such as the province, + state, or district. For example, `ON` for Ontario, Canada. + """ + zoneCode: String + + """ + The two-letter code ([ISO 3166-1 + alpha-2]](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format) for the + country of the address. For example, `US`` for the United States. + """ + countryCode: CountryCode +} + +"""The valid values for the address type of a company.""" +enum CompanyAddressType { + """The address is a billing address.""" + BILLING + + """The address is a shipping address.""" + SHIPPING +} + +"""Return type for `companyAssignCustomerAsContact` mutation.""" +type CompanyAssignCustomerAsContactPayload { + """The created company contact.""" + companyContact: CompanyContact + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyAssignMainContact` mutation.""" +type CompanyAssignMainContactPayload { + """The company for which the main contact is assigned.""" + company: Company + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""An auto-generated type for paginating through multiple Companies.""" +type CompanyConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyEdge!]! + + """ + A list of nodes that are contained in CompanyEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Company!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +A person 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): DraftOrderConnection! + + """A globally-unique ID.""" + id: ID! + + """Whether the contact is the main contact of the company.""" + isMainContact: Boolean! + + """ + The lifetime duration of the company contact, since its creation date on + Shopify. Examples: `1 year`, `2 months`, `3 days`. + """ + lifetimeDuration: String! + + """The company contact's locale (language).""" + locale: String + + """The list of orders for the company contact.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = ID + ): OrderConnection! + + """The list of roles assigned to this company contact.""" + roleAssignments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyContactRoleAssignmentSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyContactRoleAssignmentConnection! + + """The company contact's job title.""" + title: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company contact was last updated. + """ + updatedAt: DateTime! +} + +"""Return type for `companyContactAssignRole` mutation.""" +type CompanyContactAssignRolePayload { + """The company contact role assignment.""" + companyContactRoleAssignment: CompanyContactRoleAssignment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyContactAssignRoles` mutation.""" +type CompanyContactAssignRolesPayload { + """ + A list of newly created assignments of company contacts to a company location. + """ + roleAssignments: [CompanyContactRoleAssignment!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type for paginating through multiple CompanyContacts. +""" +type CompanyContactConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactEdge!]! + + """ + A list of nodes that are contained in CompanyContactEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContact!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `companyContactCreate` mutation.""" +type CompanyContactCreatePayload { + """The created company contact.""" + companyContact: CompanyContact + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyContactDelete` mutation.""" +type CompanyContactDeletePayload { + """The ID of the deleted company contact.""" + deletedCompanyContactId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyContact and a cursor during pagination. +""" +type CompanyContactEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyContactEdge.""" + node: CompanyContact! +} + +""" +The input fields for company contact attributes when creating or updating a company contact. +""" +input CompanyContactInput { + """The company contact's first name.""" + firstName: String + + """The company contact's last name.""" + lastName: String + + """The unique email address of the company contact.""" + email: String + + """The title of the company contact.""" + title: String + + """The contact's locale.""" + locale: String + + """The phone number of the company contact.""" + phone: String +} + +"""Return type for `companyContactRemoveFromCompany` mutation.""" +type CompanyContactRemoveFromCompanyPayload { + """The ID of the removed company contact.""" + removedCompanyContactId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyContactRevokeRole` mutation.""" +type CompanyContactRevokeRolePayload { + """The role assignment that was revoked.""" + revokedCompanyContactRoleAssignmentId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyContactRevokeRoles` mutation.""" +type CompanyContactRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company contact. + """ + revokedRoleAssignmentIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +The role for a [company contact](https://shopify.dev/api/admin-graphql/latest/objects/companycontact). +""" +type CompanyContactRole implements Node { + """A globally-unique ID.""" + id: ID! + + """ + The name of a role. + For example, `admin` or `buyer`. + """ + name: String! + + """A note for the role.""" + note: String +} + +""" +The input fields for the role and location to assign to a company contact. +""" +input CompanyContactRoleAssign { + """The role ID.""" + companyContactRoleId: ID! + + """The location.""" + companyLocationId: ID! +} + +""" +The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. +""" +type CompanyContactRoleAssignment implements Node { + """The company this role assignment belongs to.""" + company: Company! + + """The company contact for whom this role is assigned.""" + companyContact: CompanyContact! + + """The company location to which the role is assigned.""" + companyLocation: CompanyLocation! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was created. + """ + createdAt: DateTime! + + """A globally-unique ID.""" + id: ID! + + """The role that's assigned to the company contact.""" + role: CompanyContactRole! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the assignment record was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoleAssignments. +""" +type CompanyContactRoleAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleAssignmentEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [CompanyContactRoleAssignment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination. +""" +type CompanyContactRoleAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyContactRoleAssignmentEdge.""" + node: CompanyContactRoleAssignment! +} + +"""The set of valid sort keys for the CompanyContactRoleAssignment query.""" +enum CompanyContactRoleAssignmentSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `location_name` value.""" + LOCATION_NAME + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +""" +An auto-generated type for paginating through multiple CompanyContactRoles. +""" +type CompanyContactRoleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyContactRoleEdge!]! + + """ + A list of nodes that are contained in CompanyContactRoleEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyContactRole!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyContactRole and a cursor during pagination. +""" +type CompanyContactRoleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyContactRoleEdge.""" + node: CompanyContactRole! +} + +"""The set of valid sort keys for the CompanyContactRole query.""" +enum CompanyContactRoleSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""Return type for `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!]! +} + +"""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!]! +} + +""" +The input fields and values for creating a company and its associated resources. +""" +input CompanyCreateInput { + """The attributes for the company.""" + company: CompanyInput! + + """The attributes for the company contact.""" + companyContact: CompanyContactInput + + """The attributes for the company location.""" + companyLocation: CompanyLocationInput +} + +"""Return type for `companyCreate` mutation.""" +type CompanyCreatePayload { + """The created company.""" + company: Company + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyDelete` mutation.""" +type CompanyDeletePayload { + """The ID of the deleted company.""" + deletedCompanyId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one Company and a cursor during pagination. +""" +type CompanyEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyEdge.""" + node: Company! +} + +""" +The input fields for company attributes when creating or updating a company. +""" +input CompanyInput { + """The name of the company.""" + name: String + + """A note about the company.""" + note: String + + """A unique externally-supplied ID for the company.""" + externalId: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at + which the company became the customer. + """ + customerSince: DateTime +} + +""" +A location or branch of a [company 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 & HasStoreCreditAccounts & Navigable & Node { + """The address used as billing address for the location.""" + billingAddress: CompanyAddress + + """The configuration for the buyer's B2B checkout.""" + buyerExperienceConfiguration: BuyerExperienceConfiguration + + """The list of catalogs associated with the company location.""" + catalogs( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CatalogConnection! + + """ + The number of catalogs associated with the company location. Limited to a maximum of 10000 by default. + """ + catalogsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """The company that the company location belongs to.""" + company: Company! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) + at which the company location was created in Shopify. + """ + createdAt: DateTime! + + """ + The location's currency based on the shipping address. If the shipping address + is empty, then the value is the shop's primary market. + """ + currency: CurrencyCode! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """The list of draft orders for the company location.""" + draftOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): DraftOrderConnection! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A unique externally-supplied ID for the company location.""" + externalId: String + + """Whether the merchant added a timeline comment to the company location.""" + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! + + """Whether the company location is assigned a specific catalog.""" + inCatalog( + """The ID of the catalog.""" + catalogId: ID! + ): Boolean! + + """The preferred locale of the company location.""" + locale: String + + """ + The market that includes the location's shipping address. If the shipping + address is empty, then the value is the shop's primary market. + """ + market: Market! @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The name of the company location.""" + name: String! + + """A note about the company location.""" + note: String + + """The total number of orders placed for the location.""" + orderCount: Int! @deprecated(reason: "Use `ordersCount` instead.") + + """The list of orders for the company location.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = ID + ): OrderConnection! + + """The total number of orders placed for the location.""" + ordersCount: Count + + """The phone number of the company location.""" + phone: String + + """The list of roles assigned to the company location.""" + roleAssignments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyContactRoleAssignmentSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyContactRoleAssignmentConnection! + + """The address used as shipping address for the location.""" + shippingAddress: CompanyAddress + + """The list of staff members assigned to the company location.""" + staffMemberAssignments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyLocationStaffMemberAssignmentSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): CompanyLocationStaffMemberAssignmentConnection! + + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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. +""" +type CompanyLocationCatalog implements Catalog & Node { + """The company locations associated with the catalog.""" + companyLocations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyLocationSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyLocationConnection! + + """The number of company locations associated with the catalog.""" + companyLocationsCount: Count + + """A globally-unique ID.""" + id: ID! + + """Most recent catalog operations.""" + operations: [ResourceOperation!]! + + """The price list associated with the catalog.""" + priceList: PriceList + + """A group of products and collections that's published to a catalog.""" + publication: Publication + + """The status of the catalog.""" + status: CatalogStatus! + + """The name of the catalog.""" + title: String! +} + +""" +An auto-generated type for paginating through multiple CompanyLocations. +""" +type CompanyLocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationEdge!]! + + """ + A list of nodes that are contained in CompanyLocationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CompanyLocation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `companyLocationCreate` mutation.""" +type CompanyLocationCreatePayload { + """The created company location.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyLocationCreateTaxRegistration` mutation.""" +type CompanyLocationCreateTaxRegistrationPayload { + """The company location with the created tax registration.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyLocationDelete` mutation.""" +type CompanyLocationDeletePayload { + """The ID of the deleted company location.""" + deletedCompanyLocationId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +An auto-generated type which holds one CompanyLocation and a cursor during pagination. +""" +type CompanyLocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyLocationEdge.""" + node: CompanyLocation! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationInput { + """The name of the company location.""" + name: String + + """The phone number of the company location.""" + phone: String + + """The preferred locale of the company location.""" + locale: String + + """A unique externally-supplied ID for the company location.""" + externalId: String + + """A note about the company location.""" + note: String + + """The configuration for the buyer's checkout at the company location.""" + buyerExperienceConfiguration: BuyerExperienceConfigurationInput + + """ + The input fields to create or update the billing address for a company location. + """ + billingAddress: CompanyAddressInput + + """ + The input fields to create or update the shipping address for a company location. + """ + shippingAddress: CompanyAddressInput + + """ + Whether the billing address is the same as the shipping address. If the value + is true, then the input for `billingAddress` is ignored. + """ + billingSameAsShipping: Boolean + + """The tax registration ID of the company location.""" + taxRegistrationId: String + + """The list of tax exemptions to apply to the company location.""" + taxExemptions: [TaxExemption!] + + """Whether the location is exempt from taxes.""" + taxExempt: Boolean +} + +"""Return type for `companyLocationRemoveStaffMembers` mutation.""" +type CompanyLocationRemoveStaffMembersPayload { + """The list of IDs of the deleted staff member assignment.""" + deletedCompanyLocationStaffMemberAssignmentIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyLocationRevokeRoles` mutation.""" +type CompanyLocationRevokeRolesPayload { + """ + A list of role assignment IDs that were removed from the company location. + """ + revokedRoleAssignmentIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyLocationRevokeTaxExemptions` mutation.""" +type CompanyLocationRevokeTaxExemptionsPayload { + """The updated company location.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""Return type for `companyLocationRevokeTaxRegistration` mutation.""" +type CompanyLocationRevokeTaxRegistrationPayload { + """The updated company location.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""The input fields for the role and contact to assign on a location.""" +input CompanyLocationRoleAssign { + """The role ID.""" + companyContactRoleId: ID! + + """The company contact ID..""" + companyContactId: ID! +} + +"""A condition checking the company location a visitor is purchasing for.""" +type CompanyLocationsCondition { + """The application level for the condition.""" + applicationLevel: MarketConditionApplicationType + + """The company locations that comprise the market.""" + companyLocations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CompanyLocationConnection! +} + +"""Return type for `companyLocationsDelete` mutation.""" +type CompanyLocationsDeletePayload { + """A list of IDs of the deleted company locations.""" + deletedCompanyLocationIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""The set of valid sort keys for the CompanyLocation query.""" +enum CompanyLocationSortKeys { + """Sort by the `company_and_location_name` value.""" + COMPANY_AND_LOCATION_NAME + + """Sort by the `company_id` value.""" + COMPANY_ID + + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `name` value.""" + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +""" +A representation of store's staff member who is assigned to a [company +location](https://shopify.dev/api/admin-graphql/latest/objects/CompanyLocation) +of the shop. The staff member's actions will be limited to objects associated +with the assigned company location. +""" +type CompanyLocationStaffMemberAssignment implements Node { + """The company location the staff member is assigned to.""" + companyLocation: CompanyLocation! + + """A globally-unique ID.""" + id: ID! + + """ + Represents the data of a staff member who's assigned to a company location. + """ + staffMember: StaffMember! +} + +""" +An auto-generated type for paginating through multiple CompanyLocationStaffMemberAssignments. +""" +type CompanyLocationStaffMemberAssignmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CompanyLocationStaffMemberAssignmentEdge!]! + + """ + A list of nodes that are contained in + CompanyLocationStaffMemberAssignmentEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [CompanyLocationStaffMemberAssignment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CompanyLocationStaffMemberAssignment and a cursor during pagination. +""" +type CompanyLocationStaffMemberAssignmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CompanyLocationStaffMemberAssignmentEdge.""" + node: CompanyLocationStaffMemberAssignment! +} + +""" +The set of valid sort keys for the CompanyLocationStaffMemberAssignment query. +""" +enum CompanyLocationStaffMemberAssignmentSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""Represents the tax settings for a company location.""" +type CompanyLocationTaxSettings { + """Whether the location is exempt from taxes.""" + taxExempt: Boolean! + + """The list of tax exemptions applied to the location.""" + taxExemptions: [TaxExemption!]! + + """The tax registration ID for the company location.""" + taxRegistrationId: String +} + +"""Return type for `companyLocationTaxSettingsUpdate` mutation.""" +type CompanyLocationTaxSettingsUpdatePayload { + """The company location with the updated tax settings.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +""" +The input fields for company location when creating or updating a company location. +""" +input CompanyLocationUpdateInput { + """The name of the company location.""" + name: String + + """The phone number of the company location.""" + phone: String + + """The preferred locale of the company location.""" + locale: String + + """A unique externally-supplied ID for the company location.""" + externalId: String + + """A note about the company location.""" + note: String + + """The configuration for the buyer's checkout at the company location.""" + buyerExperienceConfiguration: BuyerExperienceConfigurationInput +} + +"""Return type for `companyLocationUpdate` mutation.""" +type CompanyLocationUpdatePayload { + """The updated company location.""" + companyLocation: CompanyLocation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [BusinessCustomerUserError!]! +} + +"""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!]! +} + +""" +A consent policy describes the level of consent that the merchant requires from the user before actually +collecting and processing the data. +""" +type ConsentPolicy implements Node { + """Whether consent is required for the region.""" + consentRequired: Boolean + + """The `ISO 3166` country code for which the policy applies.""" + countryCode: PrivacyCountryCode + + """Whether data sale opt-out is required for the region.""" + dataSaleOptOutRequired: Boolean + + """ + The global ID of the consent policy. IDs prefixed with `SD-` are system default policies. + """ + id: ID! + + """The `ISO 3166` region code for which the policy applies.""" + regionCode: String + + """The global ID of the shop that owns the policy.""" + shopId: ID! +} + +"""The errors encountered while performing mutations on consent policies.""" +type ConsentPolicyError implements DisplayableError { + """The error code.""" + code: ConsentPolicyErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `ConsentPolicyError`.""" +enum ConsentPolicyErrorCode { + """Country code is required.""" + COUNTRY_CODE_REQUIRED + + """Region code is required for countries with existing regional policies.""" + REGION_CODE_REQUIRED + + """Region code must match the country code.""" + REGION_CODE_MUST_MATCH_COUNTRY_CODE + + """Shopify's cookie banner must be disabled.""" + SHOPIFY_COOKIE_BANNER_NOT_DISABLED + + """Unsupported consent policy.""" + UNSUPORTED_CONSENT_POLICY +} + +"""The input fields for a consent policy to be updated or created.""" +input ConsentPolicyInput { + """The `ISO 3166` country code for which the policy applies.""" + countryCode: PrivacyCountryCode + + """The `ISO 3166` region code for which the policy applies.""" + regionCode: String + + """Whether consent is required for the region.""" + consentRequired: Boolean + + """Whether data sale opt-out is required for the region.""" + dataSaleOptOutRequired: Boolean +} + +"""A country or region code.""" +type ConsentPolicyRegion { + """The `ISO 3166` country code for which the policy applies.""" + countryCode: PrivacyCountryCode + + """The `ISO 3166` region code for which the policy applies.""" + regionCode: String +} + +"""Return type for `consentPolicyUpdate` mutation.""" +type ConsentPolicyUpdatePayload { + """ + All updated and created consent policies. The consent policies that haven't + been modified as part of the mutation aren't returned. + """ + updatedPolicies: [ConsentPolicy!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ConsentPolicyError!]! +} + +""" +The input fields for the context data that determines the pricing of a variant. Refer to [Product](https://shopify.dev/docs/api/admin-graphql/latest/queries/product?example=Get+the+price+range+for+a+product+for+buyers+from+Canada)for +more information on how to use this input object. +""" +input ContextualPricingContext { + """The country code used to fetch country-specific prices.""" + country: CountryCode + + """The CompanyLocation ID used to fetch company location specific prices.""" + companyLocationId: ID + + """The Location ID used to fetch location specific prices.""" + locationId: ID +} + +"""The context data that determines the publication status of a product.""" +input ContextualPublicationContext { + """The country code used to fetch country-specific publication.""" + country: CountryCode + + """The company location ID used to fetch company-specific publication.""" + companyLocationId: ID + + """The Location ID used to fetch the publication status of a product.""" + locationId: ID +} + +"""A shop's banner settings.""" +type CookieBanner implements HasPublishedTranslations { + """Indicates if the banner is auto managed.""" + autoManaged: Boolean! + + """Indicates if the banner is enabled.""" + enabled: Boolean! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +"""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 exactly the value. A write may not be reflected instantaneously. + """ + EXACT + + """The count is at least the value. A limit was imposed and reached.""" + AT_LEAST +} + +""" +The list of all the countries from the combined shipping zones for the shop. +""" +type CountriesInShippingZones { + """The list of all the countries from all the combined shipping zones.""" + countryCodes: [CountryCode!]! + + """Whether 'Rest of World' has been defined in any of the shipping zones.""" + includeRestOfWorld: Boolean! +} + +""" +The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. +If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision +of another country. For example, the territories associated with Spain are represented by the country code `ES`, +and the territories associated with the United States of America are represented by the country code `US`. +""" +enum CountryCode { + """Afghanistan.""" + AF + + """Åland Islands.""" + AX + + """Albania.""" + AL + + """Algeria.""" + DZ + + """Andorra.""" + AD + + """Angola.""" + AO + + """Anguilla.""" + AI + + """Antigua & Barbuda.""" + AG + + """Argentina.""" + AR + + """Armenia.""" + AM + + """Aruba.""" + AW + + """Ascension Island.""" + AC + + """Australia.""" + AU + + """Austria.""" + AT + + """Azerbaijan.""" + AZ + + """Bahamas.""" + BS + + """Bahrain.""" + BH + + """Bangladesh.""" + BD + + """Barbados.""" + BB + + """Belarus.""" + BY + + """Belgium.""" + BE + + """Belize.""" + BZ + + """Benin.""" + BJ + + """Bermuda.""" + BM + + """Bhutan.""" + BT + + """Bolivia.""" + BO + + """Bosnia & Herzegovina.""" + BA + + """Botswana.""" + BW + + """Bouvet Island.""" + BV + + """Brazil.""" + BR + + """British Indian Ocean Territory.""" + IO + + """Brunei.""" + BN + + """Bulgaria.""" + BG + + """Burkina Faso.""" + BF + + """Burundi.""" + BI + + """Cambodia.""" + KH + + """Canada.""" + CA + + """Cape Verde.""" + CV + + """Caribbean Netherlands.""" + BQ + + """Cayman Islands.""" + KY + + """Central African Republic.""" + CF + + """Chad.""" + TD + + """Chile.""" + CL + + """China.""" + CN + + """Christmas Island.""" + CX + + """Cocos (Keeling) Islands.""" + CC + + """Colombia.""" + CO + + """Comoros.""" + KM + + """Congo - Brazzaville.""" + CG + + """Congo - Kinshasa.""" + CD + + """Cook Islands.""" + CK + + """Costa Rica.""" + CR + + """Croatia.""" + HR + + """Cuba.""" + CU + + """Curaçao.""" + CW + + """Cyprus.""" + CY + + """Czechia.""" + CZ + + """Côte d’Ivoire.""" + CI + + """Denmark.""" + DK + + """Djibouti.""" + DJ + + """Dominica.""" + DM + + """Dominican Republic.""" + DO + + """Ecuador.""" + EC + + """Egypt.""" + EG + + """El Salvador.""" + SV + + """Equatorial Guinea.""" + GQ + + """Eritrea.""" + ER + + """Estonia.""" + EE + + """Eswatini.""" + SZ + + """Ethiopia.""" + ET + + """Falkland Islands.""" + FK + + """Faroe Islands.""" + FO + + """Fiji.""" + FJ + + """Finland.""" + FI + + """France.""" + FR + + """French Guiana.""" + GF + + """French Polynesia.""" + PF + + """French Southern Territories.""" + TF + + """Gabon.""" + GA + + """Gambia.""" + GM + + """Georgia.""" + GE + + """Germany.""" + DE + + """Ghana.""" + GH + + """Gibraltar.""" + GI + + """Greece.""" + GR + + """Greenland.""" + GL + + """Grenada.""" + GD + + """Guadeloupe.""" + GP + + """Guatemala.""" + GT + + """Guernsey.""" + GG + + """Guinea.""" + GN + + """Guinea-Bissau.""" + GW + + """Guyana.""" + GY + + """Haiti.""" + HT + + """Heard & McDonald Islands.""" + HM + + """Vatican City.""" + VA + + """Honduras.""" + HN + + """Hong Kong SAR.""" + HK + + """Hungary.""" + HU + + """Iceland.""" + IS + + """India.""" + IN + + """Indonesia.""" + ID + + """Iran.""" + IR + + """Iraq.""" + IQ + + """Ireland.""" + IE + + """Isle of Man.""" + IM + + """Israel.""" + IL + + """Italy.""" + IT + + """Jamaica.""" + JM + + """Japan.""" + JP + + """Jersey.""" + JE + + """Jordan.""" + JO + + """Kazakhstan.""" + KZ + + """Kenya.""" + KE + + """Kiribati.""" + KI + + """North Korea.""" + KP + + """Kosovo.""" + XK + + """Kuwait.""" + KW + + """Kyrgyzstan.""" + KG + + """Laos.""" + LA + + """Latvia.""" + LV + + """Lebanon.""" + LB + + """Lesotho.""" + LS + + """Liberia.""" + LR + + """Libya.""" + LY + + """Liechtenstein.""" + LI + + """Lithuania.""" + LT + + """Luxembourg.""" + LU + + """Macao SAR.""" + MO + + """Madagascar.""" + MG + + """Malawi.""" + MW + + """Malaysia.""" + MY + + """Maldives.""" + MV + + """Mali.""" + ML + + """Malta.""" + MT + + """Martinique.""" + MQ + + """Mauritania.""" + MR + + """Mauritius.""" + MU + + """Mayotte.""" + YT + + """Mexico.""" + MX + + """Moldova.""" + MD + + """Monaco.""" + MC + + """Mongolia.""" + MN + + """Montenegro.""" + ME + + """Montserrat.""" + MS + + """Morocco.""" + MA + + """Mozambique.""" + MZ + + """Myanmar (Burma).""" + MM + + """Namibia.""" + NA + + """Nauru.""" + NR + + """Nepal.""" + NP + + """Netherlands.""" + NL + + """Netherlands Antilles.""" + AN + + """New Caledonia.""" + NC + + """New Zealand.""" + NZ + + """Nicaragua.""" + NI + + """Niger.""" + NE + + """Nigeria.""" + NG + + """Niue.""" + NU + + """Norfolk Island.""" + NF + + """North Macedonia.""" + MK + + """Norway.""" + NO + + """Oman.""" + OM + + """Pakistan.""" + PK + + """Palestinian Territories.""" + PS + + """Panama.""" + PA + + """Papua New Guinea.""" + PG + + """Paraguay.""" + PY + + """Peru.""" + PE + + """Philippines.""" + PH + + """Pitcairn Islands.""" + PN + + """Poland.""" + PL + + """Portugal.""" + PT + + """Qatar.""" + QA + + """Cameroon.""" + CM + + """Réunion.""" + RE + + """Romania.""" + RO + + """Russia.""" + RU + + """Rwanda.""" + RW + + """St. Barthélemy.""" + BL + + """St. Helena.""" + SH + + """St. Kitts & Nevis.""" + KN + + """St. Lucia.""" + LC + + """St. Martin.""" + MF + + """St. Pierre & Miquelon.""" + PM + + """Samoa.""" + WS + + """San Marino.""" + SM + + """São Tomé & Príncipe.""" + ST + + """Saudi Arabia.""" + SA + + """Senegal.""" + SN + + """Serbia.""" + RS + + """Seychelles.""" + SC + + """Sierra Leone.""" + SL + + """Singapore.""" + SG + + """Sint Maarten.""" + SX + + """Slovakia.""" + SK + + """Slovenia.""" + SI + + """Solomon Islands.""" + SB + + """Somalia.""" + SO + + """South Africa.""" + ZA + + """South Georgia & South Sandwich Islands.""" + GS + + """South Korea.""" + KR + + """South Sudan.""" + SS + + """Spain.""" + ES + + """Sri Lanka.""" + LK + + """St. Vincent & Grenadines.""" + VC + + """Sudan.""" + SD + + """Suriname.""" + SR + + """Svalbard & Jan Mayen.""" + SJ + + """Sweden.""" + SE + + """Switzerland.""" + CH + + """Syria.""" + SY + + """Taiwan.""" + TW + + """Tajikistan.""" + TJ + + """Tanzania.""" + TZ + + """Thailand.""" + TH + + """Timor-Leste.""" + TL + + """Togo.""" + TG + + """Tokelau.""" + TK + + """Tonga.""" + TO + + """Trinidad & Tobago.""" + TT + + """Tristan da Cunha.""" + TA + + """Tunisia.""" + TN + + """Türkiye.""" + TR + + """Turkmenistan.""" + TM + + """Turks & Caicos Islands.""" + TC + + """Tuvalu.""" + TV + + """Uganda.""" + UG + + """Ukraine.""" + UA + + """United Arab Emirates.""" + AE + + """United Kingdom.""" + GB + + """United States.""" + US + + """U.S. Outlying Islands.""" + UM + + """Uruguay.""" + UY + + """Uzbekistan.""" + UZ + + """Vanuatu.""" + VU + + """Venezuela.""" + VE + + """Vietnam.""" + VN + + """British Virgin Islands.""" + VG + + """Wallis & Futuna.""" + WF + + """Western Sahara.""" + EH + + """Yemen.""" + YE + + """Zambia.""" + ZM + + """Zimbabwe.""" + ZW + + """Unknown Region.""" + ZZ +} + +""" +The country-specific harmonized system code and ISO country code for an inventory item. +""" +type CountryHarmonizedSystemCode { + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code. + """ + countryCode: CountryCode! + + """ + The country-specific harmonized system code. These are usually longer than 6 digits. + """ + harmonizedSystemCode: String! +} + +""" +An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes. +""" +type CountryHarmonizedSystemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CountryHarmonizedSystemCodeEdge!]! + + """ + A list of nodes that are contained in CountryHarmonizedSystemCodeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [CountryHarmonizedSystemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination. +""" +type CountryHarmonizedSystemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CountryHarmonizedSystemCodeEdge.""" + node: CountryHarmonizedSystemCode! +} + +"""The input fields required to specify a harmonized system code.""" +input CountryHarmonizedSystemCodeInput { + """Country specific harmonized system code.""" + harmonizedSystemCode: String! + + """ + The ISO 3166-1 alpha-2 country code for the country that issued the specified + harmonized system code. Represents global harmonized system code when set to null. + """ + countryCode: CountryCode +} + +"""The input fields required to create a media object.""" +input CreateMediaInput { + """ + The original source of the media object. This might be an external URL or a staged upload URL. + """ + originalSource: String! + + """The alt text associated with the media.""" + alt: String + + """The media content type.""" + mediaContentType: MediaContentType! +} + +"""The part of the image that should remain after cropping.""" +enum CropRegion { + """Keep the center of the image.""" + CENTER + + """Keep the top of the image.""" + TOP + + """Keep the bottom of the image.""" + BOTTOM + + """Keep the left of the image.""" + LEFT + + """Keep the right of the image.""" + RIGHT +} + +""" +The currency codes that represent the world currencies throughout the Admin API. Currency codes include +[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes, +digital currency codes. +""" +enum CurrencyCode { + """United States Dollars (USD).""" + USD + + """Euro (EUR).""" + EUR + + """United Kingdom Pounds (GBP).""" + GBP + + """Canadian Dollars (CAD).""" + CAD + + """Afghan Afghani (AFN).""" + AFN + + """Albanian Lek (ALL).""" + ALL + + """Algerian Dinar (DZD).""" + DZD + + """Angolan Kwanza (AOA).""" + AOA + + """Argentine Pesos (ARS).""" + ARS + + """Armenian Dram (AMD).""" + AMD + + """Aruban Florin (AWG).""" + AWG + + """Australian Dollars (AUD).""" + AUD + + """Barbadian Dollar (BBD).""" + BBD + + """Azerbaijani Manat (AZN).""" + AZN + + """Bangladesh Taka (BDT).""" + BDT + + """Bahamian Dollar (BSD).""" + BSD + + """Bahraini Dinar (BHD).""" + BHD + + """Burundian Franc (BIF).""" + BIF + + """Belarusian Ruble (BYN).""" + BYN + + """Belize Dollar (BZD).""" + BZD + + """Bermudian Dollar (BMD).""" + BMD + + """Bhutanese Ngultrum (BTN).""" + BTN + + """Bosnia and Herzegovina Convertible Mark (BAM).""" + BAM + + """Brazilian Real (BRL).""" + BRL + + """Bolivian Boliviano (BOB).""" + BOB + + """Botswana Pula (BWP).""" + BWP + + """Brunei Dollar (BND).""" + BND + + """Bulgarian Lev (BGN).""" + BGN + + """Burmese Kyat (MMK).""" + MMK + + """Cambodian Riel.""" + KHR + + """Cape Verdean escudo (CVE).""" + CVE + + """Cayman Dollars (KYD).""" + KYD + + """Central African CFA Franc (XAF).""" + XAF + + """Chilean Peso (CLP).""" + CLP + + """Chinese Yuan Renminbi (CNY).""" + CNY + + """Colombian Peso (COP).""" + COP + + """Comorian Franc (KMF).""" + KMF + + """Congolese franc (CDF).""" + CDF + + """Costa Rican Colones (CRC).""" + CRC + + """Croatian Kuna (HRK).""" + HRK + + """Czech Koruny (CZK).""" + CZK + + """Danish Kroner (DKK).""" + DKK + + """Djiboutian Franc (DJF).""" + DJF + + """Dominican Peso (DOP).""" + DOP + + """East Caribbean Dollar (XCD).""" + XCD + + """Egyptian Pound (EGP).""" + EGP + + """Eritrean Nakfa (ERN).""" + ERN + + """Ethiopian Birr (ETB).""" + ETB + + """Falkland Islands Pounds (FKP).""" + FKP + + """CFP Franc (XPF).""" + XPF + + """Fijian Dollars (FJD).""" + FJD + + """Gibraltar Pounds (GIP).""" + GIP + + """Gambian Dalasi (GMD).""" + GMD + + """Ghanaian Cedi (GHS).""" + GHS + + """Guatemalan Quetzal (GTQ).""" + GTQ + + """Guyanese Dollar (GYD).""" + GYD + + """Georgian Lari (GEL).""" + GEL + + """Guinean Franc (GNF).""" + GNF + + """Haitian Gourde (HTG).""" + HTG + + """Honduran Lempira (HNL).""" + HNL + + """Hong Kong Dollars (HKD).""" + HKD + + """Hungarian Forint (HUF).""" + HUF + + """Icelandic Kronur (ISK).""" + ISK + + """Indian Rupees (INR).""" + INR + + """Indonesian Rupiah (IDR).""" + IDR + + """Israeli New Shekel (NIS).""" + ILS + + """Iranian Rial (IRR).""" + IRR + + """Iraqi Dinar (IQD).""" + IQD + + """Jamaican Dollars (JMD).""" + JMD + + """Japanese Yen (JPY).""" + JPY + + """Jersey Pound.""" + JEP + + """Jordanian Dinar (JOD).""" + JOD + + """Kazakhstani Tenge (KZT).""" + KZT + + """Kenyan Shilling (KES).""" + KES + + """Kiribati Dollar (KID).""" + KID + + """Kuwaiti Dinar (KWD).""" + KWD + + """Kyrgyzstani Som (KGS).""" + KGS + + """Laotian Kip (LAK).""" + LAK + + """Latvian Lati (LVL).""" + LVL + + """Lebanese Pounds (LBP).""" + LBP + + """Lesotho Loti (LSL).""" + LSL + + """Liberian Dollar (LRD).""" + LRD + + """Libyan Dinar (LYD).""" + LYD + + """Lithuanian Litai (LTL).""" + LTL + + """Malagasy Ariary (MGA).""" + MGA + + """Macedonia Denar (MKD).""" + MKD + + """Macanese Pataca (MOP).""" + MOP + + """Malawian Kwacha (MWK).""" + MWK + + """Maldivian Rufiyaa (MVR).""" + MVR + + """Mauritanian Ouguiya (MRU).""" + MRU + + """Mexican Pesos (MXN).""" + MXN + + """Malaysian Ringgits (MYR).""" + MYR + + """Mauritian Rupee (MUR).""" + MUR + + """Moldovan Leu (MDL).""" + MDL + + """Moroccan Dirham.""" + MAD + + """Mongolian Tugrik.""" + MNT + + """Mozambican Metical.""" + MZN + + """Namibian Dollar.""" + NAD + + """Nepalese Rupee (NPR).""" + NPR + + """Netherlands Antillean Guilder.""" + ANG + + """New Zealand Dollars (NZD).""" + NZD + + """Nicaraguan Córdoba (NIO).""" + NIO + + """Nigerian Naira (NGN).""" + NGN + + """Norwegian Kroner (NOK).""" + NOK + + """Omani Rial (OMR).""" + OMR + + """Panamian Balboa (PAB).""" + PAB + + """Pakistani Rupee (PKR).""" + PKR + + """Papua New Guinean Kina (PGK).""" + PGK + + """Paraguayan Guarani (PYG).""" + PYG + + """Peruvian Nuevo Sol (PEN).""" + PEN + + """Philippine Peso (PHP).""" + PHP + + """Polish Zlotych (PLN).""" + PLN + + """Qatari Rial (QAR).""" + QAR + + """Romanian Lei (RON).""" + RON + + """Russian Rubles (RUB).""" + RUB + + """Rwandan Franc (RWF).""" + RWF + + """Samoan Tala (WST).""" + WST + + """Saint Helena Pounds (SHP).""" + SHP + + """Saudi Riyal (SAR).""" + SAR + + """Serbian dinar (RSD).""" + RSD + + """Seychellois Rupee (SCR).""" + SCR + + """Sierra Leonean Leone (SLL).""" + SLL + + """Singapore Dollars (SGD).""" + SGD + + """Sudanese Pound (SDG).""" + SDG + + """Somali Shilling (SOS).""" + SOS + + """Syrian Pound (SYP).""" + SYP + + """South African Rand (ZAR).""" + ZAR + + """South Korean Won (KRW).""" + KRW + + """South Sudanese Pound (SSP).""" + SSP + + """Solomon Islands Dollar (SBD).""" + SBD + + """Sri Lankan Rupees (LKR).""" + LKR + + """Surinamese Dollar (SRD).""" + SRD + + """Swazi Lilangeni (SZL).""" + SZL + + """Swedish Kronor (SEK).""" + SEK + + """Swiss Francs (CHF).""" + CHF + + """Taiwan Dollars (TWD).""" + TWD + + """Thai baht (THB).""" + THB + + """Tajikistani Somoni (TJS).""" + TJS + + """Tanzanian Shilling (TZS).""" + TZS + + """Tongan Pa'anga (TOP).""" + TOP + + """Trinidad and Tobago Dollars (TTD).""" + TTD + + """Tunisian Dinar (TND).""" + TND + + """Turkish Lira (TRY).""" + TRY + + """Turkmenistani Manat (TMT).""" + TMT + + """Ugandan Shilling (UGX).""" + UGX + + """Ukrainian Hryvnia (UAH).""" + UAH + + """United Arab Emirates Dirham (AED).""" + AED + + """Uruguayan Pesos (UYU).""" + UYU + + """Uzbekistan som (UZS).""" + UZS + + """Vanuatu Vatu (VUV).""" + VUV + + """Venezuelan Bolivares Soberanos (VES).""" + VES + + """Vietnamese đồng (VND).""" + VND + + """West African CFA franc (XOF).""" + XOF + + """Yemeni Rial (YER).""" + YER + + """Zambian Kwacha (ZMW).""" + ZMW + + """United States Dollars Coin (USDC).""" + USDC + + """Belarusian Ruble (BYR).""" + BYR @deprecated(reason: "Use `BYN` instead.") + + """Sao Tome And Principe Dobra (STD).""" + STD @deprecated(reason: "Use `STN` instead.") + + """Sao Tome And Principe Dobra (STN).""" + STN + + """Venezuelan Bolivares (VED).""" + VED + + """Venezuelan Bolivares (VEF).""" + VEF @deprecated(reason: "Use `VES` instead.") + + """Unrecognized currency.""" + XXX +} + +""" +Represents a currency exchange adjustment applied to an order transaction. +""" +type CurrencyExchangeAdjustment implements Node { + """The adjustment amount in both shop and presentment currencies.""" + adjustment: MoneyV2! + + """ + The final amount in both shop and presentment currencies after the adjustment. + """ + finalAmountSet: MoneyV2! + + """A globally-unique ID.""" + id: ID! + + """ + The original amount in both shop and presentment currencies before the adjustment. + """ + originalAmountSet: MoneyV2! +} + +""" +Currency formats configured for the merchant. These formats are available to use within Liquid. +""" +type CurrencyFormats { + """Money without currency in HTML.""" + moneyFormat: FormattedString! + + """Money without currency in emails.""" + moneyInEmailsFormat: String! + + """Money with currency in HTML.""" + moneyWithCurrencyFormat: FormattedString! + + """Money with currency in emails.""" + moneyWithCurrencyInEmailsFormat: String! +} + +"""A setting for a presentment currency.""" +type CurrencySetting { + """The currency's ISO code.""" + currencyCode: CurrencyCode! + + """The full name of the currency.""" + currencyName: String! + + """ + Whether the currency is enabled or not. An enabled currency setting is visible + to buyers and allows orders to be generated with that currency as presentment. + """ + enabled: Boolean! + + """ + The manual rate, if enabled, that applies to this currency when converting + from shop currency. This rate is specific to the associated market's currency setting. + """ + manualRate: Decimal + + """ + The date and time when the active exchange rate for the currency was last + modified. It can be the automatic rate's creation date, or the manual rate's + last updated at date if active. + """ + rateUpdatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple CurrencySettings. +""" +type CurrencySettingConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CurrencySettingEdge!]! + + """ + A list of nodes that are contained in CurrencySettingEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CurrencySetting!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CurrencySetting and a cursor during pagination. +""" +type CurrencySettingEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CurrencySettingEdge.""" + node: CurrencySetting! +} + +""" +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 addresses associated with the customer.""" + addressesV2( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MailingAddressConnection! + + """ + The total amount that the customer has spent on orders in their lifetime. + """ + amountSpent: MoneyV2! + + """ + Whether the merchant can delete the customer from their store. + + A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an + order, they can't be deleted from a store. + """ + canDelete: Boolean! + + """A list of the customer's company contact profiles.""" + companyContactProfiles: [CompanyContact!]! + + """The date and time when the customer was added to the store.""" + createdAt: DateTime! + + """Whether the customer has opted out of having their data sold.""" + dataSaleOptOut: Boolean! + + """The default address associated with the customer.""" + defaultAddress: MailingAddress + + """The customer's default email address.""" + defaultEmailAddress: CustomerEmailAddress + + """The customer's default phone number.""" + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the customer, based on the values for first_name and last_name. If the first_name and + last_name are not available, then this falls back to the customer's email + address, and if that is not available, the customer's phone number. + """ + displayName: String! + + """The customer's email address.""" + email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") + + """ + The current email marketing state for the customer. + If the customer doesn't have an email address, then this property is `null`. + """ + emailMarketingConsent: CustomerEmailMarketingConsentState @deprecated(reason: "Use `defaultEmailAddress.marketingState`, `defaultEmailAddress.marketingOptInLevel`, `defaultEmailAddress.marketingUpdatedAt`, and `defaultEmailAddress.sourceLocation` instead.") + + """A list of events associated with the customer.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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! + + """The customer's last name.""" + lastName: String + + """The customer's last order.""" + lastOrder: Order + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """ + The amount of time since the customer was first added to the store. + + Example: 'about 12 years'. + """ + lifetimeDuration: String! + + """The customer's locale.""" + locale: String! + + """The market that includes the customer’s default address.""" + market: Market @deprecated(reason: "This `market` field will be removed in a future version of the API.") + + """Whether the customer can be merged with another customer.""" + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A unique identifier for the customer that's used with Multipass login.""" + multipassIdentifier: String + + """A note about the customer.""" + note: String + + """ + The number of orders that the customer has made at the store in their lifetime. + """ + numberOfOrders: UnsignedInt64! + + """A list of the customer's orders.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): OrderConnection! + + """A list of the customer's payment methods.""" + paymentMethods( + """Whether to show the customer's revoked payment method.""" + showRevoked: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CustomerPaymentMethodConnection! + + """The customer's phone number.""" + phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") + + """ + Possible subscriber states of a customer defined by their subscription contracts. + """ + productSubscriberStatus: CustomerProductSubscriberStatus! + + """ + The current SMS marketing state for the customer's phone number. + + If the customer does not have a phone number, then this property is `null`. + """ + smsMarketingConsent: CustomerSmsMarketingConsentState @deprecated(reason: "Use `defaultPhoneNumber.marketingState`, `defaultPhoneNumber.marketingOptInLevel`, `defaultPhoneNumber.marketingUpdatedAt`, `defaultPhoneNumber.marketingCollectedFrom`, and `defaultPhoneNumber.sourceLocation` instead.") + + """ + The state of the customer's account with the shop. + + Please note that this only meaningful when Classic Customer Accounts is active. + """ + state: CustomerState! + + """The statistics for a given customer.""" + statistics: CustomerStatistics! + + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionContractConnection! + + """A comma separated list of tags that have been added to the customer.""" + tags: [String!]! + + """ + Whether the customer is exempt from being charged taxes on their orders. + """ + taxExempt: Boolean! + + """The list of tax exemptions applied to the customer.""" + taxExemptions: [TaxExemption!]! + + """The URL to unsubscribe the customer from the mailing list.""" + unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") + + """The date and time when the customer was last updated.""" + updatedAt: DateTime! + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly and + belongs to an existing domain. This doesn't guarantee that + the email address actually exists. + """ + validEmailAddress: Boolean! @deprecated(reason: "Use `defaultEmailAddress.validFormat` instead.") + + """ + Whether the customer has verified their email address. Defaults to `true` if + the customer is created through the Shopify admin or API. + """ + verifiedEmail: Boolean! +} + +"""An app extension page for the customer account navigation menu.""" +type CustomerAccountAppExtensionPage implements CustomerAccountPage & Navigable & Node { + """The UUID of the app extension.""" + appExtensionUuid: String + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """A unique, human-friendly string for the customer account page.""" + handle: String! + + """The unique ID for the customer account page.""" + id: ID! + + """The title of the customer account page.""" + title: String! +} + +"""A native page for the customer account navigation menu.""" +type CustomerAccountNativePage implements CustomerAccountPage & Navigable & Node { + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """A unique, human-friendly string for the customer account page.""" + handle: String! + + """The unique ID for the customer account page.""" + id: ID! + + """The type of customer account native page.""" + pageType: CustomerAccountNativePagePageType! + + """The title of the customer account page.""" + title: String! +} + +"""The type of customer account native page.""" +enum CustomerAccountNativePagePageType { + """An orders page type.""" + NATIVE_ORDERS + + """A settings page type.""" + NATIVE_SETTINGS + + """A profile page type.""" + NATIVE_PROFILE + + """ + An unknown page type. Represents new page types that may be added in future versions. + """ + UNKNOWN +} + +"""A customer account page.""" +interface CustomerAccountPage { + """ + 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 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 `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!]! +} + +"""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 by Shopify.""" + SHOPIFY + + """The customer consent was collected outside of Shopify.""" + OTHER +} + +"""Return type for `customerCreate` mutation.""" +type CustomerCreatePayload { + """The created customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Represents a card instrument for customer payment method.""" +type CustomerCreditCard { + """The billing address of the card.""" + billingAddress: CustomerCreditCardBillingAddress + + """The brand of the card.""" + brand: String! + + """Whether the card is about to expire.""" + expiresSoon: Boolean! + + """The expiry month of the card.""" + expiryMonth: Int! + + """The expiry year of the card.""" + expiryYear: Int! + + """The card's BIN number.""" + firstDigits: String + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """The last 4 digits of the card.""" + lastDigits: String! + + """The masked card number with only the last 4 digits displayed.""" + maskedNumber: String! + + """The name of the card holder.""" + name: String! + + """The source of the card if coming from a wallet such as Apple Pay.""" + source: String + + """The last 4 digits of the Device Account Number.""" + virtualLastDigits: String +} + +"""The billing address of a credit card payment instrument.""" +type CustomerCreditCardBillingAddress { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """The name of the city, district, village, or town.""" + city: String + + """The name of the country.""" + country: String + + """ + The two-letter code for the country of the address. + For example, US. + """ + countryCode: CountryCode + + """The first name in the billing address.""" + firstName: String + + """The last name in the billing address.""" + lastName: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """ + The alphanumeric code for the region. + For example, ON. + """ + provinceCode: String + + """The zip or postal code of the address.""" + zip: String +} + +"""The input fields to delete a customer.""" +input CustomerDeleteInput { + """The ID of the customer to delete.""" + id: ID! +} + +"""Return type for `customerDelete` mutation.""" +type CustomerDeletePayload { + """The ID of the deleted customer.""" + deletedCustomerId: ID + + """The shop of the deleted customer.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Customer and a cursor during pagination. +""" +type CustomerEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CustomerEdge.""" + node: Customer! +} + +"""Represents an email address.""" +type CustomerEmailAddress { + """The customer's default email address.""" + emailAddress: String! + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + received when the marketing consent was updated. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """Whether the customer has subscribed to email marketing.""" + marketingState: CustomerEmailAddressMarketingState! + + """The URL to unsubscribe a member from all mailing lists.""" + marketingUnsubscribeUrl: URL! + + """ + The date and time at which the marketing consent was updated. + + No date is provided if the email address never updated its marketing consent. + """ + marketingUpdatedAt: DateTime + + """ + Whether the customer has opted in to having their opened emails tracked. + """ + openTrackingLevel: CustomerEmailAddressOpenTrackingLevel! + + """ + The URL that can be used to opt a customer in or out of email open tracking. + """ + openTrackingUrl: URL! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location + + """ + Whether the email address is formatted correctly. + + Returns `true` when the email is formatted correctly. This doesn't guarantee that the email address + actually exists. + """ + validFormat: Boolean! +} + +"""Possible marketing states for the customer’s email address.""" +enum CustomerEmailAddressMarketingState { + """The customer’s email address marketing state is invalid.""" + INVALID + + """The customer is not subscribed to email marketing.""" + NOT_SUBSCRIBED + + """The customer is in the process of subscribing to email marketing.""" + PENDING + + """The customer is subscribed to email marketing.""" + SUBSCRIBED + + """ + The customer is not subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +The different levels related to whether a customer has opted in to having their opened emails tracked. +""" +enum CustomerEmailAddressOpenTrackingLevel { + """ + The customer has not specified whether they want to opt in or out of having their open emails tracked. + """ + UNKNOWN + + """The customer has opted in to having their open emails tracked.""" + OPTED_IN + + """The customer has opted out of having their open emails tracked.""" + OPTED_OUT +} + +""" +Information that describes when a customer consented to + receiving marketing material by email. +""" +input CustomerEmailMarketingConsentInput { + """ + The customer opt-in level at the time of subscribing to marketing material. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """ + The 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 latest date and time when the customer consented or objected to + receiving marketing material by email. + """ + consentUpdatedAt: DateTime + + """ + Identifies the location where the customer consented to receiving marketing material by email. + """ + sourceLocationId: ID +} + +""" +The record of when a customer consented to receive marketing material by email. +""" +type CustomerEmailMarketingConsentState { + """ + The date and time at which the customer consented to receive marketing material by email. + The customer's consent state reflects the consent record with the most recent `consent_updated_at` date. + If no date is provided, then the date and time at which the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, + that the customer gave when they consented to receive marketing material by email. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """The current email marketing state for the customer.""" + marketingState: CustomerEmailMarketingState! + + """ + The location where the customer consented to receive marketing material by email. + """ + sourceLocation: Location +} + +""" +The input fields for the email consent information to update for a given customer ID. +""" +input CustomerEmailMarketingConsentUpdateInput { + """ + The ID of the customer for which to update the email marketing consent + information. The customer must have a unique email address associated to the + record. If not, add the email address using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by email. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput! +} + +"""Return type for `customerEmailMarketingConsentUpdate` mutation.""" +type CustomerEmailMarketingConsentUpdatePayload { + """The updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerEmailMarketingConsentUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CustomerEmailMarketingConsentUpdate`. +""" +type CustomerEmailMarketingConsentUpdateUserError implements DisplayableError { + """The error code.""" + code: CustomerEmailMarketingConsentUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerEmailMarketingConsentUpdateUserError`. +""" +enum CustomerEmailMarketingConsentUpdateUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value isn't included in the list.""" + INCLUSION + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Missing a required argument.""" + MISSING_ARGUMENT +} + +"""The possible email marketing states for a customer.""" +enum CustomerEmailMarketingState { + """The customer isn't 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 isn't currently subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED + + """ + The customer's personal data is erased. This value is internally-set and read-only. + """ + REDACTED + + """The customer’s email address marketing state is invalid.""" + INVALID +} + +"""Return type for `customerGenerateAccountActivationUrl` mutation.""" +type CustomerGenerateAccountActivationUrlPayload { + """The generated account activation URL.""" + accountActivationUrl: URL + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for identifying a customer.""" +input CustomerIdentifierInput { + """The ID of the customer.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the customer. + """ + customId: UniqueMetafieldValueInput + + """The email address of the customer.""" + emailAddress: String + + """The phone number of the customer.""" + phoneNumber: String +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerInput { + """The addresses for a customer.""" + addresses: [MailingAddressInput!] + + """The unique email address of the customer.""" + email: String + + """The customer's first name.""" + firstName: String + + """The ID of the customer to update.""" + id: ID + + """The customer's last name.""" + lastName: String + + """The customer's locale.""" + locale: String + + """Additional metafields to associate to the customer.""" + metafields: [MetafieldInput!] + + """A note about the customer.""" + note: String + + """The unique phone number for the customer.""" + phone: String + + """ + A list of tags to associate with the customer. Can be an array or a + comma-separated list. Example values: `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"` + + Updating `tags` overwrites any existing tags that were previously added to the + customer. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + Information that describes when the customer consented to receiving marketing + material by email. The `email` field is required when creating a customer with email marketing + consent information. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput + + """ + The marketing consent information when the customer consented to receiving marketing + material by SMS. The `phone` field is required when creating a customer with SMS + marketing consent information. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput + + """Whether the customer is exempt from paying taxes on their order.""" + taxExempt: Boolean + + """The list of tax exemptions to apply to the customer.""" + taxExemptions: [TaxExemption!] + + """A unique identifier for the customer that's used with Multipass login.""" + multipassIdentifier: String +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CustomerMomentConnection + + """ + The total number of customer moments associated with this order. Returns null + if the order is still in the process of being attributed. + """ + momentsCount: Count + + """Whether the attributed sessions for the order have been created yet.""" + ready: Boolean! +} + +""" +The possible values for the marketing subscription opt-in level enabled at the +time the customer consented to receive marketing information. + +The levels are defined by [the M3AAWG best practices guideline + document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf). +""" +enum CustomerMarketingOptInLevel { + """ + After providing their information, the customer receives marketing information without any + intermediate steps. + """ + SINGLE_OPT_IN + + """ + After providing their information, the customer receives a confirmation and is required to + perform a intermediate step before receiving marketing information. + """ + CONFIRMED_OPT_IN + + """ + The customer receives marketing information but how they were opted in is unknown. + """ + UNKNOWN +} + +""" +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 +} + +"""The error blocking a customer merge.""" +type CustomerMergeError { + """The list of fields preventing the customer from being merged.""" + errorFields: [CustomerMergeErrorFieldType!]! + + """The customer merge error message.""" + message: String! +} + +"""Possible error codes that can be returned by `CustomerMergeUserError`.""" +enum CustomerMergeErrorCode { + """An internal error occurred.""" + INTERNAL_ERROR + + """The customer cannot be merged.""" + INVALID_CUSTOMER + + """The customer ID is invalid.""" + INVALID_CUSTOMER_ID + + """The customer cannot be merged because it has associated gift cards.""" + CUSTOMER_HAS_GIFT_CARDS + + """The customer is missing the attribute requested for override.""" + MISSING_OVERRIDE_ATTRIBUTE + + """The override attribute is invalid.""" + OVERRIDE_ATTRIBUTE_INVALID +} + +""" +The types of the hard blockers preventing a customer from being merged to another customer. +""" +enum CustomerMergeErrorFieldType { + """The customer does not exist.""" + DELETED_AT + + """The customer has a pending or completed redaction.""" + REDACTED_AT + + """The customer has a subscription history.""" + SUBSCRIPTIONS + + """The customer has a merge in progress.""" + MERGE_IN_PROGRESS + + """The customer has gift cards.""" + GIFT_CARDS + + """The override fields are invalid.""" + OVERRIDE_FIELDS + + """The customer has store credit.""" + STORE_CREDIT + + """The customer is a company contact.""" + COMPANY_CONTACT + + """The customer has payment methods.""" + CUSTOMER_PAYMENT_METHODS + + """The customer has a pending data request.""" + PENDING_DATA_REQUEST + + """The customer has a multipass identifier.""" + MULTIPASS_IDENTIFIER +} + +"""The input fields to override default customer merge rules.""" +input CustomerMergeOverrideFields { + """The ID of the customer whose first name will be kept.""" + customerIdOfFirstNameToKeep: ID + + """The ID of the customer whose last name will be kept.""" + customerIdOfLastNameToKeep: ID + + """The ID of the customer whose email will be kept.""" + customerIdOfEmailToKeep: ID + + """The ID of the customer whose phone number will be kept.""" + customerIdOfPhoneNumberToKeep: ID + + """The ID of the customer whose default address will be kept.""" + customerIdOfDefaultAddressToKeep: ID + + """The note to keep.""" + note: String + + """The tags to keep.""" + tags: [String!] +} + +"""Return type for `customerMerge` mutation.""" +type CustomerMergePayload { + """The asynchronous job for merging the customers.""" + job: Job + + """The ID of the customer 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MailingAddressConnection! + + """The default address resulting from a customer merge.""" + defaultAddress: MailingAddress + + """ + The total number of customer-specific discounts resulting from a customer merge. + """ + discountNodeCount: UnsignedInt64! + + """ + The merged customer-specific discounts resulting from a customer merge. + """ + discountNodes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountSortKeys = CREATED_AT + ): DiscountNodeConnection! + + """ + The full name of the customer, based on the values for `first_name` and + `last_name`. If `first_name` and `last_name` aren't available, then this field + falls back to the customer's email address. If the customer's email isn't + available, then this field falls back to the customer's phone number. + """ + displayName: String! + + """The total number of merged draft orders.""" + draftOrderCount: UnsignedInt64! + + """The merged draft orders resulting from a customer merge.""" + draftOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = UPDATED_AT + ): DraftOrderConnection! + + """The email state of a customer.""" + email: CustomerEmailAddress + + """The first name resulting from a customer merge.""" + firstName: String + + """The total number of merged gift cards.""" + giftCardCount: UnsignedInt64! + + """The merged gift cards resulting from a customer merge.""" + giftCards( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: GiftCardSortKeys = CREATED_AT + ): GiftCardConnection! + + """The last name resulting from a customer merge.""" + lastName: String + + """The total number of merged metafields.""" + metafieldCount: UnsignedInt64! + + """The merged note resulting from a customer merge.""" + note: String + + """The total number of merged orders.""" + orderCount: UnsignedInt64! + + """The merged orders resulting from a customer merge.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = PROCESSED_AT + ): OrderConnection! + + """The phone number state of a customer.""" + phoneNumber: CustomerPhoneNumber + + """The merged tags resulting from a customer merge.""" + tags: [String!]! +} + +"""A merge request for merging two customers.""" +type CustomerMergeRequest { + """The merge errors that occurred during the customer merge request.""" + customerMergeErrors: [CustomerMergeError!]! + + """The UUID of the merge job.""" + jobId: ID + + """The ID of the customer 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 requested.""" + REQUESTED + + """The customer merge request is currently in progress.""" + IN_PROGRESS + + """The customer merge request has been completed.""" + COMPLETED + + """The customer merge request has failed.""" + FAILED +} + +"""An error that occurs while merging two customers.""" +type CustomerMergeUserError implements DisplayableError { + """The error code.""" + code: CustomerMergeErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +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 mandates associated with the payment method.""" + mandates( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PaymentMandateResourceConnection! + + """The time that the payment method was revoked.""" + revokedAt: DateTime + + """The revocation reason for this payment method.""" + revokedReason: CustomerPaymentMethodRevocationReason + + """List Subscription Contracts.""" + subscriptionContracts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionContractConnection! +} + +""" +An auto-generated type for paginating through multiple CustomerPaymentMethods. +""" +type CustomerPaymentMethodConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CustomerPaymentMethodEdge!]! + + """ + A list of nodes that are contained in CustomerPaymentMethodEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [CustomerPaymentMethod!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Return type for `customerPaymentMethodCreateFromDuplicationData` mutation. +""" +type CustomerPaymentMethodCreateFromDuplicationDataPayload { + """The customer payment method.""" + customerPaymentMethod: CustomerPaymentMethod + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodCreateFromDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodCreateFromDuplicationData`. +""" +type CustomerPaymentMethodCreateFromDuplicationDataUserError implements DisplayableError { + """The error code.""" + code: CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodCreateFromDuplicationDataUserError`. +""" +enum CustomerPaymentMethodCreateFromDuplicationDataUserErrorCode { + """Too many requests.""" + TOO_MANY_REQUESTS + + """Customer doesn't exist.""" + CUSTOMER_DOES_NOT_EXIST + + """Invalid encrypted duplication data.""" + INVALID_ENCRYPTED_DUPLICATION_DATA +} + +"""Return type for `customerPaymentMethodCreditCardCreate` mutation.""" +type CustomerPaymentMethodCreditCardCreatePayload { + """The customer payment method.""" + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerPaymentMethodCreditCardUpdate` mutation.""" +type CustomerPaymentMethodCreditCardUpdatePayload { + """The customer payment method.""" + customerPaymentMethod: CustomerPaymentMethod + + """ + If the card verification result is processing. When this is true, customer_payment_method will be null. + """ + processing: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination. +""" +type CustomerPaymentMethodEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CustomerPaymentMethodEdge.""" + node: CustomerPaymentMethod! +} + +"""Return type for `customerPaymentMethodGetDuplicationData` mutation.""" +type CustomerPaymentMethodGetDuplicationDataPayload { + """The encrypted data from the payment method to be duplicated.""" + encryptedDuplicationData: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodGetDuplicationDataUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetDuplicationData`. +""" +type CustomerPaymentMethodGetDuplicationDataUserError implements DisplayableError { + """The error code.""" + code: CustomerPaymentMethodGetDuplicationDataUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetDuplicationDataUserError`. +""" +enum CustomerPaymentMethodGetDuplicationDataUserErrorCode { + """Payment method doesn't exist.""" + PAYMENT_METHOD_DOES_NOT_EXIST + + """Invalid payment instrument.""" + INVALID_INSTRUMENT + + """Too many requests.""" + TOO_MANY_REQUESTS + + """Customer doesn't exist.""" + CUSTOMER_DOES_NOT_EXIST + + """Target shop cannot be the same as the source.""" + SAME_SHOP + + """Must be targeted to another shop in the same organization.""" + INVALID_ORGANIZATION_SHOP +} + +"""Return type for `customerPaymentMethodGetUpdateUrl` mutation.""" +type CustomerPaymentMethodGetUpdateUrlPayload { + """The URL to redirect the customer to update the payment method.""" + updatePaymentMethodUrl: URL + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodGetUpdateUrlUserError!]! +} + +""" +An error that occurs during the execution of `CustomerPaymentMethodGetUpdateUrl`. +""" +type CustomerPaymentMethodGetUpdateUrlUserError implements DisplayableError { + """The error code.""" + code: CustomerPaymentMethodGetUpdateUrlUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerPaymentMethodGetUpdateUrlUserError`. +""" +enum CustomerPaymentMethodGetUpdateUrlUserErrorCode { + """Payment method doesn't exist.""" + PAYMENT_METHOD_DOES_NOT_EXIST + + """Invalid payment instrument.""" + INVALID_INSTRUMENT + + """Too many requests.""" + TOO_MANY_REQUESTS + + """Customer doesn't exist.""" + CUSTOMER_DOES_NOT_EXIST +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementCreate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementCreatePayload { + """The customer payment method.""" + customerPaymentMethod: CustomerPaymentMethod + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodUserError!]! +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementUpdate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementUpdatePayload { + """The customer payment method.""" + customerPaymentMethod: CustomerPaymentMethod + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodUserError!]! +} + +"""Return type for `customerPaymentMethodRemoteCreate` mutation.""" +type CustomerPaymentMethodRemoteCreatePayload { + """ + The customer payment method. Note that the returned payment method may + initially be in an incomplete state. Developers should poll this payment + method using the customerPaymentMethod query until all required payment + details have been processed. + """ + customerPaymentMethod: CustomerPaymentMethod + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerPaymentMethodRemoteUserError!]! +} + +""" +The input fields for a remote gateway payment method, only one remote reference permitted. +""" +input CustomerPaymentMethodRemoteInput { + """Input containing the fields for a remote stripe credit card.""" + stripePaymentMethod: RemoteStripePaymentMethodInput + + """The input fields for a remote authorize net customer profile.""" + authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput + + """The input fields for a remote Braintree customer profile.""" + braintreePaymentMethod: RemoteBraintreePaymentMethodInput +} + +"""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 { + """The input value is invalid.""" + INVALID + + """The input value needs to be blank.""" + PRESENT + + """The input value is already taken.""" + TAKEN + + """Exactly one remote reference is required.""" + EXACTLY_ONE_REMOTE_REFERENCE_REQUIRED + + """Authorize.net is not enabled for subscriptions.""" + AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """Braintree is not enabled for subscriptions.""" + BRAINTREE_NOT_ENABLED_FOR_SUBSCRIPTIONS +} + +"""The revocation reason types for a customer payment method.""" +enum CustomerPaymentMethodRevocationReason { + """The Authorize.net payment gateway is not enabled.""" + AUTHORIZE_NET_GATEWAY_NOT_ENABLED + + """ + Authorize.net did not return any payment methods. Make sure that the correct Authorize.net account is linked. + """ + AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD + + """The credit card failed to update.""" + FAILED_TO_UPDATE_CREDIT_CARD + + """Failed to contact the Stripe API.""" + STRIPE_API_AUTHENTICATION_ERROR + + """Invalid request. Failed to retrieve payment method from Stripe.""" + STRIPE_API_INVALID_REQUEST_ERROR + + """The Stripe payment gateway is not enabled.""" + STRIPE_GATEWAY_NOT_ENABLED + + """ + Stripe did not return any payment methods. Make sure that the correct Stripe account is linked. + """ + STRIPE_RETURNED_NO_PAYMENT_METHOD + + """The Stripe payment method type should be card.""" + STRIPE_PAYMENT_METHOD_NOT_CARD + + """Failed to contact Braintree API.""" + BRAINTREE_API_AUTHENTICATION_ERROR + + """The Braintree payment gateway is not enabled.""" + BRAINTREE_GATEWAY_NOT_ENABLED + + """ + Braintree returned no payment methods. Make sure the correct Braintree account is linked. + """ + BRAINTREE_RETURNED_NO_PAYMENT_METHOD + + """ + The Braintree payment method type should be a credit card or Apple Pay card. + """ + BRAINTREE_PAYMENT_METHOD_NOT_CARD + + """Verification of payment method failed.""" + PAYMENT_METHOD_VERIFICATION_FAILED + + """ + Verification of the payment method failed due to 3DS not being supported. + """ + THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED + + """The payment method was manually revoked.""" + MANUALLY_REVOKED + + """The billing address failed to retrieve.""" + FAILED_TO_RETRIEVE_BILLING_ADDRESS + + """ + The payment method was replaced with an existing payment method. The + associated contracts have been migrated to the other payment method. + """ + MERGED + + """The customer redacted their payment method.""" + CUSTOMER_REDACTED + + """Too many consecutive failed attempts.""" + TOO_MANY_CONSECUTIVE_FAILURES + + """CVV attempts limit exceeded.""" + CVV_ATTEMPTS_LIMIT_EXCEEDED +} + +"""Return type for `customerPaymentMethodRevoke` mutation.""" +type CustomerPaymentMethodRevokePayload { + """The ID of the revoked customer payment method.""" + revokedCustomerPaymentMethodId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerPaymentMethodSendUpdateEmail` mutation.""" +type CustomerPaymentMethodSendUpdateEmailPayload { + """The customer to whom an update payment method email was sent.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""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 { + """ + 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 in the normal spending range for the shop in the following year. + """ + MEDIUM + + """ + The customer's spending is predicted to be zero, or in the lowest spending range for the shop in the following year. + """ + LOW +} + +""" +The possible product subscription states for a customer, as defined by the customer's subscription contracts. +""" +enum CustomerProductSubscriberStatus { + """The customer has at least one active subscription contract.""" + ACTIVE + + """ + The customer's last subscription contract was cancelled and there are no other active or paused + subscription contracts. + """ + CANCELLED + + """ + The customer's last subscription contract expired and there are no other active or paused + subscription contracts. + """ + EXPIRED + + """ + The customer's last subscription contract failed and there are no other active or paused + subscription contracts. + """ + FAILED + + """The customer has never had a subscription contract.""" + NEVER_SUBSCRIBED + + """ + The customer has at least one paused subscription contract and there are no other active + subscription contracts. + """ + PAUSED +} + +"""Return type for `customerRemoveTaxExemptions` mutation.""" +type CustomerRemoveTaxExemptionsPayload { + """The updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerReplaceTaxExemptions` mutation.""" +type CustomerReplaceTaxExemptionsPayload { + """The updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +Possible error codes that can be returned by `CustomerRequestDataErasureUserError`. +""" +enum CustomerRequestDataErasureErrorCode { + """Customer does not exist.""" + DOES_NOT_EXIST + + """Failed to request customer data erasure.""" + FAILED_TO_REQUEST +} + +"""Return type for `customerRequestDataErasure` mutation.""" +type CustomerRequestDataErasurePayload { + """The ID of the customer that will be erased.""" + customerId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerRequestDataErasureUserError!]! +} + +"""An error that occurs when requesting a customer data erasure.""" +type CustomerRequestDataErasureUserError implements DisplayableError { + """The error code.""" + code: CustomerRequestDataErasureErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""The RFM (Recency, Frequency, Monetary) group for a customer.""" +enum CustomerRfmGroup { + """Customers with very recent purchases, many orders, and the most spend.""" + CHAMPIONS + + """Customers with recent purchases, many orders, and the most spend.""" + LOYAL + + """Customers with recent purchases, some orders, and moderate spend.""" + ACTIVE + + """Customers with very recent purchases, few orders, and low spend.""" + NEW + + """Customers with recent purchases, few orders, and low spend.""" + PROMISING + + """Customers with recent purchases, some orders, and moderate spend.""" + NEEDS_ATTENTION + + """ + Customers without recent purchases, fewer orders, and with lower spend. + """ + ALMOST_LOST + + """ + Customers without recent purchases, but with a very strong history of orders and spend. + """ + PREVIOUSLY_LOYAL + + """ + Customers without recent purchases, but with a strong history of orders and spend. + """ + AT_RISK + + """ + Customers without recent orders, with infrequent orders, and with low spend. + """ + DORMANT + + """Customers with no orders yet.""" + PROSPECTS +} + +"""The set of valid sort keys for the CustomerSavedSearch query.""" +enum CustomerSavedSearchSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `name` value.""" + NAME +} + +"""The member of a segment.""" +type CustomerSegmentMember implements HasMetafields { + """The total amount of money that the member has spent on orders.""" + amountSpent: MoneyV2 + + """The member's default address.""" + defaultAddress: MailingAddress + + """The member's default email address.""" + defaultEmailAddress: CustomerEmailAddress + + """The member's default phone number.""" + defaultPhoneNumber: CustomerPhoneNumber + + """ + The full name of the member, which is based on the values of the `first_name` + and `last_name` fields. If the member's first name and last name aren't + available, then the customer's email address is used. If the customer's email + address isn't available, then the customer's phone number is used. + """ + displayName: String! + + """The member's first name.""" + firstName: String + + """The member’s ID.""" + id: ID! + + """The member's last name.""" + lastName: String + + """The ID of the member's most recent order.""" + lastOrderId: ID + + """Whether the customer can be merged with another customer.""" + mergeable: CustomerMergeable! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A note about the member.""" + note: String + + """The total number of orders that the member has made.""" + numberOfOrders: UnsignedInt64 +} + +"""The connection type for the `CustomerSegmentMembers` object.""" +type CustomerSegmentMemberConnection { + """A list of edges.""" + edges: [CustomerSegmentMemberEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """The statistics for a given segment.""" + statistics: SegmentStatistics! + + """The total number of members in a given segment.""" + totalCount: Int! +} + +""" +An auto-generated type which holds one CustomerSegmentMember and a cursor during pagination. +""" +type CustomerSegmentMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of CustomerSegmentMemberEdge.""" + node: CustomerSegmentMember! +} + +""" +A job to determine a list of members, such as customers, that are associated with an individual segment. +""" +type CustomerSegmentMembersQuery implements JobResult & Node { + """The current total number of members in a given segment.""" + currentCount: Int! + + """This indicates if the job is still queued or has been run.""" + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +"""Return type for `customerSegmentMembersQueryCreate` mutation.""" +type CustomerSegmentMembersQueryCreatePayload { + """The newly created customer segment members query.""" + customerSegmentMembersQuery: CustomerSegmentMembersQuery + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerSegmentMembersQueryUserError!]! +} + +""" +The input fields and values for creating a customer segment members query. +""" +input CustomerSegmentMembersQueryInput { + """The ID of the segment.""" + segmentId: ID + + """ + The query that's used to filter the members. The query is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """Sort the list by a given key.""" + sortKey: String +} + +"""Represents a customer segment members query custom error.""" +type CustomerSegmentMembersQueryUserError implements DisplayableError { + """The error code.""" + code: CustomerSegmentMembersQueryUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSegmentMembersQueryUserError`. +""" +enum CustomerSegmentMembersQueryUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""Return type for `customerSendAccountInviteEmail` mutation.""" +type CustomerSendAccountInviteEmailPayload { + """The customer to whom an account invite email was sent.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerSendAccountInviteEmailUserError!]! +} + +"""Defines errors for customerSendAccountInviteEmail mutation.""" +type CustomerSendAccountInviteEmailUserError implements DisplayableError { + """The error code.""" + code: CustomerSendAccountInviteEmailUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSendAccountInviteEmailUserError`. +""" +enum CustomerSendAccountInviteEmailUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""The input fields required to identify a customer.""" +input CustomerSetIdentifiers { + """ID of customer to update.""" + id: ID + + """Email address of the customer to upsert.""" + email: String + + """Phone number of the customer to upsert.""" + phone: String + + """Custom ID of customer to upsert.""" + customId: UniqueMetafieldValueInput +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerSetInput { + """The addresses for a customer.""" + addresses: [MailingAddressInput!] + + """The unique email address of the customer.""" + email: String + + """The customer's first name.""" + firstName: String + + """The customer's last name.""" + lastName: String + + """The customer's locale.""" + locale: String + + """A note about the customer.""" + note: String + + """The unique phone number for the customer.""" + phone: String + + """ + A list of tags to associate with the customer. Can be an array or a + comma-separated list. Example values: `["tag1", "tag2", "tag3"]`, `"tag1, tag2, tag3"` + + Updating `tags` overwrites any existing tags that were previously added to the + customer. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """Whether the customer is exempt from paying taxes on their order.""" + taxExempt: Boolean + + """The list of tax exemptions to apply to the customer.""" + taxExemptions: [TaxExemption!] +} + +"""Return type for `customerSet` mutation.""" +type CustomerSetPayload { + """The created or updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerSetUserError!]! +} + +"""Defines errors for CustomerSet mutation.""" +type CustomerSetUserError implements DisplayableError { + """The error code.""" + code: CustomerSetUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `CustomerSetUserError`.""" +enum CustomerSetUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value needs to be blank.""" + PRESENT + + """The input value is blank.""" + BLANK + + """The id field is not allowed if identifier is provided.""" + ID_NOT_ALLOWED + + """The input field corresponding to the identifier is required.""" + MISSING_FIELD_REQUIRED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """Resource matching the identifier was not found.""" + NOT_FOUND + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH +} + +"""Represents a Shop Pay card instrument for customer payment method.""" +type CustomerShopPayAgreement { + """The billing address of the card.""" + billingAddress: CustomerCreditCardBillingAddress + + """Whether the card is about to expire.""" + expiresSoon: Boolean! + + """The expiry month of the card.""" + expiryMonth: Int! + + """The expiry year of the card.""" + expiryYear: Int! + + """Whether the Shop Pay billing agreement is inactive.""" + inactive: Boolean! + + """ + The payment method can be revoked if there are no active subscription contracts. + """ + isRevocable: Boolean! + + """The last 4 digits of the card.""" + lastDigits: String! + + """The masked card number with only the last 4 digits displayed.""" + maskedNumber: String! + + """The name of the card holder.""" + name: String! +} + +""" +An error that occurs during execution of an SMS marketing consent mutation. +""" +type CustomerSmsMarketingConsentError implements DisplayableError { + """The error code.""" + code: CustomerSmsMarketingConsentErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `CustomerSmsMarketingConsentError`. +""" +enum CustomerSmsMarketingConsentErrorCode { + """The input value is invalid.""" + INVALID + + """The input value isn't included in the list.""" + INCLUSION + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Missing a required argument.""" + MISSING_ARGUMENT +} + +""" +The marketing consent information when the customer consented to + receiving marketing material by SMS. +""" +input CustomerSmsMarketingConsentInput { + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel + + """The current SMS marketing state for the customer.""" + marketingState: CustomerSmsMarketingState! + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + Identifies the location where the customer consented to receiving marketing material by SMS. + """ + sourceLocationId: ID +} + +""" +The record of when a customer consented to receive marketing material by SMS. + +The customer's consent state reflects the record with the most recent date when consent was updated. +""" +type CustomerSmsMarketingConsentState { + """ + The source from which the SMS marketing information for the customer was collected. + """ + consentCollectedFrom: CustomerConsentCollectedFrom + + """ + The date and time when the customer consented to receive marketing material by SMS. + If no date is provided, then the date and time when the consent information was sent is used. + """ + consentUpdatedAt: DateTime + + """ + The marketing subscription opt-in level that was set when the customer consented to receive marketing information. + """ + marketingOptInLevel: CustomerMarketingOptInLevel! + + """The current SMS marketing state for the customer.""" + marketingState: CustomerSmsMarketingState! + + """ + The location where the customer consented to receive marketing material by SMS. + """ + sourceLocation: Location +} + +""" +The input fields for updating SMS marketing consent information for a given customer ID. +""" +input CustomerSmsMarketingConsentUpdateInput { + """ + The ID of the customer to update the SMS marketing consent information for. + The customer must have a unique phone number associated to the record. If not, + add the phone number using the `customerUpdate` mutation first. + """ + customerId: ID! + + """ + The marketing consent information when the customer consented to receiving marketing material by SMS. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput! +} + +"""Return type for `customerSmsMarketingConsentUpdate` mutation.""" +type CustomerSmsMarketingConsentUpdatePayload { + """The updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [CustomerSmsMarketingConsentError!]! +} + +"""The valid SMS marketing states for a customer’s phone number.""" +enum CustomerSmsMarketingState { + """The customer hasn't subscribed to SMS marketing.""" + NOT_SUBSCRIBED + + """The customer is in the process of subscribing to SMS marketing.""" + PENDING + + """The customer is subscribed to SMS marketing.""" + SUBSCRIBED + + """ + The customer isn't currently subscribed to SMS marketing but was previously subscribed. + """ + UNSUBSCRIBED + + """ + The customer's personal data is erased. This value is internally-set and read-only. + """ + REDACTED +} + +"""The set of valid sort keys for the Customer query.""" +enum CustomerSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `location` value.""" + LOCATION + + """Sort by the `name` value.""" + NAME + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The valid values for the state of a customer's account with a shop.""" +enum CustomerState { + """The customer declined the email invite to create an account.""" + DECLINED + + """ + The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. + """ + DISABLED + + """The customer has created an account.""" + ENABLED + + """The customer has received an email invite to create an account.""" + INVITED +} + +"""A customer's computed statistics.""" +type CustomerStatistics { + """The predicted spend tier of a customer with a shop.""" + predictedSpendTier: CustomerPredictedSpendTier + + """The RFM (Recency, Frequency, Monetary) group of the customer.""" + rfmGroup: CustomerRfmGroup +} + +"""Return type for `customerUpdateDefaultAddress` mutation.""" +type CustomerUpdateDefaultAddressPayload { + """The customer whose address was updated.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerUpdate` mutation.""" +type CustomerUpdatePayload { + """The updated customer.""" + customer: Customer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +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! +} + +"""The input fields for a custom shipping package used to pack shipment.""" +input CustomShippingPackageInput { + """Weight of the empty shipping package.""" + weight: WeightInput + + """Outside dimensions of the empty shipping package.""" + dimensions: ObjectDimensionsInput + + """ + The default package is the one used to calculate shipping costs on checkout. + """ + default: Boolean = false + + """Descriptive name for the package.""" + name: String + + """Type of package.""" + type: ShippingPackageType +} + +"""A shop's data sale opt out page.""" +type DataSaleOptOutPage { + """If the data sale opt out page is auto managed.""" + autoManaged: Boolean! +} + +"""Return type for `dataSaleOptOut` mutation.""" +type DataSaleOptOutPayload { + """ + The ID of the customer whose email address has been opted out of data sale. + """ + customerId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DataSaleOptOutUserError!]! +} + +"""An error that occurs during the execution of `DataSaleOptOut`.""" +type DataSaleOptOutUserError implements DisplayableError { + """The error code.""" + code: DataSaleOptOutUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DataSaleOptOutUserError`. +""" +enum DataSaleOptOutUserErrorCode { + """Data sale opt out failed.""" + FAILED +} + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string. +For example, September 7, 2019 is represented as `"2019-07-16"`. +""" +scalar Date + +""" +Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string. +For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is +represented as `"2019-09-07T15:50:00Z`". +""" +scalar DateTime + +"""Days of the week from Monday to Sunday.""" +enum DayOfTheWeek { + """Monday.""" + MONDAY + + """Tuesday.""" + TUESDAY + + """Wednesday.""" + WEDNESDAY + + """Thursday.""" + THURSDAY + + """Friday.""" + FRIDAY + + """Saturday.""" + SATURDAY + + """Sunday.""" + SUNDAY +} + +""" +A signed decimal number, which supports arbitrary precision and is serialized as a string. + +Example values: `"29.99"`, `"29.999"`. +""" +scalar Decimal + +""" +A token that delegates a set of scopes from the original permission. + +To learn more about creating delegate access tokens, refer to +[Delegate OAuth access tokens to subsystems](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/use-delegate-tokens). +""" +type DelegateAccessToken { + """The list of permissions associated with the token.""" + accessScopes: [String!]! + + """The issued delegate access token.""" + accessToken: String! + + """The date and time when the delegate access token was created.""" + createdAt: DateTime! +} + +"""Return type for `delegateAccessTokenCreate` mutation.""" +type DelegateAccessTokenCreatePayload { + """The delegate access token.""" + delegateAccessToken: DelegateAccessToken + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DelegateAccessTokenCreateUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenCreate`. +""" +type DelegateAccessTokenCreateUserError implements DisplayableError { + """The error code.""" + code: DelegateAccessTokenCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenCreateUserError`. +""" +enum DelegateAccessTokenCreateUserErrorCode { + """The access scope can't be empty.""" + EMPTY_ACCESS_SCOPE + + """The parent access token can't be a delegate token.""" + DELEGATE_ACCESS_TOKEN + + """The expires_in value must be greater than 0.""" + NEGATIVE_EXPIRES_IN + + """The delegate token can't expire after the parent token.""" + EXPIRES_AFTER_PARENT + + """The parent access token can't have a refresh token.""" + REFRESH_TOKEN + + """Persistence failed.""" + PERSISTENCE_FAILED + + """Unknown scopes.""" + UNKNOWN_SCOPES +} + +"""Return type for `delegateAccessTokenDestroy` mutation.""" +type DelegateAccessTokenDestroyPayload { + """The user's shop.""" + shop: Shop! + + """ + The status of the delegate access token destroy operation. Returns true if successful. + """ + status: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DelegateAccessTokenDestroyUserError!]! +} + +""" +An error that occurs during the execution of `DelegateAccessTokenDestroy`. +""" +type DelegateAccessTokenDestroyUserError implements DisplayableError { + """The error code.""" + code: DelegateAccessTokenDestroyUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DelegateAccessTokenDestroyUserError`. +""" +enum DelegateAccessTokenDestroyUserErrorCode { + """Persistence failed.""" + PERSISTENCE_FAILED + + """Access token not found.""" + ACCESS_TOKEN_NOT_FOUND + + """Cannot delete parent access token.""" + CAN_ONLY_DELETE_DELEGATE_TOKENS + + """Access denied.""" + ACCESS_DENIED +} + +"""The input fields for a delegate access token.""" +input DelegateAccessTokenInput { + """The list of scopes that will be delegated to the new access token.""" + delegateAccessScope: [String!]! + + """ + The amount of time, in seconds, after which the delegate access token is no longer valid. + """ + expiresIn: Int +} + +""" +Deletion events chronicle the destruction of resources (e.g. products and collections). +Once deleted, the deletion event is the only trace of the original's existence, +as the resource itself has been removed and can no longer be accessed. +""" +type DeletionEvent { + """ + The date and time when the deletion event for the related resource was generated. + """ + occurredAt: DateTime! + + """The ID of the resource that was deleted.""" + subjectId: ID! + + """The type of resource that was deleted.""" + subjectType: DeletionEventSubjectType! +} + +"""An auto-generated type for paginating through multiple DeletionEvents.""" +type DeletionEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeletionEventEdge!]! + + """ + A list of nodes that are contained in DeletionEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeletionEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeletionEvent and a cursor during pagination. +""" +type DeletionEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeletionEventEdge.""" + node: DeletionEvent! +} + +"""The set of valid sort keys for the DeletionEvent query.""" +enum DeletionEventSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID +} + +"""The supported subject types of deletion events.""" +enum DeletionEventSubjectType { + COLLECTION + PRODUCT +} + +""" +A shipping service and a list of countries that the service is available for. +""" +type DeliveryAvailableService { + """The countries the service provider ships to.""" + countries: DeliveryCountryCodesOrRestOfWorld! + + """The name of the service.""" + name: String! +} + +"""Represents a branded promise presented to buyers.""" +type DeliveryBrandedPromise { + """The handle of the branded promise. For example: `shop_promise`.""" + handle: String! + + """The name of the branded promise. For example: `Shop Promise`.""" + name: String! +} + +""" +A carrier service (also known as a carrier calculated service or shipping +service) provides real-time shipping rates to Shopify. Some common carrier +services include Canada Post, FedEx, UPS, and USPS. The term **carrier** is +often used interchangeably with the terms **shipping company** and **rate provider**. + +Using the CarrierService resource, you can add a carrier service to a shop and +then provide a list of applicable shipping rates at checkout. You can even use +the cart data to adjust shipping rates and offer shipping discounts based on +what is in the customer's cart. + +## Requirements for accessing the CarrierService resource +To access the CarrierService resource, add the `write_shipping` permission to +your app's requested scopes. For more information, see [API access +scopes](https://shopify.dev/docs/admin-api/access-scopes). + +Your app's request to create a carrier service will fail unless the store +installing your carrier service meets one of the following requirements: +* It's on the Advanced Shopify plan or higher. +* It's on the Shopify plan with yearly billing, or the carrier service feature +has been added to the store for a monthly fee. For more information, contact +[Shopify Support](https://help.shopify.com/questions). +* It's a development store. + +> Note: +> If a store changes its Shopify plan, then the store's association with a +carrier service is deactivated if the store no long meets one of the +requirements above. + +## Providing shipping rates to Shopify +When adding a carrier service to a store, you need to provide a POST endpoint +rooted in the `callbackUrl` property where Shopify can retrieve applicable +shipping rates. The callback URL should be a public endpoint that expects these +requests from Shopify. + +### Example shipping rate request sent to a carrier service + +```json +{ + "rate": { + "origin": { + "country": "CA", + "postal_code": "K2P1L4", + "province": "ON", + "city": "Ottawa", + "name": null, + "address1": "150 Elgin St.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": "Jamie D's Emporium" + }, + "destination": { + "country": "CA", + "postal_code": "K1M1M4", + "province": "ON", + "city": "Ottawa", + "name": "Bob Norman", + "address1": "24 Sussex Dr.", + "address2": "", + "address3": null, + "phone": null, + "fax": null, + "email": null, + "address_type": null, + "company_name": null + }, + "items": [{ + "name": "Short Sleeve T-Shirt", + "sku": "", + "quantity": 1, + "grams": 1000, + "price": 1999, + "vendor": "Jamie D's Emporium", + "requires_shipping": true, + "taxable": true, + "fulfillment_service": "manual", + "properties": null, + "product_id": 48447225880, + "variant_id": 258644705304 + }], + "currency": "USD", + "locale": "en" + } +} +``` + +### 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 locations of the possible origins.""" + origins: [ID!] + + """The country codes of the destinations.""" + countryCodes: [CountryCode!] + + """Whether to use 'Rest of World' as the destination.""" + restOfWorld: Boolean! + ): [DeliveryAvailableService!]! + + """The URL endpoint that Shopify needs to retrieve shipping rates.""" + callbackUrl: URL + + """ + The properly formatted name of the shipping service provider, ready to display. + """ + formattedName: String + + """The logo of the service provider.""" + icon: Image! + + """A globally-unique ID.""" + id: ID! + + """The name of the shipping service provider.""" + name: String + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! +} + +"""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 { + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL! + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! + + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean! +} + +""" +An auto-generated type which holds one DeliveryCarrierService and a cursor during pagination. +""" +type DeliveryCarrierServiceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryCarrierServiceEdge.""" + node: DeliveryCarrierService! +} + +"""The input fields used to update a carrier service.""" +input DeliveryCarrierServiceUpdateInput { + """The global ID of the carrier service to update.""" + id: ID! + + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean + + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean +} + +""" +A condition that must pass for a delivery method definition to be applied to an order. +""" +type DeliveryCondition implements Node { + """The value (weight or price) that the condition field is compared to.""" + conditionCriteria: DeliveryConditionCriteria! + + """The field to compare the criterion value against, using the operator.""" + field: DeliveryConditionField! + + """A globally-unique ID.""" + id: ID! + + """The operator to compare the field and criterion value.""" + operator: DeliveryConditionOperator! +} + +"""The value (weight or price) that the condition field is compared to.""" +union DeliveryConditionCriteria = MoneyV2 | Weight + +"""The field type that the condition will be applied to.""" +enum DeliveryConditionField { + """The condition will check against the total weight of the order.""" + TOTAL_WEIGHT + + """The condition will check against the total price of the order.""" + TOTAL_PRICE +} + +"""The operator to use to determine if the condition passes.""" +enum DeliveryConditionOperator { + """ + The condition will check whether the field is greater than or equal to the criterion. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The condition will check if the field is less than or equal to the criterion. + """ + LESS_THAN_OR_EQUAL_TO +} + +"""A country that is used to define a shipping zone.""" +type DeliveryCountry implements Node { + """ + A two-letter country code in ISO 3166-1 alpha-2 standard. + It also includes a flag indicating whether the country should be + a part of the 'Rest Of World' shipping zone. + """ + code: DeliveryCountryCodeOrRestOfWorld! + + """A globally-unique ID.""" + id: ID! + + """The full name of the country.""" + name: String! + + """The list of regions associated with this country.""" + provinces: [DeliveryProvince!]! + + """ + The translated name of the country. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +"""The country details and the associated shipping zone.""" +type DeliveryCountryAndZone { + """The country details.""" + country: DeliveryCountry! + + """The name of the shipping zone.""" + zone: String! +} + +""" +The country code and whether the country is a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodeOrRestOfWorld { + """The country code in the ISO 3166-1 alpha-2 format.""" + countryCode: CountryCode + + """Whether the country is a part of the 'Rest of World' shipping zone.""" + restOfWorld: Boolean! +} + +""" +The list of country codes and information whether the countries +are a part of the 'Rest Of World' shipping zone. +""" +type DeliveryCountryCodesOrRestOfWorld { + """List of applicable country codes in the ISO 3166-1 alpha-2 format.""" + countryCodes: [CountryCode!]! + + """Whether the countries are a part of the 'Rest of World' shipping zone.""" + restOfWorld: Boolean! +} + +"""The input fields to specify a country.""" +input DeliveryCountryInput { + """The country code of the country in the ISO 3166-1 alpha-2 format.""" + code: CountryCode + + """Whether the country is a part of the 'Rest of World' shipping zone.""" + restOfWorld: Boolean + + """The regions associated with this country.""" + provinces: [DeliveryProvinceInput!] + + """Associate all available provinces with this country.""" + includeAllProvinces: Boolean +} + +"""A delivery customization.""" +type DeliveryCustomization implements HasMetafieldDefinitions & HasMetafields & Node { + """The enabled status of the delivery customization.""" + enabled: Boolean! + + """ + The error history on the most recent version of the delivery customization. + """ + errorHistory: FunctionsErrorHistory + + """ + The ID of the Shopify Function implementing the delivery customization. + """ + functionId: String! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The Shopify Function implementing the delivery customization.""" + shopifyFunction: ShopifyFunction! + + """The title of the delivery customization.""" + title: String! +} + +"""Return type for `deliveryCustomizationActivation` mutation.""" +type DeliveryCustomizationActivationPayload { + """The IDs of the updated delivery customizations.""" + ids: [String!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple DeliveryCustomizations. +""" +type DeliveryCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryCustomizationEdge!]! + + """ + A list of nodes that are contained in DeliveryCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `deliveryCustomizationCreate` mutation.""" +type DeliveryCustomizationCreatePayload { + """Returns the created delivery customization.""" + deliveryCustomization: DeliveryCustomization + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryCustomizationError!]! +} + +"""Return type for `deliveryCustomizationDelete` mutation.""" +type DeliveryCustomizationDeletePayload { + """Returns the deleted delivery customization ID.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryCustomizationError!]! +} + +""" +An auto-generated type which holds one DeliveryCustomization and a cursor during pagination. +""" +type DeliveryCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryCustomizationEdge.""" + node: DeliveryCustomization! +} + +""" +An error that occurs during the execution of a delivery customization mutation. +""" +type DeliveryCustomizationError implements DisplayableError { + """The error code.""" + code: DeliveryCustomizationErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryCustomizationError`. +""" +enum DeliveryCustomizationErrorCode { + """The input value is invalid.""" + INVALID + + """Function not found.""" + FUNCTION_NOT_FOUND + + """Delivery customization not found.""" + DELIVERY_CUSTOMIZATION_NOT_FOUND + + """ + Shop must be on a Shopify Plus plan to activate delivery customizations from a custom app. + """ + DELIVERY_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """Unauthorized app scope.""" + UNAUTHORIZED_APP_SCOPE + + """Maximum delivery customizations are already enabled.""" + MAXIMUM_ACTIVE_DELIVERY_CUSTOMIZATIONS + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface for this delivery customization. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """Function is pending deletion.""" + FUNCTION_PENDING_DELETION + + """Function ID cannot be changed.""" + FUNCTION_ID_CANNOT_BE_CHANGED + + """Required input field must be present.""" + REQUIRED_INPUT_FIELD + + """Could not create or update metafields.""" + INVALID_METAFIELDS + + """Either function_id or function_handle must be provided.""" + MISSING_FUNCTION_IDENTIFIER + + """Only one of function_id or function_handle can be provided, not both.""" + MULTIPLE_FUNCTION_IDENTIFIERS +} + +"""The input fields to create and update a delivery customization.""" +input DeliveryCustomizationInput { + """ + Function handle scoped to your current app ID. Only finds functions within your app. + """ + functionHandle: String + + """The title of the delivery customization.""" + title: String + + """The enabled status of the delivery customization.""" + enabled: Boolean + + """Additional metafields to associate to the delivery customization.""" + metafields: [MetafieldInput!] = [] +} + +"""Return type for `deliveryCustomizationUpdate` mutation.""" +type DeliveryCustomizationUpdatePayload { + """Returns the updated delivery customization.""" + deliveryCustomization: DeliveryCustomization + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryCustomizationError!]! +} + +""" +Whether the shop is blocked from converting to full multi-location delivery +profiles mode. If the shop is blocked, then the blocking reasons are also returned. +""" +type DeliveryLegacyModeBlocked { + """ + Whether the shop can convert to full multi-location delivery profiles mode. + """ + blocked: Boolean! + + """ + The reasons why the shop is blocked from converting to full multi-location delivery profiles mode. + """ + reasons: [DeliveryLegacyModeBlockedReason!] +} + +""" +Reasons the shop is blocked from converting to full multi-location delivery profiles mode. +""" +enum DeliveryLegacyModeBlockedReason { + """ + Multi-Location mode is disabled. The shop can't convert to full multi-location delivery profiles mode. + """ + MULTI_LOCATION_DISABLED @deprecated(reason: "All shops are now using multi-location mode.") + + """There are no locations for this store that can fulfill online orders.""" + NO_LOCATIONS_FULFILLING_ONLINE_ORDERS +} + +"""Local pickup settings associated with a location.""" +type DeliveryLocalPickupSettings { + """Additional instructions or information related to the local pickup.""" + instructions: String! + + """The estimated pickup time to show customers at checkout.""" + pickupTime: DeliveryLocalPickupTime! +} + +""" +Possible pickup time values that a location enabled for local pickup can have. +""" +enum DeliveryLocalPickupTime { + """Usually ready in 1 hour.""" + ONE_HOUR + + """Usually ready in 2 hours.""" + TWO_HOURS + + """Usually ready in 4 hours.""" + FOUR_HOURS + + """Usually ready in 24 hours.""" + TWENTY_FOUR_HOURS + + """Usually ready in 2-4 days.""" + TWO_TO_FOUR_DAYS + + """Usually ready in 5+ days.""" + FIVE_OR_MORE_DAYS + + """Custom pickup time. Unrecognized pickup time enum value.""" + CUSTOM @deprecated(reason: "Custom pickup time is no longer supported.") +} + +""" +A location group is a collection of locations. They share zones and delivery methods across delivery +profiles. +""" +type DeliveryLocationGroup implements Node { + """A globally-unique ID.""" + id: ID! + + """A list of all locations that are part of this location group.""" + locations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: LocationSortKeys = NAME + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """Whether to include the legacy locations of fulfillment services.""" + includeLegacy: Boolean = false + + """Whether to include the locations that are deactivated.""" + includeInactive: Boolean = false + ): LocationConnection! + + """A count of all locations that are part of this location group.""" + locationsCount: Count +} + +""" +Links a location group with a zone and the associated method definitions. +""" +type DeliveryLocationGroupZone { + """The number of method definitions for the zone.""" + methodDefinitionCounts: DeliveryMethodDefinitionCounts! + + """The method definitions associated to a zone and location group.""" + methodDefinitions( + """Return only eligible or ineligible method definitions.""" + eligible: Boolean + + """Return only merchant or participant method definitions.""" + type: DeliveryMethodDefinitionType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MethodDefinitionSortKeys = ID + ): DeliveryMethodDefinitionConnection! + + """The zone associated to a location group.""" + zone: DeliveryZone! +} + +""" +An auto-generated type for paginating through multiple DeliveryLocationGroupZones. +""" +type DeliveryLocationGroupZoneConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryLocationGroupZoneEdge!]! + + """ + A list of nodes that are contained in DeliveryLocationGroupZoneEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryLocationGroupZone!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination. +""" +type DeliveryLocationGroupZoneEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryLocationGroupZoneEdge.""" + node: DeliveryLocationGroupZone! +} + +""" +The input fields for a delivery zone associated to a location group and profile. +""" +input DeliveryLocationGroupZoneInput { + """A globally-unique ID of the zone.""" + id: ID + + """The name of the zone.""" + name: String + + """A list of countries to associate with the zone.""" + countries: [DeliveryCountryInput!] + + """A list of method definitions to create.""" + methodDefinitionsToCreate: [DeliveryMethodDefinitionInput!] + + """A list of method definitions to update.""" + methodDefinitionsToUpdate: [DeliveryMethodDefinitionInput!] +} + +""" +The input fields for a local pickup setting associated with a location. +""" +input DeliveryLocationLocalPickupEnableInput { + """The ID of the location associated with the location setting.""" + locationId: ID! + + """The time of the local pickup.""" + pickupTime: DeliveryLocalPickupTime! + + """The instructions for the local pickup.""" + instructions: String +} + +""" +Represents an error that happened when changing local pickup settings for a location. +""" +type DeliveryLocationLocalPickupSettingsError implements DisplayableError { + """The error code.""" + code: DeliveryLocationLocalPickupSettingsErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryLocationLocalPickupSettingsError`. +""" +enum DeliveryLocationLocalPickupSettingsErrorCode { + """ + Provided locationId is not for an active location belonging to this store. + """ + ACTIVE_LOCATION_NOT_FOUND + + """Custom pickup time is not allowed for local pickup settings.""" + CUSTOM_PICKUP_TIME_NOT_ALLOWED + + """An error occurred while changing the local pickup settings.""" + GENERIC_ERROR +} + +"""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 + + """ + The name of the delivery option that was presented to the buyer during checkout. + """ + presentedName: String + + """A reference to the shipping method.""" + serviceCode: String + + """ + Source reference is promise provider specific data associated with delivery promise. + """ + sourceReference: String +} + +""" +Additional information included on a delivery method that will help during the delivery process. +""" +type DeliveryMethodAdditionalInformation { + """The delivery instructions to follow when performing the delivery.""" + instructions: String + + """The phone number to contact when performing the delivery.""" + phone: String +} + +""" +A method definition contains the delivery rate and the conditions that must be met for the method to be +applied. +""" +type DeliveryMethodDefinition implements Node { + """Whether this method definition is active.""" + active: Boolean! + + """ + The description of the method definition. Only available on shipping rates that are custom. + """ + description: String + + """A globally-unique ID.""" + id: ID! + + """ + The method conditions that must pass for this method definition to be applied to an order. + """ + methodConditions: [DeliveryCondition!]! + + """The name of the method definition.""" + name: String! + + """ + The provided rate for this method definition, from a rate definition or participant. + """ + rateProvider: DeliveryRateProvider! +} + +""" +An auto-generated type for paginating through multiple DeliveryMethodDefinitions. +""" +type DeliveryMethodDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryMethodDefinitionEdge!]! + + """ + A list of nodes that are contained in DeliveryMethodDefinitionEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryMethodDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The number of method definitions for a zone, separated into merchant-owned and participant definitions. +""" +type DeliveryMethodDefinitionCounts { + """The number of participant method definitions for the specified zone.""" + participantDefinitionsCount: Int! + + """ + The number of merchant-defined method definitions for the specified zone. + """ + rateDefinitionsCount: Int! +} + +""" +An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination. +""" +type DeliveryMethodDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryMethodDefinitionEdge.""" + node: DeliveryMethodDefinition! +} + +"""The input fields for a method definition.""" +input DeliveryMethodDefinitionInput { + """ + A globally-unique ID of the method definition. Use only when updating a method definition. + """ + id: ID + + """The name of the method definition.""" + name: String + + """The description of the method definition.""" + description: String + + """Whether to use this method definition during rate calculation.""" + active: Boolean + + """A rate definition to apply to the method definition.""" + rateDefinition: DeliveryRateDefinitionInput + + """A participant to apply to the method definition.""" + participant: DeliveryParticipantInput + + """A list of weight conditions on the method definition.""" + weightConditionsToCreate: [DeliveryWeightConditionInput!] + + """A list of price conditions on the method definition.""" + priceConditionsToCreate: [DeliveryPriceConditionInput!] + + """A list of conditions to update on the method definition.""" + conditionsToUpdate: [DeliveryUpdateConditionInput!] +} + +"""The different types of method definitions to filter by.""" +enum DeliveryMethodDefinitionType { + """A static merchant-defined rate.""" + MERCHANT + + """A dynamic participant rate.""" + PARTICIPANT +} + +"""Possible method types that a delivery method can have.""" +enum DeliveryMethodType { + """The order is shipped.""" + SHIPPING + + """The order is picked up by the customer.""" + PICK_UP + + """Non-physical items, no delivery needed.""" + NONE + + """In-store sale, no delivery needed.""" + RETAIL + + """The order is delivered using a local delivery service.""" + LOCAL + + """The order is delivered to a pickup point.""" + PICKUP_POINT +} + +""" +A participant defines carrier-calculated rates for shipping services +with a possible merchant-defined fixed fee or a percentage-of-rate fee. +""" +type DeliveryParticipant implements Node { + """ + Whether to display new shipping services automatically to the customer when the service becomes available. + """ + adaptToNewServicesFlag: Boolean! + + """The carrier used for this participant.""" + carrierService: DeliveryCarrierService! + + """The merchant-defined fixed fee for this participant.""" + fixedFee: MoneyV2 + + """A globally-unique ID.""" + id: ID! + + """ + The carrier-specific services offered by the participant, and whether each service is active. + """ + participantServices: [DeliveryParticipantService!]! + + """The merchant-defined percentage-of-rate fee for this participant.""" + percentageOfRateFee: Float! +} + +"""The input fields for a participant.""" +input DeliveryParticipantInput { + """The ID of the participant.""" + id: ID + + """The ID of the carrier service for this participant.""" + carrierServiceId: ID + + """The fixed feed that's defined by the merchant for this participant.""" + fixedFee: MoneyInput + + """The merchant-defined percentage-of-rate fee for this participant.""" + percentageOfRateFee: Float + + """The list of shipping services offered by the participant.""" + participantServices: [DeliveryParticipantServiceInput!] + + """ + Whether to automatically display new shipping services to the customer when a service becomes available. + """ + adaptToNewServices: Boolean +} + +"""A mail service provided by the participant.""" +type DeliveryParticipantService { + """Whether the service is active.""" + active: Boolean! + + """The name of the service.""" + name: String! +} + +"""The input fields for a shipping service provided by a participant.""" +input DeliveryParticipantServiceInput { + """The name of the service.""" + name: String! + + """Whether the service is active.""" + active: Boolean! +} + +""" +The input fields for a price-based condition of a delivery method definition. +""" +input DeliveryPriceConditionInput { + """The monetary value to compare the price of an order to.""" + criteria: MoneyInput + + """The operator to use for comparison.""" + operator: DeliveryConditionOperator +} + +""" +How many product variants are in a profile. This count is capped at 500. +""" +type DeliveryProductVariantsCount { + """Whether the count has reached the cap of 500.""" + capped: Boolean! + + """The product variant count.""" + count: Int! +} + +""" +A shipping profile. 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! + + """The number of locations without rates defined.""" + locationsWithoutRatesCount: Int! + + """The name of the delivery profile.""" + name: String! + + """The number of active origin locations for the profile.""" + originLocationCount: Int! + + """How many product variants are in this profile.""" + productVariantsCount: Count + + """How many product variants are in this profile.""" + productVariantsCountV2: DeliveryProductVariantsCount! @deprecated(reason: "Use `productVariantsCount` instead.") + + """The products and variants associated with this profile.""" + profileItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DeliveryProfileItemConnection! + + """The location groups and associated zones using this profile.""" + profileLocationGroups( + """Filter the location groups of the profile by location group ID.""" + locationGroupId: ID + ): [DeliveryProfileLocationGroup!]! + + """Selling plan groups associated with the specified delivery profile.""" + sellingPlanGroups( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SellingPlanGroupConnection! + + """ + List of locations that haven't been assigned to a location group for this profile. + """ + unassignedLocations: [Location!]! + + """ + List of locations that have not been assigned to a location group for this profile. + """ + unassignedLocationsPaginated( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocationConnection! + + """The version of the delivery profile.""" + version: Int! + + """The number of countries with active rates to deliver to.""" + zoneCountryCount: Int! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfiles. +""" +type DeliveryProfileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `deliveryProfileCreate` mutation.""" +type DeliveryProfileCreatePayload { + """The delivery profile that was created.""" + profile: DeliveryProfile + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DeliveryProfile and a cursor during pagination. +""" +type DeliveryProfileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryProfileEdge.""" + node: DeliveryProfile! +} + +"""The input fields for a delivery profile.""" +input DeliveryProfileInput { + """The name of the delivery profile.""" + name: String + + """The list of location groups associated with the delivery profile.""" + profileLocationGroups: [DeliveryProfileLocationGroupInput!] + + """ + The list of location groups to be created in the delivery profile. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 location groups per each request. + """ + locationGroupsToCreate: [DeliveryProfileLocationGroupInput!] + + """ + The list of location groups to be updated in the delivery profile. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 location groups per each request. + """ + locationGroupsToUpdate: [DeliveryProfileLocationGroupInput!] + + """The list of location groups to be deleted from the delivery profile.""" + locationGroupsToDelete: [ID!] + + """ + The list of product variant IDs to be associated with the delivery profile. + """ + variantsToAssociate: [ID!] + + """ + The list of product variant IDs to be dissociated from the delivery profile. + The dissociated product variants are moved back to the default delivery profile. + """ + variantsToDissociate: [ID!] + + """The list of zone IDs to delete.""" + zonesToDelete: [ID!] + + """The list of method definition IDs to delete.""" + methodDefinitionsToDelete: [ID!] + + """The list of condition IDs to delete.""" + conditionsToDelete: [ID!] + + """ + The list of selling plan groups to be associated with the delivery profile. + """ + sellingPlanGroupsToAssociate: [ID!] + + """ + The list of selling plan groups to be dissociated with the delivery profile. + """ + sellingPlanGroupsToDissociate: [ID!] +} + +""" +A product and the subset of associated variants that are part of this delivery profile. +""" +type DeliveryProfileItem implements Node { + """A globally-unique ID.""" + id: ID! + + """A product associated with this profile.""" + product: Product! + + """The product variants associated with this delivery profile.""" + variants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfileItems. +""" +type DeliveryProfileItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryProfileItemEdge!]! + + """ + A list of nodes that are contained in DeliveryProfileItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DeliveryProfileItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination. +""" +type DeliveryProfileItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryProfileItemEdge.""" + node: DeliveryProfileItem! +} + +""" +Links a location group with zones. Both are associated to a delivery profile. +""" +type DeliveryProfileLocationGroup { + """ + The countries already selected in any zone for the specified location group. + """ + countriesInAnyZone: [DeliveryCountryAndZone!]! + + """The collection of locations that make up the specified location group.""" + locationGroup: DeliveryLocationGroup! + + """The applicable zones associated to the specified location group.""" + locationGroupZones( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DeliveryLocationGroupZoneConnection! +} + +""" +The input fields for a location group associated to a delivery profile. +""" +input DeliveryProfileLocationGroupInput { + """The globally-unique ID of the delivery profile location group.""" + id: ID + + """The list of location IDs to be moved to this location group.""" + locations: [ID!] + + """ + The list of location IDs to be added to this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToAdd: [ID!] + + """ + The list of location IDs to be removed from this location group. + + **Note:** due to API input array limits, a maximum of 250 items can be sent per each request. + """ + locationsToRemove: [ID!] + + """ + The list of location group zones to create. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToCreate: [DeliveryLocationGroupZoneInput!] + + """ + The list of location group zones to update. + + **Note:** due to the potential complexity of the nested data, it is + recommended to send no more than 5 zones per each request. + """ + zonesToUpdate: [DeliveryLocationGroupZoneInput!] +} + +"""Return type for `deliveryProfileRemove` mutation.""" +type DeliveryProfileRemovePayload { + """The delivery profile deletion job triggered by the mutation.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `deliveryProfileUpdate` mutation.""" +type DeliveryProfileUpdatePayload { + """The delivery profile that was updated.""" + profile: DeliveryProfile + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Returns enabled delivery promise participants.""" +type DeliveryPromiseParticipant implements Node { + """The ID of the promise participant.""" + id: ID! + + """The resource that the participant is attached to.""" + owner: DeliveryPromiseParticipantOwner + + """The owner type of the participant.""" + ownerType: DeliveryPromiseParticipantOwnerType! +} + +""" +An auto-generated type for paginating through multiple DeliveryPromiseParticipants. +""" +type DeliveryPromiseParticipantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryPromiseParticipantEdge!]! + + """ + A list of nodes that are contained in DeliveryPromiseParticipantEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [DeliveryPromiseParticipant!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DeliveryPromiseParticipant and a cursor during pagination. +""" +type DeliveryPromiseParticipantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DeliveryPromiseParticipantEdge.""" + node: DeliveryPromiseParticipant! +} + +"""The object that the participant references.""" +union DeliveryPromiseParticipantOwner = ProductVariant + +"""The type of object that the participant is attached to.""" +enum DeliveryPromiseParticipantOwnerType { + """A product variant.""" + PRODUCTVARIANT +} + +"""Return type for `deliveryPromiseParticipantsUpdate` mutation.""" +type DeliveryPromiseParticipantsUpdatePayload { + """The promise participants that were added.""" + promiseParticipants: [DeliveryPromiseParticipant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A delivery promise provider. Currently restricted to select approved delivery promise partners. +""" +type DeliveryPromiseProvider implements Node { + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean! + + """ + The number of seconds to add to the current time as a buffer when looking up + delivery promises. Represents how long the shop requires before releasing an + order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """A globally-unique ID.""" + id: ID! + + """The location associated with this delivery promise provider.""" + location: Location! + + """ + The time zone to be used for interpreting day of week and cutoff times in + delivery schedules when looking up delivery promises. + """ + timeZone: String! +} + +"""Return type for `deliveryPromiseProviderUpsert` mutation.""" +type DeliveryPromiseProviderUpsertPayload { + """The created or updated delivery promise provider.""" + deliveryPromiseProvider: DeliveryPromiseProvider + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryPromiseProviderUpsertUserError!]! +} + +""" +An error that occurs during the execution of `DeliveryPromiseProviderUpsert`. +""" +type DeliveryPromiseProviderUpsertUserError implements DisplayableError { + """The error code.""" + code: DeliveryPromiseProviderUpsertUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DeliveryPromiseProviderUpsertUserError`. +""" +enum DeliveryPromiseProviderUpsertUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is too long.""" + TOO_LONG + + """The location doesn't belong to the app.""" + MUST_BELONG_TO_APP + + """The time zone is invalid.""" + INVALID_TIME_ZONE +} + +"""The delivery promise settings.""" +type DeliveryPromiseSetting { + """Whether delivery dates is enabled.""" + deliveryDatesEnabled: Boolean! + + """ + The number of business days required for processing the order before the + package is handed off to the carrier. Expressed as an ISO8601 duration. + """ + processingTime: String +} + +"""A region that is used to define a shipping zone.""" +type DeliveryProvince implements Node { + """The code of the region.""" + code: String! + + """A globally-unique ID.""" + id: ID! + + """The full name of the region.""" + name: String! + + """ + The translated name of the region. The translation returned is based on the system's locale. + """ + translatedName: String! +} + +"""The input fields to specify a region.""" +input DeliveryProvinceInput { + """The code of the region.""" + code: String! +} + +""" +The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). +""" +type DeliveryRateDefinition implements Node { + """A globally-unique ID.""" + id: ID! + + """The price of this rate.""" + price: MoneyV2! +} + +"""The input fields for a rate definition.""" +input DeliveryRateDefinitionInput { + """A globally-unique ID of the rate definition.""" + id: ID + + """The price of the rate definition.""" + price: MoneyInput! +} + +"""A rate provided by a merchant-defined rate or a participant.""" +union DeliveryRateProvider = DeliveryParticipant | DeliveryRateDefinition + +""" +The `DeliverySetting` object enables you to manage shop-wide shipping settings. +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. + """ + legacyModeBlocked: DeliveryLegacyModeBlocked! + + """ + Enables legacy compatability mode for the multi-location delivery profiles feature. + """ + 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. + """ + legacyModeProfiles: Boolean +} + +"""Return type for `deliverySettingUpdate` mutation.""" +type DeliverySettingUpdatePayload { + """The updated delivery shop level settings.""" + setting: DeliverySetting + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `deliveryShippingOriginAssign` mutation.""" +type DeliveryShippingOriginAssignPayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The input fields for updating the condition of a delivery method definition. +""" +input DeliveryUpdateConditionInput { + """A globally-unique ID of the condition.""" + id: ID! + + """The value that will be used in comparison.""" + criteria: Float + + """The unit associated with the value that will be used in comparison.""" + criteriaUnit: String + + """The property of an order that will be used in comparison.""" + field: DeliveryConditionField + + """The operator to use for comparison.""" + operator: DeliveryConditionOperator +} + +""" +The input fields for a weight-based condition of a delivery method definition. +""" +input DeliveryWeightConditionInput { + """The weight value to compare the weight of an order to.""" + criteria: WeightInput + + """The operator to use for comparison.""" + operator: DeliveryConditionOperator +} + +""" +A zone is a group of countries that have the same shipping rates. Customers can +order products from a store only if they choose a shipping destination that's +included in one of the store's zones. +""" +type DeliveryZone implements Node { + """The list of countries within the zone.""" + countries: [DeliveryCountry!]! + + """A globally-unique ID.""" + id: ID! + + """The name of the zone.""" + name: String! +} + +"""Configuration of the deposit.""" +union DepositConfiguration = DepositPercentage + +"""The input fields configuring the deposit 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 { + """Apple Pay.""" + APPLE_PAY + + """Android Pay.""" + ANDROID_PAY + + """Google Pay.""" + GOOGLE_PAY + + """Shopify Pay.""" + SHOPIFY_PAY + + """Facebook Pay.""" + FACEBOOK_PAY + + """Amazon Pay.""" + AMAZON_PAY +} + +""" +A discount offers promotional value and can be applied by entering a code or +automatically when conditions are met. Discounts can provide fixed amounts, +percentage reductions, free shipping, or Buy X Get Y (BXGY) benefits on specific +products or the entire order. For more complex scenarios, developers can use +Function-backed discounts to create custom discount configurations. +""" +union Discount = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping | DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +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! +} + +""" +An auto-generated type for paginating through multiple DiscountAllocations. +""" +type DiscountAllocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAllocationEdge!]! + + """ + A list of nodes that are contained in DiscountAllocationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAllocation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAllocation and a cursor during pagination. +""" +type DiscountAllocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountAllocationEdge.""" + node: DiscountAllocation! +} + +""" +The fixed amount value of a discount, and whether the amount is applied to each +entitled item or spread evenly across the entitled items. +""" +type DiscountAmount { + """The value of the discount.""" + amount: MoneyV2! + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean! +} + +"""The input fields for the value of the discount and how it is applied.""" +input DiscountAmountInput { + """The value of the discount.""" + amount: Decimal + + """ + If true, then the discount is applied to each of the entitled items. If false, + then the amount is split across all of the entitled items. + """ + appliesOnEachItem: Boolean +} + +""" +Discount applications capture the intentions of a discount source at +the time of application on an order's line items or shipping lines. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +interface DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """How the discount amount is distributed on the discounted lines.""" + targetSelection: DiscountApplicationTargetSelection! + + """Whether the discount is applied on line items or shipping lines.""" + targetType: DiscountApplicationTargetType! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +The method by which the discount's value is allocated onto its entitled lines. +""" +enum DiscountApplicationAllocationMethod { + """The value is spread across all entitled lines.""" + ACROSS + + """The value is applied onto every entitled line.""" + EACH + + """The value is specifically applied onto a particular line.""" + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. +""" +type DiscountApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountApplicationEdge!]! + + """ + A list of nodes that are contained in DiscountApplicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. +""" +type DiscountApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountApplicationEdge.""" + node: DiscountApplication! +} + +"""The level at which the discount's value is applied.""" +enum DiscountApplicationLevel { + """ + The discount is applied at the order level. + Order level discounts are not factored into the discountedUnitPriceSet on line items. + """ + ORDER + + """ + The discount is applied at the line level. + Line level discounts are factored into the discountedUnitPriceSet on line items. + """ + LINE +} + +""" +The lines on the order to which the discount is applied, of the type defined by +the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of +`LINE_ITEM`, applies the discount on all line items that are entitled to the discount. +The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines. +""" +enum DiscountApplicationTargetSelection { + """The discount is allocated onto all the lines.""" + ALL + + """The discount is allocated onto only the lines that it's entitled for.""" + ENTITLED + + """The discount is allocated onto explicitly chosen lines.""" + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. +""" +enum DiscountApplicationTargetType { + """The discount applies onto line items.""" + LINE_ITEM + + """The discount applies onto shipping lines.""" + SHIPPING_LINE +} + +""" +The 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! + + """Whether the discount applies on one-time purchases.""" + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """The context defining which buyers can use the discount.""" + context: DiscountContext! + + """The date and time when the discount was created.""" + createdAt: DateTime! + + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """The classes of the discount.""" + discountClasses: [DiscountClass!]! + + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + for the discount. + """ + discountId: ID! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The [error history](https://shopify.dev/docs/apps/build/functions/monitoring-and-errors) + for the latest version of the discount type that the app provides. + """ + errorHistory: FunctionsErrorHistory + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """The date and time when the discount was updated.""" + updatedAt: DateTime! +} + +"""Return type for `discountAutomaticAppCreate` mutation.""" +type DiscountAutomaticAppCreatePayload { + """The automatic discount that the app manages.""" + automaticAppDiscount: DiscountAutomaticApp + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an automatic discount +that's managed by an app. + +Use these input fields when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +input DiscountAutomaticAppInput { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """Determines which discount effects the discount can apply.""" + discountClasses: [DiscountClass!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations. For + app discounts using Admin UI Extensions, merchants can control POS eligibility + when the context is set to ALL. + """ + context: DiscountContextInput + + """The handle of the function providing the discount.""" + functionHandle: String + + """ + Additional metafields to associate to the discount. + [Metafields](https://shopify.dev/docs/apps/build/custom-data) + provide dynamic function configuration with + different parameters, such as `percentage` for a percentage discount. Merchants can set metafield values + in the Shopify admin, which makes the discount function more flexible and customizable. + """ + metafields: [MetafieldInput!] = [] + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean = false + + """Whether the discount applies on one-time purchases.""" + appliesOnOneTimePurchase: Boolean = true + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int = 1 +} + +"""Return type for `discountAutomaticAppUpdate` mutation.""" +type DiscountAutomaticAppUpdatePayload { + """The updated automatic discount that the app provides.""" + automaticAppDiscount: DiscountAutomaticApp + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are automatically applied on a cart and at checkout. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountAutomaticBasic` object stores information about automatic amount off discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBasic) +object has similar functionality to the `DiscountAutomaticBasic` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBasic { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """The context defining which buyers can use the discount.""" + context: DiscountContext! + + """The date and time when the discount was created.""" + createdAt: DateTime! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """The classes of the discount.""" + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """The date and time when the discount was updated.""" + updatedAt: DateTime! + + """The number of times that the discount has been used.""" + usageCount: Int! @deprecated(reason: "Use `asyncUsageCount` instead.") +} + +"""Return type for `discountAutomaticBasicCreate` mutation.""" +type DiscountAutomaticBasicCreatePayload { + """The automatic discount that was created.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating an +[amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that's automatically applied on a cart and at checkout. +""" +input DiscountAutomaticBasicInput { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """Information about the qualifying items and their discount.""" + customerGets: DiscountCustomerGetsInput + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +"""Return type for `discountAutomaticBasicUpdate` mutation.""" +type DiscountAutomaticBasicUpdatePayload { + """The automatic discount that was updated.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountAutomaticBulkDelete` mutation.""" +type DiscountAutomaticBulkDeletePayload { + """The asynchronous job removing the automatic discounts.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are automatically applied on a cart and at checkout. BXGY discounts incentivize customers by offering +them additional items at a discounted price or for free when they purchase a specified quantity of items. + +The `DiscountAutomaticBxgy` object stores information about automatic BXGY discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy) +object has similar functionality to the `DiscountAutomaticBxgy` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticBxgy implements HasEvents & Node { + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """The context defining which buyers can use the discount.""" + context: DiscountContext! + + """The date and time when the discount was created.""" + createdAt: DateTime! + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuys! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGets! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: MerchandiseDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """The classes of the discount.""" + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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 discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: UnsignedInt64 + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuysInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput +} + +"""Return type for `discountAutomaticBxgyUpdate` mutation.""" +type DiscountAutomaticBxgyUpdatePayload { + """The automatic discount that was updated.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomatics. +""" +type DiscountAutomaticConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomatic!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `discountAutomaticDeactivate` mutation.""" +type DiscountAutomaticDeactivatePayload { + """The deactivated automatic discount.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountAutomaticDelete` mutation.""" +type DiscountAutomaticDeletePayload { + """The ID of the automatic discount that was deleted.""" + deletedAutomaticDiscountId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +An auto-generated type which holds one DiscountAutomatic and a cursor during pagination. +""" +type DiscountAutomaticEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountAutomaticEdge.""" + node: DiscountAutomatic! +} + +""" +The `DiscountAutomaticFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are automatically applied on a cart and at checkout. Free shipping discounts are promotional deals that +merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountAutomaticFreeShipping` object stores information about automatic free shipping discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountCodeFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeFreeShipping) +object has similar functionality to the `DiscountAutomaticFreeShipping` object, but customers need to enter a code to +receive a discount. +> +> API versions prior to `2025-10` only return automatic discounts with `context` +set to `all`, discounts with other values are filtered out. +""" +type DiscountAutomaticFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWith! + + """The context defining which buyers can use the discount.""" + context: DiscountContext! + + """The date and time when the discount was created.""" + createdAt: DateTime! + + """ + The countries that qualify for the discount. + You can define + [a list of countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountries) + or specify [all countries](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCountryAll) + to be eligible for the discount. + """ + destinationSelection: DiscountShippingDestinationSelection! + + """ + The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that's used to control how discounts can be combined. + """ + discountClass: ShippingDiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """The classes of the discount.""" + discountClasses: [DiscountClass!]! + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + Whether there are + [timeline comments](https://help.shopify.com/manual/discounts/managing-discount-codes#use-the-discount-timeline) + associated with the discount. + """ + hasTimelineComment: Boolean! + + """ + The maximum shipping price amount accepted to qualify for the discount. + """ + maximumShippingPrice: MoneyV2 + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirement + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping#field-summary) + field. + """ + shortSummary: String! + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime! + + """ + The status of the discount that describes its availability, + expiration, or pending activation. + """ + status: DiscountStatus! + + """ + A detailed explanation of what the discount is, + who can use it, when and where it applies, and any associated + rules or limitations. + """ + summary: String! + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! + + """The total sales from orders where the discount was used.""" + totalSales: MoneyV2 + + """The date and time when the discount was updated.""" + updatedAt: DateTime! +} + +"""Return type for `discountAutomaticFreeShippingCreate` mutation.""" +type DiscountAutomaticFreeShippingCreatePayload { + """The automatic free shipping discount that was created.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The input fields for creating or updating a +[free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that's automatically applied on a cart and at checkout. +""" +input DiscountAutomaticFreeShippingInput { + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + Discounts automatically apply on Point of Sale (POS) for Pro locations when the context is not set to ALL. + """ + context: DiscountContextInput + + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with the shipping discount. + """ + combinesWith: DiscountCombinesWithInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """A list of destinations where the discount will apply.""" + destination: DiscountShippingDestinationSelectionInput + + """The maximum shipping price that qualifies for the discount.""" + maximumShippingPrice: Decimal + + """Whether the discount applies on regular one-time-purchase items.""" + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean + + """ + The number of billing cycles for which the discount can be applied, + which is useful for subscription-based discounts. For example, if you set this field + to `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +"""Return type for `discountAutomaticFreeShippingUpdate` mutation.""" +type DiscountAutomaticFreeShippingUpdatePayload { + """The automatic discount that was updated.""" + automaticDiscountNode: DiscountAutomaticNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountAutomaticNode` object enables you to manage [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts) +that are applied when an order meets specific criteria. You can create amount +off, free shipping, or buy X get Y automatic discounts. For example, you can +offer customers a free shipping discount that applies when conditions are met. +Or you can offer customers a buy X get Y discount that's automatically applied +when customers spend a specified amount of money, or a specified quantity of products. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountAutomaticNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied automatically when an order meets specific criteria. + Learn more about [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscount: DiscountAutomatic! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomaticNodes. +""" +type DiscountAutomaticNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountAutomaticNodeEdge!]! + + """ + A list of nodes that are contained in DiscountAutomaticNodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountAutomaticNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountAutomaticNode and a cursor during pagination. +""" +type DiscountAutomaticNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountAutomaticNodeEdge.""" + node: DiscountAutomaticNode! +} + +"""All buyers are eligible for the discount.""" +enum DiscountBuyerSelection { + """All buyers are eligible for the discount.""" + ALL +} + +""" +Indicates that a discount applies to all buyers without restrictions, enabling +universal promotions that reach every customer. This selection removes +buyer-specific limitations from discount eligibility. + +For example, a flash sale or grand opening promotion would target all buyers to maximize participation and store visibility. + +Learn more about [discount targeting](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountBuyerSelectionAll { + """All buyers are eligible for the discount.""" + all: DiscountBuyerSelection! +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum DiscountClass { + """ + The discount is combined with a + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT + + """ + The discount is combined with an + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + ORDER + + """ + The discount is combined with a + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + SHIPPING +} + +""" +The type of discount associated with the discount code. For example, the +discount code might offer a basic discount of a fixed percentage, or a fixed +amount, on specific products or the order. Alternatively, the discount might +offer the customer free shipping on their order. A third option is a Buy X, Get +Y (BXGY) discount, which offers a customer discounts on select products if they +add a specific product to their order. +""" +union DiscountCode = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +"""Return type for `discountCodeActivate` mutation.""" +type DiscountCodeActivatePayload { + """The activated code discount.""" + codeDiscountNode: DiscountCodeNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeApp` object stores information about code discounts +that are managed by an app using +[Shopify Functions](https://shopify.dev/docs/apps/build/functions). +Use `DiscountCodeApp` when you need advanced, custom, or +dynamic discount capabilities that aren't supported by +[Shopify's native discount types](https://help.shopify.com/manual/discounts/discount-types). + +Learn more about creating +[custom discount functionality](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + +> Note: +> The [`DiscountAutomaticApp`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticApp) +object has similar functionality to the `DiscountCodeApp` object, with the exception that `DiscountAutomaticApp` +stores information about automatic discounts that are managed by an app using Shopify Functions. +""" +type DiscountCodeApp { + """ + The details about the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + This information includes the app extension's name and + [client ID](https://shopify.dev/docs/apps/build/authentication-authorization/client-secrets), + [App Bridge configuration](https://shopify.dev/docs/api/app-bridge), + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations), + [function ID](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries), + and other metadata about the discount type, including the discount type's name and description. + """ + appDiscountType: AppDiscountType! + + """Whether the discount applies on regular one-time-purchase items.""" + appliesOnOneTimePurchase: Boolean! + + """Whether the discount applies to subscriptions items.""" + appliesOnSubscription: Boolean! + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """A list codes that customers can use to redeem the discount.""" + codes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 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 { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """Determines which discount effects the discount can apply.""" + discountClasses: [DiscountClass!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean + + """The code that customers use to apply the discount.""" + code: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """The handle of the function providing the discount.""" + functionHandle: String + + """Whether the discount applies to subscriptions items.""" + appliesOnSubscription: Boolean = false + + """Whether the discount applies on regular one-time-purchase items.""" + appliesOnOneTimePurchase: Boolean = true + + """ + The number of times a discount applies on recurring purchases (subscriptions). + 0 will apply infinitely whereas 1 will only apply to the first checkout. + """ + recurringCycleLimit: Int = 1 + + """ + Additional metafields to associate to the discount. + [Metafields](https://shopify.dev/docs/apps/build/custom-data) provide dynamic + function configuration with different parameters, such as `percentage` for a + percentage discount. Merchants can set metafield values in the Shopify admin, + which makes the discount function more flexible and customizable. + """ + metafields: [MetafieldInput!] = [] +} + +""" +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! +} + +"""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!]! +} + +""" +The `DiscountCodeBasic` object lets you manage +[amount off discounts](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) +that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a +fixed value or a percentage off the products in an order, but don't apply to shipping costs. + +The `DiscountCodeBasic` object stores information about amount off code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBasic`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBasic) +object has similar functionality to the `DiscountCodeBasic` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBasic { + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """A list codes that customers can use to redeem the discount.""" + codes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 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 { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean + + """The code that customers use to apply the discount.""" + code: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The number of billing cycles for which the discount can be applied, which is + useful for subscription-based discounts. For example, if you set this field to + `3`, then the discount only applies to the first three billing cycles of a + subscription. If you specify `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int +} + +"""Return type for `discountCodeBasicUpdate` mutation.""" +type DiscountCodeBasicUpdatePayload { + """The discount code that was updated.""" + codeDiscountNode: DiscountCodeNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountCodeBulkActivate` mutation.""" +type DiscountCodeBulkActivatePayload { + """The asynchronous job that activates the discounts.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountCodeBulkDeactivate` mutation.""" +type DiscountCodeBulkDeactivatePayload { + """The asynchronous job that deactivates the discounts.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountCodeBulkDelete` mutation.""" +type DiscountCodeBulkDeletePayload { + """The asynchronous job that deletes the discounts.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeBxgy` object lets you manage +[buy X get Y discounts (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) +that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers +by offering them additional items at a discounted price or for free when they purchase a specified quantity +of items. + +The `DiscountCodeBxgy` object stores information about BXGY code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The [`DiscountAutomaticBxgy`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticBxgy) +object has similar functionality to the `DiscountCodeBxgy` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeBxgy { + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """A list codes that customers can use to redeem the discount.""" + codes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 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 { + """ + The + [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with + [Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean + + """The code that customers use to apply the discount.""" + code: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The items eligible for the discount and the required quantity of each to receive the discount. + """ + customerBuys: DiscountCustomerBuysInput + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: Int +} + +"""Return type for `discountCodeBxgyUpdate` mutation.""" +type DiscountCodeBxgyUpdatePayload { + """The code discount that was updated.""" + codeDiscountNode: DiscountCodeNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountCodeDeactivate` mutation.""" +type DiscountCodeDeactivatePayload { + """The deactivated code discount.""" + codeDiscountNode: DiscountCodeNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""Return type for `discountCodeDelete` mutation.""" +type DiscountCodeDeletePayload { + """The ID of the code discount that was deleted.""" + deletedCodeDiscountId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeFreeShipping` object lets you manage +[free shipping discounts](https://help.shopify.com/manual/discounts/discount-types/free-shipping) +that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are +promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases. + +The `DiscountCodeFreeShipping` object stores information about free shipping code discounts that apply to +specific [products and variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountProducts), +[collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCollections), +or [all items in a cart](https://shopify.dev/docs/api/admin-graphql/latest/objects/AllDiscountItems). + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including limitations and considerations. + +> Note: +> The +[`DiscountAutomaticFreeShipping`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping) +object has similar functionality to the `DiscountCodeFreeShipping` object, but discounts are automatically applied, +without the need for customers to enter a code. +""" +type DiscountCodeFreeShipping { + """ + Whether the discount applies on one-time purchases. + A one-time purchase is a transaction where you pay a + single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean! + + """ + The number of times that the discount has been used. + For example, if a "Buy 3, Get 1 Free" t-shirt discount + is automatically applied in 200 transactions, then the + discount has been used 200 times. + This value is updated asynchronously. As a result, + it might be lower than the actual usage count until the + asynchronous process is completed. + """ + asyncUsageCount: Int! + + """A list codes that customers can use to redeem the discount.""" + codes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 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 { + """ + The + [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that you can use in combination with the shipping discount. + """ + combinesWith: DiscountCombinesWithInput + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + The date and time when the discount expires and is no longer available to customers. + For discounts without a fixed expiration date, specify `null`. + """ + endsAt: DateTime + + """Whether a customer can only use the discount once.""" + appliesOncePerCustomer: Boolean + + """The code that customers use to apply the discount.""" + code: String + + """ + The maximum number of times that a customer can use the discount. + For discounts with unlimited usage, specify `null`. + """ + usageLimit: Int + + """ + The context defining which buyers can use the discount. + You can target specific customer IDs, customer segments, or make the discount available to all buyers. + """ + context: DiscountContextInput + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + The shipping destinations where the free shipping discount can be applied. You + can specify whether the discount applies to all countries, or specify + individual countries. + """ + destination: DiscountShippingDestinationSelectionInput + + """ + The maximum shipping price, in the shop's currency, that qualifies for free shipping. +

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

+ For example, if set to `3`, then the discount only applies to the first three + billing cycles of a subscription. If set to `0`, then the discount applies indefinitely. + """ + recurringCycleLimit: Int + + """ + Whether the discount applies on one-time purchases. A one-time purchase is a + transaction where you pay a single time for a product, without any ongoing + commitments or recurring charges. + """ + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products on a recurring basis. + """ + appliesOnSubscription: Boolean +} + +"""Return type for `discountCodeFreeShippingUpdate` mutation.""" +type DiscountCodeFreeShippingUpdatePayload { + """The discount code that was updated.""" + codeDiscountNode: DiscountCodeNode + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The `DiscountCodeNode` object enables you to manage [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) +that are applied when customers enter a code at checkout. For example, you can +offer discounts where customers have to enter a code to redeem an amount off +discount on products, variants, or collections in a store. Or, you can offer +discounts where customers have to enter a code to get free shipping. Merchants +can create and share discount codes individually with customers. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related queries, mutations, limitations, and considerations. +""" +type DiscountCodeNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """The underlying code discount object.""" + codeDiscount: DiscountCode! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +""" +An auto-generated type for paginating through multiple DiscountCodeNodes. +""" +type DiscountCodeNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountCodeNodeEdge!]! + + """ + A list of nodes that are contained in DiscountCodeNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountCodeNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountCodeNode and a cursor during pagination. +""" +type DiscountCodeNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountCodeNodeEdge.""" + node: DiscountCodeNode! +} + +"""Return type for `discountCodeRedeemCodeBulkDelete` mutation.""" +type DiscountCodeRedeemCodeBulkDeletePayload { + """The asynchronous job that deletes the discount codes.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +"""The set of valid sort keys for the DiscountCode query.""" +enum DiscountCodeSortKeys { + """Sort by the `code` value.""" + CODE + + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +A list of collections that the discount can have as a prerequisite or a list of +collections to which the discount can be applied. +""" +type DiscountCollections { + """ + The list of collections that the discount can have as a prerequisite or the + list of collections to which the discount can be applied. + """ + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! +} + +"""The input fields for collections attached to a discount.""" +input DiscountCollectionsInput { + """Specifies list of collection ids to add.""" + add: [ID!] + + """Specifies list of collection ids to remove.""" + remove: [ID!] +} + +""" +The [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that you can use in combination with +[Shopify discount types](https://help.shopify.com/manual/discounts/discount-types). +""" +type DiscountCombinesWith { + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean! + + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean! + + """ + Whether the discount combines with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean! +} + +""" +The input fields to determine which discount classes the discount can combine with. +""" +input DiscountCombinesWithInput { + """ + Whether the discount combines with the + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean = false + + """ + Whether the discount combines with the + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + orderDiscounts: Boolean = false + + """ + Whether the discount combines + with the + [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + shippingDiscounts: Boolean = false +} + +"""The type used to define which buyers can use the discount.""" +union DiscountContext = DiscountBuyerSelectionAll | DiscountCustomerSegments | DiscountCustomers + +"""The input fields for the buyers who can use this discount.""" +input DiscountContextInput { + """All buyers are eligible for this discount.""" + all: DiscountBuyerSelection + + """The list of customer IDs to add or remove from the list of customers.""" + customers: DiscountCustomersInput + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput +} + +""" +Defines the geographic scope where a shipping discount can be applied based on +customer shipping destinations. This configuration determines which countries +are eligible for the promotional offer. + +For example, a "Free Shipping to EU" promotion would specify European Union +countries, while a domestic-only sale might target just the store's home country. + +The object includes both specific country selections and an option to include +all remaining countries not explicitly listed, providing flexible geographic +targeting for international merchants. +""" +type DiscountCountries { + """The codes for the countries where the discount can be applied.""" + countries: [CountryCode!]! + + """ + Whether the discount is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! +} + +""" +The input fields for a list of countries to add or remove from the free shipping discount. +""" +input DiscountCountriesInput { + """ + The country codes to add to the list of countries where the discount applies. + """ + add: [CountryCode!] + + """ + The country codes to remove from the list of countries where the discount applies. + """ + remove: [CountryCode!] + + """ + Whether the discount code is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean = false +} + +""" +Indicates that a shipping discount applies to all countries without restriction, +enabling merchants to create truly global promotions. This object represents +universal geographic eligibility for shipping discount offers. + +For example, an online store launching a "Worldwide Free Shipping" campaign +would use this configuration to ensure customers from any country can benefit +from the promotion. + +This setting simplifies international discount management by eliminating the +need to manually select individual countries or regions, making it ideal for +digital products or stores with comprehensive global shipping capabilities. +""" +type DiscountCountryAll { + """ + Whether the discount can be applied to all countries as shipping destination. This value is always `true`. + """ + allCountries: Boolean! +} + +""" +Creates the broadest possible discount reach by targeting all customers, +regardless of their purchase history or segment membership. This gives merchants +maximum flexibility to run store-wide promotions without worrying about customer +eligibility restrictions. + +For example, a flash sale or grand opening promotion would target all customers +to maximize participation and store visibility. + +Learn more about [customer targeting](https://help.shopify.com/manual/discounts/). +""" +type DiscountCustomerAll { + """ + Whether the discount can be applied by all customers. This value is always `true`. + """ + allCustomers: Boolean! +} + +""" +The prerequisite items and prerequisite value that a customer must have on the order for the discount to be applicable. +""" +type DiscountCustomerBuys { + """ + If the discount is applicable when a customer buys a one-time purchase. + """ + isOneTimePurchase: Boolean! + + """ + If the discount is applicable when a customer buys a subscription purchase. + """ + isSubscription: Boolean! + + """The items required for the discount to be applicable.""" + items: DiscountItems! + + """The prerequisite value.""" + value: DiscountCustomerBuysValue! +} + +"""The input fields for prerequisite items and quantity for the discount.""" +input DiscountCustomerBuysInput { + """The quantity of prerequisite items.""" + value: DiscountCustomerBuysValueInput + + """ + The IDs of items that the customer buys. The items can be either collections or products. + """ + items: DiscountItemsInput + + """ + If the discount is applicable when a customer buys a one-time purchase. + """ + isOneTimePurchase: Boolean = true + + """ + If the discount is applicable when a customer buys a subscription purchase. + """ + isSubscription: Boolean = false +} + +""" +The prerequisite for the discount to be applicable. For example, the discount +might require a customer to buy a minimum quantity of select items. +Alternatively, the discount might require a customer to spend a minimum amount +on select items. +""" +union DiscountCustomerBuysValue = DiscountPurchaseAmount | DiscountQuantity + +""" +The input fields for prerequisite quantity or minimum purchase amount required for the discount. +""" +input DiscountCustomerBuysValueInput { + """The quantity of prerequisite items.""" + quantity: UnsignedInt64 + + """ + The prerequisite minimum purchase amount required for the discount to be applicable. + """ + amount: Decimal +} + +""" +The items in the order that qualify for the discount, their quantities, and the total value of the discount. +""" +type DiscountCustomerGets { + """Whether the discount applies on regular one-time-purchase items.""" + appliesOnOneTimePurchase: Boolean! + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean! + + """The items to which the discount applies.""" + items: DiscountItems! + + """Entitled quantity and the discount value.""" + value: DiscountCustomerGetsValue! +} + +""" +Specifies the items that will be discounted, the quantity of items that will be discounted, and the value of discount. +""" +input DiscountCustomerGetsInput { + """The quantity of items discounted and the discount value.""" + value: DiscountCustomerGetsValueInput + + """ + The IDs of the items that the customer gets. The items can be either collections or products. + """ + items: DiscountItemsInput + + """Whether the discount applies on regular one-time-purchase items.""" + appliesOnOneTimePurchase: Boolean + + """ + Whether the discount applies on subscription items. + [Subscriptions](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) + enable customers to purchase products + on a recurring basis. + """ + appliesOnSubscription: Boolean +} + +""" +The type of the discount value and how it will be applied. For example, it might +be a percentage discount on a fixed number of items. Alternatively, it might be +a fixed amount evenly distributed across all items or on each individual item. A +third example is a percentage discount on all items. +""" +union DiscountCustomerGetsValue = DiscountAmount | DiscountOnQuantity | DiscountPercentage + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountCustomerGetsValueInput { + """The quantity of the items that are discounted and the discount value.""" + discountOnQuantity: DiscountOnQuantityInput + + """ + The percentage value of the discount. Value must be between 0.00 - 1.00. + + Note: BXGY doesn't support percentage. + """ + percentage: Float + + """ + The value of the discount. + + Note: BXGY doesn't support discountAmount. + """ + discountAmount: DiscountAmountInput +} + +""" +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!]! +} + +""" +Represents customer segments that are eligible to receive a specific discount, +allowing merchants to target promotions to defined groups of customers. This +enables personalized marketing campaigns based on customer behavior and +characteristics. + +For example, a "VIP Customer 15% Off" promotion might target a segment of +high-value repeat customers, while a "New Customer Welcome" discount could focus +on first-time buyers. + +Segment-based discounts help merchants create more relevant promotional +experiences and improve conversion rates by showing the right offers to the +right customers at the right time. +""" +type DiscountCustomerSegments { + """The list of customer segments who are eligible for the discount.""" + segments: [Segment!]! +} + +""" +The input fields for which customer segments to add to or remove from the discount. +""" +input DiscountCustomerSegmentsInput { + """ + A list of customer segments to add to the current list of customer segments. + """ + add: [ID!] + + """ + A list of customer segments to remove from the current list of customer segments. + """ + remove: [ID!] +} + +""" +The type used for targeting a set of customers who are eligible for the +discount. For example, the discount might be available to all customers or it +might only be available to a specific set of customers. You can define the set +of customers by targeting a list of customer segments, or by targeting a list of +specific customers. +""" +union DiscountCustomerSelection = DiscountCustomerAll | DiscountCustomerSegments | DiscountCustomers + +"""The input fields for the customers who can use this discount.""" +input DiscountCustomerSelectionInput { + """Whether all customers can use this discount.""" + all: Boolean + + """The list of customer IDs to add or remove from the list of customers.""" + customers: DiscountCustomersInput + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput +} + +""" +The input fields for which customers to add to or remove from the discount. +""" +input DiscountCustomersInput { + """ + A list of customers to add to the current list of customers who can use the discount. + """ + add: [ID!] + + """ + A list of customers to remove from the current list of customers who can use the discount. + """ + remove: [ID!] +} + +""" +The type of discount that will be applied. Currently, only a percentage discount is supported. +""" +union DiscountEffect = DiscountAmount | DiscountPercentage + +""" +The input fields for how the discount will be applied. Currently, only percentage off is supported. +""" +input DiscountEffectInput { + """ + The percentage value of the discount. Value must be between 0.00 - 1.00. + """ + percentage: Float + + """The value of the discount.""" + amount: Decimal +} + +"""Possible error codes that can be returned by `DiscountUserError`.""" +enum DiscountErrorCode { + """The input value is blank.""" + BLANK + + """The input value needs to be blank.""" + PRESENT + + """The input value should be equal to the value allowed.""" + EQUAL_TO + + """The input value should be greater than the minimum allowed value.""" + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """The input value is invalid.""" + INVALID + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """The input value should be less than the maximum value allowed.""" + LESS_THAN + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Too many arguments provided.""" + TOO_MANY_ARGUMENTS + + """Missing a required argument.""" + MISSING_ARGUMENT + + """ + The active period overlaps with other automatic discounts. At any given time, only 25 automatic discounts can be active. + """ + ACTIVE_PERIOD_OVERLAP + + """The end date should be after the start date.""" + END_DATE_BEFORE_START_DATE + + """The value exceeded the maximum allowed value.""" + EXCEEDED_MAX + + """Specify a minimum subtotal or a quantity, but not both.""" + MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT + + """The value is outside of the allowed range.""" + VALUE_OUTSIDE_RANGE + + """The attribute selection contains conflicting settings.""" + CONFLICT + + """The value is already present through another selection.""" + IMPLICIT_DUPLICATE + + """The input value is already present.""" + DUPLICATE + + """The input value isn't included in the list.""" + INCLUSION + + """The `combinesWith` settings are invalid for the discount class.""" + INVALID_COMBINES_WITH_FOR_DISCOUNT_CLASS + + """The discountClass is invalid for the price rule.""" + INVALID_DISCOUNT_CLASS_FOR_PRICE_RULE + + """ + The active period overlaps with too many other app-provided discounts. There's + a limit on the number of app discounts that can be active at any given time. + """ + MAX_APP_DISCOUNTS + + """ + A discount cannot have both appliesOnOneTimePurchase and appliesOnSubscription set to false. + """ + APPLIES_ON_NOTHING + + """ + Recurring cycle limit must be a valid integer greater than or equal to 0. + """ + RECURRING_CYCLE_LIMIT_NOT_A_VALID_INTEGER + + """ + Recurring cycle limit must be 1 when discount does not apply to subscription items. + """ + MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS + + """Either function ID or function handle must be provided.""" + MISSING_FUNCTION_IDENTIFIER + + """Only one of function ID or function handle is allowed.""" + MULTIPLE_FUNCTION_IDENTIFIERS +} + +""" +The type used to target the items required for discount eligibility, or the +items to which the application of a discount might apply. For example, for a +customer to be eligible for a discount, they're required to add an item from a +specified collection to their order. Alternatively, a customer might be required +to add a specific product or product variant. When using this type to target +which items the discount will apply to, the discount might apply to all items on +the order, or to specific products and product variants, or items in a given collection. +""" +union DiscountItems = AllDiscountItems | DiscountCollections | DiscountProducts + +""" +The input fields for the items attached to a discount. You can specify the discount items by product ID or collection ID. +""" +input DiscountItemsInput { + """ + The + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) + that the discount applies to. + """ + products: DiscountProductsInput + + """The collections that are attached to a discount.""" + collections: DiscountCollectionsInput + + """ + Whether all items should be selected for the discount. Not supported for Buy X get Y discounts. + """ + all: Boolean +} + +""" +Specifies the minimum item quantity required for discount eligibility, helping +merchants create volume-based promotions that encourage larger purchases. This +threshold applies to qualifying items in the customer's cart. + +For example, a "Buy 3, Get 10% Off" promotion would set the minimum quantity to 3 items. + +Learn more about [discount requirements](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountApplication). +""" +type DiscountMinimumQuantity { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64! +} + +"""The input fields for the minimum quantity required for the discount.""" +input DiscountMinimumQuantityInput { + """ + The minimum quantity of items that's required for the discount to be applied. + """ + greaterThanOrEqualToQuantity: UnsignedInt64 +} + +""" +The type of minimum requirement that must be met for the discount to be applied. +For example, a customer must spend a minimum subtotal to be eligible for the +discount. Alternatively, a customer must purchase a minimum quantity of items to +be eligible for the discount. +""" +union DiscountMinimumRequirement = DiscountMinimumQuantity | DiscountMinimumSubtotal + +""" +The input fields for the minimum quantity or subtotal required for a discount. +""" +input DiscountMinimumRequirementInput { + """The minimum required quantity.""" + quantity: DiscountMinimumQuantityInput + + """The minimum required subtotal.""" + subtotal: DiscountMinimumSubtotalInput +} + +"""The minimum subtotal required for the discount to apply.""" +type DiscountMinimumSubtotal { + """The minimum subtotal that's required for the discount to be applied.""" + greaterThanOrEqualToSubtotal: MoneyV2! +} + +"""The input fields for the minimum subtotal required for a discount.""" +input DiscountMinimumSubtotalInput { + """The minimum subtotal that's required for the discount to be applied.""" + greaterThanOrEqualToSubtotal: Decimal +} + +""" +The `DiscountNode` object enables you to manage +[discounts](https://help.shopify.com/manual/discounts), which are applied at +checkout or on a cart. + + +Discounts are a way for merchants to promote sales and special offers, or as +customer loyalty rewards. Discounts can apply to [orders, products, or +shipping](https://shopify.dev/docs/apps/build/discounts#discount-classes), and +can be either automatic or code-based. For example, you can offer customers a +buy X get Y discount that's automatically applied when purchases meet specific +criteria. Or, you can offer discounts where customers have to enter a code to +redeem an amount off discount on products, variants, or collections in a store. + +Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), +including related mutations, limitations, and considerations. +""" +type DiscountNode implements HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """ + A discount that's applied at checkout or on cart. + + + Discounts can be [automatic or code-based](https://shopify.dev/docs/apps/build/discounts#discount-methods). + """ + discount: Discount! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +"""An auto-generated type for paginating through multiple DiscountNodes.""" +type DiscountNodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountNodeEdge!]! + + """ + A list of nodes that are contained in DiscountNodeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountNode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountNode and a cursor during pagination. +""" +type DiscountNodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountNodeEdge.""" + node: DiscountNode! +} + +""" +Defines quantity-based discount rules that specify how many items are eligible +for a discount effect. This object enables bulk purchase incentives and tiered +pricing strategies. + +For example, a "Buy 4 candles, get 2 candles 50% off (mix and match)" promotion +would specify a quantity threshold of 2 items that will receive a percentage +discount effect, encouraging customers to purchase more items to unlock savings. + +The configuration combines quantity requirements with discount effects, allowing +merchants to create sophisticated pricing rules that reward larger purchases and +increase average order values. +""" +type DiscountOnQuantity { + """The discount's effect on qualifying items.""" + effect: DiscountEffect! + + """ + The number of items being discounted. The customer must have at least this + many items of specified products or product variants in their order to be + eligible for the discount. + """ + quantity: DiscountQuantity! +} + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountOnQuantityInput { + """The quantity of items that are discounted.""" + quantity: UnsignedInt64 + + """The percentage value of the discount.""" + effect: DiscountEffectInput +} + +""" +Creates percentage-based discounts that reduce item prices by a specified +percentage amount. This gives merchants a flexible way to offer proportional +savings that automatically scale with order value. + +For example, a "20% off all winter clothing" promotion would use this object to +apply consistent percentage savings across different price points. + +Learn more about [discount types](https://help.shopify.com/manual/discounts/). +""" +type DiscountPercentage { + """The percentage value of the discount.""" + percentage: Float! +} + +""" +A list of products and product variants that the discount can have as a +prerequisite or a list of products and product variants to which the discount +can be applied. +""" +type DiscountProducts { + """ + The list of product variants that the discount can have as a prerequisite or + the list of product variants to which the discount can be applied. + """ + productVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """ + The list of products that the discount can have as a prerequisite or the list + of products to which the discount can be applied. + """ + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductConnection! +} + +""" +The input fields for adding and removing +[products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) and +[product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) +as prerequisites or as eligible items for a discount. +""" +input DiscountProductsInput { + """ + The IDs of the products to add as prerequisites or as eligible items for a discount. + """ + productsToAdd: [ID!] + + """ + The IDs of the products to remove as prerequisites or as eligible items for a discount. + """ + productsToRemove: [ID!] + + """ + The IDs of the product variants to add as prerequisites or as eligible items for a discount. + """ + productVariantsToAdd: [ID!] + + """ + The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + """ + productVariantsToRemove: [ID!] +} + +""" +A purchase amount in the context of a discount. This object can be used to +define the minimum purchase amount required for a discount to be applicable. +""" +type DiscountPurchaseAmount { + """The purchase amount in decimal format.""" + amount: Decimal! +} + +""" +Defines a quantity threshold for discount eligibility or application. This +simple object specifies the number of items required to trigger or calculate +discount benefits. + +For example, a "Buy 3, Get 1 Free" promotion would use DiscountQuantity to +define the minimum purchase quantity of 3 items, or a bulk discount might +specify quantity tiers like 10+ items for wholesale pricing. + +The quantity value determines how discounts interact with cart contents, whether +setting minimum purchase requirements or defining quantity-based discount calculations. +""" +type DiscountQuantity { + """The quantity of items.""" + quantity: UnsignedInt64! +} + +""" +A code that a customer can use at checkout to receive a discount. For example, a +customer can use the redeem code 'SUMMER20' at checkout to receive a 20% +discount on their entire order. +""" +type DiscountRedeemCode { + """ + The number of times that the discount redeem code has been used. This value is + updated asynchronously and can be different than the actual usage count. + """ + asyncUsageCount: Int! + + """The code that a customer can use at checkout to receive a discount.""" + code: String! + + """The application that created the discount redeem code.""" + createdBy: App + + """A globally-unique ID of the discount redeem code.""" + id: ID! +} + +"""Return type for `discountRedeemCodeBulkAdd` mutation.""" +type DiscountRedeemCodeBulkAddPayload { + """ + The ID of bulk operation that creates multiple unique discount codes. + You can use the + [`discountRedeemCodeBulkCreation` query](https://shopify.dev/api/admin-graphql/latest/queries/discountRedeemCodeBulkCreation) + to track the status of the bulk operation. + """ + bulkCreation: DiscountRedeemCodeBulkCreation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DiscountUserError!]! +} + +""" +The properties and status of a bulk discount redeem code creation operation. +""" +type DiscountRedeemCodeBulkCreation implements Node { + """ + The result of each code creation operation associated with the bulk creation + operation including any errors that might have occurred during the operation. + """ + codes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DiscountRedeemCodeBulkCreationCodeConnection! + + """The number of codes to create.""" + codesCount: Int! + + """The date and time when the bulk creation was created.""" + createdAt: DateTime! + + """The code discount associated with the created codes.""" + discountCode: DiscountCodeNode + + """ + Whether the bulk creation is still queued (`false`) or has been run (`true`). + """ + done: Boolean! + + """The number of codes that weren't created successfully.""" + failedCount: Int! + + """A globally-unique ID.""" + id: ID! + + """The number of codes created successfully.""" + importedCount: Int! +} + +""" +A result of a discount redeem code creation operation created by a bulk creation. +""" +type DiscountRedeemCodeBulkCreationCode { + """The code to use in the discount redeem code creation operation.""" + code: String! + + """ + The successfully created discount redeem code. + + If the discount redeem code couldn't be created, then this field is `null``. + """ + discountRedeemCode: DiscountRedeemCode + + """ + A list of errors that occurred during the creation operation of the discount redeem code. + """ + errors: [DiscountUserError!]! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodeBulkCreationCodes. +""" +type DiscountRedeemCodeBulkCreationCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeBulkCreationCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeBulkCreationCodeEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [DiscountRedeemCodeBulkCreationCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCodeBulkCreationCode and a cursor during pagination. +""" +type DiscountRedeemCodeBulkCreationCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountRedeemCodeBulkCreationCodeEdge.""" + node: DiscountRedeemCodeBulkCreationCode! +} + +""" +An auto-generated type for paginating through multiple DiscountRedeemCodes. +""" +type DiscountRedeemCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DiscountRedeemCodeEdge!]! + + """ + A list of nodes that are contained in DiscountRedeemCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DiscountRedeemCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountRedeemCode and a cursor during pagination. +""" +type DiscountRedeemCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DiscountRedeemCodeEdge.""" + node: DiscountRedeemCode! +} + +"""The input fields for the redeem code to attach to a discount.""" +input DiscountRedeemCodeInput { + """ + The code that a customer can use at checkout to receive the associated discount. + """ + code: String! +} + +"""A shareable URL for a discount code.""" +type DiscountShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """The type of page that's associated with the URL.""" + targetType: DiscountShareableUrlTargetType! + + """The title of the page that's associated with the URL.""" + title: String! + + """The URL for the discount code.""" + url: URL! +} + +"""The type of page where a shareable discount URL lands.""" +enum DiscountShareableUrlTargetType { + """The URL lands on a home page.""" + HOME + + """The URL lands on a product page.""" + PRODUCT + + """The URL lands on a collection page.""" + COLLECTION +} + +""" +The type used to target the eligible countries of an order's shipping +destination for which the discount applies. For example, the discount might be +applicable when shipping to all countries, or only to a set of countries. +""" +union DiscountShippingDestinationSelection = DiscountCountries | DiscountCountryAll + +""" +The input fields for the destinations where the free shipping discount will be applied. +""" +input DiscountShippingDestinationSelectionInput { + """Whether the discount code applies to all countries.""" + all: Boolean = false + + """A list of countries where the discount code will apply.""" + countries: DiscountCountriesInput +} + +"""The set of valid sort keys for the Discount query.""" +enum DiscountSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `ends_at` value.""" + ENDS_AT + + """Sort by the `id` value.""" + ID + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `starts_at` value.""" + STARTS_AT + + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +""" +The status of the discount that describes its availability, +expiration, or pending activation. +""" +enum DiscountStatus { + """The discount is currently available for use.""" + ACTIVE + + """The discount has reached its end date and is no longer valid.""" + EXPIRED + + """The discount is set to become active at a future date.""" + SCHEDULED +} + +""" +The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. +""" +enum DiscountTargetType { + """The discount applies onto line items.""" + LINE_ITEM + + """The discount applies onto shipping lines.""" + SHIPPING_LINE +} + +"""The type of the subscription discount.""" +enum DiscountType { + """Manual discount type.""" + MANUAL + + """Code discount type.""" + CODE_DISCOUNT + + """Automatic discount type.""" + AUTOMATIC_DISCOUNT +} + +"""An error that occurs during the execution of a discount mutation.""" +type DiscountUserError implements DisplayableError { + """The error code.""" + code: DiscountErrorCode + + """Extra information about this error.""" + extraInfo: String + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Represents an error in the input of a mutation.""" +interface DisplayableError { + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Return type for `disputeEvidenceUpdate` mutation.""" +type DisputeEvidenceUpdatePayload { + """The updated dispute evidence.""" + disputeEvidence: ShopifyPaymentsDisputeEvidence + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DisputeEvidenceUpdateUserError!]! +} + +"""An error that occurs during the execution of `DisputeEvidenceUpdate`.""" +type DisputeEvidenceUpdateUserError implements DisplayableError { + """The error code.""" + code: DisputeEvidenceUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `DisputeEvidenceUpdateUserError`. +""" +enum DisputeEvidenceUpdateUserErrorCode { + """Dispute evidence could not be found.""" + DISPUTE_EVIDENCE_NOT_FOUND + + """Evidence already accepted.""" + EVIDENCE_ALREADY_ACCEPTED + + """Evidence past due date.""" + EVIDENCE_PAST_DUE_DATE + + """Combined files size is too large.""" + FILES_SIZE_EXCEEDED_LIMIT + + """File upload failed. Please try again.""" + FILE_NOT_FOUND + + """Individual file size is too large.""" + TOO_LARGE + + """The input value is invalid.""" + INVALID +} + +"""The possible statuses of a dispute.""" +enum DisputeStatus { + ACCEPTED + LOST + NEEDS_RESPONSE + UNDER_REVIEW + WON + + """ + Status previously used by Stripe to indicate that a dispute led to a refund. + """ + CHARGE_REFUNDED @deprecated(reason: "CHARGE_REFUNDED is no longer supported.") +} + +"""The possible types for a dispute.""" +enum DisputeType { + """The dispute has turned into a chargeback.""" + CHARGEBACK + + """The dispute is in the inquiry phase.""" + INQUIRY +} + +"""A distance, which includes a numeric value and a unit of measurement.""" +type Distance { + """The unit of measurement for `value`.""" + unit: DistanceUnit! + + """The distance value using the unit system specified with `unit`.""" + value: Float! +} + +"""Units of measurement for distance.""" +enum DistanceUnit { + """Metric system unit of distance.""" + KILOMETERS + + """Imperial system unit of distance.""" + MILES +} + +""" +A unique string that represents the address of a Shopify store on the Internet. +""" +type Domain implements Node { + """The host name of the domain. For example, `example.com`.""" + host: String! + + """A globally-unique ID.""" + id: ID! + + """The localization of the domain, if the domain doesn't redirect.""" + localization: DomainLocalization + + """The web presence of the domain.""" + marketWebPresence: MarketWebPresence + + """Whether SSL is enabled.""" + sslEnabled: Boolean! + + """The URL of the domain (for example, `https://example.com`).""" + url: URL! +} + +"""The country and language settings assigned to a domain.""" +type DomainLocalization { + """ + The ISO codes for the domain’s alternate locales. For example, `["en"]`. + """ + alternateLocales: [String!]! + + """ + The ISO code for the country assigned to the domain. For example, `"CA"` or "*" for a domain set to "Rest of world". + """ + country: String + + """The ISO code for the domain’s default locale. For example, `"en"`.""" + defaultLocale: String! +} + +""" +An order that a merchant creates on behalf of a customer. Draft orders are +useful for merchants that need to do the following tasks: + +- Create new orders for sales made by phone, in person, by chat, or elsewhere. +When a merchant accepts payment for a draft order, an order is created. +- Send invoices to customers to pay with a secure checkout link. +- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory. +- Re-create orders manually from active sales channels. +- Sell products at discount or wholesale rates. +- Take pre-orders. + +For draft orders in multiple currencies `presentment_money` is the source of +truth for what a customer is going to be charged and `shop_money` is an estimate +of what the merchant might receive in their shop currency. + +**Caution:** Only use this data if it's required for your app's functionality. +Shopify will restrict [access to +scopes](https://shopify.dev/api/usage/access-scopes) for apps that don't have a +legitimate use for the associated data. + +Draft orders created on or after April 1, 2025 will be automatically purged after one year of inactivity. +""" +type DraftOrder implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLocalizedFields & HasMetafields & LegacyInteroperability & Navigable & Node { + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """Whether all variant prices have been overridden.""" + allVariantPricesOverridden: Boolean! + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean! + + """Whether any variant prices have been overridden.""" + anyVariantPricesOverridden: Boolean! + + """The custom order-level discount applied.""" + appliedDiscount: DraftOrderAppliedDiscount + + """The billing address of the customer.""" + billingAddress: MailingAddress + + """Whether the billing address matches the shipping address.""" + billingAddressMatchesShippingAddress: Boolean! + + """ + The date and time when the draft order was converted to a new order, + and had it's status changed to **Completed**. + """ + completedAt: DateTime + + """The date and time when the draft order was created in Shopify.""" + createdAt: DateTime! + + """The shop currency used for calculation.""" + currencyCode: CurrencyCode! + + """ + The custom information added to the draft order on behalf of the customer. + """ + customAttributes: [Attribute!]! + + """The customer who will be sent an invoice.""" + customer: Customer + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """All discount codes applied.""" + discountCodes: [String!]! + + """ + The email address of the customer, which is used to send notifications. + """ + email: String + + """The list of events associated with the draft order.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """Whether the merchant has added timeline comments to the draft order.""" + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! + + """The subject defined for the draft invoice email template.""" + invoiceEmailTemplateSubject: String! + + """The date and time when the invoice was last emailed to the customer.""" + invoiceSentAt: DateTime + + """ + The link to the checkout, which is sent to the customer in the invoice email. + """ + invoiceUrl: URL + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The list of the line items in the draft order.""" + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DraftOrderLineItemConnection! + + """ + A subtotal of the line items and corresponding discounts, + excluding shipping charges, shipping discounts, taxes, or order discounts. + """ + lineItemsSubtotalPrice: MoneyBag! + + """List of localization extensions for the resource.""" + localizationExtensions( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizationExtensionPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") + + """List of localized fields for the resource.""" + localizedFields( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizedFieldPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizedFieldConnection! + + """The name of the selected market.""" + marketName: String! @deprecated(reason: "This field is now incompatible with Markets.") + + """The selected country code that determines the pricing.""" + marketRegionCountryCode: CountryCode! @deprecated(reason: "This field is now incompatible with Markets.") + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The identifier for the draft order, which is unique within the store. For example, _#D1223_. + """ + name: String! + + """The text from an optional note attached to the draft order.""" + note2: String + + """The order that was created from the draft order.""" + order: Order + + """The associated payment terms for this draft order.""" + paymentTerms: PaymentTerms + + """The assigned phone number.""" + phone: String + + """The list of platform discounts applied.""" + platformDiscounts: [DraftOrderPlatformDiscount!]! + + """The purchase order number.""" + poNumber: String + + """The payment currency used for calculation.""" + presentmentCurrencyCode: CurrencyCode! + + """The purchasing entity.""" + purchasingEntity: PurchasingEntity + + """ + Whether the draft order is ready and can be completed. + Draft orders might have asynchronous operations that can take time to finish. + """ + ready: Boolean! + + """The time after which inventory will automatically be restocked.""" + reserveInventoryUntil: DateTime + + """The shipping address of the customer.""" + shippingAddress: MailingAddress + + """The line item containing the shipping information and costs.""" + shippingLine: ShippingLine + + """The status of the draft order.""" + status: DraftOrderStatus! + + """ + The subtotal, in shop currency, of the line items and their discounts, + excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The subtotal, of the line items and their discounts, excluding shipping charges, shipping discounts, and taxes. + """ + subtotalPriceSet: MoneyBag! + + """ + The comma separated list of tags associated with the draft order. + Updating `tags` overwrites any existing tags that were previously added to the draft order. + To add new tags without overwriting existing tags, use the + [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) mutation. + """ + tags: [String!]! + + """Whether the draft order is tax exempt.""" + taxExempt: Boolean! + + """ + The list of of taxes lines charged for each line item and shipping line. + """ + taxLines: [TaxLine!]! + + """Whether the line item prices include taxes.""" + taxesIncluded: Boolean! + + """Total discounts.""" + totalDiscountsSet: MoneyBag! + + """Total price of line items, excluding discounts.""" + totalLineItemsPriceSet: MoneyBag! + + """ + The total price, in shop currency, includes taxes, shipping charges, and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """The total price, includes taxes, shipping charges, and discounts.""" + totalPriceSet: MoneyBag! + + """ + The sum of individual line item quantities. + If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle. + """ + totalQuantityOfLineItems: Int! + + """The total shipping price in shop currency.""" + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """The total shipping price.""" + totalShippingPriceSet: MoneyBag! + + """The total tax in shop currency.""" + totalTax: Money! @deprecated(reason: "Use `totalTaxSet` instead.") + + """The total tax.""" + totalTaxSet: MoneyBag! + + """The total weight in grams of the draft order.""" + totalWeight: UnsignedInt64! + + """ + Fingerprint of the current cart. + In order to have bundles work, the fingerprint must be passed to + each request as it was previously returned, unmodified. + """ + transformerFingerprint: String + + """ + The date and time when the draft order was last changed. + The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01. + """ + updatedAt: DateTime! + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean! + + """The list of warnings raised while calculating.""" + warnings: [DraftOrderWarning!]! +} + +"""The order-level discount applied to a draft order.""" +type DraftOrderAppliedDiscount { + """ + Amount of the order-level discount that's applied to the draft order in shop currency. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + amountSet: MoneyBag! + + """Amount of money discounted.""" + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """Description of the order-level discount.""" + description: String! + + """Name of the order-level discount.""" + title: String + + """ + The order level discount amount. If `valueType` is `"percentage"`, + then `value` is the percentage discount. + """ + value: Float! + + """Type of the order-level discount.""" + valueType: DraftOrderAppliedDiscountType! +} + +""" +The input fields for applying an order-level discount to a draft order. +""" +input DraftOrderAppliedDiscountInput { + """The applied amount of the discount in the specified currency.""" + amountWithCurrency: MoneyInput + + """Reason for the discount.""" + description: String + + """Title of the discount.""" + title: String + + """ + The value of the discount. + If the type of the discount is fixed amount, then this is a fixed amount in your shop currency. + If the type is percentage, then this is the percentage. + """ + value: Float! + + """The type of discount.""" + valueType: DraftOrderAppliedDiscountType! +} + +"""The valid discount types that can be applied to a draft order.""" +enum DraftOrderAppliedDiscountType { + """A fixed amount in the store's currency.""" + FIXED_AMOUNT + + """A percentage of the order subtotal.""" + PERCENTAGE +} + +"""The available delivery options for a draft order.""" +type DraftOrderAvailableDeliveryOptions { + """ + The available local delivery rates for the draft order. Requires a customer + with a valid shipping address and at least one line item. + """ + availableLocalDeliveryRates: [DraftOrderShippingRate!]! + + """ + The available local pickup options for the draft order. Requires at least one line item. + """ + availableLocalPickupOptions: [PickupInStoreLocation!]! + + """ + The available shipping rates for the draft order. Requires a customer with a + valid shipping address and at least one line item. + """ + availableShippingRates: [DraftOrderShippingRate!]! + + """Returns information about pagination of local pickup options.""" + pageInfo: PageInfo! +} + +""" +The input fields used to determine available delivery options for a draft order. +""" +input DraftOrderAvailableDeliveryOptionsInput { + """ + The discount that will be applied to the draft order. + A draft order line item can have one discount. A draft order can also have one order-level discount. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + Discount codes that will be attempted to be applied to the draft order. If the + draft isn't eligible for any given discount code it will be skipped during calculation. + """ + discountCodes: [String!] + + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """ + Product variant line item or custom line item associated to the draft order. + Each draft order must include at least one line item. + """ + lineItems: [DraftOrderLineItemInput!] + + """The mailing address to where the order will be shipped.""" + shippingAddress: MailingAddressInput + + """ + The selected country code that determines the pricing of the draft order. + """ + marketRegionCountryCode: CountryCode + + """The purchasing entity for the draft order.""" + purchasingEntity: PurchasingEntityInput +} + +"""Return type for `draftOrderBulkAddTags` mutation.""" +type DraftOrderBulkAddTagsPayload { + """The asynchronous job for adding tags to the draft orders.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `draftOrderBulkDelete` mutation.""" +type DraftOrderBulkDeletePayload { + """The asynchronous job for deleting the draft orders.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `draftOrderBulkRemoveTags` mutation.""" +type DraftOrderBulkRemoveTagsPayload { + """The asynchronous job for removing tags from the draft orders.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""A warning indicating that a bundle was added to a draft order.""" +type DraftOrderBundleAddedWarning implements DraftOrderWarning { + """The error code.""" + errorCode: String! + + """The input field that the warning applies to.""" + field: String! + + """The warning message.""" + message: String! +} + +"""Return type for `draftOrderCalculate` mutation.""" +type DraftOrderCalculatePayload { + """The calculated properties for a draft order.""" + calculatedDraftOrder: CalculatedDraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `draftOrderComplete` mutation.""" +type DraftOrderCompletePayload { + """The completed draft order.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""An auto-generated type for paginating through multiple DraftOrders.""" +type DraftOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderEdge!]! + + """ + A list of nodes that are contained in DraftOrderEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `draftOrderCreateFromOrder` mutation.""" +type DraftOrderCreateFromOrderPayload { + """The created draft order.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `draftOrderCreate` mutation.""" +type DraftOrderCreatePayload { + """The created draft order.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields to specify the draft order to delete by its ID.""" +input DraftOrderDeleteInput { + """The ID of the draft order to delete.""" + id: ID! +} + +"""Return type for `draftOrderDelete` mutation.""" +type DraftOrderDeletePayload { + """The ID of the deleted draft order.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A warning indicating that a discount cannot be applied to a draft order. +""" +type DraftOrderDiscountNotAppliedWarning implements DraftOrderWarning { + """The code of the discount that can't be applied.""" + discountCode: String + + """The title of the discount that can't be applied.""" + discountTitle: String + + """The error code.""" + errorCode: String! + + """The input field that the warning applies to.""" + field: String! + + """The warning message.""" + message: String! + + """The price rule that can't be applied.""" + priceRule: PriceRule +} + +"""Return type for `draftOrderDuplicate` mutation.""" +type DraftOrderDuplicatePayload { + """The newly duplicated draft order.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one DraftOrder and a cursor during pagination. +""" +type DraftOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DraftOrderEdge.""" + node: DraftOrder! +} + +"""The input fields used to create or update a draft order.""" +input DraftOrderInput { + """ + The discount that will be applied to the draft order. + A draft order line item can have one discount. A draft order can also have one order-level discount. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + The list of discount codes that will be attempted to be applied to the draft order. + If the draft isn't eligible for any given discount code it will be skipped during calculation. + """ + discountCodes: [String!] + + """ + Whether or not to accept automatic discounts on the draft order during calculation. + If false, only discount codes and custom draft order discounts (see `appliedDiscount`) will be applied. + If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts. + """ + acceptAutomaticDiscounts: Boolean + + """The mailing address associated with the payment method.""" + billingAddress: MailingAddressInput + + """ + The extra information added to the draft order on behalf of the customer. + """ + customAttributes: [AttributeInput!] + + """The customer's email address.""" + email: String + + """ + The list of product variant or custom line item. + Each draft order must include at least one line item. + Accepts a maximum of 499 line items. + + NOTE: Draft orders don't currently support subscriptions. + """ + lineItems: [DraftOrderLineItemInput!] + + """ + The list of metafields attached to the draft order. An existing metafield can not be used when creating a draft order. + """ + metafields: [MetafieldInput!] + + """ + The localized fields attached to the draft order. For example, Tax IDs. + """ + localizedFields: [LocalizedFieldInput!] + + """ + The text of an optional note that a shop owner can attach to the draft order. + """ + note: String + + """The mailing address to where the order will be shipped.""" + shippingAddress: MailingAddressInput + + """The shipping line object, which details the shipping method used.""" + shippingLine: ShippingLineInput + + """ + A comma separated list of tags that have been added to the draft order. + """ + tags: [String!] + + """ + Whether or not taxes are exempt for the draft order. + If false, then Shopify will refer to the taxable field for each line item. + If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead. + """ + taxExempt: Boolean + + """Whether to use the customer's default address.""" + useCustomerDefaultAddress: Boolean + + """ + Whether the draft order will be visible to the customer on the self-serve portal. + """ + visibleToCustomer: Boolean + + """The time after which inventory reservation will expire.""" + reserveInventoryUntil: DateTime + + """The payment currency of the customer for this draft order.""" + presentmentCurrencyCode: CurrencyCode + + """The customer's phone number.""" + phone: String + + """The fields used to create payment terms.""" + paymentTerms: PaymentTermsInput + + """The purchasing entity for the draft order.""" + purchasingEntity: PurchasingEntityInput + + """ + The source 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 + + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean + + """The purchase order number.""" + poNumber: String + + """The unique token identifying the draft order.""" + sessionToken: String + + """Fingerprint to guarantee bundles are handled correctly.""" + transformerFingerprint: String +} + +"""Return type for `draftOrderInvoicePreview` mutation.""" +type DraftOrderInvoicePreviewPayload { + """The draft order invoice email rendered as HTML to allow previewing.""" + previewHtml: HTML + + """The subject preview for the draft order invoice email.""" + previewSubject: HTML + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `draftOrderInvoiceSend` mutation.""" +type DraftOrderInvoiceSendPayload { + """The draft order an invoice email is sent for.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""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!]! @deprecated(reason: "Use `components` instead.") + + """The components of the draft order line item.""" + components: [DraftOrderLineItem!]! + + """ + Whether the line item is custom (`true`) or contains a product variant (`false`). + """ + custom: Boolean! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The list of additional information (metafields) with the associated types. + """ + customAttributesV2: [TypedAttribute!]! + + """The line item price, in shop currency, after discounts are applied.""" + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """The total price with discounts applied.""" + discountedTotalSet: MoneyBag! + + """ + The `discountedTotal` divided by `quantity`, equal to the value of the discount per unit in the shop currency. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """The unit price with discounts applied.""" + discountedUnitPriceSet: MoneyBag! @deprecated(reason: "Use `approximateDiscountedUnitPriceSet` instead.") + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """The weight of the line item in grams.""" + grams: Int @deprecated(reason: "Use `weight` instead.") + + """A globally-unique ID.""" + id: ID! + + """The image of the product variant.""" + image: Image + + """Whether the line item represents the purchase of a gift card.""" + isGiftCard: Boolean! + + """The name of the product.""" + name: String! + + """ + The total price, in shop currency, excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotal: Money! @deprecated(reason: "Use `originalTotalSet` instead.") + + """ + The total price excluding discounts, equal to the original unit price multiplied by quantity. + """ + originalTotalSet: MoneyBag! + + """The price, in shop currency, without any discounts applied.""" + originalUnitPrice: Money! @deprecated(reason: "Use `originalUnitPriceWithCurrency` instead.") + + """The price without any discounts applied.""" + originalUnitPriceSet: MoneyBag! + + """The original custom line item input price.""" + originalUnitPriceWithCurrency: MoneyV2 + + """The price override for the line item.""" + priceOverride: MoneyV2 + + """The product for the line item.""" + product: Product + + """ + The quantity of items. For a bundle item, this is the quantity of bundles, + not the quantity of items contained in the bundles themselves. + """ + quantity: Int! + + """Whether physical shipping is required for the variant.""" + requiresShipping: Boolean! + + """The SKU number of the product variant.""" + sku: String + + """A list of tax lines.""" + taxLines: [TaxLine!]! + + """Whether the variant is taxable.""" + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """The total discount applied in shop currency.""" + totalDiscount: Money! @deprecated(reason: "Use `totalDiscountSet` instead.") + + """The total discount amount.""" + totalDiscountSet: MoneyBag! + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String! + + """The product variant for the line item.""" + variant: ProductVariant + + """The name of the variant.""" + variantTitle: String + + """The name of the vendor who created the product variant.""" + vendor: String + + """The weight unit and value.""" + weight: Weight +} + +"""The input fields representing the components of a line item.""" +input DraftOrderLineItemComponentInput { + """The ID of the product variant corresponding to the component.""" + variantId: ID + + """The quantity of the component.""" + quantity: Int! + + """ + The UUID of the component. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with parent line items. + """ + uuid: String +} + +""" +An auto-generated type for paginating through multiple DraftOrderLineItems. +""" +type DraftOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DraftOrderLineItemEdge!]! + + """ + A list of nodes that are contained in DraftOrderLineItemEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [DraftOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DraftOrderLineItem and a cursor during pagination. +""" +type DraftOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of DraftOrderLineItemEdge.""" + node: DraftOrderLineItem! +} + +"""The input fields for a line item included in a draft order.""" +input DraftOrderLineItemInput { + """The custom discount to be applied.""" + appliedDiscount: DraftOrderAppliedDiscountInput + + """A generic custom attribute using a key value pair.""" + customAttributes: [AttributeInput!] + + """ + The price in presentment currency, without any discounts applied, for a custom line item. + If this value is provided, `original_unit_price` will be ignored. This field is ignored when `variantId` is provided. + Note: All presentment currencies for a single draft should be the same and match the + presentment currency of the draft order. + """ + originalUnitPriceWithCurrency: MoneyInput + + """The line item quantity.""" + quantity: Int! + + """ + Whether physical shipping is required for a custom line item. This field is ignored when `variantId` is provided. + """ + requiresShipping: Boolean + + """ + The SKU number for custom line items only. This field is ignored when `variantId` is provided. + """ + sku: String + + """ + Whether the custom line item is taxable. This field is ignored when `variantId` is provided. + """ + taxable: Boolean + + """ + Title of the line item. This field is ignored when `variantId` is provided. + """ + title: String + + """ + The ID of the product variant corresponding to the line item. + Must be null for custom line items, otherwise required. + """ + variantId: ID + + """ + The weight unit and value inputs for custom line items only. + This field is ignored when `variantId` is provided. + """ + weight: WeightInput + + """ + The UUID of the draft order line item. Must be unique and consistent across requests. + This field is mandatory in order to manipulate drafts with bundles. + """ + uuid: String + + """The components of the draft order line item.""" + components: [DraftOrderLineItemComponentInput!] + + """ + If the line item doesn't already have a price override input, setting `generatePriceOverride` to `true` will + create a price override from the current price. + """ + generatePriceOverride: Boolean + + """ + The price override for the line item. Should be set in presentment currency. + + This price will be used in place of the product variant's catalog price in this draft order. + + If the override's presentment currency doesn't match the draft order's presentment currency, it will be + converted over to match the draft order's presentment currency. This will occur if the input is defined in a + differing currency, or if some other event causes the draft order's currency to change. + + Price overrides can't be applied to bundle components. If this line item becomes part of a bundle the price + override will be removed. In the case of a cart transform, this may mean that a price override is applied to + this line item earlier in its lifecycle, and is removed later when the transform occurs. + """ + priceOverride: MoneyInput +} + +""" +A warning indicating that the market region country code is not supported with Markets. +""" +type DraftOrderMarketRegionCountryCodeNotSupportedWarning implements DraftOrderWarning { + """The error code.""" + errorCode: String! + + """The input field that the warning applies to.""" + field: String! + + """The warning message.""" + message: String! +} + +"""The platform discounts applied to the draft order.""" +type DraftOrderPlatformDiscount { + """Price reduction allocations across the draft order's lines.""" + allocations: [DraftOrderPlatformDiscountAllocation!]! + + """Whether the discount is an automatic discount.""" + automaticDiscount: Boolean! + + """Whether the discount is a buy x get y discount.""" + bxgyDiscount: Boolean! + + """If a code-based discount, the code used to add the discount.""" + code: String + + """The discount class.""" + discountClass: DiscountClass! @deprecated(reason: "Use `discountClasses` instead.") + + """The discount classes.""" + discountClasses: [DiscountClass!]! + + """The discount node for the platform discount.""" + discountNode: DiscountNode + + """The ID of the discount.""" + id: ID + + """Whether the discount is line, order or shipping level.""" + presentationLevel: String! + + """The short summary of the discount.""" + shortSummary: String! + + """The summary of the discount.""" + summary: String! + + """The name of the discount.""" + title: String! + + """The discount total amount in shop currency.""" + totalAmount: MoneyV2! + + """ + The amount of money discounted, with values shown in both shop currency and presentment currency. + """ + totalAmountPriceSet: MoneyBag! +} + +"""Price reduction allocations across the draft order's lines.""" +type DraftOrderPlatformDiscountAllocation { + """The ID of the allocation.""" + id: ID + + """The quantity of the target being discounted.""" + quantity: Int + + """Amount of the discount allocated to the target.""" + reductionAmount: MoneyV2! + + """ + Amount of the discount allocated to the target in both shop currency and presentment currency. + """ + reductionAmountSet: MoneyBag! + + """The element of the draft being discounted.""" + target: DraftOrderPlatformDiscountAllocationTarget +} + +"""The element of the draft being discounted.""" +union DraftOrderPlatformDiscountAllocationTarget = CalculatedDraftOrderLineItem | DraftOrderLineItem | ShippingLine + +""" +A shipping rate is an additional cost added to the cost of the products that were ordered. +""" +type DraftOrderShippingRate { + """The code of the shipping rate.""" + code: String! + + """Unique identifier for this shipping rate.""" + handle: String! + + """The cost associated with the shipping rate.""" + price: MoneyV2! + + """The source of the shipping rate.""" + source: String! + + """The name of the shipping rate.""" + title: String! +} + +"""The set of valid sort keys for the DraftOrder query.""" +enum DraftOrderSortKeys { + """Sort by the `customer_name` value.""" + CUSTOMER_NAME + + """Sort by the `id` value.""" + ID + + """Sort by the `number` value.""" + NUMBER + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `status` value.""" + STATUS + + """Sort by the `total_price` value.""" + TOTAL_PRICE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The valid statuses for a draft order.""" +enum DraftOrderStatus { + """The draft order has been paid.""" + COMPLETED + + """An invoice for the draft order has been sent to the customer.""" + INVOICE_SENT + + """ + The draft order is open. It has not been paid, and an invoice hasn't been sent. + """ + OPEN +} + +"""Represents a draft order tag.""" +type DraftOrderTag implements Node { + """Handle of draft order tag.""" + handle: String! + + """ID of draft order tag.""" + id: ID! + + """Title of draft order tag.""" + title: String! +} + +"""Return type for `draftOrderUpdate` mutation.""" +type DraftOrderUpdatePayload { + """The updated draft order.""" + draftOrder: DraftOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A warning that is displayed to the merchant when a change is made to a draft order. +""" +interface DraftOrderWarning { + """The error code.""" + errorCode: String! + + """The input field that the warning applies to.""" + field: String! + + """The warning message.""" + message: String! +} + +"""The duty details for a line item.""" +type Duty implements Node { + """ + The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty. + """ + countryCodeOfOrigin: CountryCode + + """The harmonized system code of the item used in calculating the duty.""" + harmonizedSystemCode: String + + """A globally-unique ID.""" + id: ID! + + """The amount of the duty.""" + price: MoneyBag! + + """A list of taxes charged on the duty.""" + taxLines: [TaxLine!]! +} + +"""A sale associated with a duty charge.""" +type DutySale implements Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """The duty for the associated sale.""" + duty: Duty! + + """The unique ID for the sale.""" + id: ID! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""The attribute editable information.""" +type EditableProperty { + """Whether the attribute is locked for editing.""" + locked: Boolean! + + """The reason the attribute is locked for editing.""" + reason: FormattedString +} + +"""The input fields for an email.""" +input EmailInput { + """Specifies the email subject.""" + subject: String + + """Specifies the email recipient.""" + to: String + + """Specifies the email sender.""" + from: String + + """Specifies the email body.""" + body: String + + """Specifies any bcc recipients for the email.""" + bcc: [String!] + + """Specifies a custom message to include in the email.""" + customMessage: String +} + +"""The shop's entitlements.""" +type EntitlementsType { + """Represents the markets for the shop.""" + markets: MarketsType! +} + +"""An error that occurs during the execution of a server pixel mutation.""" +type ErrorsServerPixelUserError implements DisplayableError { + """The error code.""" + code: ErrorsServerPixelUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsServerPixelUserError`. +""" +enum ErrorsServerPixelUserErrorCode { + """A server pixel doesn't exist for this app and shop.""" + NOT_FOUND + + """ + A server pixel already exists for this app and shop. Only one server pixel can exist for any app and shop combination. + """ + ALREADY_EXISTS + + """ + PubSubProject and PubSubTopic values resulted in an address that is not a + valid GCP pub/sub format.Address format should be pubsub://project:topic. + """ + PUB_SUB_ERROR + + """ + Server Pixel must be configured with a valid AWS Event Bridge or GCP pub/sub endpoint address to be connected. + """ + NEEDS_CONFIGURATION_TO_CONNECT +} + +"""An error that occurs during the execution of a web pixel mutation.""" +type ErrorsWebPixelUserError implements DisplayableError { + """The error code.""" + code: ErrorsWebPixelUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ErrorsWebPixelUserError`. +""" +enum ErrorsWebPixelUserErrorCode { + """The input value is blank.""" + BLANK + + """The input value is already taken.""" + TAKEN + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """ + The provided settings does not match the expected settings definition on the app. + """ + INVALID_SETTINGS + + """An error occurred and the web pixel couldnt be deleted.""" + UNABLE_TO_DELETE @deprecated(reason: "`UNABLE_TO_DELETE` is deprecated. Use `UNEXPECTED_ERROR` instead.") + + """No extension found.""" + NO_EXTENSION + + """The provided settings is not a valid JSON.""" + INVALID_CONFIGURATION_JSON + + """ + The settings definition of the web pixel extension is in an invalid state on the app. + """ + INVALID_SETTINGS_DEFINITION + + """An unexpected error occurred.""" + UNEXPECTED_ERROR + + """The provided runtime context is invalid.""" + INVALID_RUNTIME_CONTEXT +} + +""" +Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the +addition of a product. +""" +interface Event { + """The action that occured.""" + action: String! + + """The name of the app that created the event.""" + appTitle: String + + """Whether the event was created by an app.""" + attributeToApp: Boolean! + + """Whether the event was caused by an admin user.""" + attributeToUser: Boolean! + + """The date and time when the event was created.""" + createdAt: DateTime! + + """Whether the event is critical.""" + criticalAlert: Boolean! + + """A globally-unique ID.""" + id: ID! + + """Human readable text that describes the event.""" + message: FormattedString! +} + +"""Return type for `eventBridgeServerPixelUpdate` mutation.""" +type EventBridgeServerPixelUpdatePayload { + """The server pixel as configured by the mutation.""" + serverPixel: ServerPixel + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ErrorsServerPixelUserError!]! +} + +"""Return type for `eventBridgeWebhookSubscriptionCreate` mutation.""" +type EventBridgeWebhookSubscriptionCreatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! + + """The webhook subscription that was created.""" + webhookSubscription: WebhookSubscription +} + +"""The input fields for an EventBridge webhook subscription.""" +input EventBridgeWebhookSubscriptionInput { + """The format in which the webhook subscription should send the data.""" + format: WebhookSubscriptionFormat + + """ + The list of fields to be included in the webhook subscription. Only the fields + specified will be included in the webhook payload. If null, then all fields + will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). + """ + includeFields: [String!] + + """ + A constraint specified using search syntax that ensures only webhooks that + match the specified filter are emitted. See our [guide on + filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. + """ + filter: String + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!] + + """ + A list of identifiers specifying metafields to include in the webhook payload. + """ + metafields: [HasMetafieldsMetafieldIdentifierInput!] + + """The ARN of the EventBridge partner event source.""" + arn: ARN +} + +"""Return type for `eventBridgeWebhookSubscriptionUpdate` mutation.""" +type EventBridgeWebhookSubscriptionUpdatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! + + """The webhook subscription that was updated.""" + webhookSubscription: WebhookSubscription +} + +"""An auto-generated type for paginating through multiple Events.""" +type EventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [EventEdge!]! + + """ + A list of nodes that are contained in EventEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Event!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Event and a cursor during pagination. +""" +type EventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of EventEdge.""" + node: Event! +} + +"""The set of valid sort keys for the Event query.""" +enum EventSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID +} + +"""The type of the resource that generated the event.""" +enum EventSubjectType { + """A CompanyLocation resource generated the event.""" + COMPANY_LOCATION + + """A Company resource generated the event.""" + COMPANY + + """A Customer resource generated the event.""" + CUSTOMER + + """A DraftOrder resource generated the event.""" + DRAFT_ORDER + + """A InventoryTransfer resource generated the event.""" + INVENTORY_TRANSFER + + """A Collection resource generated the event.""" + COLLECTION + + """A Product resource generated the event.""" + PRODUCT + + """A ProductVariant resource generated the event.""" + PRODUCT_VARIANT + + """A Article resource generated the event.""" + ARTICLE + + """A Blog resource generated the event.""" + BLOG + + """A Comment resource generated the event.""" + COMMENT + + """A Page resource generated the event.""" + PAGE + + """A DiscountAutomaticBxgy resource generated the event.""" + DISCOUNT_AUTOMATIC_BXGY + + """A DiscountAutomaticNode resource generated the event.""" + DISCOUNT_AUTOMATIC_NODE + + """A DiscountCodeNode resource generated the event.""" + DISCOUNT_CODE_NODE + + """A DiscountNode resource generated the event.""" + DISCOUNT_NODE + + """A PriceRule resource generated the event.""" + PRICE_RULE + + """A Order resource generated the event.""" + ORDER + + """ + Subject type is not available. This usually means that the subject isn't available in the current + version of the API, using a newer API version may resolve this. + """ + UNKNOWN +} + +"""An item for exchange.""" +type ExchangeLineItem implements Node { + """A globally-unique ID.""" + id: ID! + + """ + The order line item for the exchange. If the exchange line has been processed + multiple times, this will be the first associated line item and won't reflect + all processed values. + """ + lineItem: LineItem @deprecated(reason: "Use `lineItems` instead.") + + """The order line items for the exchange.""" + lineItems: [LineItem!] + + """The quantity of the exchange item that can be processed.""" + processableQuantity: Int! + + """The quantity of the exchange item that have been processed.""" + processedQuantity: Int! + + """The number of units ordered, including refunded and removed units.""" + quantity: Int! + + """The quantity of the exchange item that haven't been processed.""" + unprocessedQuantity: Int! + + """The ID of the variant at time of return creation.""" + variantId: ID +} + +""" +The input fields for an applied discount on a calculated exchange line item. +""" +input ExchangeLineItemAppliedDiscountInput { + """The description of the discount.""" + description: String + + """The value of the discount as a fixed amount or a percentage.""" + value: ExchangeLineItemAppliedDiscountValueInput! +} + +""" +The input value for an applied discount on a calculated exchange line item. +Can either specify the value as a fixed amount or a percentage. +""" +input ExchangeLineItemAppliedDiscountValueInput { + """The value of the discount as a fixed amount.""" + amount: MoneyInput + + """The value of the discount as a percentage.""" + percentage: Float +} + +""" +An auto-generated type for paginating through multiple ExchangeLineItems. +""" +type ExchangeLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeLineItemEdge!]! + + """ + A list of nodes that are contained in ExchangeLineItemEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeLineItem and a cursor during pagination. +""" +type ExchangeLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ExchangeLineItemEdge.""" + node: ExchangeLineItem! +} + +""" +The input fields for new line items to be added to the order as part of an exchange. +""" +input ExchangeLineItemInput { + """The gift card codes associated with the physical gift cards.""" + giftCardCodes: [String!] + + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID + + """The quantity of the item to be added.""" + quantity: Int! + + """The discount to be applied to the exchange line item.""" + appliedDiscount: ExchangeLineItemAppliedDiscountInput +} + +"""The input fields for removing an exchange line item from a return.""" +input ExchangeLineItemRemoveFromReturnInput { + """The ID of the exchange line item to remove.""" + exchangeLineItemId: ID! + + """The quantity of the associated exchange line item to be removed.""" + quantity: Int! +} + +""" +An exchange where existing items on an order are returned and new items are added to the order. +""" +type ExchangeV2 implements Node { + """The details of the new items in the exchange.""" + additions: ExchangeV2Additions! + + """The date and time when the exchange was completed.""" + completedAt: DateTime + + """The date and time when the exchange was created.""" + createdAt: DateTime! + + """A globally-unique ID.""" + id: ID! + + """The location where the exchange happened.""" + location: Location + + """Mirrored from Admin Exchanges.""" + mirrored: Boolean! + + """ + The text of an optional note that a shop owner can attach to the exchange. + """ + note: String + + """The refunds processed during the exchange.""" + refunds: [Refund!]! + + """The details of the returned items in the exchange.""" + returns: ExchangeV2Returns! + + """The staff member associated with the exchange.""" + staffMember: StaffMember + + """The amount of money that was paid or refunded as part of the exchange.""" + totalAmountProcessedSet: MoneyBag! + + """The difference in values of the items that were exchanged.""" + totalPriceSet: MoneyBag! + + """The order transactions related to the exchange.""" + transactions: [OrderTransaction!]! +} + +"""New items associated to the exchange.""" +type ExchangeV2Additions { + """The list of new items for the exchange.""" + lineItems: [ExchangeV2LineItem!]! + + """The subtotal of the items being added, including discounts.""" + subtotalPriceSet: MoneyBag! + + """The summary of all taxes of the items being added.""" + taxLines: [TaxLine!]! + + """ + The total price of the items being added, including discounts and taxes. + """ + totalPriceSet: MoneyBag! +} + +"""An auto-generated type for paginating through multiple ExchangeV2s.""" +type ExchangeV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ExchangeV2Edge!]! + + """ + A list of nodes that are contained in ExchangeV2Edge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ExchangeV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ExchangeV2 and a cursor during pagination. +""" +type ExchangeV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ExchangeV2Edge.""" + node: ExchangeV2! +} + +"""Contains information about an item in the exchange.""" +type ExchangeV2LineItem { + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The total line price, in shop and presentment currencies, after discounts are applied. + """ + discountedTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit after line item discounts are applied. + """ + discountedUnitPriceSet: MoneyBag! + + """ + Name of the service provider who fulfilled the order. + + Valid values are either **manual** or the name of the provider. + For example, **amazon**, **shipwire**. + + Deleted fulfillment services will return null. + """ + fulfillmentService: FulfillmentService + + """Indiciates if this line item is a gift card.""" + giftCard: Boolean! + + """The gift cards associated with the line item.""" + giftCards: [GiftCard!]! + + """Whether the line item represents the purchase of a gift card.""" + isGiftCard: Boolean! + + """The line item associated with this object.""" + lineItem: LineItem + + """The name of the product.""" + name: String! + + """ + The total price, in shop and presentment currencies, before discounts are applied. + """ + originalTotalSet: MoneyBag! + + """ + The price, in shop and presentment currencies, + of a single variant unit before line item discounts are applied. + """ + originalUnitPriceSet: MoneyBag! + + """The number of products that were purchased.""" + quantity: Int! + + """Whether physical shipping is required for the variant.""" + requiresShipping: Boolean! + + """The SKU number of the product variant.""" + sku: String + + """The TaxLine object connected to this line item.""" + taxLines: [TaxLine!]! + + """Whether the variant is taxable.""" + taxable: Boolean! + + """ + The title of the product or variant. This field only applies to custom line items. + """ + title: String! + + """The product variant of the line item.""" + variant: ProductVariant + + """The name of the variant.""" + variantTitle: String + + """The name of the vendor who created the product variant.""" + vendor: String +} + +"""Return items associated to the exchange.""" +type ExchangeV2Returns { + """The list of return items for the exchange.""" + lineItems: [ExchangeV2LineItem!]! + + """ + The amount of the order-level discount for the items and shipping being + returned, which doesn't contain any line item discounts. + """ + orderDiscountAmountSet: MoneyBag! + + """The amount of money to be refunded for shipping.""" + shippingRefundAmountSet: MoneyBag! + + """The subtotal of the items being returned.""" + subtotalPriceSet: MoneyBag! + + """The summary of all taxes of the items being returned.""" + taxLines: [TaxLine!]! + + """The amount of money to be refunded for tip.""" + tipRefundAmountSet: MoneyBag! + + """The total value of the items being returned.""" + totalPriceSet: MoneyBag! +} + +"""Represents a video hosted outside of Shopify.""" +type ExternalVideo implements File & Media & Node { + """A word or phrase to describe the contents or the function of a file.""" + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """The embed URL of the video for the respective host.""" + embedUrl: URL! + + """The URL.""" + embeddedUrl: URL! @deprecated(reason: "Use `originUrl` instead.") + + """Any errors that have occurred on the file.""" + fileErrors: [FileError!]! + + """The status of the file.""" + fileStatus: FileStatus! + + """The host of the external video.""" + host: MediaHost! + + """A globally-unique ID.""" + id: ID! + + """The media content type.""" + mediaContentType: MediaContentType! + + """Any errors which have occurred on the media.""" + mediaErrors: [MediaError!]! + + """The warnings attached to the media.""" + mediaWarnings: [MediaWarning!]! + + """The origin URL of the video on the respective host.""" + originUrl: URL! + + """The preview image for the media.""" + preview: MediaPreviewImage + + """Current status of the media.""" + status: MediaStatus! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +"""Requirements that must be met before an app can be installed.""" +type FailedRequirement { + """ + Action to be taken to resolve a failed requirement, including URL link. + """ + action: NavigationItem + + """ + A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app + encounters when trying to make use of their Shop and its resources. + """ + message: String! +} + +""" +A additional cost, charged by the merchant, on an order. Examples include return shipping fees and restocking fees. +""" +interface Fee { + """The unique ID for the Fee.""" + id: ID! +} + +"""A sale associated with a fee.""" +type FeeSale implements Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """ + The fee associated with the sale. It can be null if the fee was deleted. + """ + fee: Fee + + """The unique ID for the sale.""" + id: ID! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""A file interface.""" +interface File { + """A word or phrase to describe the contents or the function of a file.""" + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """Any errors that have occurred on the file.""" + fileErrors: [FileError!]! + + """The status of the file.""" + fileStatus: FileStatus! + + """A globally-unique ID.""" + id: ID! + + """The preview image for the media.""" + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +"""Return type for `fileAcknowledgeUpdateFailed` mutation.""" +type FileAcknowledgeUpdateFailedPayload { + """The updated file(s).""" + files: [File!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FilesUserError!]! +} + +"""An auto-generated type for paginating through multiple Files.""" +type FileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FileEdge!]! + + """ + A list of nodes that are contained in FileEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [File!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The possible content types for a file object.""" +enum FileContentType { + """A Shopify-hosted image.""" + IMAGE + + """A Shopify-hosted generic file.""" + FILE + + """ + A Shopify-hosted video file. It's recommended to use this type for all video files. + """ + VIDEO + + """An externally hosted video.""" + EXTERNAL_VIDEO + + """A Shopify-hosted 3D model.""" + MODEL_3D +} + +"""The input fields that are required to create a file object.""" +input FileCreateInput { + """ + The name of the file. If provided, then the file is created with the specified filename. + If not provided, then the filename from the `originalSource` is used. + """ + filename: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """How to handle if filename is already in use.""" + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """ + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String! +} + +"""The input fields for handling if filename is already in use.""" +enum FileCreateInputDuplicateResolutionMode { + """Append a UUID if filename is already in use.""" + APPEND_UUID + + """Raise an error if filename is already in use.""" + RAISE_ERROR + + """Replace the existing file if filename is already in use.""" + REPLACE +} + +"""Return type for `fileCreate` mutation.""" +type FileCreatePayload { + """The newly created files.""" + files: [File!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FilesUserError!]! +} + +"""Return type for `fileDelete` mutation.""" +type FileDeletePayload { + """The IDs of the deleted files.""" + deletedFileIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FilesUserError!]! +} + +""" +An auto-generated type which holds one File and a cursor during pagination. +""" +type FileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of FileEdge.""" + node: File! +} + +""" +A file error. This typically occurs when there is an issue with the file itself causing it to fail validation. +Check the file before attempting to upload again. +""" +type FileError { + """Code representing the type of error.""" + code: FileErrorCode! + + """Additional details regarding the error.""" + details: String + + """Translated error message.""" + message: String! +} + +"""The error types for a file.""" +enum FileErrorCode { + """File error has occurred for an unknown reason.""" + UNKNOWN + + """File could not be processed because the signed URL was invalid.""" + INVALID_SIGNED_URL + + """File could not be processed because the image could not be downloaded.""" + IMAGE_DOWNLOAD_FAILURE + + """File could not be processed because the image could not be processed.""" + IMAGE_PROCESSING_FAILURE + + """ + File timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_ERROR + + """ + File could not be created because the external video could not be found. + """ + EXTERNAL_VIDEO_NOT_FOUND + + """ + File could not be created because the external video is not listed or is private. + """ + EXTERNAL_VIDEO_UNLISTED + + """ + File could not be created because the external video has an invalid aspect ratio. + """ + EXTERNAL_VIDEO_INVALID_ASPECT_RATIO + + """ + File could not be created because embed permissions are disabled for this video. + """ + EXTERNAL_VIDEO_EMBED_DISABLED + + """ + File could not be created because video is either not found or still transcoding. + """ + EXTERNAL_VIDEO_EMBED_NOT_FOUND_OR_TRANSCODING + + """ + File could not be processed because the source could not be downloaded. + """ + GENERIC_FILE_DOWNLOAD_FAILURE + + """File could not be created because the size is too large.""" + GENERIC_FILE_INVALID_SIZE + + """File could not be created because the metadata could not be read.""" + VIDEO_METADATA_READ_ERROR + + """File could not be created because it has an invalid file type.""" + VIDEO_INVALID_FILETYPE_ERROR + + """ + File could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + File could not be created because it does not meet the maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + File could not be created because it does not meet the minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + File could not be created because it does not meet the maximum height requirement. + """ + VIDEO_MAX_HEIGHT_ERROR + + """ + File could not be created because it does not meet the minimum duration requirement. + """ + VIDEO_MIN_DURATION_ERROR + + """ + File could not be created because it does not meet the maximum duration requirement. + """ + VIDEO_MAX_DURATION_ERROR + + """Video failed validation.""" + VIDEO_VALIDATION_ERROR + + """Model failed validation.""" + MODEL3D_VALIDATION_ERROR + + """ + File could not be created because the model's thumbnail generation failed. + """ + MODEL3D_THUMBNAIL_GENERATION_ERROR + + """There was an issue while trying to generate a new thumbnail.""" + MODEL3D_THUMBNAIL_REGENERATION_ERROR + + """ + File could not be created because the model can't be converted to USDZ format. + """ + MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR + + """File could not be created because the model file failed processing.""" + MODEL3D_GLB_OUTPUT_CREATION_ERROR + + """File could not be created because the model file failed processing.""" + MODEL3D_PROCESSING_FAILURE + + """ + File could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """File could not be created because the image size is too large.""" + INVALID_IMAGE_FILE_SIZE + + """ + File could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + File could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + File could not be created because the cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + File could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR +} + +"""Possible error codes that can be returned by `FilesUserError`.""" +enum FilesErrorCode { + """The input value is invalid.""" + INVALID + + """File does not exist.""" + FILE_DOES_NOT_EXIST + + """File has a pending operation.""" + FILE_LOCKED + + """Filename update is only supported on Image and GenericFile.""" + UNSUPPORTED_MEDIA_TYPE_FOR_FILENAME_UPDATE + + """Specify one argument: search, IDs, or deleteAll.""" + TOO_MANY_ARGUMENTS + + """The search term must not be blank.""" + BLANK_SEARCH + + """At least one argument is required.""" + MISSING_ARGUMENTS + + """Search query isn't supported.""" + INVALID_QUERY + + """One or more associated products are suspended.""" + PRODUCT_SUSPENDED + + """Invalid filename extension.""" + INVALID_FILENAME_EXTENSION + + """The provided filename is invalid.""" + INVALID_FILENAME + + """The provided filename already exists.""" + FILENAME_ALREADY_EXISTS + + """ + The file is not supported on trial accounts that have not validated their + email. Either select a plan or verify the shop owner email to upload this file. + """ + UNACCEPTABLE_UNVERIFIED_TRIAL_ASSET + + """The file type is not supported.""" + UNACCEPTABLE_ASSET + + """ + The file is not supported on trial accounts. Select a plan to upload this file. + """ + UNACCEPTABLE_TRIAL_ASSET + + """The alt value exceeds the maximum limit of 512 characters.""" + ALT_VALUE_LIMIT_EXCEEDED + + """The file is not in the READY state.""" + NON_READY_STATE + + """File cannot be updated in a failed state.""" + INVALID_FAILED_MEDIA_STATE + + """Exceeded the limit of non-image media per shop.""" + NON_IMAGE_MEDIA_PER_SHOP_LIMIT_EXCEEDED + + """ + Cannot create file with custom filename which does not match original source extension. + """ + MISMATCHED_FILENAME_AND_ORIGINAL_SOURCE + + """Duplicate resolution mode is not supported for this file type.""" + INVALID_DUPLICATE_MODE_FOR_TYPE + + """Invalid image source url value provided.""" + INVALID_IMAGE_SOURCE_URL + + """ + Duplicate resolution mode REPLACE cannot be used without specifying filename. + """ + MISSING_FILENAME_FOR_DUPLICATE_MODE_REPLACE + + """Exceeded the limit of media per product.""" + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """The file type is not supported for referencing.""" + UNSUPPORTED_FILE_REFERENCE + + """The target resource does not exist.""" + REFERENCE_TARGET_DOES_NOT_EXIST + + """Cannot add more than 10000 references to a file.""" + TOO_MANY_FILE_REFERENCE + + """Invalid duplicate resolution mode provided.""" + INVALID_DUPLICATE_RESOLUTION_MODE +} + +"""The input fields required to create or update a file object.""" +input FileSetInput { + """ + The name of the file. If provided, then the file is created with the specified filename. + If not provided, then the filename from the `originalSource` is used. + """ + filename: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """How to handle if filename is already in use.""" + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """The ID of an existing file.""" + id: ID + + """ + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String +} + +"""The set of valid sort keys for the File query.""" +enum FileSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `filename` value.""" + FILENAME + + """Sort by the `id` value.""" + ID + + """Sort by the `original_upload_size` value.""" + ORIGINAL_UPLOAD_SIZE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The possible statuses for a file object.""" +enum FileStatus { + """File has been uploaded but hasn't been processed.""" + UPLOADED + + """File is being processed.""" + PROCESSING + + """File is ready to be displayed.""" + READY + + """File processing has failed.""" + FAILED +} + +""" +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! +} + +"""The input fields that are required to update a file object.""" +input FileUpdateInput { + """The ID of the file to be updated.""" + id: ID! + + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + The source from which to update a media image or generic file. + An external URL (for images only) or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + originalSource: String + + """ + The source from which to update the media preview image. + May be an external URL or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + """ + previewImageSource: String + + """The name of the file including its extension.""" + filename: String + + """ + The IDs of the references to add to the file. Currently only accepts product IDs. + """ + referencesToAdd: [ID!] + + """ + The IDs of the references to remove from the file. Currently only accepts product IDs. + """ + referencesToRemove: [ID!] +} + +"""Return type for `fileUpdate` mutation.""" +type FileUpdatePayload { + """The list of updated files.""" + files: [File!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FilesUserError!]! +} + +"""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 + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentEventSortKeys = HAPPENED_AT + ): FulfillmentEventConnection! + + """List of the fulfillment's line items.""" + fulfillmentLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentLineItemConnection! + + """A paginated list of fulfillment orders for the fulfillment.""" + fulfillmentOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderConnection! + + """A globally-unique ID.""" + id: ID! + + """The date and time when the fulfillment went into transit.""" + inTransitAt: DateTime + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The location that the fulfillment was processed at.""" + location: Location + + """Human readable reference identifier for this fulfillment.""" + name: String! + + """The order for which the fulfillment was created.""" + order: Order! + + """ + The address at which the fulfillment occurred. This field is intended for tax + purposes, as a full address is required for tax providers to accurately + calculate taxes. Typically this is the address of the warehouse or fulfillment + center. To retrieve a fulfillment location's address, use the + `assignedLocation` field on the + [`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) + object instead. + """ + originAddress: FulfillmentOriginAddress + + """Whether any of the line items in the fulfillment require shipping.""" + requiresShipping: Boolean! + + """Fulfillment service associated with the fulfillment.""" + service: FulfillmentService + + """The status of the fulfillment.""" + status: FulfillmentStatus! + + """Sum of all line item quantities for the fulfillment.""" + totalQuantity: Int! + + """ + Tracking information associated with the fulfillment, + such as the tracking company, tracking number, and tracking URL. + """ + trackingInfo( + """Truncate the array result to this size.""" + first: Int + ): [FulfillmentTrackingInfo!]! + + """The date and time when the fulfillment was last modified.""" + updatedAt: DateTime! +} + +"""Return type for `fulfillmentCancel` mutation.""" +type FulfillmentCancelPayload { + """The canceled fulfillment.""" + fulfillment: Fulfillment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""An auto-generated type for paginating through multiple Fulfillments.""" +type FulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentEdge!]! + + """ + A list of nodes that are contained in FulfillmentEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Fulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""A fulfillment constraint rule.""" +type FulfillmentConstraintRule implements HasMetafields & Node { + """Delivery method types that the function is associated with.""" + deliveryMethodTypes: [DeliveryMethodType!]! + + """The ID for the fulfillment constraint function.""" + function: ShopifyFunction! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +"""Return type for `fulfillmentConstraintRuleCreate` mutation.""" +type FulfillmentConstraintRuleCreatePayload { + """The newly created fulfillment constraint rule.""" + fulfillmentConstraintRule: FulfillmentConstraintRule + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentConstraintRuleCreateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleCreate`. +""" +type FulfillmentConstraintRuleCreateUserError implements DisplayableError { + """The error code.""" + code: FulfillmentConstraintRuleCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleCreateUserError`. +""" +enum FulfillmentConstraintRuleCreateUserErrorCode { + """Failed to create fulfillment constraint rule due to invalid input.""" + INPUT_INVALID + + """No Shopify Function found for provided function_id.""" + FUNCTION_NOT_FOUND + + """ + A fulfillment constraint rule already exists for the provided function_id. + """ + FUNCTION_ALREADY_REGISTERED + + """ + Function does not implement the required interface for this fulfillment constraint rule. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function is pending deletion and cannot have new rules created against it. + """ + FUNCTION_PENDING_DELETION + + """Only one of function_id or function_handle can be provided, not both.""" + MULTIPLE_FUNCTION_IDENTIFIERS + + """Either function_id or function_handle must be provided.""" + MISSING_FUNCTION_IDENTIFIER + + """Maximum number of fulfillment constraint rules reached. Limit is 10.""" + MAXIMUM_FULFILLMENT_CONSTRAINT_RULES_REACHED +} + +"""Return type for `fulfillmentConstraintRuleDelete` mutation.""" +type FulfillmentConstraintRuleDeletePayload { + """ + Whether or not the fulfillment constraint rule was successfully deleted. + """ + success: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentConstraintRuleDeleteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleDelete`. +""" +type FulfillmentConstraintRuleDeleteUserError implements DisplayableError { + """The error code.""" + code: FulfillmentConstraintRuleDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleDeleteUserError`. +""" +enum FulfillmentConstraintRuleDeleteUserErrorCode { + """Could not find fulfillment constraint rule for provided id.""" + NOT_FOUND + + """Unauthorized app scope.""" + UNAUTHORIZED_APP_SCOPE +} + +"""Return type for `fulfillmentConstraintRuleUpdate` mutation.""" +type FulfillmentConstraintRuleUpdatePayload { + """The updated fulfillment constraint rule.""" + fulfillmentConstraintRule: FulfillmentConstraintRule + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentConstraintRuleUpdateUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentConstraintRuleUpdate`. +""" +type FulfillmentConstraintRuleUpdateUserError implements DisplayableError { + """The error code.""" + code: FulfillmentConstraintRuleUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentConstraintRuleUpdateUserError`. +""" +enum FulfillmentConstraintRuleUpdateUserErrorCode { + """Could not find fulfillment constraint rule for provided id.""" + NOT_FOUND + + """Unauthorized app scope.""" + UNAUTHORIZED_APP_SCOPE +} + +"""Return type for `fulfillmentCreate` mutation.""" +type FulfillmentCreatePayload { + """The created fulfillment.""" + fulfillment: Fulfillment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentCreateV2` mutation.""" +type FulfillmentCreateV2Payload { + """The created fulfillment.""" + fulfillment: Fulfillment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The display status of a fulfillment.""" +enum FulfillmentDisplayStatus { + """Displayed as **Attempted delivery**.""" + ATTEMPTED_DELIVERY + + """Displayed as **Canceled**.""" + CANCELED + + """Displayed as **Confirmed**.""" + CONFIRMED + + """Displayed as **Delayed**.""" + DELAYED + + """Displayed as **Delivered**.""" + DELIVERED + + """Displayed as **Failure**.""" + FAILURE + + """Displayed as **Fulfilled**.""" + FULFILLED + + """Displayed as **Picked up by carrier**.""" + CARRIER_PICKED_UP + + """Displayed as **In transit**.""" + IN_TRANSIT + + """Displayed as **Label printed**.""" + LABEL_PRINTED + + """Displayed as **Label purchased**.""" + LABEL_PURCHASED + + """Displayed as **Label voided**.""" + LABEL_VOIDED + + """Displayed as **Marked as fulfilled**.""" + MARKED_AS_FULFILLED + + """Displayed as **Not delivered**.""" + NOT_DELIVERED + + """Displayed as **Out for delivery**.""" + OUT_FOR_DELIVERY + + """Displayed as **Ready for pickup**.""" + READY_FOR_PICKUP + + """Displayed as **Picked up**.""" + PICKED_UP + + """Displayed as **Submitted**.""" + SUBMITTED +} + +""" +An auto-generated type which holds one Fulfillment and a cursor during pagination. +""" +type FulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of FulfillmentEdge.""" + node: Fulfillment! +} + +""" +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 time at which this fulfillment event happened.""" + happenedAt: DateTime + + """ + The ID for the fulfillment that's associated with this fulfillment event. + """ + fulfillmentId: ID! + + """The latitude where this fulfillment event occurred.""" + latitude: Float + + """The longitude where this fulfillment event occurred.""" + longitude: Float + + """A message associated with this fulfillment event.""" + message: String + + """The province where this fulfillment event occurred.""" + province: String + + """The status of this fulfillment event.""" + status: FulfillmentEventStatus! + + """The zip code of the location where this fulfillment event occurred.""" + zip: String +} + +"""The set of valid sort keys for the FulfillmentEvent query.""" +enum FulfillmentEventSortKeys { + """Sort by the `happened_at` value.""" + HAPPENED_AT + + """Sort by the `id` value.""" + ID +} + +"""The status that describes a fulfillment or delivery event.""" +enum FulfillmentEventStatus { + """A shipping label has been purchased.""" + LABEL_PURCHASED + + """A purchased shipping label has been printed.""" + LABEL_PRINTED + + """The fulfillment is ready to be picked up.""" + READY_FOR_PICKUP + + """ + The fulfillment is confirmed. This is the default value when no other information is available. + """ + CONFIRMED + + """The fulfillment is in transit.""" + IN_TRANSIT + + """The fulfillment is out for delivery.""" + OUT_FOR_DELIVERY + + """A delivery was attempted.""" + ATTEMPTED_DELIVERY + + """The fulfillment is delayed.""" + DELAYED + + """The fulfillment was successfully delivered.""" + DELIVERED + + """The fulfillment request failed.""" + FAILURE + + """The fulfillment has been picked up by the carrier.""" + CARRIER_PICKED_UP +} + +"""A fulfillment hold currently applied on a fulfillment order.""" +type FulfillmentHold implements Node { + """The localized reason for the fulfillment hold for display purposes.""" + displayReason: String! + + """ + An identifier an app can use to reference one of many holds it applied to a fulfillment order. + This field must be unique among the holds that a single app applies to a single fulfillment order. + """ + handle: String + + """The app that created the fulfillment hold.""" + heldByApp: App + + """ + A boolean value that indicates whether the requesting app created the fulfillment hold. + """ + heldByRequestingApp: Boolean! + + """A globally-unique ID.""" + id: ID! + + """The reason for the fulfillment hold.""" + reason: FulfillmentHoldReason! + + """Additional information about the fulfillment hold reason.""" + reasonNotes: String +} + +"""The reason for a fulfillment hold.""" +enum FulfillmentHoldReason { + """The fulfillment hold is applied because payment is pending.""" + AWAITING_PAYMENT + + """The fulfillment hold is applied because of a high risk of fraud.""" + HIGH_RISK_OF_FRAUD + + """The fulfillment hold is applied because of an incorrect address.""" + INCORRECT_ADDRESS + + """The fulfillment hold is applied because inventory is out of stock.""" + INVENTORY_OUT_OF_STOCK + + """The fulfillment hold is applied because of an unknown delivery date.""" + UNKNOWN_DELIVERY_DATE + + """ + The fulfillment hold is applied because of a post purchase upsell offer. + """ + ONLINE_STORE_POST_PURCHASE_CROSS_SELL + + """ + The fulfillment hold is applied because of return items not yet received during an exchange. + """ + AWAITING_RETURN_ITEMS + + """The fulfillment hold is applied for another reason.""" + OTHER +} + +"""The input fields used to create a fulfillment from fulfillment orders.""" +input FulfillmentInput { + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput + + """ + Whether the customer is notified. + If `true`, then a notification is sent when the fulfillment is created. The default value is `false`. + """ + notifyCustomer: Boolean = false + + """ + Pairs of `fulfillment_order_id` and `fulfillment_order_line_items` that represent the fulfillment + order line items that have to be fulfilled for each fulfillment order. For any given pair, if the + fulfillment order line items are left blank then all the fulfillment order line items of the + associated fulfillment order ID will be fulfilled. + """ + lineItemsByFulfillmentOrder: [FulfillmentOrderLineItemsInput!]! + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderConnection! + + """A list of fulfillments for the fulfillment order.""" + fulfillments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentConnection! + + """A globally-unique ID.""" + id: ID! + + """The duties delivery method of this fulfillment order.""" + internationalDuties: FulfillmentOrderInternationalDuties + + """A list of the fulfillment order's line items.""" + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderLineItemConnection! + + """ + A list of locations that the fulfillment order can potentially move to. + """ + locationsForMove( + """Filter to a list of Fulfillment Order Line Items.""" + lineItemIds: [ID!] = [] + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + Specific Location ids to check for the movability for a fulfillment order. + """ + locationIds: [ID!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderLocationForMoveConnection! + + """ + A list of requests sent by the merchant or an order management app to the fulfillment service for the fulfillment order. + """ + merchantRequests( + """The kind of request the merchant sent.""" + kind: FulfillmentOrderMerchantRequestKind + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderMerchantRequestConnection! + + """The order that's associated with the fulfillment order.""" + order: Order! + + """ID of the order that's associated with the fulfillment order.""" + orderId: ID! + + """ + The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. + For example, "#1001", "EN1001", or "1001-A". + This value isn't unique across multiple stores. + """ + orderName: String! + + """ + The date and time when the order was processed. + This date and time might not match the date and time when the order was created. + """ + orderProcessedAt: DateTime! + + """The request status of the fulfillment order.""" + requestStatus: FulfillmentOrderRequestStatus! + + """The status of the fulfillment order.""" + status: FulfillmentOrderStatus! + + """The actions that can be performed on this fulfillment order.""" + supportedActions: [FulfillmentOrderSupportedAction!]! + + """The date and time when the fulfillment order was last updated.""" + updatedAt: DateTime! +} + +"""Return type for `fulfillmentOrderAcceptCancellationRequest` mutation.""" +type FulfillmentOrderAcceptCancellationRequestPayload { + """The fulfillment order whose cancellation request was accepted.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderAcceptFulfillmentRequest` mutation.""" +type FulfillmentOrderAcceptFulfillmentRequestPayload { + """The fulfillment order whose fulfillment request was accepted.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The actions that can be taken on a fulfillment order.""" +enum FulfillmentOrderAction { + """ + Creates a fulfillment for selected line items in the fulfillment order. The + corresponding mutation for this action is `fulfillmentCreateV2`. + """ + CREATE_FULFILLMENT + + """ + Sends a request for fulfilling selected line items in a fulfillment order to a + fulfillment service. The corresponding mutation for this action is + `fulfillmentOrderSubmitFulfillmentRequest`. + """ + REQUEST_FULFILLMENT + + """ + Cancels a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderCancel`. + """ + CANCEL_FULFILLMENT_ORDER + + """ + Moves a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMove`. + """ + MOVE + + """ + Sends a cancellation request to the fulfillment service of a fulfillment + order. The corresponding mutation for this action is + `fulfillmentOrderSubmitCancellationRequest`. + """ + REQUEST_CANCELLATION + + """ + Marks the fulfillment order as open. The corresponding mutation for this action is `fulfillmentOrderOpen`. + """ + MARK_AS_OPEN + + """ + Releases the fulfillment hold on the fulfillment order. The corresponding + mutation for this action is `fulfillmentOrderReleaseHold`. + """ + RELEASE_HOLD + + """ + Applies a fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderHold`. + """ + HOLD + + """ + Opens an external URL to initiate the fulfillment process outside Shopify. + This action should be paired with + `FulfillmentOrderSupportedAction.externalUrl`. + """ + EXTERNAL + + """ + Splits a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSplit`. + """ + SPLIT + + """ + Merges a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMerge`. + """ + MERGE +} + +""" +The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen. + + The fulfillment order's assigned location might change in the following cases: + + - The fulfillment order has been entirely moved to a new location. For example, the [fulfillmentOrderMove]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove + ) mutation has been called, and you see the original fulfillment order in the [movedFulfillmentOrder]( + https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove#field-fulfillmentordermovepayload-movedfulfillmentorder + ) field within the mutation's response. + + - Work on the fulfillment order has not yet begun, which means that the fulfillment order has the + [OPEN](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-open), + [SCHEDULED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-scheduled), or + [ON_HOLD](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-onhold) + status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin). + +If the [fulfillmentOrderMove]( +https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentOrderMove +) mutation has moved the fulfillment order's line items to a new location, +but hasn't moved the fulfillment order instance itself, then the original fulfillment order's assigned location +doesn't change. +This happens if the fulfillment order is being split during the move, or if all line items can be moved +to an existing fulfillment order at a new location. + +Once the fulfillment order has been taken into work or canceled, +which means that the fulfillment order has the +[IN_PROGRESS](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-inprogress), +[CLOSED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-closed), +[CANCELLED](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-cancelled), or +[INCOMPLETE](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderStatus#value-incomplete) +status, `FulfillmentOrderAssignedLocation` acts as a snapshot of the shop's location content. +Up-to-date shop's location data may be queried through [location]( + https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderAssignedLocation#field-fulfillmentorderassignedlocation-location +) connection. +""" +type FulfillmentOrderAssignedLocation { + """The first line of the address for the location.""" + address1: String + + """The second line of the address for the location.""" + address2: String + + """The city of the location.""" + city: String + + """The two-letter country code of the location.""" + countryCode: CountryCode! + + """ + The location where the fulfillment is expected to happen. This value might be different from + `FulfillmentOrderAssignedLocation` if the location's attributes were updated + after the fulfillment order was taken into work of canceled. + """ + location: Location + + """The name of the location.""" + name: String! + + """The phone number of the location.""" + phone: String + + """The province of the location.""" + province: String + + """The ZIP code of the location.""" + zip: String +} + +"""The assigment status to be used to filter fulfillment orders.""" +enum FulfillmentOrderAssignmentStatus { + """ + Fulfillment orders for which the merchant has requested cancellation of + the previously accepted fulfillment request. + """ + CANCELLATION_REQUESTED + + """Fulfillment orders for which the merchant has requested fulfillment.""" + FULFILLMENT_REQUESTED + + """ + Fulfillment orders for which the merchant's fulfillment request has been accepted. + Any number of fulfillments can be created on these fulfillment orders + to completely fulfill the requested items. + """ + FULFILLMENT_ACCEPTED + + """ + Fulfillment orders for which the merchant hasn't yet requested fulfillment. + """ + FULFILLMENT_UNSUBMITTED +} + +"""Return type for `fulfillmentOrderCancel` mutation.""" +type FulfillmentOrderCancelPayload { + """The fulfillment order that was marked as canceled.""" + fulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was created to replace the canceled fulfillment order. + """ + replacementFulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderClose` mutation.""" +type FulfillmentOrderClosePayload { + """The fulfillment order that was marked as incomplete.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrders. +""" +type FulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [FulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the destination where the items should be sent upon fulfillment. +""" +type FulfillmentOrderDestination implements Node { + """The first line of the address of the destination.""" + address1: String + + """The second line of the address of the destination.""" + address2: String + + """The city of the destination.""" + city: String + + """The company of the destination.""" + company: String + + """The two-letter country code of the destination.""" + countryCode: CountryCode + + """The email of the customer at the destination.""" + email: String + + """The first name of the customer at the destination.""" + firstName: String + + """A globally-unique ID.""" + id: ID! + + """The last name of the customer at the destination.""" + lastName: String + + """The location designated for the pick-up of the fulfillment order.""" + location: Location + + """The phone number of the customer at the destination.""" + phone: String + + """The province of the destination.""" + province: String + + """The ZIP code of the destination.""" + zip: String +} + +""" +An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. +""" +type FulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of FulfillmentOrderEdge.""" + node: FulfillmentOrder! +} + +""" +The input fields for the fulfillment hold applied on the fulfillment order. +""" +input FulfillmentOrderHoldInput { + """The reason for the fulfillment hold.""" + reason: FulfillmentHoldReason! + + """Additional information about the fulfillment hold reason.""" + reasonNotes: String + + """ + Whether the merchant receives a notification about the fulfillment hold. The default value is `false`. + """ + notifyMerchant: Boolean = false + + """ + A configurable ID used to track the automation system releasing these holds. + """ + externalId: String + + """ + An identifier that an app can use to reference one of the holds that it applies to a + fulfillment order. + + This field must be unique among the holds that a single app applies to a single fulfillment order. + It prevents apps from inadvertently creating duplicate holds. + This field cannot exceed 64 characters. + + For example, an app can place multiple holds on a single fulfillment order each with a different `handle`. + If an app attempts to place two holds with the same `handle`, the second hold will be rejected with + [a duplicate hold user error](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-duplicatefulfillmentholdhandle). + The same `handle` can however be re-used on different fulfillment orders and by different apps. + + By default, `handle` will be an empty string. If an app wishes to place multiple holds on a single + fulfillment order, then a different `handle` must be provided for each. + """ + handle: String = "" + + """ + The fulfillment order line items to be placed on hold. + + If left blank, all line items of the fulfillment order are placed on hold. + + Not supported when placing a hold on a fulfillment order that is already held. + If supplied when a fulfillment order is already on hold, [a user error](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderHoldUserErrorCode#value-fulfillmentordernotsplittable) + will be returned indicating that the fulfillment order is not able to be split. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] = [] +} + +"""Return type for `fulfillmentOrderHold` mutation.""" +type FulfillmentOrderHoldPayload { + """ + The fulfillment hold created for the fulfillment order. Null if no hold was created. + """ + fulfillmentHold: FulfillmentHold + + """The fulfillment order on which a fulfillment hold was applied.""" + fulfillmentOrder: FulfillmentOrder + + """ + The remaining fulfillment order containing the line items to which the hold wasn't applied, + if specific line items were specified to be placed on hold. + """ + remainingFulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrderHoldUserError!]! +} + +"""An error that occurs during the execution of `FulfillmentOrderHold`.""" +type FulfillmentOrderHoldUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrderHoldUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderHoldUserError`. +""" +enum FulfillmentOrderHoldUserErrorCode { + """The fulfillment order could not be found.""" + FULFILLMENT_ORDER_NOT_FOUND + + """The input value is already taken.""" + TAKEN + + """The fulfillment order line item quantity must be greater than 0.""" + GREATER_THAN_ZERO + + """ + The maximum number of fulfillment holds for this fulfillment order has been + reached for this app. An app can only have up to 10 holds on a single + fulfillment order at any one time. + """ + FULFILLMENT_ORDER_HOLD_LIMIT_REACHED + + """ + The handle provided for the fulfillment hold is already in use by this app for another hold on this fulfillment order. + """ + DUPLICATE_FULFILLMENT_HOLD_HANDLE + + """The fulfillment order line item quantity is invalid.""" + INVALID_LINE_ITEM_QUANTITY + + """The fulfillment order is not in a splittable state.""" + FULFILLMENT_ORDER_NOT_SPLITTABLE + + """The fulfillment order line items are not unique.""" + DUPLICATED_FULFILLMENT_ORDER_LINE_ITEMS +} + +"""The international duties relevant to a fulfillment order.""" +type FulfillmentOrderInternationalDuties { + """The method of duties payment. Example values: `DDP`, `DAP`.""" + incoterm: String! +} + +""" +Associates an order line item with 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! +} + +""" +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 { + """ + The fulfillment order does not have any line items that can be prepared. + """ + NO_LINE_ITEMS_TO_PREPARE_FOR_FULFILLMENT_ORDER + + """Invalid fulfillment order ID provided.""" + FULFILLMENT_ORDER_INVALID + + """Unable to prepare quantity.""" + UNABLE_TO_PREPARE_QUANTITY +} + +""" +A 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 +} + +"""A location that a fulfillment order can potentially move to.""" +type FulfillmentOrderLocationForMove { + """ + Fulfillment order line items that can be moved from their current location to the given location. + """ + availableLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderLineItemConnection! + + """ + Total number of fulfillment order line items that can be moved from their current assigned location to the + given location. + """ + availableLineItemsCount: Count + + """ + The location being considered as the fulfillment order's new assigned location. + """ + location: Location! + + """ + A human-readable string with the reason why the fulfillment order, or some of its line items, can't be + moved to the location. + """ + message: String + + """Whether the fulfillment order can be moved to the location.""" + movable: Boolean! + + """ + Fulfillment order line items that cannot be moved from their current location to the given location. + """ + unavailableLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderLineItemConnection! + + """ + Total number of fulfillment order line items that can't be moved from their current assigned location to the + given location. + """ + unavailableLineItemsCount: Count +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderLocationForMoves. +""" +type FulfillmentOrderLocationForMoveConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderLocationForMoveEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderLocationForMoveEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderLocationForMove!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination. +""" +type FulfillmentOrderLocationForMoveEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of FulfillmentOrderLocationForMoveEdge.""" + node: FulfillmentOrderLocationForMove! +} + +""" +A request made by the merchant or an order management app to a fulfillment service +for a fulfillment order. +""" +type FulfillmentOrderMerchantRequest implements Node { + """The fulfillment order associated with the merchant request.""" + fulfillmentOrder: FulfillmentOrder! + + """A globally-unique ID.""" + id: ID! + + """The kind of request made.""" + kind: FulfillmentOrderMerchantRequestKind! + + """The optional message that the merchant included in the request.""" + message: String + + """ + Additional options requested by the merchant. These depend on the `kind` of the request. + For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the + merchant intends to notify the customer upon fulfillment. The fulfillment service can then set + `notifyCustomer` when making calls to `FulfillmentCreate`. + """ + requestOptions: JSON + + """The response from the fulfillment service.""" + responseData: JSON + + """The timestamp when the request was made.""" + sentAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests. +""" +type FulfillmentOrderMerchantRequestConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [FulfillmentOrderMerchantRequestEdge!]! + + """ + A list of nodes that are contained in FulfillmentOrderMerchantRequestEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [FulfillmentOrderMerchantRequest!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination. +""" +type FulfillmentOrderMerchantRequestEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of FulfillmentOrderMerchantRequestEdge.""" + node: FulfillmentOrderMerchantRequest! +} + +"""The kinds of request merchants can make to a fulfillment service.""" +enum FulfillmentOrderMerchantRequestKind { + """The merchant requests fulfillment for an `OPEN` fulfillment order.""" + FULFILLMENT_REQUEST + + """ + The merchant requests cancellation of an `IN_PROGRESS` fulfillment order. + """ + CANCELLATION_REQUEST +} + +"""The input fields for merging fulfillment orders.""" +input FulfillmentOrderMergeInput { + """The details of the fulfillment orders to be merged.""" + mergeIntents: [FulfillmentOrderMergeInputMergeIntent!]! +} + +""" +The input fields for merging fulfillment orders into a single merged fulfillment order. +""" +input FulfillmentOrderMergeInputMergeIntent { + """The fulfillment order line items to be merged.""" + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + + """The ID of the fulfillment order to be merged.""" + fulfillmentOrderId: ID! +} + +"""Return type for `fulfillmentOrderMerge` mutation.""" +type FulfillmentOrderMergePayload { + """The result of the fulfillment order merges.""" + fulfillmentOrderMerges: [FulfillmentOrderMergeResult!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrderMergeUserError!]! +} + +"""The result of merging a set of fulfillment orders.""" +type FulfillmentOrderMergeResult { + """The new fulfillment order as a result of the merge.""" + fulfillmentOrder: FulfillmentOrder! +} + +"""An error that occurs during the execution of `FulfillmentOrderMerge`.""" +type FulfillmentOrderMergeUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrderMergeUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderMergeUserError`. +""" +enum FulfillmentOrderMergeUserErrorCode { + """The fulfillment order could not be found.""" + FULFILLMENT_ORDER_NOT_FOUND + + """The fulfillment order line item quantity must be greater than 0.""" + GREATER_THAN + + """The fulfillment order line item quantity is invalid.""" + INVALID_LINE_ITEM_QUANTITY +} + +"""Return type for `fulfillmentOrderMove` mutation.""" +type FulfillmentOrderMovePayload { + """ + The fulfillment order which now contains the moved line items and is assigned to the destination location. + + If the original fulfillment order doesn't have any line items which are fully + or partially fulfilled, the original fulfillment order will be moved to the new location. + However if this isn't the case, the moved fulfillment order will differ from the original one. + """ + movedFulfillmentOrder: FulfillmentOrder + + """ + The final state of the original fulfillment order. + + As a result of the move operation, the original fulfillment order might be moved to the new location + or remain in the original location. The original fulfillment order might have the same status or be closed. + """ + originalFulfillmentOrder: FulfillmentOrder + + """This field is deprecated.""" + remainingFulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderOpen` mutation.""" +type FulfillmentOrderOpenPayload { + """ + The fulfillment order that was transitioned to open and is fulfillable. + """ + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderRejectCancellationRequest` mutation.""" +type FulfillmentOrderRejectCancellationRequestPayload { + """The fulfillment order whose cancellation request was rejected.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderRejectFulfillmentRequest` mutation.""" +type FulfillmentOrderRejectFulfillmentRequestPayload { + """The fulfillment order whose fulfillment request was rejected.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The reason for a fulfillment order rejection.""" +enum FulfillmentOrderRejectionReason { + """The fulfillment order was rejected because of an incorrect address.""" + INCORRECT_ADDRESS + + """The fulfillment order was rejected because inventory is out of stock.""" + INVENTORY_OUT_OF_STOCK + + """The fulfillment order was rejected because of an ineligible product.""" + INELIGIBLE_PRODUCT + + """ + The fulfillment order was rejected because of an undeliverable destination. + """ + UNDELIVERABLE_DESTINATION + + """ + The fulfillment order was rejected because international address shipping hasn't been enabled. + """ + INTERNATIONAL_SHIPPING_UNAVAILABLE + + """ + The fulfillment order was rejected because product information is incorrect to be able to ship. + """ + INCORRECT_PRODUCT_INFO + + """ + The fulfillment order was rejected because customs information was missing for international shipping. + """ + MISSING_CUSTOMS_INFO + + """The fulfillment order was rejected because of an invalid SKU.""" + INVALID_SKU + + """ + The fulfillment order was rejected because the payment method was declined. + """ + PAYMENT_DECLINED + + """ + The fulfillment order was rejected because the package preference was not set. + """ + PACKAGE_PREFERENCE_NOT_SET + + """ + The fulfillment order was rejected because of invalid customer contact information. + """ + INVALID_CONTACT_INFORMATION + + """The fulfillment order was rejected because the order is too large.""" + ORDER_TOO_LARGE + + """ + The fulfillment order was rejected because the merchant is blocked or suspended. + """ + MERCHANT_BLOCKED_OR_SUSPENDED + + """The fulfillment order was rejected for another reason.""" + OTHER +} + +"""Return type for `fulfillmentOrderReleaseHold` mutation.""" +type FulfillmentOrderReleaseHoldPayload { + """The fulfillment order on which the hold was released.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrderReleaseHoldUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReleaseHold`. +""" +type FulfillmentOrderReleaseHoldUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrderReleaseHoldUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderReleaseHoldUserError`. +""" +enum FulfillmentOrderReleaseHoldUserErrorCode { + """The fulfillment order wasn't found.""" + FULFILLMENT_ORDER_NOT_FOUND + + """The app doesn't have access to release the fulfillment hold.""" + INVALID_ACCESS +} + +"""The request status of a fulfillment order.""" +enum FulfillmentOrderRequestStatus { + """ + The initial request status for the newly-created fulfillment orders. This is the only valid + request status for fulfillment orders that aren't assigned to a fulfillment service. + """ + UNSUBMITTED + + """The merchant requested fulfillment for this fulfillment order.""" + SUBMITTED + + """The fulfillment service accepted the merchant's fulfillment request.""" + ACCEPTED + + """The fulfillment service rejected the merchant's fulfillment request.""" + REJECTED + + """ + The merchant requested a cancellation of the fulfillment request for this fulfillment order. + """ + CANCELLATION_REQUESTED + + """ + The fulfillment service accepted the merchant's fulfillment cancellation request. + """ + CANCELLATION_ACCEPTED + + """ + The fulfillment service rejected the merchant's fulfillment cancellation request. + """ + CANCELLATION_REJECTED + + """ + The fulfillment service closed the fulfillment order without completing it. + """ + CLOSED +} + +"""Return type for `fulfillmentOrderReschedule` mutation.""" +type FulfillmentOrderReschedulePayload { + """ + A fulfillment order with the rescheduled line items. + + Fulfillment orders may be merged if they have the same `fulfillAt` datetime. + + If the fulfillment order is merged then the resulting fulfillment order will be returned. + Otherwise the original fulfillment order will be returned with an updated `fulfillAt` datetime. + """ + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrderRescheduleUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReschedule`. +""" +type FulfillmentOrderRescheduleUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrderRescheduleUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderRescheduleUserError`. +""" +enum FulfillmentOrderRescheduleUserErrorCode { + """Fulfillment order could not be found.""" + FULFILLMENT_ORDER_NOT_FOUND +} + +"""The set of valid sort keys for the FulfillmentOrder query.""" +enum FulfillmentOrderSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The input fields for the split applied to the fulfillment order.""" +input FulfillmentOrderSplitInput { + """The fulfillment order line items to be split out.""" + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! + + """The ID of the fulfillment order to be split.""" + fulfillmentOrderId: ID! +} + +"""Return type for `fulfillmentOrderSplit` mutation.""" +type FulfillmentOrderSplitPayload { + """The result of the fulfillment order splits.""" + fulfillmentOrderSplits: [FulfillmentOrderSplitResult!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrderSplitUserError!]! +} + +"""The result of splitting a fulfillment order.""" +type FulfillmentOrderSplitResult { + """The original fulfillment order as a result of the split.""" + fulfillmentOrder: FulfillmentOrder! + + """The remaining fulfillment order as a result of the split.""" + remainingFulfillmentOrder: FulfillmentOrder! + + """ + The replacement fulfillment order if the original fulfillment order wasn't in a state to be split. + """ + replacementFulfillmentOrder: FulfillmentOrder +} + +"""An error that occurs during the execution of `FulfillmentOrderSplit`.""" +type FulfillmentOrderSplitUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrderSplitUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrderSplitUserError`. +""" +enum FulfillmentOrderSplitUserErrorCode { + """The fulfillment order could not be found.""" + FULFILLMENT_ORDER_NOT_FOUND + + """The fulfillment order line item quantity must be greater than 0.""" + GREATER_THAN + + """The fulfillment order line item quantity is invalid.""" + INVALID_LINE_ITEM_QUANTITY + + """The fulfillment order must have at least one line item input to split.""" + NO_LINE_ITEMS_PROVIDED_TO_SPLIT +} + +"""Return type for `fulfillmentOrdersReroute` mutation.""" +type FulfillmentOrdersReroutePayload { + """The fulfillment orders which contains the moved line items.""" + movedFulfillmentOrders: [FulfillmentOrder!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [FulfillmentOrdersRerouteUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrdersReroute`. +""" +type FulfillmentOrdersRerouteUserError implements DisplayableError { + """The error code.""" + code: FulfillmentOrdersRerouteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `FulfillmentOrdersRerouteUserError`. +""" +enum FulfillmentOrdersRerouteUserErrorCode { + """No fulfillment order IDs were provided.""" + NO_FULFILLMENT_ORDER_IDS + + """Fulfillment order could not be found.""" + FULFILLMENT_ORDER_NOT_FOUND + + """Fulfillment orders are not from the same order.""" + FULFILLMENT_ORDERS_NOT_FROM_THE_SAME_ORDER + + """ + All fulfillment orders must have status and request status compatible with reroutable states. + """ + FULFILLMENT_ORDERS_STATE_NOT_SUPPORTED + + """Cannot reassign location for fulfillment orders.""" + CANNOT_REASSIGN_LOCATION_FOR_FULFILLMENT_ORDERS + + """The delivery method type is not supported.""" + DELIVERY_METHOD_TYPE_NOT_SUPPORTED + + """This feature is only supported for multi-location shops.""" + SINGLE_LOCATION_SHOP_NOT_SUPPORTED + + """Fulfillment orders must belong to the same location.""" + FULFILLMENT_ORDERS_MUST_BELONG_TO_SAME_LOCATION +} + +"""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 status of a fulfillment order.""" +enum FulfillmentOrderStatus { + """The fulfillment order is ready for fulfillment.""" + OPEN + + """The fulfillment order is being processed.""" + IN_PROGRESS + + """The fulfillment order has been cancelled by the merchant.""" + CANCELLED + + """The fulfillment order cannot be completed as requested.""" + INCOMPLETE + + """The fulfillment order has been completed and closed.""" + CLOSED + + """ + The fulfillment order is deferred and will be ready for fulfillment after the date and time specified in `fulfill_at`. + """ + SCHEDULED + + """ + The fulfillment order is on hold. The fulfillment process can't be initiated + until the hold on the fulfillment order is released. + """ + ON_HOLD +} + +"""Return type for `fulfillmentOrderSubmitCancellationRequest` mutation.""" +type FulfillmentOrderSubmitCancellationRequestPayload { + """The fulfillment order specified in the cancelation request.""" + fulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentOrderSubmitFulfillmentRequest` mutation.""" +type FulfillmentOrderSubmitFulfillmentRequestPayload { + """The original fulfillment order intended to request fulfillment for.""" + originalFulfillmentOrder: FulfillmentOrder + + """ + The fulfillment order that was submitted to the fulfillment service. This will be the same as + the original fulfillment order field. The exception to this is partial fulfillment requests or + fulfillment request for cancelled or incomplete fulfillment orders. + """ + submittedFulfillmentOrder: FulfillmentOrder + + """ + This field will only be present for partial fulfillment requests. This will represent the new + fulfillment order with the remaining line items not submitted to the fulfillment service. + """ + unsubmittedFulfillmentOrder: FulfillmentOrder + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +One of the actions that the fulfillment order supports in its current state. +""" +type FulfillmentOrderSupportedAction { + """The action value.""" + action: FulfillmentOrderAction! + + """ + The external URL to be used to initiate the fulfillment process outside Shopify. + Applicable only when the `action` value is `EXTERNAL`. + """ + externalUrl: URL +} + +""" +The address at which the fulfillment occurred. This object is intended for tax +purposes, as a full address is required for tax providers to accurately +calculate taxes. Typically this is the address of the warehouse or fulfillment +center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +type FulfillmentOriginAddress { + """The street address of the fulfillment location.""" + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The city in which the fulfillment location is located.""" + city: String + + """The country code of the fulfillment location.""" + countryCode: String! + + """The province code of the fulfillment location.""" + provinceCode: String + + """The zip code of the fulfillment location.""" + zip: String +} + +""" +The input fields used to include the address at which the fulfillment occurred. +This input object is intended for tax purposes, as a full address is required +for tax providers to accurately calculate taxes. Typically this is the address +of the warehouse or fulfillment center. To retrieve a fulfillment location's +address, use the `assignedLocation` field on the +[`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/FulfillmentOrder) +object instead. +""" +input FulfillmentOriginAddressInput { + """The street address of the fulfillment location.""" + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The city in which the fulfillment location is located.""" + city: String + + """The zip code of the fulfillment location.""" + zip: String + + """The province of the fulfillment location.""" + provinceCode: String + + """The country of the fulfillment location.""" + countryCode: String! +} + +""" +A **Fulfillment Service** is a third party warehouse that prepares and ships orders +on behalf of the store owner. Fulfillment services charge a fee to package and ship items +and update product inventory levels. Some well known fulfillment services with Shopify integrations +include: Amazon, Shipwire, and Rakuten. When an app registers a new `FulfillmentService` on a store, +Shopify automatically creates a `Location` that's associated to the fulfillment service. +To learn more about fulfillment services, refer to +[Manage fulfillments as a fulfillment service app](https://shopify.dev/apps/fulfillment/fulfillment-service-apps) +guide. + +## Mutations + +You can work with the `FulfillmentService` object with the +[fulfillmentServiceCreate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceCreate), +[fulfillmentServiceUpdate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceUpdate), +and [fulfillmentServiceDelete](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceDelete) +mutations. + +## Hosted endpoints + +Fulfillment service providers integrate with Shopify by providing Shopify with a set of hosted endpoints that +Shopify can query on certain conditions. +These endpoints must have a common prefix, and this prefix should be supplied in the `callbackUrl` parameter +in the +[fulfillmentServiceCreate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentServiceCreate) +mutation. + +- Shopify sends POST requests to the `/fulfillment_order_notification` endpoint + to notify the fulfillment service about fulfillment requests and fulfillment cancellation requests. + + For more information, refer to + [Receive fulfillment requests and cancellations](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). +- Shopify sends GET requests to the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers for orders + if `trackingSupport` is set to `true`. + + For more information, refer to + [Enable tracking support](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-8-enable-tracking-support-optional). + + Fulfillment services can also update tracking information using the + [fulfillmentTrackingInfoUpdate](https://shopify.dev/api/admin-graphql/latest/mutations/fulfillmentTrackingInfoUpdate) mutation, + rather than waiting for Shopify to ask for tracking numbers. +- Shopify sends GET requests to the `/fetch_stock` endpoint to retrieve + on hand inventory levels for the fulfillment service location if `inventoryManagement` is set to `true`. + + For more information, refer to + [Sharing inventory levels with Shopify](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-10-optional-share-inventory-levels-with-shopify). + +To make sure you have everything set up correctly, you can test the `callbackUrl`-prefixed endpoints +in your development store. + +## Resources and webhooks + +There are a variety of objects and webhooks that enable a fulfillment service to work. +To exchange fulfillment information with Shopify, fulfillment services use the +[FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder), +[Fulfillment](https://shopify.dev/api/admin-graphql/latest/objects/Fulfillment) and +[Order](https://shopify.dev/api/admin-graphql/latest/objects/Order) objects and related mutations. +To act on fulfillment process events that happen on the Shopify side, +besides awaiting calls to `callbackUrl`-prefixed endpoints, +fulfillment services can subscribe to the +[fulfillment order](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#webhooks) +and [order](https://shopify.dev/api/admin-rest/latest/resources/webhook) +webhooks. +""" +type FulfillmentService { + """ + The callback URL that the fulfillment service has registered for requests. The following considerations apply: + + - Shopify queries the `/fetch_tracking_numbers` endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the `/fetch_stock` endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the `/fulfillment_order_notification` endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support). + """ + callbackUrl: URL + + """ + Whether the fulfillment service uses the [fulfillment order based workflow](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments) + for managing fulfillments. + + As the migration is now finished, the `fulfillmentOrdersOptIn` property is [deprecated]( + https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field) + and is always set to `true` on correctly functioning fulfillment services. + """ + fulfillmentOrdersOptIn: Boolean! @deprecated(reason: "Migration period ended. All correctly functioning fulfillment services have `fulfillmentOrdersOptIn` set to `true`.") + + """Human-readable unique identifier for this fulfillment service.""" + handle: String! + + """The ID of the fulfillment service.""" + id: ID! + + """ + Whether the fulfillment service tracks product inventory and provides updates to Shopify. + """ + inventoryManagement: Boolean! + + """Location associated with the fulfillment service.""" + location: Location + + """ + Whether the fulfillment service can stock inventory alongside other locations. + """ + permitsSkuSharing: Boolean! @deprecated(reason: "Fulfillment services are all migrating to permit SKU sharing.\nSetting permits SKU sharing to false [is no longer supported](https://shopify.dev/changelog/setting-permitsskusharing-argument-to-false-when-creating-a-fulfillment-service-returns-an-error).\n") + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean! + + """The name of the fulfillment service as seen by merchants.""" + serviceName: String! + + """ + Whether the fulfillment service implemented the /fetch_tracking_numbers endpoint. + """ + trackingSupport: Boolean! + + """Type associated with the fulfillment service.""" + type: FulfillmentServiceType! +} + +"""Return type for `fulfillmentServiceCreate` mutation.""" +type FulfillmentServiceCreatePayload { + """The created fulfillment service.""" + fulfillmentService: FulfillmentService + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +Actions that can be taken at the location when a client requests the deletion of the fulfillment service. +""" +enum FulfillmentServiceDeleteInventoryAction { + """Deactivate and delete the inventory and location.""" + DELETE + + """ + Keep the inventory in place and convert the Fulfillment Service's location to be merchant managed. + """ + KEEP + + """ + Transfer the inventory and other dependencies to the provided location. + """ + TRANSFER +} + +"""Return type for `fulfillmentServiceDelete` mutation.""" +type FulfillmentServiceDeletePayload { + """The ID of the deleted fulfillment service.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The type of a fulfillment service.""" +enum FulfillmentServiceType { + """Fulfillment by gift card.""" + GIFT_CARD + + """Manual fulfillment by the merchant.""" + MANUAL + + """Fullfillment by a third-party fulfillment service.""" + THIRD_PARTY +} + +"""Return type for `fulfillmentServiceUpdate` mutation.""" +type FulfillmentServiceUpdatePayload { + """The updated fulfillment service.""" + fulfillmentService: FulfillmentService + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The status of a fulfillment.""" +enum FulfillmentStatus { + """ + Shopify has created the fulfillment and is waiting for the third-party + fulfillment service to transition it to `open` or `success`. + """ + PENDING @deprecated(reason: "This is a legacy status and is due to be deprecated.") + + """ + The third-party fulfillment service has acknowledged the fulfillment and is processing it. + """ + OPEN @deprecated(reason: "This is a legacy status and is due to be deprecated.") + + """The fulfillment was completed successfully.""" + SUCCESS + + """The fulfillment was canceled.""" + CANCELLED + + """There was an error with the fulfillment request.""" + ERROR + + """The fulfillment request failed.""" + FAILURE +} + +"""Represents the tracking information for a fulfillment.""" +type FulfillmentTrackingInfo { + """ + The name of the tracking company. + + For tracking company names from the list below + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + ### Supported tracking companies + + The following tracking companies display for shops located in any country: + + * 4PX + * AGS + * Amazon + * Amazon Logistics UK + * An Post + * Anjun Logistics + * APC + * Asendia USA + * Australia Post + * Bonshaw + * BPost + * BPost International + * Canada Post + * Canpar + * CDL Last Mile + * China Post + * Chronopost + * Chukou1 + * Colissimo + * Comingle + * Coordinadora + * Correios + * Correos + * CTT + * CTT Express + * Cyprus Post + * Delnext + * Deutsche Post + * DHL eCommerce + * DHL eCommerce Asia + * DHL Express + * DPD + * DPD Local + * DPD UK + * DTD Express + * DX + * Eagle + * Estes + * Evri + * FedEx + * First Global Logistics + * First Line + * FSC + * Fulfilla + * GLS + * Guangdong Weisuyi Information Technology (WSE) + * Heppner Internationale Spedition GmbH & Co. + * Iceland Post + * IDEX + * Israel Post + * Japan Post (EN) + * Japan Post (JA) + * La Poste Colissimo + * La Poste Burkina Faso + * Lasership + * Latvia Post + * Lietuvos Paštas + * Logisters + * Lone Star Overnight + * M3 Logistics + * Meteor Space + * Mondial Relay + * New Zealand Post + * NinjaVan + * North Russia Supply Chain (Shenzhen) Co. + * OnTrac + * Packeta + * Pago Logistics + * Ping An Da Tengfei Express + * Pitney Bowes + * Portal PostNord + * Poste Italiane + * PostNL + * PostNord DK + * PostNord NO + * PostNord SE + * Purolator + * Qxpress + * Qyun Express + * Royal Mail + * Royal Shipments + * Sagawa (EN) + * Sagawa (JA) + * Sendle + * SF Express + * SFC Fulfillment + * SHREE NANDAN COURIER + * Singapore Post + * Southwest Air Cargo + * StarTrack + * Step Forward Freight + * Swiss Post + * TForce Final Mile + * Tinghao + * TNT + * Toll IPEC + * United Delivery Service + * UPS + * USPS + * Venipak + * We Post + * Whistl + * Wizmo + * WMYC + * Xpedigo + * XPO Logistics + * Yamato (EN) + * Yamato (JA) + * YiFan Express + * YunExpress + + The following tracking companies are displayed for shops located in specific countries: + + * **Australia**: Australia Post, Sendle, Aramex Australia, TNT Australia, + Hunter Express, Couriers Please, Bonds, Allied Express, Direct Couriers, + Northline, GO Logistics + * **Austria**: Österreichische Post + * **Bulgaria**: Speedy + * **Canada**: Intelcom, BoxKnight, Loomis, GLS + * **China**: China Post, DHL eCommerce Asia, WanbExpress, YunExpress, Anjun Logistics, SFC Fulfillment, FSC + * **Czechia**: Zásilkovna + * **Germany**: Deutsche Post (DE), Deutsche Post (EN), DHL, DHL Express, Swiship, Hermes, GLS + * **Spain**: SEUR + * **France**: Colissimo, Mondial Relay, Colis Privé, GLS + * **United Kingdom**: Evri, DPD UK, Parcelforce, Yodel, DHL Parcel, Tuffnells + * **Greece**: ACS Courier + * **Hong Kong SAR**: SF Express + * **Ireland**: Fastway, DPD Ireland + * **India**: DTDC, India Post, Delhivery, Gati KWE, Professional Couriers, + XpressBees, Ecom Express, Ekart, Shadowfax, Bluedart + * **Italy**: BRT, GLS Italy + * **Japan**: エコ配, 西濃運輸, 西濃スーパーエキスプレス, 福山通運, 日本通運, 名鉄運輸, 第一貨物 + * **Netherlands**: DHL Parcel, DPD + * **Norway**: Bring + * **Poland**: Inpost + * **Turkey**: PTT, Yurtiçi Kargo, Aras Kargo, Sürat Kargo + * **United States**: GLS, Alliance Air Freight, Pilot Freight, LSO, Old + Dominion, Pandion, R+L Carriers, Southwest Air Cargo + * **South Africa**: Fastway, Skynet. + """ + company: String + + """ + The tracking number of the fulfillment. + + The tracking number is clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking url provided in the `url` field. + * [Shopify-known tracking company name](#supported-tracking-companies) specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URL. + """ + number: String + + """ + The URLs to track the fulfillment. + + The tracking URL is displayed in the merchant's admin on the order page. + The tracking URL is displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, it's also displayed in the customer's order history. + """ + url: URL +} + +"""Return type for `fulfillmentTrackingInfoUpdate` mutation.""" +type FulfillmentTrackingInfoUpdatePayload { + """The updated fulfillment with tracking information.""" + fulfillment: Fulfillment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `fulfillmentTrackingInfoUpdateV2` mutation.""" +type FulfillmentTrackingInfoUpdateV2Payload { + """The updated fulfillment with tracking information.""" + fulfillment: Fulfillment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The input fields that specify all possible fields for tracking information. + +> Note: +> If you provide the `url` field, you should not provide the `urls` field. +> +> If you provide the `number` field, you should not provide the `numbers` field. +> +> If you provide the `url` field, you should provide the `number` field. +> +> If you provide the `urls` field, you should provide the `numbers` field. +""" +input FulfillmentTrackingInput { + """ + The tracking number of the fulfillment. + + The tracking number will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking url provided in the `url` field. + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URL. + """ + number: String + + """ + The URL to track the fulfillment. + + The tracking URL is displayed in the merchant's admin on the order page. + The tracking URL is displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, it's also displayed in the customer's order history. + + The URL must be an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and + [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + For example, `"https://www.myshipping.com/track/?tracknumbers=TRACKING_NUMBER"` is a valid URL. + It includes a scheme (`https`) and a host (`myshipping.com`). + """ + url: URL + + """ + The name of the tracking company. + + If you specify a tracking company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + The same tracking company will be applied to all tracking numbers specified. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + > Note: + > Send the tracking company name exactly as written in + > [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + > (capitalization matters). + """ + company: String + + """ + The tracking numbers of the fulfillment, one or many. + + With multiple tracking numbers, you can provide tracking information + for all shipments associated with the fulfillment, if there are more than one. + For example, if you're shipping assembly parts of one furniture item in several boxes. + + Tracking numbers will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * Tracking URLs provided in the `urls` field. + The tracking URLs will be matched to the tracking numbers based on their positions in the arrays. + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build tracking URLs automatically for all tracking numbers specified. + The same tracking company will be applied to all tracking numbers. + * Tracking numbers have a Shopify-known format. + Shopify will guess tracking providers and build tracking URLs based on the tracking number formats. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + It is highly recommended that you send the tracking company and the tracking URLs. + """ + numbers: [String!] + + """ + The URLs to track the fulfillment, one or many. + + The tracking URLs are displayed in the merchant's admin on the order page. + The tracking URLs are displayed in the shipping confirmation email, which can optionally be sent to the customer. + When accounts are enabled, the tracking URLs are also displayed in the customer's order history. + + If you're not specifying a + [Shopify-known](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + tracking company name in the `company` field, + then provide tracking URLs for all tracking numbers from the `numbers` field. + + Tracking URLs from the `urls` array field are being matched with the tracking numbers from the `numbers` array + field correspondingly their positions in the arrays. + + Each URL must be an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and + [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + For example, `"https://www.myshipping.com/track/?tracknumbers=TRACKING_NUMBER"` is a valid URL. + It includes a scheme (`https`) and a host (`myshipping.com`). + """ + urls: [URL!] +} + +"""The input fields used to create a fulfillment from fulfillment orders.""" +input FulfillmentV2Input { + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput + + """ + Whether the customer is notified. + If `true`, then a notification is sent when the fulfillment is created. The default value is `false`. + """ + notifyCustomer: Boolean = false + + """ + Pairs of `fulfillment_order_id` and `fulfillment_order_line_items` that represent the fulfillment + order line items that have to be fulfilled for each fulfillment order. For any given pair, if the + fulfillment order line items are left blank then all the fulfillment order line items of the + associated fulfillment order ID will be fulfilled. + """ + lineItemsByFulfillmentOrder: [FulfillmentOrderLineItemsInput!]! + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput +} + +"""The App Bridge information for a Shopify Function.""" +type FunctionsAppBridge { + """The relative path for creating a customization.""" + createPath: String! + + """The relative path for viewing a customization.""" + detailsPath: String! +} + +"""The error history from running a Shopify Function.""" +type FunctionsErrorHistory { + """The date and time that the first error occurred.""" + errorsFirstOccurredAt: DateTime! + + """The date and time that the first error occurred.""" + firstOccurredAt: DateTime! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasBeenSharedSinceLastError: Boolean! + + """ + Whether the merchant has shared all the recent errors with the developer. + """ + hasSharedRecentErrors: Boolean! +} + +"""Represents any file other than HTML.""" +type GenericFile implements File & Node { + """A word or phrase to describe the contents or the function of a file.""" + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """Any errors that have occurred on the file.""" + fileErrors: [FileError!]! + + """The status of the file.""" + fileStatus: FileStatus! + + """A globally-unique ID.""" + id: ID! + + """The generic file's MIME type.""" + mimeType: String + + """The generic file's size in bytes.""" + originalFileSize: Int + + """The preview image for the media.""" + preview: MediaPreviewImage + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! + + """The generic file's URL.""" + url: URL +} + +"""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 deactivated.""" + deactivatedAt: DateTime + + """Whether the gift card is enabled.""" + enabled: Boolean! + + """The date at which the gift card will expire.""" + expiresOn: Date + + """A globally-unique ID.""" + id: ID! + + """The initial value of the gift card.""" + initialValue: MoneyV2! + + """The final four characters of the gift card code.""" + lastCharacters: String! + + """ + The gift card code. Everything but the final four characters is masked. + """ + maskedCode: String! + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The order associated with the gift card. This value is `null` if the gift card was issued manually. + """ + order: Order + + """The recipient who will receive the gift card.""" + recipientAttributes: GiftCardRecipient + + """The theme template used to render the gift card online.""" + templateSuffix: String + + """The transaction history of the gift card.""" + transactions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): GiftCardTransactionConnection + + """The date and time at which the gift card was updated.""" + updatedAt: DateTime! +} + +""" +Represents information about the configuration of gift cards on the shop. +""" +type GiftCardConfiguration { + """The issue limit for gift cards in the default shop currency.""" + issueLimit: MoneyV2! + + """The purchase limit for gift cards in the default shop currency.""" + purchaseLimit: MoneyV2! +} + +"""An auto-generated type for paginating through multiple GiftCards.""" +type GiftCardConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardEdge!]! + + """ + A list of nodes that are contained in GiftCardEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [GiftCard!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields to issue a gift card.""" +input GiftCardCreateInput { + """The initial value of the gift card.""" + initialValue: Decimal! + + """ + The gift card's code. It must be 8-20 characters long and contain only letters(a-z) and numbers(0-9). + It isn't case sensitive. If not provided, then a random code will be generated. + """ + code: String + + """ + The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. + """ + customerId: ID + + """ + The date at which the gift card will expire. If not provided, then the gift card will never expire. + """ + expiresOn: Date + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """The recipient attributes of the gift card.""" + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + If not provided, then the default `gift_card.liquid` template is used. + """ + templateSuffix: String +} + +"""Return type for `giftCardCreate` mutation.""" +type GiftCardCreatePayload { + """The created gift card.""" + giftCard: GiftCard + + """The created gift card's code.""" + giftCardCode: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardUserError!]! +} + +"""The input fields for a gift card credit transaction.""" +input GiftCardCreditInput { + """The amount to credit the gift card.""" + creditAmount: MoneyInput! + + """A note about the credit.""" + note: String + + """ + The date and time the credit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +"""Return type for `giftCardCredit` mutation.""" +type GiftCardCreditPayload { + """The gift card credit transaction that was created.""" + giftCardCreditTransaction: GiftCardCreditTransaction + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardTransactionUserError!]! +} + +"""A credit transaction which increases the gift card balance.""" +type GiftCardCreditTransaction implements GiftCardTransaction & HasMetafields & Node { + """The amount of the transaction.""" + amount: MoneyV2! + + """The gift card that the transaction belongs to.""" + giftCard: GiftCard! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A note about the transaction.""" + note: String + + """The date and time when the transaction was processed.""" + processedAt: DateTime! +} + +"""Return type for `giftCardDeactivate` mutation.""" +type GiftCardDeactivatePayload { + """The deactivated gift card.""" + giftCard: GiftCard + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardDeactivateUserError!]! +} + +"""An error that occurs during the execution of `GiftCardDeactivate`.""" +type GiftCardDeactivateUserError implements DisplayableError { + """The error code.""" + code: GiftCardDeactivateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardDeactivateUserError`. +""" +enum GiftCardDeactivateUserErrorCode { + """The gift card could not be found.""" + GIFT_CARD_NOT_FOUND +} + +"""The input fields for a gift card debit transaction.""" +input GiftCardDebitInput { + """The amount to debit the gift card.""" + debitAmount: MoneyInput! + + """A note about the debit.""" + note: String + + """ + The date and time the debit was processed. Defaults to current date and time. + """ + processedAt: DateTime +} + +"""Return type for `giftCardDebit` mutation.""" +type GiftCardDebitPayload { + """The gift card debit transaction that was created.""" + giftCardDebitTransaction: GiftCardDebitTransaction + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardTransactionUserError!]! +} + +"""A debit transaction which decreases the gift card balance.""" +type GiftCardDebitTransaction implements GiftCardTransaction & HasMetafields & Node { + """The amount of the transaction.""" + amount: MoneyV2! + + """The gift card that the transaction belongs to.""" + giftCard: GiftCard! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A note about the transaction.""" + note: String + + """The date and time when the transaction was processed.""" + processedAt: DateTime! +} + +""" +An auto-generated type which holds one GiftCard and a cursor during pagination. +""" +type GiftCardEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of GiftCardEdge.""" + node: GiftCard! +} + +"""Possible error codes that can be returned by `GiftCardUserError`.""" +enum GiftCardErrorCode { + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is already taken.""" + TAKEN + + """The input value is invalid.""" + INVALID + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Missing a required argument.""" + MISSING_ARGUMENT + + """The input value should be greater than the minimum allowed value.""" + GREATER_THAN + + """The gift card's value exceeds the allowed limits.""" + GIFT_CARD_LIMIT_EXCEEDED + + """The customer could not be found.""" + CUSTOMER_NOT_FOUND + + """The recipient could not be found.""" + RECIPIENT_NOT_FOUND +} + +"""Represents a recipient who will receive the issued gift card.""" +type GiftCardRecipient { + """The message sent with the gift card.""" + message: String + + """The preferred name of the recipient who will receive the gift card.""" + preferredName: String + + """The recipient who will receive the gift card.""" + recipient: Customer! + + """ + The scheduled datetime on which the gift card will be sent to the recipient. + The gift card will be sent within an hour of the specified datetime. + """ + sendNotificationAt: DateTime +} + +"""The input fields to add a recipient to a gift card.""" +input GiftCardRecipientInput { + """ + The ID of the customer who will be the recipient of the gift card. Requires `write_customers` access_scope. + """ + id: ID! + + """The preferred name of the recipient.""" + preferredName: String + + """The personalized message intended for the recipient.""" + message: String + + """ + The scheduled datetime on which the gift card will be sent to the recipient. + The gift card will be sent within an hour of the specified datetime. + """ + sendNotificationAt: DateTime +} + +"""A sale associated with a gift card.""" +type GiftCardSale implements Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """The unique ID for the sale.""" + id: ID! + + """The line item for the associated sale.""" + lineItem: LineItem! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""Return type for `giftCardSendNotificationToCustomer` mutation.""" +type GiftCardSendNotificationToCustomerPayload { + """The gift card that was sent.""" + giftCard: GiftCard + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardSendNotificationToCustomerUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToCustomer`. +""" +type GiftCardSendNotificationToCustomerUserError implements DisplayableError { + """The error code.""" + code: GiftCardSendNotificationToCustomerUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToCustomerUserError`. +""" +enum GiftCardSendNotificationToCustomerUserErrorCode { + """The input value is invalid.""" + INVALID + + """The customer could not be found.""" + CUSTOMER_NOT_FOUND + + """The gift card could not be found.""" + GIFT_CARD_NOT_FOUND +} + +"""Return type for `giftCardSendNotificationToRecipient` mutation.""" +type GiftCardSendNotificationToRecipientPayload { + """The gift card that was sent.""" + giftCard: GiftCard + + """The list of errors that occurred from executing the mutation.""" + userErrors: [GiftCardSendNotificationToRecipientUserError!]! +} + +""" +An error that occurs during the execution of `GiftCardSendNotificationToRecipient`. +""" +type GiftCardSendNotificationToRecipientUserError implements DisplayableError { + """The error code.""" + code: GiftCardSendNotificationToRecipientUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardSendNotificationToRecipientUserError`. +""" +enum GiftCardSendNotificationToRecipientUserErrorCode { + """The input value is invalid.""" + INVALID + + """The recipient could not be found.""" + RECIPIENT_NOT_FOUND + + """The gift card could not be found.""" + GIFT_CARD_NOT_FOUND +} + +"""The set of valid sort keys for the GiftCard query.""" +enum GiftCardSortKeys { + """Sort by the `amount_spent` value.""" + AMOUNT_SPENT + + """Sort by the `balance` value.""" + BALANCE + + """Sort by the `code` value.""" + CODE + + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `customer_name` value.""" + CUSTOMER_NAME + + """Sort by the `disabled_at` value.""" + DISABLED_AT + + """Sort by the `expires_on` value.""" + EXPIRES_ON + + """Sort by the `id` value.""" + ID + + """Sort by the `initial_value` value.""" + INITIAL_VALUE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""Interface for a gift card transaction.""" +interface GiftCardTransaction { + """The amount of the transaction.""" + amount: MoneyV2! + + """The gift card that the transaction belongs to.""" + giftCard: GiftCard! + + """The unique ID for the transaction.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """A note about the transaction.""" + note: String + + """The date and time when the transaction was processed.""" + processedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple GiftCardTransactions. +""" +type GiftCardTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [GiftCardTransactionEdge!]! + + """ + A list of nodes that are contained in GiftCardTransactionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [GiftCardTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one GiftCardTransaction and a cursor during pagination. +""" +type GiftCardTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of GiftCardTransactionEdge.""" + node: GiftCardTransaction! +} + +""" +Represents an error that happens during the execution of a gift card transaction mutation. +""" +type GiftCardTransactionUserError implements DisplayableError { + """The error code.""" + code: GiftCardTransactionUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `GiftCardTransactionUserError`. +""" +enum GiftCardTransactionUserErrorCode { + """The input value is invalid.""" + INVALID + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """The gift card's value exceeds the allowed limits.""" + GIFT_CARD_LIMIT_EXCEEDED + + """The gift card could not be found.""" + GIFT_CARD_NOT_FOUND + + """A positive amount must be used.""" + NEGATIVE_OR_ZERO_AMOUNT + + """The gift card does not have sufficient funds to satisfy the request.""" + INSUFFICIENT_FUNDS + + """The currency provided does not match the currency of the gift card.""" + MISMATCHING_CURRENCY +} + +"""The input fields to update a gift card.""" +input GiftCardUpdateInput { + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + The date at which the gift card will expire. If set to `null`, then the gift card will never expire. + """ + expiresOn: Date + + """ + The ID of the customer who will receive the gift card. The ID can't be changed + if the gift card already has an assigned customer ID. + """ + customerId: ID + + """The recipient attributes of the gift card.""" + recipientAttributes: GiftCardRecipientInput + + """ + The suffix of the Liquid template that's used to render the gift card online. + For example, if the value is `birthday`, then the gift card is rendered using the template `gift_card.birthday.liquid`. + """ + templateSuffix: String +} + +"""Return type for `giftCardUpdate` mutation.""" +type GiftCardUpdatePayload { + """The updated gift card.""" + giftCard: GiftCard + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +Represents an error that happens during the execution of a gift card mutation. +""" +type GiftCardUserError implements DisplayableError { + """The error code.""" + code: GiftCardErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Represents a summary of the current version of data in a resource. + +The `compare_digest` field can be used as input for mutations that implement a compare-and-swap mechanism. +""" +interface HasCompareDigest { + """The data stored in the resource, represented as a digest.""" + compareDigest: String! +} + +"""Represents an object that has a list of events.""" +interface HasEvents { + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! +} + +""" +Localization extensions associated with the specified resource. For example, the tax id for government invoice. +""" +interface HasLocalizationExtensions { + """List of localization extensions for the resource.""" + localizationExtensions( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizationExtensionPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") +} + +"""Localized fields associated with the specified resource.""" +interface HasLocalizedFields { + """List of localized fields for the resource.""" + localizedFields( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizedFieldPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizedFieldConnection! +} + +"""Resources that metafield definitions can be applied to.""" +interface HasMetafieldDefinitions { + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") +} + +""" +Represents information about the metafields associated to the specified resource. +""" +interface HasMetafields { + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +"""The input fields that identify metafield definitions.""" +input HasMetafieldsMetafieldIdentifierInput { + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! +} + +"""Published translations associated with the resource.""" +interface HasPublishedTranslations { + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Represents information about the store credit accounts associated to the specified owner. +""" +interface HasStoreCreditAccounts { + """ + Returns a list of store credit accounts that belong to the owner resource. + A store credit account owner can hold multiple accounts each with a different currency. + """ + storeCreditAccounts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 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 an image resource.""" +type Image implements HasMetafields & HasPublishedTranslations { + """A word or phrase to share the nature or contents of an image.""" + altText: String + + """ + The original height of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + height: Int + + """A unique ID for the image.""" + id: ID + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The location of the original image as a URL. + + If there are any existing transformations in the original source URL, they will remain and not be stripped. + """ + originalSrc: URL! @deprecated(reason: "Use `url` instead.") + + """The location of the image as a URL.""" + src: URL! @deprecated(reason: "Use `url` instead.") + + """ + The ThumbHash of the image. + + Useful to display placeholder images while the original image is loading. + """ + thumbhash: String + + """ + The location of the transformed image as a URL. + + All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. + Otherwise any transformations which an image type doesn't support will be ignored. + """ + transformedSrc( + """Image width in pixels between 1 and 5760.""" + maxWidth: Int + + """Image height in pixels between 1 and 5760.""" + maxHeight: Int + + """Crops the image according to the specified region.""" + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 and 3. + """ + scale: Int = 1 + + """ + Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported). + """ + preferredContentType: ImageContentType + ): URL! @deprecated(reason: "Use `url(transform:)` instead") + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The location of the image as a URL. + + If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + + All transformation options are considered "best-effort". Any transformation + that the original image type doesn't support will be ignored. + + If you need multiple variations of the same image, then you can use [GraphQL + aliases](https://graphql.org/learn/queries/#aliases). + """ + url( + """A set of options to transform the original image.""" + transform: ImageTransformInput + ): URL! + + """ + The original width of the image in pixels. Returns `null` if the image isn't hosted by Shopify. + """ + width: Int +} + +"""An auto-generated type for paginating through multiple Images.""" +type ImageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ImageEdge!]! + + """ + A list of nodes that are contained in ImageEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Image!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""List of supported image content types.""" +enum ImageContentType { + """A PNG image.""" + PNG + + """A JPG image.""" + JPG + + """A WEBP image.""" + WEBP +} + +""" +An auto-generated type which holds one Image and a cursor during pagination. +""" +type ImageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ImageEdge.""" + node: Image! +} + +"""The input fields for an image.""" +input ImageInput { + """A globally-unique ID.""" + id: ID + + """A word or phrase to share the nature or contents of an image.""" + altText: String + + """The URL of the image. May be a staged upload URL.""" + src: String +} + +""" +The available options for transforming an image. + +All transformation options are considered best effort. Any transformation that +the original image type doesn't support will be ignored. +""" +input ImageTransformInput { + """ + The region of the image to remain after cropping. + Must be used in conjunction with the `maxWidth` and/or `maxHeight` fields, + where the `maxWidth` and `maxHeight` aren't equal. + The `crop` argument should coincide with the smaller value. A smaller `maxWidth` indicates a `LEFT` or `RIGHT` crop, while + a smaller `maxHeight` indicates a `TOP` or `BOTTOM` crop. For example, `{ + maxWidth: 5, maxHeight: 10, crop: LEFT }` will result + in an image with a width of 5 and height of 10, where the right side of the image is removed. + """ + crop: CropRegion + + """Image width in pixels between 1 and 5760.""" + maxWidth: Int + + """Image height in pixels between 1 and 5760.""" + maxHeight: Int + + """ + Image size multiplier for high-resolution retina displays. Must be within 1..3. + """ + scale: Int = 1 + + """ + Convert the source image into the preferred content type. + Supported conversions: `.svg` to `.png`, any file type to `.jpg`, and any file type to `.webp`. + """ + preferredContentType: ImageContentType +} + +""" +A parameter to upload an image. + +Deprecated in favor of +[StagedUploadParameter](https://shopify.dev/api/admin-graphql/latest/objects/StagedUploadParameter), +which is used in +[StagedMediaUploadTarget](https://shopify.dev/api/admin-graphql/latest/objects/StagedMediaUploadTarget) +and returned by the +[stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stagedUploadsCreate). +""" +type ImageUploadParameter { + """The parameter name.""" + name: String! + + """The parameter value.""" + value: String! +} + +"""Answers the question if prices include duties and / or taxes.""" +enum InclusiveDutiesPricingStrategy { + """Add duties at checkout when configured to collect.""" + ADD_DUTIES_AT_CHECKOUT + + """Include duties in price when configured to collect.""" + INCLUDE_DUTIES_IN_PRICE +} + +"""Answers the question if prices include duties and / or taxes.""" +enum InclusiveTaxPricingStrategy { + """Add taxes at checkout when configured to collect.""" + ADD_TAXES_AT_CHECKOUT + + """Include taxes in price when configured to collect.""" + INCLUDES_TAXES_IN_PRICE + + """Include taxes in price based on country when configured to collect.""" + INCLUDES_TAXES_IN_PRICE_BASED_ON_COUNTRY +} + +"""The input fields for the incoming line item.""" +input IncomingRequestLineItemInput { + """The ID of the rejected line item.""" + fulfillmentOrderLineItemId: ID! + + """The rejection message of the line item.""" + message: String +} + +"""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!]! +} + +"""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 required to adjust inventory quantities.""" +input InventoryAdjustQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + to be adjusted. + """ + name: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """The quantity changes of items at locations to be made.""" + changes: [InventoryChangeInput!]! +} + +"""Return type for `inventoryAdjustQuantities` mutation.""" +type InventoryAdjustQuantitiesPayload { + """The group of changes made by the operation.""" + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryAdjustQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryAdjustQuantities`. +""" +type InventoryAdjustQuantitiesUserError implements DisplayableError { + """The error code.""" + code: InventoryAdjustQuantitiesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryAdjustQuantitiesUserError`. +""" +enum InventoryAdjustQuantitiesUserErrorCode { + """ + Internal (gid://shopify/) ledger documents are not allowed to be adjusted via API. + """ + INTERNAL_LEDGER_DOCUMENT + + """A ledger document URI is not allowed when adjusting available.""" + INVALID_AVAILABLE_DOCUMENT + + """The specified inventory item could not be found.""" + INVALID_INVENTORY_ITEM + + """The specified ledger document is invalid.""" + INVALID_LEDGER_DOCUMENT + + """The specified location could not be found.""" + INVALID_LOCATION + + """A ledger document URI is required except when adjusting available.""" + INVALID_QUANTITY_DOCUMENT + + """The specified quantity name is invalid.""" + INVALID_QUANTITY_NAME + + """The quantity can't be lower than -2,000,000,000.""" + INVALID_QUANTITY_TOO_LOW + + """The quantity can't be higher than 2,000,000,000.""" + INVALID_QUANTITY_TOO_HIGH + + """The specified reason is invalid.""" + INVALID_REASON + + """The specified reference document is invalid.""" + INVALID_REFERENCE_DOCUMENT + + """The quantities couldn't be adjusted. Try again.""" + ADJUST_QUANTITIES_FAILED + + """ + All changes must have the same ledger document URI or, in the case of adjusting available, no ledger document URI. + """ + MAX_ONE_LEDGER_DOCUMENT + + """The inventory item is not stocked at the location.""" + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM +} + +""" +The input fields to specify whether the inventory item should be activated or not at the specified location. +""" +input InventoryBulkToggleActivationInput { + """The ID of the location to modify the inventory item's stocked status.""" + locationId: ID! + + """ + Whether the inventory item can be stocked at the specified location. To + deactivate, set the value to false which removes an inventory item's + quantities from that location, and turns off inventory at that location. + """ + activate: Boolean! +} + +"""Return type for `inventoryBulkToggleActivation` mutation.""" +type InventoryBulkToggleActivationPayload { + """The inventory item that was updated.""" + inventoryItem: InventoryItem + + """The activated inventory levels.""" + inventoryLevels: [InventoryLevel!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryBulkToggleActivationUserError!]! +} + +""" +An error that occurred while setting the activation status of an inventory item. +""" +type InventoryBulkToggleActivationUserError implements DisplayableError { + """The error code.""" + code: InventoryBulkToggleActivationUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryBulkToggleActivationUserError`. +""" +enum InventoryBulkToggleActivationUserErrorCode { + """An error occurred while setting the activation status.""" + GENERIC_ERROR + + """ + Cannot unstock an inventory item from the only location at which it is stocked. + """ + CANNOT_DEACTIVATE_FROM_ONLY_LOCATION + + """ + Cannot unstock this inventory item from this location because it has committed and incoming quantities. + """ + COMMITTED_AND_INCOMING_INVENTORY_AT_LOCATION @deprecated(reason: "This error code is deprecated. Both INCOMING_INVENTORY_AT_LOCATION and COMMITTED_INVENTORY_AT_LOCATION codes will be returned as individual errors instead.") + + """ + Cannot unstock this inventory item from this location because it has incoming quantities. + """ + INCOMING_INVENTORY_AT_LOCATION + + """ + Cannot unstock this inventory item from this location because it has committed quantities. + """ + COMMITTED_INVENTORY_AT_LOCATION + + """ + Cannot unstock this inventory item from this location because it has unavailable quantities. + """ + RESERVED_INVENTORY_AT_LOCATION + + """Failed to unstock this inventory item from this location.""" + FAILED_TO_UNSTOCK_FROM_LOCATION + + """ + Cannot stock this inventory item at this location because it is managed by a third-party fulfillment service. + """ + INVENTORY_MANAGED_BY_3RD_PARTY + + """ + Cannot stock this inventory item at this location because it is managed by Shopify. + """ + INVENTORY_MANAGED_BY_SHOPIFY + + """Failed to stock this inventory item at this location.""" + FAILED_TO_STOCK_AT_LOCATION + + """ + Cannot stock this inventory item at this location because the variant is missing a SKU. + """ + MISSING_SKU + + """The location was not found.""" + LOCATION_NOT_FOUND + + """The inventory item was not found.""" + INVENTORY_ITEM_NOT_FOUND +} + +""" +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! + + """Specifies the location at which the change will be applied.""" + locationId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Required for all + quantity names except `available`. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: String +} + +"""Return type for `inventoryDeactivate` mutation.""" +type InventoryDeactivatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CountryHarmonizedSystemCodeConnection! + + """The date and time when the inventory item was created.""" + createdAt: DateTime! + + """The number of inventory items that share the same SKU with this item.""" + duplicateSkuCount: Int! + + """ + The harmonized system code of the item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """A globally-unique ID.""" + id: ID! + + """The URL that points to the inventory history for the item.""" + inventoryHistoryUrl: URL + + """The inventory item's quantities at the specified location.""" + inventoryLevel( + """ID of the location for which the inventory level is requested.""" + locationId: ID! + ): InventoryLevel + + """ + A list of the inventory item's quantities for each location that the inventory item can be stocked at. + """ + inventoryLevels( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 { + """The SKU (stock keeping unit) of the inventory item.""" + sku: String + + """ + Unit cost associated with the inventory item, the currency is the shop's default currency. + """ + cost: Decimal + + """Whether the inventory item is tracked.""" + tracked: Boolean + + """ + The country where the item was manufactured or produced, specified using the + standard two-letter [ISO 3166-1 + alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. + """ + countryCodeOfOrigin: CountryCode + + """ + The harmonized system code of the inventory item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """List of country-specific harmonized system codes.""" + countryHarmonizedSystemCodes: [CountryHarmonizedSystemCodeInput!] + + """ + The province where the item was manufactured or produced, specified using the + standard two-letter [ISO 3166-2 + alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) province code. + """ + provinceCodeOfOrigin: String + + """The measurements of an inventory item.""" + measurement: InventoryItemMeasurementInput + + """ + Whether the inventory item needs to be physically shipped to the customer. + Items that require shipping are physical products, while digital goods and + services typically don't require shipping and can be fulfilled electronically. + """ + requiresShipping: Boolean +} + +"""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 + + """Shipping package associated with inventory item.""" + shippingPackageId: ID +} + +"""Return type for `inventoryItemUpdate` mutation.""" +type InventoryItemUpdatePayload { + """The inventory item that was updated.""" + inventoryItem: InventoryItem + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The quantities of an inventory item 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ScheduledChangeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String! + + """The quantity changes of items at locations to be made.""" + changes: [InventoryMoveQuantityChange!]! +} + +"""Return type for `inventoryMoveQuantities` mutation.""" +type InventoryMoveQuantitiesPayload { + """The group of changes made by the operation.""" + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryMoveQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryMoveQuantities`. +""" +type InventoryMoveQuantitiesUserError implements DisplayableError { + """The error code.""" + code: InventoryMoveQuantitiesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryMoveQuantitiesUserError`. +""" +enum InventoryMoveQuantitiesUserErrorCode { + """ + Internal (gid://shopify/) ledger documents are not allowed to be adjusted via API. + """ + INTERNAL_LEDGER_DOCUMENT + + """A ledger document URI is not allowed when adjusting available.""" + INVALID_AVAILABLE_DOCUMENT + + """The specified inventory item could not be found.""" + INVALID_INVENTORY_ITEM + + """The specified ledger document is invalid.""" + INVALID_LEDGER_DOCUMENT + + """The specified location could not be found.""" + INVALID_LOCATION + + """A ledger document URI is required except when adjusting available.""" + INVALID_QUANTITY_DOCUMENT + + """The specified quantity name is invalid.""" + INVALID_QUANTITY_NAME + + """The quantity can't be negative.""" + INVALID_QUANTITY_NEGATIVE + + """The quantity can't be higher than 2,000,000,000.""" + INVALID_QUANTITY_TOO_HIGH + + """The specified reason is invalid.""" + INVALID_REASON + + """The specified reference document is invalid.""" + INVALID_REFERENCE_DOCUMENT + + """The quantities couldn't be moved. Try again.""" + MOVE_QUANTITIES_FAILED + + """The quantities can't be moved between different locations.""" + DIFFERENT_LOCATIONS + + """The quantity names for each change can't be the same.""" + SAME_QUANTITY_NAME + + """ + Only a maximum of 2 ledger document URIs across all changes is allowed. + """ + MAXIMUM_LEDGER_DOCUMENT_URIS + + """The inventory item is not stocked at the location.""" + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM +} + +""" +Represents the change to be made to an inventory item at a location. +The change can either involve the same quantity name between different locations, +or involve different quantity names between the same location. +""" +input InventoryMoveQuantityChange { + """Specifies the inventory item to which the change will be applied.""" + inventoryItemId: ID! + + """The amount by which the inventory quantity will be changed.""" + quantity: Int! + + """Details about where the move will be made from.""" + from: InventoryMoveQuantityTerminalInput! + + """Details about where the move will be made to.""" + to: InventoryMoveQuantityTerminalInput! +} + +""" +The input fields representing the change to be made to an inventory item at a location. +""" +input InventoryMoveQuantityTerminalInput { + """Specifies the location at which the change will be applied.""" + locationId: ID! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) to be + moved. + """ + name: String! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Required for all + quantity names except `available`. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: String +} + +"""General inventory properties for the shop.""" +type InventoryProperties { + """All the quantity names.""" + quantityNames: [InventoryQuantityName!]! +} + +""" +The `InventoryQuantity` object lets you manage and track inventory quantities for specific [states](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). +Inventory quantities represent different states of items such as available for +purchase, committed to orders, reserved for drafts, incoming from suppliers, or +set aside for quality control or safety stock. + +You can use [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel) +to manage where inventory items are stocked. You can also [make inventory adjustments](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) +to apply changes to inventory quantities. + +Inventory quantities can be managed by a merchant or by [fulfillment services](https://shopify.dev/docs/api/admin-graphql/latest/objects/fulfillmentservice) +that handle inventory tracking. +Learn more about working with [Shopify's inventory management +system](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps). +""" +type InventoryQuantity implements Node { + """A globally-unique ID.""" + id: ID! + + """ + The inventory state [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + that identifies the inventory quantity. + """ + name: String! + + """ + The quantity of an inventory item at a specific location, for a quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). + """ + quantity: Int! + + """When the inventory quantity was last updated.""" + updatedAt: DateTime +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventoryQuantityInput { + """Specifies the inventory item to which the quantity will be set.""" + inventoryItemId: ID! + + """Specifies the location at which the quantity will be set.""" + locationId: ID! + + """The quantity to which the inventory quantity will be set.""" + quantity: Int! + + """The current quantity to be compared against the persisted quantity.""" + compareQuantity: Int +} + +"""Details about an individual quantity name.""" +type InventoryQuantityName { + """List of quantity names that this quantity name belongs to.""" + belongsTo: [String!]! + + """List of quantity names that comprise this quantity name.""" + comprises: [String!]! + + """ + The display name for quantity names translated into applicable language. + """ + displayName: String + + """Whether the quantity name has been used by the merchant.""" + isInUse: Boolean! + + """ + The [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) of + the inventory quantity. Used by + [inventory queries and mutations](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#graphql-queries-and-mutations). + """ + name: String! +} + +""" +Returns the scheduled changes to inventory states related to the ledger document. +""" +type InventoryScheduledChange { + """The date and time that the scheduled change is expected to happen.""" + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantities of an inventory item that are related to a specific location. + """ + inventoryLevel: InventoryLevel! + + """A freeform URI that represents what changed the inventory quantities.""" + ledgerDocumentUri: URL! + + """ + The quantity of the scheduled change associated with the ledger document in the `fromName` state. + """ + quantity: Int! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +An auto-generated type for paginating through multiple InventoryScheduledChanges. +""" +type InventoryScheduledChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryScheduledChangeEdge!]! + + """ + A list of nodes that are contained in InventoryScheduledChangeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryScheduledChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryScheduledChange and a cursor during pagination. +""" +type InventoryScheduledChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of InventoryScheduledChangeEdge.""" + node: InventoryScheduledChange! +} + +"""The input fields for a scheduled change of an inventory item.""" +input InventoryScheduledChangeInput { + """The date and time that the scheduled change is expected to happen.""" + expectedAt: DateTime! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition from. + """ + fromName: String! + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) + to transition to. + """ + toName: String! +} + +""" +The input fields for the inventory item associated with the scheduled changes that need to be applied. +""" +input InventoryScheduledChangeItemInput { + """The ID of the inventory item.""" + inventoryItemId: ID! + + """The ID of the location.""" + locationId: ID! + + """ + A non-Shopify URI that identifies what specific inventory transaction or + ledger entry was changed. Represents the exact inventory movement being + referenced, distinct from the business reason for the change. + + Preferred format - Global ID (GID): gid://[your-app-name]/[transaction-type]/[id] + + Examples: + - gid://warehouse-app/InventoryTransaction/TXN-2024-001 (specific transaction) + - gid://3pl-system/StockMovement/SM-2024-0125 (stock movement record) + - gid://pos-app/InventoryUpdate/UPD-98765 (POS inventory update) + - gid://erp-connector/LedgerEntry/LE-2024-11-21-001 (ledger entry) + + Requirements: Valid non-Shopify URI with scheme and content. Cannot use gid://shopify/* format. + """ + ledgerDocumentUri: URL! + + """An array of all the scheduled changes for the item.""" + scheduledChanges: [InventoryScheduledChangeInput!]! +} + +"""The input fields required to set inventory on hand quantities.""" +input InventorySetOnHandQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """The value to which the on hand quantity will be set.""" + setQuantities: [InventorySetQuantityInput!]! +} + +"""Return type for `inventorySetOnHandQuantities` mutation.""" +type InventorySetOnHandQuantitiesPayload { + """The group of changes made by the operation.""" + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventorySetOnHandQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetOnHandQuantities`. +""" +type InventorySetOnHandQuantitiesUserError implements DisplayableError { + """The error code.""" + code: InventorySetOnHandQuantitiesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetOnHandQuantitiesUserError`. +""" +enum InventorySetOnHandQuantitiesUserErrorCode { + """The specified inventory item could not be found.""" + INVALID_INVENTORY_ITEM + + """The specified location could not be found.""" + INVALID_LOCATION + + """The quantity can't be negative.""" + INVALID_QUANTITY_NEGATIVE + + """The specified reason is invalid.""" + INVALID_REASON + + """The specified reference document is invalid.""" + INVALID_REFERENCE_DOCUMENT + + """The on-hand quantities couldn't be set. Try again.""" + SET_ON_HAND_QUANTITIES_FAILED + + """The inventory item is not stocked at the location.""" + ITEM_NOT_STOCKED_AT_LOCATION + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM + + """The total quantity can't be higher than 1,000,000,000.""" + INVALID_QUANTITY_TOO_HIGH + + """The compareQuantity value does not match persisted value.""" + COMPARE_QUANTITY_STALE +} + +"""The input fields required to set inventory quantities.""" +input InventorySetQuantitiesInput { + """ + The reason for the quantity changes. The value must be one of the [possible + reasons](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#set-inventory-quantities-on-hand). + """ + reason: String! + + """ + The name of quantities to be changed. The only accepted values are: `available` or `on_hand`. + """ + name: String! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: String + + """The values to which each quantities will be set.""" + quantities: [InventoryQuantityInput!]! + + """Skip the compare quantity check in the quantities field.""" + ignoreCompareQuantity: Boolean = false +} + +"""Return type for `inventorySetQuantities` mutation.""" +type InventorySetQuantitiesPayload { + """The group of changes made by the operation.""" + inventoryAdjustmentGroup: InventoryAdjustmentGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventorySetQuantitiesUserError!]! +} + +"""An error that occurs during the execution of `InventorySetQuantities`.""" +type InventorySetQuantitiesUserError implements DisplayableError { + """The error code.""" + code: InventorySetQuantitiesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetQuantitiesUserError`. +""" +enum InventorySetQuantitiesUserErrorCode { + """The specified inventory item could not be found.""" + INVALID_INVENTORY_ITEM + + """The specified location could not be found.""" + INVALID_LOCATION + + """The quantity can't be negative.""" + INVALID_QUANTITY_NEGATIVE + + """The specified reason is invalid.""" + INVALID_REASON + + """The specified reference document is invalid.""" + INVALID_REFERENCE_DOCUMENT + + """The specified inventory item is not stocked at the location.""" + ITEM_NOT_STOCKED_AT_LOCATION + + """The total quantity can't be higher than 1,000,000,000.""" + INVALID_QUANTITY_TOO_HIGH + + """The total quantity can't be lower than -1,000,000,000.""" + INVALID_QUANTITY_TOO_LOW + + """ + The compareQuantity argument must be given to each quantity or ignored using ignoreCompareQuantity. + """ + COMPARE_QUANTITY_REQUIRED + + """The compareQuantity value does not match persisted value.""" + COMPARE_QUANTITY_STALE + + """The quantity name must be either 'available' or 'on_hand'.""" + INVALID_NAME + + """The combination of inventoryItemId and locationId must be unique.""" + NO_DUPLICATE_INVENTORY_ITEM_ID_GROUP_ID_PAIR + + """ + The specified inventory item is not allowed to be adjusted via API. Example: if the inventory item is a parent bundle. + """ + NON_MUTABLE_INVENTORY_ITEM +} + +""" +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 reason for setting up the scheduled changes.""" + reason: String! + + """ + The list of all the items on which the scheduled changes need to be applied. + """ + items: [InventoryScheduledChangeItemInput!]! + + """ + A URI that represents why the inventory change happened, identifying the + source system and document that caused this adjustment. Enables complete audit + trails and brand visibility in Shopify admin inventory history. + + Preferred format - Global ID (GID): gid://[your-app-name]/[entity-type]/[id] + + Examples: + - gid://warehouse-app/PurchaseOrder/PO-2024-001 (stock received) + - gid://3pl-system/CycleCount/CC-2024-0125 (cycle count adjustment) + - gid://pos-app/Transaction/TXN-98765 (in-store sale) + - gid://erp-connector/SyncJob/SYNC-2024-11-21-001 (ERP sync) + - gid://shopify/Order/1234567890 (Shopify order reference) + + Benefits: Your app name appears directly in merchant inventory history, + reducing support tickets and providing clear audit trails for compliance. + + Alternative formats (also supported): https://myapp.com/documents/12345, custom-scheme://identifier + + Requirements: Valid URI with scheme and content. For GID format, all components (app, entity, id) must be present. + """ + referenceDocumentUri: URL! +} + +"""Return type for `inventorySetScheduledChanges` mutation.""" +type InventorySetScheduledChangesPayload { + """The scheduled changes that were created.""" + scheduledChanges: [InventoryScheduledChange!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventorySetScheduledChangesUserError!]! +} + +""" +An error that occurs during the execution of `InventorySetScheduledChanges`. +""" +type InventorySetScheduledChangesUserError implements DisplayableError { + """The error code.""" + code: InventorySetScheduledChangesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventorySetScheduledChangesUserError`. +""" +enum InventorySetScheduledChangesUserErrorCode { + """There was an error updating the scheduled changes.""" + ERROR_UPDATING_SCHEDULED + + """The from_name and to_name can't be the same.""" + SAME_FROM_TO_NAMES + + """The specified fromName is invalid.""" + INVALID_FROM_NAME + + """The specified toName is invalid.""" + INVALID_TO_NAME + + """ + The item can only have one scheduled change for quantity name as the toName. + """ + DUPLICATE_TO_NAME + + """The specified reason is invalid.""" + INVALID_REASON + + """ + The item can only have one scheduled change for quantity name as the fromName. + """ + DUPLICATE_FROM_NAME + + """The location couldn't be found.""" + LOCATION_NOT_FOUND + + """The inventory item was not found at the location specified.""" + INVENTORY_STATE_NOT_FOUND + + """At least 1 item must be provided.""" + ITEMS_EMPTY + + """The inventory item was not found.""" + INVENTORY_ITEM_NOT_FOUND + + """The specified field is invalid.""" + INCLUSION + + """The ledger document URI is invalid.""" + LEDGER_DOCUMENT_INVALID +} + +"""Represents an inventory shipment.""" +type InventoryShipment implements Node { + """The date the shipment was created in UTC.""" + dateCreated: DateTime + + """The date the shipment was initially received in UTC.""" + dateReceived: DateTime + + """The date the shipment was shipped in UTC.""" + dateShipped: DateTime + + """A globally-unique ID.""" + id: ID! + + """The total quantity of all items in the shipment.""" + lineItemTotalQuantity: Int! + + """The line items included in this shipment.""" + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ShipmentLineItemSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): InventoryShipmentLineItemConnection + + """ + The number of line items associated with the inventory shipment. Limited to a maximum of 10000 by default. + """ + lineItemsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """The name of the inventory shipment.""" + name: String! + + """The current status of the shipment.""" + status: InventoryShipmentStatus! + + """ + The total quantity of items accepted across all line items in this shipment. + """ + totalAcceptedQuantity: Int! + + """ + The total quantity of items received (both accepted and rejected) across all line items in this shipment. + """ + totalReceivedQuantity: Int! + + """ + The total quantity of items rejected across all line items in this shipment. + """ + totalRejectedQuantity: Int! + + """The tracking information for the shipment.""" + tracking: InventoryShipmentTracking +} + +"""Return type for `inventoryShipmentAddItems` mutation.""" +type InventoryShipmentAddItemsPayload { + """The list of added line items.""" + addedItems: [InventoryShipmentLineItem!] + + """The inventory shipment with the added items.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentAddItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentAddItems`. +""" +type InventoryShipmentAddItemsUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentAddItemsUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentAddItemsUserError`. +""" +enum InventoryShipmentAddItemsUserErrorCode { + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS + + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The quantity is invalid.""" + INVALID_QUANTITY + + """The item was not found.""" + ITEM_NOT_FOUND + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +""" +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! +} + +"""The input fields to add a shipment.""" +input InventoryShipmentCreateInput { + """ + The ID of the inventory movement (transfer or purchase order) this shipment belongs to. + """ + movementId: ID! + + """The tracking information for the shipment.""" + trackingInput: InventoryShipmentTrackingInput + + """The list of line items for the inventory shipment.""" + lineItems: [InventoryShipmentLineItemInput!]! + + """The date the shipment was created.""" + dateCreated: DateTime +} + +"""Return type for `inventoryShipmentCreateInTransit` mutation.""" +type InventoryShipmentCreateInTransitPayload { + """The created inventory shipment.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentCreateInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentCreateInTransit`. +""" +type InventoryShipmentCreateInTransitUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentCreateInTransitUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentCreateInTransitUserError`. +""" +enum InventoryShipmentCreateInTransitUserErrorCode { + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The quantity is invalid.""" + INVALID_QUANTITY + + """The item was not found.""" + ITEM_NOT_FOUND + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The shipment input cannot be empty.""" + EMPTY_SHIPMENT_INPUT + + """The list of line items is empty.""" + ITEMS_EMPTY + + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """The URL is invalid.""" + INVALID_URL + + """The shipment input is invalid.""" + INVALID_SHIPMENT_INPUT + + """One or more items are not valid.""" + INVALID_ITEM + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +"""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 { + """The shipment input cannot be empty.""" + EMPTY_SHIPMENT_INPUT + + """The item was not found.""" + ITEM_NOT_FOUND + + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """Bundled items cannot be used for this operation.""" + BUNDLED_ITEM + + """The quantity is invalid.""" + INVALID_QUANTITY + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The shipment input is invalid.""" + INVALID_SHIPMENT_INPUT + + """One or more items are not valid.""" + INVALID_ITEM + + """The URL is invalid.""" + INVALID_URL + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +"""Return type for `inventoryShipmentDelete` mutation.""" +type InventoryShipmentDeletePayload { + """The ID of the inventory shipment that was deleted.""" + id: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentDelete`. +""" +type InventoryShipmentDeleteUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentDeleteUserError`. +""" +enum InventoryShipmentDeleteUserErrorCode { + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS +} + +""" +An auto-generated type which holds one InventoryShipment and a cursor during pagination. +""" +type InventoryShipmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of InventoryShipmentEdge.""" + node: InventoryShipment! +} + +"""Represents a single line item within an inventory shipment.""" +type InventoryShipmentLineItem implements Node { + """The quantity of items that were accepted in this shipment line item.""" + acceptedQuantity: Int! + + """A globally-unique ID.""" + id: ID! + + """The inventory item associated with this line item.""" + inventoryItem: InventoryItem + + """The quantity of items in this shipment line item.""" + quantity: Int! + + """The quantity of items that were rejected in this shipment line item.""" + rejectedQuantity: Int! + + """ + The total quantity of units that haven't been received (neither accepted or rejected) in this shipment line item. + """ + unreceivedQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryShipmentLineItems. +""" +type InventoryShipmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryShipmentLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryShipmentLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryShipmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryShipmentLineItem and a cursor during pagination. +""" +type InventoryShipmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of InventoryShipmentLineItemEdge.""" + node: InventoryShipmentLineItem! +} + +"""The input fields for a line item on an inventory shipment.""" +input InventoryShipmentLineItemInput { + """The inventory item ID for the shipment line item.""" + inventoryItemId: ID! + + """The quantity for the shipment line item.""" + quantity: Int! +} + +"""Return type for `inventoryShipmentMarkInTransit` mutation.""" +type InventoryShipmentMarkInTransitPayload { + """The marked in transit inventory shipment.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentMarkInTransitUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentMarkInTransit`. +""" +type InventoryShipmentMarkInTransitUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentMarkInTransitUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentMarkInTransitUserError`. +""" +enum InventoryShipmentMarkInTransitUserErrorCode { + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS + + """The item was not found.""" + ITEM_NOT_FOUND + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The quantity is invalid.""" + INVALID_QUANTITY + + """The list of line items is empty.""" + ITEMS_EMPTY + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """Failed to activate inventory at location.""" + ACTIVATION_FAILED +} + +"""The input fields to receive an item on an inventory shipment.""" +input InventoryShipmentReceiveItemInput { + """The shipment line item ID to be received.""" + shipmentLineItemId: ID! + + """The quantity for the item to be received.""" + quantity: Int! + + """The reason for received item.""" + reason: InventoryShipmentReceiveLineItemReason! +} + +"""The reason for receiving a line item on an inventory shipment.""" +enum InventoryShipmentReceiveLineItemReason { + """The line item was accepted.""" + ACCEPTED + + """The line item was rejected.""" + REJECTED +} + +"""Return type for `inventoryShipmentReceive` mutation.""" +type InventoryShipmentReceivePayload { + """The inventory shipment with received items.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentReceiveUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentReceive`. +""" +type InventoryShipmentReceiveUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentReceiveUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentReceiveUserError`. +""" +enum InventoryShipmentReceiveUserErrorCode { + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE + + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """The quantity is invalid.""" + INVALID_QUANTITY + + """The item was not found.""" + ITEM_NOT_FOUND + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +"""Return type for `inventoryShipmentRemoveItems` mutation.""" +type InventoryShipmentRemoveItemsPayload { + """The inventory shipment with items removed.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentRemoveItemsUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentRemoveItems`. +""" +type InventoryShipmentRemoveItemsUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentRemoveItemsUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentRemoveItemsUserError`. +""" +enum InventoryShipmentRemoveItemsUserErrorCode { + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """The item was not found.""" + ITEM_NOT_FOUND + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +"""Return type for `inventoryShipmentSetTracking` mutation.""" +type InventoryShipmentSetTrackingPayload { + """The inventory shipment with the edited tracking info.""" + inventoryShipment: InventoryShipment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentSetTrackingUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentSetTracking`. +""" +type InventoryShipmentSetTrackingUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentSetTrackingUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentSetTrackingUserError`. +""" +enum InventoryShipmentSetTrackingUserErrorCode { + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """The URL is invalid.""" + INVALID_URL +} + +"""The status of an inventory shipment.""" +enum InventoryShipmentStatus { + """The inventory shipment has been created but not yet shipped.""" + DRAFT + + """The inventory shipment is currently in transit.""" + IN_TRANSIT + + """The inventory shipment has been partially received at the destination.""" + PARTIALLY_RECEIVED + + """ + The inventory shipment has been completely received at the destination. + """ + RECEIVED + + """Status not included in the current enumeration set.""" + OTHER +} + +"""Represents the tracking information for an inventory shipment.""" +type InventoryShipmentTracking { + """The estimated date and time that the shipment will arrive.""" + arrivesAt: DateTime + + """The name of the shipping carrier company.""" + company: String + + """The tracking number used by the carrier to identify the shipment.""" + trackingNumber: String + + """ + The URL to track the shipment. + + Given a tracking number and a shipping carrier company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company), + Shopify will return a generated tracking URL if no tracking URL was set manually. + """ + trackingUrl: URL +} + +"""The input fields for an inventory shipment's tracking information.""" +input InventoryShipmentTrackingInput { + """The tracking number for the shipment.""" + trackingNumber: String + + """ + The name of the shipping carrier company. + + Given a shipping carrier company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company), + Shopify can build a tracking URL for a provided tracking number. + """ + company: String + + """ + The URL to track the shipment. + + Use this field to specify a custom tracking URL. If no custom tracking URL is set, Shopify will automatically provide + this field on query for a tracking number and a supported shipping carrier company from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#field-company). + """ + trackingUrl: URL + + """The estimated date and time that the shipment will arrive.""" + arrivesAt: DateTime +} + +"""The input fields for a line item on an inventory shipment.""" +input InventoryShipmentUpdateItemQuantitiesInput { + """The ID for the inventory shipment line item.""" + shipmentLineItemId: ID! + + """The quantity for the shipment line item.""" + quantity: Int! +} + +"""Return type for `inventoryShipmentUpdateItemQuantities` mutation.""" +type InventoryShipmentUpdateItemQuantitiesPayload { + """The inventory shipment with updated item quantities.""" + shipment: InventoryShipment + + """The updated item quantities.""" + updatedLineItems: [InventoryShipmentLineItem!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryShipmentUpdateItemQuantitiesUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentUpdateItemQuantities`. +""" +type InventoryShipmentUpdateItemQuantitiesUserError implements DisplayableError { + """The error code.""" + code: InventoryShipmentUpdateItemQuantitiesUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryShipmentUpdateItemQuantitiesUserError`. +""" +enum InventoryShipmentUpdateItemQuantitiesUserErrorCode { + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """The shipment was not found.""" + SHIPMENT_NOT_FOUND + + """The item was not found.""" + ITEM_NOT_FOUND + + """The quantity is invalid.""" + INVALID_QUANTITY + + """Current shipment status does not support this operation.""" + INVALID_SHIPMENT_STATUS + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE +} + +"""Represents the intention to move inventory between locations.""" +type InventoryTransfer implements CommentEventSubject & HasEvents & HasMetafieldDefinitions & HasMetafields & Node { + """The date and time the inventory transfer was created in UTC format.""" + dateCreated: DateTime + + """ + Snapshot of the destination location (name, address, when snapped) with an + optional link to the live Location object. If the original location is + deleted, the snapshot data will still be available but the location link will be nil. + """ + destination: LocationSnapshot + + """The list of events associated with the inventory transfer.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """ + Whether the merchant has added timeline comments to the inventory transfer. + """ + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! + + """The line items associated with the inventory transfer.""" + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): InventoryTransferLineItemConnection! + + """ + The number of line items associated with the inventory transfer. Limited to a maximum of 10000 by default. + """ + lineItemsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The name of the inventory transfer.""" + name: String! + + """Additional note attached to the inventory transfer.""" + note: String + + """ + Snapshot of the origin location (name, address, when snapped) with an optional + link to the live Location object. If the original location is deleted, the + snapshot data will still be available but the location link will be nil. + """ + origin: LocationSnapshot + + """The total quantity of items received in the transfer.""" + receivedQuantity: Int! + + """The reference name of the inventory transfer.""" + referenceName: String + + """The shipments associated with the inventory transfer.""" + shipments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): InventoryShipmentConnection! + + """The current status of the transfer.""" + status: InventoryTransferStatus! + + """A list of tags that have been added to the inventory transfer.""" + tags: [String!]! + + """The total quantity of items being transferred.""" + totalQuantity: Int! +} + +"""Return type for `inventoryTransferCancel` mutation.""" +type InventoryTransferCancelPayload { + """The cancelled inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferCancelUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCancel`. +""" +type InventoryTransferCancelUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferCancelUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCancelUserError`. +""" +enum InventoryTransferCancelUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """Shipment already exists for the transfer.""" + SHIPMENT_EXISTS +} + +""" +An auto-generated type for paginating through multiple InventoryTransfers. +""" +type InventoryTransferConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferEdge!]! + + """ + A list of nodes that are contained in InventoryTransferEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [InventoryTransfer!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields to create an inventory transfer.""" +input InventoryTransferCreateAsReadyToShipInput { + """The origin location for the inventory transfer.""" + originLocationId: ID! + + """The destination location for the inventory transfer.""" + destinationLocationId: ID! + + """The list of line items for the inventory transfer.""" + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """A note to add to the Inventory Transfer.""" + note: String + + """The tags to add to the inventory transfer.""" + tags: [String!] + + """The reference name to add to the inventory transfer.""" + referenceName: String +} + +"""Return type for `inventoryTransferCreateAsReadyToShip` mutation.""" +type InventoryTransferCreateAsReadyToShipPayload { + """The created inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferCreateAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreateAsReadyToShip`. +""" +type InventoryTransferCreateAsReadyToShipUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferCreateAsReadyToShipUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateAsReadyToShipUserError`. +""" +enum InventoryTransferCreateAsReadyToShipUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """The list of line items is empty.""" + ITEMS_EMPTY + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """The origin location cannot be the same as the destination location.""" + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """The tag exceeds the maximum length.""" + TAG_EXCEEDS_MAX_LENGTH + + """A location is required for this operation.""" + LOCATION_REQUIRED + + """Bundled items cannot be used for this operation.""" + BUNDLED_ITEM + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The item was not found.""" + ITEM_NOT_FOUND + + """The quantity is invalid.""" + INVALID_QUANTITY + + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE +} + +"""The input fields to create an inventory transfer.""" +input InventoryTransferCreateInput { + """The origin location for the inventory transfer.""" + originLocationId: ID + + """The destination location for the inventory transfer.""" + destinationLocationId: ID + + """The list of line items for the inventory transfer.""" + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """A note to add to the Inventory Transfer.""" + note: String + + """The tags to add to the inventory transfer.""" + tags: [String!] + + """The reference name to add to the inventory transfer.""" + referenceName: String +} + +"""Return type for `inventoryTransferCreate` mutation.""" +type InventoryTransferCreatePayload { + """The created inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferCreateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferCreate`. +""" +type InventoryTransferCreateUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferCreateUserError`. +""" +enum InventoryTransferCreateUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """The origin location cannot be the same as the destination location.""" + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """The tag exceeds the maximum length.""" + TAG_EXCEEDS_MAX_LENGTH + + """Bundled items cannot be used for this operation.""" + BUNDLED_ITEM + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The item was not found.""" + ITEM_NOT_FOUND + + """The quantity is invalid.""" + INVALID_QUANTITY + + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE +} + +"""Return type for `inventoryTransferDelete` mutation.""" +type InventoryTransferDeletePayload { + """The ID of the deleted inventory transfer.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferDeleteUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDelete`. +""" +type InventoryTransferDeleteUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDeleteUserError`. +""" +enum InventoryTransferDeleteUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS +} + +"""Return type for `inventoryTransferDuplicate` mutation.""" +type InventoryTransferDuplicatePayload { + """The duplicated inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferDuplicateUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferDuplicate`. +""" +type InventoryTransferDuplicateUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferDuplicateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferDuplicateUserError`. +""" +enum InventoryTransferDuplicateUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND +} + +""" +An auto-generated type which holds one InventoryTransfer and a cursor during pagination. +""" +type InventoryTransferEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of InventoryTransferEdge.""" + node: InventoryTransfer! +} + +"""The input fields to edit an inventory transfer.""" +input InventoryTransferEditInput { + """ + The origin location for the inventory transfer. The origin location can only be changed + for draft transfers. + """ + originId: ID + + """ + The destination location for the inventory transfer. The destination location can only be + changed for draft transfers. + """ + destinationId: ID + + """The date the inventory transfer was created.""" + dateCreated: Date + + """A note to add to the Inventory Transfer.""" + note: String + + """The tags to add to the inventory transfer.""" + tags: [String!] + + """The reference name to add to the inventory transfer.""" + referenceName: String +} + +"""Return type for `inventoryTransferEdit` mutation.""" +type InventoryTransferEditPayload { + """The edited inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferEditUserError!]! +} + +"""An error that occurs during the execution of `InventoryTransferEdit`.""" +type InventoryTransferEditUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferEditUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferEditUserError`. +""" +enum InventoryTransferEditUserErrorCode { + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """ + The location of a transfer cannot be updated. Only Draft Transfers can mutate their locations. + """ + TRANSFER_LOCATION_IMMUTABLE + + """The origin location cannot be the same as the destination location.""" + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE + + """The tag exceeds the maximum length.""" + TAG_EXCEEDS_MAX_LENGTH +} + +"""Represents a line item belonging to an inventory transfer.""" +type InventoryTransferLineItem implements Node { + """A globally-unique ID.""" + id: ID! + + """The inventory item associated with this line item.""" + inventoryItem: InventoryItem + + """ + The quantity of the item that has been picked for a draft shipment but not yet shipped. + """ + pickedForShipmentQuantity: Int! + + """ + The quantity of the item that can be actioned upon, such as editing the item + quantity on the transfer or adding to a shipment. + """ + processableQuantity: Int! + + """The quantity of the item that can be shipped.""" + shippableQuantity: Int! + + """The quantity of the item that has been shipped.""" + shippedQuantity: Int! + + """The title of the product associated with this line item.""" + title: String + + """The total quantity of items being transferred.""" + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple InventoryTransferLineItems. +""" +type InventoryTransferLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryTransferLineItemEdge!]! + + """ + A list of nodes that are contained in InventoryTransferLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [InventoryTransferLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one InventoryTransferLineItem and a cursor during pagination. +""" +type InventoryTransferLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of InventoryTransferLineItemEdge.""" + node: InventoryTransferLineItem! +} + +"""The input fields for a line item on an inventory transfer.""" +input InventoryTransferLineItemInput { + """The inventory item ID for the transfer line item.""" + inventoryItemId: ID! + + """The quantity for the transfer line item.""" + quantity: Int! +} + +"""Represents an update to a single transfer line item.""" +type InventoryTransferLineItemUpdate { + """The delta quantity for the transfer line item.""" + deltaQuantity: Int + + """The inventory item ID for the transfer line item.""" + inventoryItemId: ID + + """The new quantity for the transfer line item.""" + newQuantity: Int +} + +"""Return type for `inventoryTransferMarkAsReadyToShip` mutation.""" +type InventoryTransferMarkAsReadyToShipPayload { + """The ready to ship inventory transfer.""" + inventoryTransfer: InventoryTransfer + + """The list of errors that occurred from executing the mutation.""" + userErrors: [InventoryTransferMarkAsReadyToShipUserError!]! +} + +""" +An error that occurs during the execution of `InventoryTransferMarkAsReadyToShip`. +""" +type InventoryTransferMarkAsReadyToShipUserError implements DisplayableError { + """The error code.""" + code: InventoryTransferMarkAsReadyToShipUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `InventoryTransferMarkAsReadyToShipUserError`. +""" +enum InventoryTransferMarkAsReadyToShipUserErrorCode { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """The list of line items is empty.""" + ITEMS_EMPTY + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """A location is required for this operation.""" + LOCATION_REQUIRED + + """One or more items are not valid.""" + INVALID_ITEM + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """The location selected can't be found.""" + LOCATION_NOT_FOUND +} + +"""The input fields to remove inventory items from a transfer.""" +input InventoryTransferRemoveItemsInput { + """The ID of the inventory transfer where the items will be removed.""" + id: ID! + + """The IDs of the 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 transfer was not found.""" + TRANSFER_NOT_FOUND + + """A ready to ship transfer must have at least one item.""" + CANT_REMOVE_ALL_ITEMS_FROM_READY_TO_SHIP_TRANSFER + + """The item was not found.""" + ITEM_NOT_FOUND + + """ + The item cannot have its shippable quantity removed if all of its quantity is fully allocated in one or more shipments. + """ + ALL_QUANTITY_SHIPPED + + """ + The item cannot be removed because it exists in a draft shipment with zero quantity. + """ + ITEM_PRESENT_ON_DRAFT_SHIPMENT_WITH_ZERO_QUANTITY + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """The location selected can't be found.""" + LOCATION_NOT_FOUND +} + +"""The input fields to the InventoryTransferSetItems mutation.""" +input InventoryTransferSetItemsInput { + """The ID of the inventory transfer where the items will be set.""" + id: ID! + + """The line items to 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 { + """The transfer was not found.""" + TRANSFER_NOT_FOUND + + """Current transfer status does not support this operation.""" + INVALID_TRANSFER_STATUS + + """The location selected can't be found.""" + LOCATION_NOT_FOUND + + """The location selected is not active.""" + LOCATION_NOT_ACTIVE + + """Bundled items cannot be used for this operation.""" + BUNDLED_ITEM + + """The item does not track inventory.""" + UNTRACKED_ITEM + + """The item was not found.""" + ITEM_NOT_FOUND + + """The quantity is invalid.""" + INVALID_QUANTITY + + """A single item can't be listed twice.""" + DUPLICATE_ITEM + + """The item is not stocked at the intended location.""" + INVENTORY_STATE_NOT_ACTIVE +} + +"""The status of a transfer.""" +enum InventoryTransferStatus { + """The inventory transfer has been created but not yet finalized.""" + DRAFT + + """The inventory transfer has been created, but not yet shipped.""" + READY_TO_SHIP + + """ + The inventory transfer is in progress, with a shipment currently underway or received. + """ + IN_PROGRESS + + """ + The inventory transfer has been completely received at the destination. + """ + TRANSFERRED + + """The inventory transfer has been canceled.""" + CANCELED + + """Status not included in the current enumeration set.""" + OTHER +} + +""" +The financial transfer details for a return outcome that results in an invoice. +""" +type InvoiceReturnOutcome { + """ + The total monetary value to be invoiced in shop and presentment currencies. + """ + amount: MoneyBag! +} + +""" +A 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! +} + +""" +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 + +"""Language codes supported by Shopify.""" +enum LanguageCode { + """Afrikaans.""" + AF + + """Akan.""" + AK + + """Amharic.""" + AM + + """Arabic.""" + AR + + """Assamese.""" + AS + + """Azerbaijani.""" + AZ + + """Belarusian.""" + BE + + """Bulgarian.""" + BG + + """Bambara.""" + BM + + """Bangla.""" + BN + + """Tibetan.""" + BO + + """Breton.""" + BR + + """Bosnian.""" + BS + + """Catalan.""" + CA + + """Chechen.""" + CE + + """Central Kurdish.""" + CKB + + """Czech.""" + CS + + """Welsh.""" + CY + + """Danish.""" + DA + + """German.""" + DE + + """Dzongkha.""" + DZ + + """Ewe.""" + EE + + """Greek.""" + EL + + """English.""" + EN + + """Esperanto.""" + EO + + """Spanish.""" + ES + + """Estonian.""" + ET + + """Basque.""" + EU + + """Persian.""" + FA + + """Fulah.""" + FF + + """Finnish.""" + FI + + """Filipino.""" + FIL + + """Faroese.""" + FO + + """French.""" + FR + + """Western Frisian.""" + FY + + """Irish.""" + GA + + """Scottish Gaelic.""" + GD + + """Galician.""" + GL + + """Gujarati.""" + GU + + """Manx.""" + GV + + """Hausa.""" + HA + + """Hebrew.""" + HE + + """Hindi.""" + HI + + """Croatian.""" + HR + + """Hungarian.""" + HU + + """Armenian.""" + HY + + """Interlingua.""" + IA + + """Indonesian.""" + ID + + """Igbo.""" + IG + + """Sichuan Yi.""" + II + + """Icelandic.""" + IS + + """Italian.""" + IT + + """Japanese.""" + JA + + """Javanese.""" + JV + + """Georgian.""" + KA + + """Kikuyu.""" + KI + + """Kazakh.""" + KK + + """Kalaallisut.""" + KL + + """Khmer.""" + KM + + """Kannada.""" + KN + + """Korean.""" + KO + + """Kashmiri.""" + KS + + """Kurdish.""" + KU + + """Cornish.""" + KW + + """Kyrgyz.""" + KY + + """Luxembourgish.""" + LB + + """Ganda.""" + LG + + """Lingala.""" + LN + + """Lao.""" + LO + + """Lithuanian.""" + LT + + """Luba-Katanga.""" + LU + + """Latvian.""" + LV + + """Malagasy.""" + MG + + """Māori.""" + MI + + """Macedonian.""" + MK + + """Malayalam.""" + ML + + """Mongolian.""" + MN + + """Marathi.""" + MR + + """Malay.""" + MS + + """Maltese.""" + MT + + """Burmese.""" + MY + + """Norwegian (Bokmål).""" + NB + + """North Ndebele.""" + ND + + """Nepali.""" + NE + + """Dutch.""" + NL + + """Norwegian Nynorsk.""" + NN + + """Norwegian.""" + NO + + """Oromo.""" + OM + + """Odia.""" + OR + + """Ossetic.""" + OS + + """Punjabi.""" + PA + + """Polish.""" + PL + + """Pashto.""" + PS + + """Portuguese (Brazil).""" + PT_BR + + """Portuguese (Portugal).""" + PT_PT + + """Quechua.""" + QU + + """Romansh.""" + RM + + """Rundi.""" + RN + + """Romanian.""" + RO + + """Russian.""" + RU + + """Kinyarwanda.""" + RW + + """Sanskrit.""" + SA + + """Sardinian.""" + SC + + """Sindhi.""" + SD + + """Northern Sami.""" + SE + + """Sango.""" + SG + + """Sinhala.""" + SI + + """Slovak.""" + SK + + """Slovenian.""" + SL + + """Shona.""" + SN + + """Somali.""" + SO + + """Albanian.""" + SQ + + """Serbian.""" + SR + + """Sundanese.""" + SU + + """Swedish.""" + SV + + """Swahili.""" + SW + + """Tamil.""" + TA + + """Telugu.""" + TE + + """Tajik.""" + TG + + """Thai.""" + TH + + """Tigrinya.""" + TI + + """Turkmen.""" + TK + + """Tongan.""" + TO + + """Turkish.""" + TR + + """Tatar.""" + TT + + """Uyghur.""" + UG + + """Ukrainian.""" + UK + + """Urdu.""" + UR + + """Uzbek.""" + UZ + + """Vietnamese.""" + VI + + """Wolof.""" + WO + + """Xhosa.""" + XH + + """Yiddish.""" + YI + + """Yoruba.""" + YO + + """Chinese (Simplified).""" + ZH_CN + + """Chinese (Traditional).""" + ZH_TW + + """Zulu.""" + ZU + + """Chinese.""" + ZH + + """Portuguese.""" + PT + + """Church Slavic.""" + CU + + """Volapük.""" + VO +} + +""" +Interoperability metadata for types that directly correspond to a REST Admin API resource. +For example, on the Product type, LegacyInteroperability returns metadata for +the corresponding [Product +object](https://shopify.dev/api/admin-graphql/latest/objects/product) in the +REST Admin API. +""" +interface LegacyInteroperability { + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! +} + +"""Units of measurement for length.""" +enum LengthUnit { + """1000 millimeters equals 1 meter.""" + MILLIMETERS + + """100 centimeters equals 1 meter.""" + CENTIMETERS + + """Metric system unit of length.""" + METERS + + """12 inches equals 1 foot.""" + INCHES + + """Imperial system unit of length.""" + FEET + + """1 yard equals 3 feet.""" + YARDS +} + +""" +The total number of pending orders on a shop if less then a maximum, or that maximum. +The atMax field indicates when this maximum has been reached. +""" +type LimitedPendingOrderCount { + """This is set when the number of pending orders has reached the maximum.""" + atMax: Boolean! + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + count: Int! +} + +""" +The `LineItem` object represents a single product or service that a customer purchased in an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order). +Each line item is associated with a +[product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) +and can have multiple [discount allocations](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAllocation). +Line items contain details about what was purchased, including the product variant, quantity, pricing, +and fulfillment status. + +Use the `LineItem` object to manage the following processes: + +- [Track the quantity of items](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/build-fulfillment-solutions) +ordered, fulfilled, and unfulfilled. +- [Calculate prices](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders), including discounts and taxes. +- Manage fulfillment through [fulfillment services](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps). +- Manage [returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) and [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges). +- Handle [subscriptions](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) and recurring orders. + +Line items can also include custom attributes and properties, allowing merchants to add specific details +about each item in an order. Learn more about +[managing orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type LineItem implements Node { + """Whether the line item can be restocked.""" + canRestock: Boolean! @deprecated(reason: "Use `restockable` instead.") + + """The subscription contract associated with this line item.""" + contract: SubscriptionContract + + """The number of units ordered, excluding refunded and removed units.""" + currentQuantity: Int! + + """ + A list of attributes that represent custom features or special requests. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated to the line item by discount + applications, including discounts allocated to refunded and removed quantities. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total discounted price of the line item in shop currency, including + refunded and removed quantities. This value doesn't include order-level discounts. + """ + discountedTotal: Money! @deprecated(reason: "Use `discountedTotalSet` instead.") + + """ + The total discounted price of the line item in shop and presentment + currencies, including refunded and removed quantities. This value doesn't + include order-level discounts. Code-based discounts aren't included by default. + """ + discountedTotalSet( + """Whether to include code-based discounts in the total.""" + withCodeDiscounts: Boolean = false + ): MoneyBag! + + """ + The approximate unit price of the line item in shop currency. This value + includes line-level discounts and discounts applied to refunded and removed + quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPrice: Money! @deprecated(reason: "Use `discountedUnitPriceSet` instead.") + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes discounts applied to refunded and removed quantities. + """ + discountedUnitPriceAfterAllDiscountsSet: MoneyBag! + + """ + The approximate unit price of the line item in shop and presentment + currencies. This value includes line-level discounts and discounts applied to + refunded and removed quantities. It doesn't include order-level or code-based discounts. + """ + discountedUnitPriceSet: MoneyBag! + + """The duties associated with the line item.""" + duties: [Duty!]! + + """The total number of units to fulfill.""" + fulfillableQuantity: Int! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead.") + + """ + The fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) + is a third-party fulfillment service. Third-party fulfillment services don't + have a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was awaiting + fulfillment by a third-party fulfillment service. Third-party fulfillment + services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: FulfillmentService @deprecated(reason: "\nThe [relationship between a product variant and a fulfillment service was changed](/changelog/fulfillment-service-sku-sharing). A [ProductVariant](/api/admin-graphql/latest/objects/ProductVariant) can be stocked by multiple fulfillment services. As a result, we recommend that you use the [inventoryItem field](/api/admin-graphql/latest/objects/ProductVariant#field-productvariant-inventoryitem) if you need to determine where a product variant is stocked.\n\nIf you need to determine whether a product is a gift card, then you should continue to use this field until an alternative is available.\n\nAltering the locations which stock a product variant won't change the value of this field for existing orders.\n\nLearn about [managing inventory quantities and states](/apps/fulfillment/inventory-management-apps/quantities-states).\n") + + """ + The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, + 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. + """ + fulfillmentStatus: String! @deprecated(reason: "Use [FulfillmentOrderLineItem#remainingQuantity](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrderLineItem#field-fulfillmentorderlineitem-remainingquantity) instead") + + """A globally-unique ID.""" + id: ID! + + """The image associated to the line item's variant.""" + image: Image + + """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! + + """ID of the product of the line item group.""" + productId: ID + + """Quantity of the line item group on the order.""" + quantity: Int! + + """Title of the line item group.""" + title: String! + + """ID of the variant of the line item group.""" + variantId: ID + + """SKU of the variant of the line item group.""" + variantSku: String +} + +"""Represents the selling plan for a line item.""" +type LineItemSellingPlan { + """The name of the selling plan for display purposes.""" + name: String! + + """The ID of the selling plan associated with the line item.""" + sellingPlanId: ID +} + +"""A link to direct users to.""" +type Link implements HasPublishedTranslations { + """A context-sensitive label for the link.""" + label: String! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The URL that the link visits.""" + url: URL! +} + +""" +The identifier for the metafield linked to this option. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) +for more details. +""" +type LinkedMetafield { + """Key of the metafield the option is linked to.""" + key: String + + """Namespace of the metafield the option is linked to.""" + namespace: String +} + +"""The input fields required to link a product option to a metafield.""" +input LinkedMetafieldCreateInput { + """The namespace of the metafield this option is linked to.""" + namespace: String! + + """The key of the metafield this option is linked to.""" + key: String! + + """Values associated with the option.""" + values: [String!] +} + +"""The input fields for linking a combined listing option to a metafield.""" +input LinkedMetafieldInput { + """The namespace of the linked metafield.""" + namespace: String! + + """The key of the linked metafield.""" + key: String! + + """The values of the linked metafield.""" + values: [String!]! +} + +""" +The input fields required to link a product option to a metafield. + +This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) +for more details. +""" +input LinkedMetafieldUpdateInput { + """The namespace of the metafield this option is linked to.""" + namespace: String! + + """The key of the metafield this option is linked to.""" + key: String! +} + +"""A locale.""" +type Locale { + """Locale ISO code.""" + isoCode: String! + + """Human-readable locale name.""" + name: String! +} + +""" +Specifies the type of the underlying localizable content. This can be used to +conditionally render different UI elements such as input fields. +""" +enum LocalizableContentType { + """A JSON string.""" + JSON_STRING + + """A JSON.""" + JSON + + """A list of multi-line texts.""" + LIST_MULTI_LINE_TEXT_FIELD + + """A list of single-line texts.""" + LIST_SINGLE_LINE_TEXT_FIELD + + """A list of URLs.""" + LIST_URL + + """A multi-line text.""" + MULTI_LINE_TEXT_FIELD + + """A rich text.""" + RICH_TEXT_FIELD + + """A single-line text.""" + SINGLE_LINE_TEXT_FIELD + + """A string.""" + STRING + + """A URL.""" + URL + + """A link.""" + LINK + + """A list of links.""" + LIST_LINK + + """A file reference.""" + FILE_REFERENCE + + """A list of file references.""" + LIST_FILE_REFERENCE + + """An HTML.""" + HTML + + """A URI.""" + URI + + """An inline rich text.""" + INLINE_RICH_TEXT +} + +""" +Represents the value captured by a localization extension. Localization +extensions are additional fields required by certain countries on international +orders. For example, some countries require additional fields for customs +information or tax identification numbers. +""" +type LocalizationExtension { + """Country ISO 3166-1 alpha-2 code.""" + countryCode: CountryCode! + + """The localized extension keys that are allowed.""" + key: LocalizationExtensionKey! + + """The purpose of this localization extension.""" + purpose: LocalizationExtensionPurpose! + + """The localized extension title.""" + title: String! + + """The value of the field.""" + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizationExtensions. +""" +type LocalizationExtensionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizationExtensionEdge!]! + + """ + A list of nodes that are contained in LocalizationExtensionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LocalizationExtension!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizationExtension and a cursor during pagination. +""" +type LocalizationExtensionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of LocalizationExtensionEdge.""" + node: LocalizationExtension! +} + +"""The input fields for a LocalizationExtensionInput.""" +input LocalizationExtensionInput { + """The key for the localization extension.""" + key: LocalizationExtensionKey! + + """The localization extension value.""" + value: String! +} + +"""The key of a localization extension.""" +enum LocalizationExtensionKey { + """Extension key 'tax_credential_br' for country BR.""" + TAX_CREDENTIAL_BR + + """Extension key 'shipping_credential_br' for country BR.""" + SHIPPING_CREDENTIAL_BR + + """Extension key 'tax_credential_cl' for country CL.""" + TAX_CREDENTIAL_CL + + """Extension key 'shipping_credential_cl' for country CL.""" + SHIPPING_CREDENTIAL_CL + + """Extension key 'shipping_credential_cn' for country CN.""" + SHIPPING_CREDENTIAL_CN + + """Extension key 'tax_credential_co' for country CO.""" + TAX_CREDENTIAL_CO + + """Extension key 'tax_credential_type_co' for country CO.""" + TAX_CREDENTIAL_TYPE_CO + + """Extension key 'shipping_credential_co' for country CO.""" + SHIPPING_CREDENTIAL_CO + + """Extension key 'shipping_credential_type_co' for country CO.""" + SHIPPING_CREDENTIAL_TYPE_CO + + """Extension key 'tax_credential_cr' for country CR.""" + TAX_CREDENTIAL_CR + + """Extension key 'shipping_credential_cr' for country CR.""" + SHIPPING_CREDENTIAL_CR + + """Extension key 'tax_credential_ec' for country EC.""" + TAX_CREDENTIAL_EC + + """Extension key 'shipping_credential_ec' for country EC.""" + SHIPPING_CREDENTIAL_EC + + """Extension key 'tax_credential_gt' for country GT.""" + TAX_CREDENTIAL_GT + + """Extension key 'shipping_credential_gt' for country GT.""" + SHIPPING_CREDENTIAL_GT + + """Extension key 'tax_credential_id' for country ID.""" + TAX_CREDENTIAL_ID + + """Extension key 'shipping_credential_id' for country ID.""" + SHIPPING_CREDENTIAL_ID + + """Extension key 'tax_credential_it' for country IT.""" + TAX_CREDENTIAL_IT + + """Extension key 'tax_email_it' for country IT.""" + TAX_EMAIL_IT + + """Extension key 'tax_credential_my' for country MY.""" + TAX_CREDENTIAL_MY + + """Extension key 'shipping_credential_my' for country MY.""" + SHIPPING_CREDENTIAL_MY + + """Extension key 'shipping_credential_mx' for country MX.""" + SHIPPING_CREDENTIAL_MX + + """Extension key 'tax_credential_mx' for country MX.""" + TAX_CREDENTIAL_MX + + """Extension key 'tax_credential_type_mx' for country MX.""" + TAX_CREDENTIAL_TYPE_MX + + """Extension key 'tax_credential_use_mx' for country MX.""" + TAX_CREDENTIAL_USE_MX + + """Extension key 'tax_credential_py' for country PY.""" + TAX_CREDENTIAL_PY + + """Extension key 'shipping_credential_py' for country PY.""" + SHIPPING_CREDENTIAL_PY + + """Extension key 'tax_credential_pe' for country PE.""" + TAX_CREDENTIAL_PE + + """Extension key 'shipping_credential_pe' for country PE.""" + SHIPPING_CREDENTIAL_PE + + """Extension key 'tax_credential_pt' for country PT.""" + TAX_CREDENTIAL_PT + + """Extension key 'shipping_credential_pt' for country PT.""" + SHIPPING_CREDENTIAL_PT + + """Extension key 'shipping_credential_kr' for country KR.""" + SHIPPING_CREDENTIAL_KR + + """Extension key 'tax_credential_es' for country ES.""" + TAX_CREDENTIAL_ES + + """Extension key 'shipping_credential_es' for country ES.""" + SHIPPING_CREDENTIAL_ES + + """Extension key 'shipping_credential_tw' for country TW.""" + SHIPPING_CREDENTIAL_TW + + """Extension key 'tax_credential_tr' for country TR.""" + TAX_CREDENTIAL_TR + + """Extension key 'shipping_credential_tr' for country TR.""" + SHIPPING_CREDENTIAL_TR +} + +"""The purpose of a localization extension.""" +enum LocalizationExtensionPurpose { + """ + Extensions that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """Extensions that are used for taxes purposes, for example, invoicing.""" + TAX +} + +""" +Represents the value captured by a localized field. Localized fields are +additional fields required by certain countries on international orders. For +example, some countries require additional fields for customs information or tax +identification numbers. +""" +type LocalizedField { + """Country ISO 3166-1 alpha-2 code.""" + countryCode: CountryCode! + + """The localized field keys that are allowed.""" + key: LocalizedFieldKey! + + """The purpose of this localized field.""" + purpose: LocalizedFieldPurpose! + + """The localized field title.""" + title: String! + + """The value of the field.""" + value: String! +} + +""" +An auto-generated type for paginating through multiple LocalizedFields. +""" +type LocalizedFieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocalizedFieldEdge!]! + + """ + A list of nodes that are contained in LocalizedFieldEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [LocalizedField!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one LocalizedField and a cursor during pagination. +""" +type LocalizedFieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of LocalizedFieldEdge.""" + node: LocalizedField! +} + +"""The input fields for a LocalizedFieldInput.""" +input LocalizedFieldInput { + """The key for the localized field.""" + key: LocalizedFieldKey! + + """The localized field value.""" + value: String! +} + +"""The key of a localized field.""" +enum LocalizedFieldKey { + """Localized field key 'tax_credential_br' for country Brazil.""" + TAX_CREDENTIAL_BR + + """Localized field key 'shipping_credential_br' for country Brazil.""" + SHIPPING_CREDENTIAL_BR + + """Localized field key 'tax_credential_cl' for country Chile.""" + TAX_CREDENTIAL_CL + + """Localized field key 'shipping_credential_cl' for country Chile.""" + SHIPPING_CREDENTIAL_CL + + """Localized field key 'shipping_credential_cn' for country China.""" + SHIPPING_CREDENTIAL_CN + + """Localized field key 'tax_credential_co' for country Colombia.""" + TAX_CREDENTIAL_CO + + """Localized field key 'tax_credential_type_co' for country Colombia.""" + TAX_CREDENTIAL_TYPE_CO + + """Localized field key 'shipping_credential_co' for country Colombia.""" + SHIPPING_CREDENTIAL_CO + + """ + Localized field key 'shipping_credential_type_co' for country Colombia. + """ + SHIPPING_CREDENTIAL_TYPE_CO + + """Localized field key 'tax_credential_cr' for country Costa Rica.""" + TAX_CREDENTIAL_CR + + """Localized field key 'shipping_credential_cr' for country Costa Rica.""" + SHIPPING_CREDENTIAL_CR + + """Localized field key 'tax_credential_ec' for country Ecuador.""" + TAX_CREDENTIAL_EC + + """Localized field key 'shipping_credential_ec' for country Ecuador.""" + SHIPPING_CREDENTIAL_EC + + """Localized field key 'tax_credential_gt' for country Guatemala.""" + TAX_CREDENTIAL_GT + + """Localized field key 'shipping_credential_gt' for country Guatemala.""" + SHIPPING_CREDENTIAL_GT + + """Localized field key 'tax_credential_id' for country Indonesia.""" + TAX_CREDENTIAL_ID + + """Localized field key 'shipping_credential_id' for country Indonesia.""" + SHIPPING_CREDENTIAL_ID + + """Localized field key 'tax_credential_it' for country Italy.""" + TAX_CREDENTIAL_IT + + """Localized field key 'tax_email_it' for country Italy.""" + TAX_EMAIL_IT + + """Localized field key 'tax_credential_my' for country Malaysia.""" + TAX_CREDENTIAL_MY + + """Localized field key 'shipping_credential_my' for country Malaysia.""" + SHIPPING_CREDENTIAL_MY + + """Localized field key 'shipping_credential_mx' for country Mexico.""" + SHIPPING_CREDENTIAL_MX + + """Localized field key 'tax_credential_mx' for country Mexico.""" + TAX_CREDENTIAL_MX + + """Localized field key 'tax_credential_type_mx' for country Mexico.""" + TAX_CREDENTIAL_TYPE_MX + + """Localized field key 'tax_credential_use_mx' for country Mexico.""" + TAX_CREDENTIAL_USE_MX + + """Localized field key 'tax_credential_py' for country Paraguay.""" + TAX_CREDENTIAL_PY + + """Localized field key 'shipping_credential_py' for country Paraguay.""" + SHIPPING_CREDENTIAL_PY + + """Localized field key 'tax_credential_pe' for country Peru.""" + TAX_CREDENTIAL_PE + + """Localized field key 'shipping_credential_pe' for country Peru.""" + SHIPPING_CREDENTIAL_PE + + """Localized field key 'tax_credential_pt' for country Portugal.""" + TAX_CREDENTIAL_PT + + """Localized field key 'shipping_credential_pt' for country Portugal.""" + SHIPPING_CREDENTIAL_PT + + """Localized field key 'shipping_credential_kr' for country South Korea.""" + SHIPPING_CREDENTIAL_KR + + """Localized field key 'tax_credential_es' for country Spain.""" + TAX_CREDENTIAL_ES + + """Localized field key 'shipping_credential_es' for country Spain.""" + SHIPPING_CREDENTIAL_ES + + """Localized field key 'shipping_credential_tw' for country Taiwan.""" + SHIPPING_CREDENTIAL_TW + + """Localized field key 'tax_credential_tr' for country Turkey.""" + TAX_CREDENTIAL_TR + + """Localized field key 'shipping_credential_tr' for country Turkey.""" + SHIPPING_CREDENTIAL_TR +} + +"""The purpose of a localized field.""" +enum LocalizedFieldPurpose { + """ + Fields that are used for shipping purposes, for example, customs clearance. + """ + SHIPPING + + """Fields that are used for taxes purposes, for example, invoicing.""" + TAX +} + +"""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 +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): InventoryLevelConnection! + + """ + Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has + `activatable` set to `true` by calling the + [`locationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) + mutation. + """ + isActive: Boolean! + + """Whether this location is a fulfillment service.""" + isFulfillmentService: Boolean! + + """Whether the location is your primary location for shipping inventory.""" + isPrimary: Boolean! @deprecated(reason: "The concept of a primary location is deprecated, shipsInventory can be used to get a fallback location") + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """Local pickup settings for the location.""" + localPickupSettingsV2: DeliveryLocalPickupSettings + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The name of the location.""" + name: String! + + """ + 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 + + """Shop has reached its location limit.""" + LOCATION_LIMIT + + """ + This location currently cannot be activated as inventory, pending orders or + transfers are being relocated from this location. + """ + HAS_ONGOING_RELOCATION + + """Location not found.""" + LOCATION_NOT_FOUND + + """There is already an active location with this name.""" + HAS_NON_UNIQUE_NAME +} + +""" +The input fields to use to specify the address while adding a location. +""" +input LocationAddAddressInput { + """The first line of the address.""" + address1: String + + """The second line of the address.""" + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The phone number of the location.""" + phone: String + + """The ZIP code or postal code of the address.""" + zip: String + + """The two-letter code of country for the address.""" + countryCode: CountryCode! + + """ + The code for the region of the address, such as the state, province, or district. + For example CA for California, United States. + """ + provinceCode: String +} + +"""The input fields to use to add a location.""" +input LocationAddInput { + """The name of the location.""" + name: String! + + """The address of the location.""" + address: LocationAddAddressInput! + + """Whether inventory at this location is available for sale online.""" + fulfillsOnlineOrders: Boolean = true + + """Additional customizable information to associate with the location.""" + metafields: [MetafieldInput!] +} + +"""Return type for `locationAdd` mutation.""" +type LocationAddPayload { + """The location that was added.""" + location: Location + + """The list of errors that occurred from executing the mutation.""" + userErrors: [LocationAddUserError!]! +} + +"""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 error that occurs while adding a location.""" +type LocationAddUserError implements DisplayableError { + """The error code.""" + code: LocationAddUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `LocationAddUserError`.""" +enum LocationAddUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is too long.""" + TOO_LONG + + """The input value is already taken.""" + TAKEN + + """The input value is blank.""" + BLANK + + """The ZIP code is not a valid US ZIP code.""" + INVALID_US_ZIPCODE + + """An error occurred while adding the location.""" + GENERIC_ERROR + + """The type is invalid.""" + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """Unstructured reserved namespace.""" + UNSTRUCTURED_RESERVED_NAMESPACE + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE + + """The input value isn't included in the list.""" + INCLUSION + + """The input value needs to be blank.""" + PRESENT + + """The input value is too short.""" + TOO_SHORT + + """The metafield violates a capability restriction.""" + CAPABILITY_VIOLATION + + """An internal error occurred.""" + INTERNAL_ERROR +} + +"""An auto-generated type for paginating through multiple Locations.""" +type LocationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [LocationEdge!]! + + """ + A list of nodes that are contained in LocationEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Location!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `locationDeactivate` mutation.""" +type LocationDeactivatePayload { + """The location that was deactivated.""" + location: Location + + """The list of errors that occurred from executing the mutation.""" + locationDeactivateUserErrors: [LocationDeactivateUserError!]! +} + +""" +The possible errors that can be returned when executing the `locationDeactivate` mutation. +""" +type LocationDeactivateUserError implements DisplayableError { + """The error code.""" + code: LocationDeactivateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeactivateUserError`. +""" +enum LocationDeactivateUserErrorCode { + """Location not found.""" + LOCATION_NOT_FOUND + + """ + Location either has a fulfillment service or is the only location with a shipping address. + """ + PERMANENTLY_BLOCKED_FROM_DEACTIVATION_ERROR + + """ + Location has incoming inventory. The location can be deactivated after the inventory has been received. + """ + TEMPORARILY_BLOCKED_FROM_DEACTIVATION_ERROR + + """ + Location needs to be removed from Shopify POS for Retail subscription in Point of Sale channel. + """ + HAS_ACTIVE_RETAIL_SUBSCRIPTIONS + + """Destination location is the same as the location to be deactivated.""" + DESTINATION_LOCATION_IS_THE_SAME_LOCATION + + """Destination location is not found or inactive.""" + DESTINATION_LOCATION_NOT_FOUND_OR_INACTIVE + + """Destination location is not Shopify managed.""" + DESTINATION_LOCATION_NOT_SHOPIFY_MANAGED + + """ + Location could not be deactivated without specifying where to relocate inventory at the location. + """ + HAS_ACTIVE_INVENTORY_ERROR + + """Location could not be deactivated because it has pending orders.""" + HAS_FULFILLMENT_ORDERS_ERROR + + """ + Location could not be deactivated because it has open Shopify Fulfillment Network transfers. + """ + HAS_INCOMING_MOVEMENTS_ERROR + + """Location could not be deactivated because it has open purchase orders.""" + HAS_OPEN_PURCHASE_ORDERS_ERROR + + """Failed to relocate active inventories to the destination location.""" + FAILED_TO_RELOCATE_ACTIVE_INVENTORIES + + """Failed to relocate open purchase orders to the destination location.""" + FAILED_TO_RELOCATE_OPEN_PURCHASE_ORDERS + + """Failed to relocate incoming movements to the destination location.""" + FAILED_TO_RELOCATE_INCOMING_MOVEMENTS + + """At least one location must fulfill online orders.""" + CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT +} + +"""Return type for `locationDelete` mutation.""" +type LocationDeletePayload { + """The ID of the location that was deleted.""" + deletedLocationId: ID + + """The list of errors that occurred from executing the mutation.""" + locationDeleteUserErrors: [LocationDeleteUserError!]! +} + +"""An error that occurs while deleting a location.""" +type LocationDeleteUserError implements DisplayableError { + """The error code.""" + code: LocationDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `LocationDeleteUserError`. +""" +enum LocationDeleteUserErrorCode { + """Location not found.""" + LOCATION_NOT_FOUND + + """The location cannot be deleted while it is active.""" + LOCATION_IS_ACTIVE + + """An error occurred while deleting the location.""" + GENERIC_ERROR + + """The location cannot be deleted while it has inventory.""" + LOCATION_HAS_INVENTORY + + """The location cannot be deleted while it has pending orders.""" + LOCATION_HAS_PENDING_ORDERS + + """ + The location cannot be deleted while it has any active Retail subscriptions in the Point of Sale channel. + """ + LOCATION_HAS_ACTIVE_RETAIL_SUBSCRIPTION +} + +""" +An auto-generated type which holds one Location and a cursor during pagination. +""" +type LocationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of LocationEdge.""" + node: Location! +} + +"""The input fields to use to edit the address of a location.""" +input LocationEditAddressInput { + """The first line of the address.""" + address1: String + + """The second line of the address.""" + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The phone number of the location.""" + phone: String + + """The ZIP code or postal code of the location.""" + zip: String + + """The two-letter code of country for the address.""" + countryCode: CountryCode + + """ + The code for the region of the address, such as the state, province, or district. + For example CA for California, United States. + """ + provinceCode: String +} + +"""The input fields to use to edit a location.""" +input LocationEditInput { + """The name of the location.""" + name: String + + """The address of the location.""" + address: LocationEditAddressInput + + """ + Whether inventory at this location is available for sale online. + + **Note:** This can't be disabled for fulfillment service locations. + """ + fulfillsOnlineOrders: Boolean + + """Additional customizable information to associate with the location.""" + metafields: [MetafieldInput!] +} + +"""Return type for `locationEdit` mutation.""" +type LocationEditPayload { + """The location that was edited.""" + location: Location + + """The list of errors that occurred from executing the mutation.""" + userErrors: [LocationEditUserError!]! +} + +"""An error that occurs while editing a location.""" +type LocationEditUserError implements DisplayableError { + """The error code.""" + code: LocationEditUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `LocationEditUserError`.""" +enum LocationEditUserErrorCode { + """The input value is too long.""" + TOO_LONG + + """The input value is blank.""" + BLANK + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """The ZIP code is not a valid US ZIP code.""" + INVALID_US_ZIPCODE + + """An error occurred while editing the location.""" + GENERIC_ERROR + + """At least one location must fulfill online orders.""" + CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT + + """ + Cannot modify the online order fulfillment preference for fulfillment service locations. + """ + CANNOT_MODIFY_ONLINE_ORDER_FULFILLMENT_FOR_FS_LOCATION + + """The type is invalid.""" + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """Unstructured reserved namespace.""" + UNSTRUCTURED_RESERVED_NAMESPACE + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE + + """The input value isn't included in the list.""" + INCLUSION + + """The input value needs to be blank.""" + PRESENT + + """The input value is too short.""" + TOO_SHORT + + """The metafield violates a capability restriction.""" + CAPABILITY_VIOLATION + + """An internal error occurred.""" + INTERNAL_ERROR +} + +"""The input fields for identifying a location.""" +input LocationIdentifierInput { + """The ID of the location.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the location. + """ + customId: UniqueMetafieldValueInput +} + +"""Return type for `locationLocalPickupDisable` mutation.""" +type LocationLocalPickupDisablePayload { + """The ID of the location for which local pickup was disabled.""" + locationId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +"""Return type for `locationLocalPickupEnable` mutation.""" +type LocationLocalPickupEnablePayload { + """The local pickup settings that were enabled.""" + localPickupSettings: DeliveryLocalPickupSettings + + """The list of errors that occurred from executing the mutation.""" + userErrors: [DeliveryLocationLocalPickupSettingsError!]! +} + +"""A condition checking the location that the visitor is shopping from.""" +type LocationsCondition { + """The application level for the condition.""" + applicationLevel: MarketConditionApplicationType + + """The locations that comprise the market.""" + locations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocationConnection! +} + +""" +A 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 +} + +""" +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 name in the formatted address.""" + withName: Boolean = false + + """Whether to include the customer's company in the formatted address.""" + withCompany: Boolean = true + ): [String!]! + + """A comma-separated list of the values for city, province, and country.""" + formattedArea: String + + """A globally-unique ID.""" + id: ID! + + """The last name of the customer.""" + lastName: String + + """The latitude coordinate of the customer address.""" + latitude: Float + + """The longitude coordinate of the customer address.""" + longitude: Float + + """The full name of the customer, based on firstName and lastName.""" + name: String + + """A unique phone number for the customer.""" + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """The time zone of the address.""" + timeZone: String + + """ + The validation status that 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 two-letter code for the country of the address.""" + countryCode: CountryCode + + """The first name of the customer.""" + firstName: String + + """The last name of the customer.""" + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """ + The code for the region of the address, such as the province, state, or district. + For example QC for Quebec, Canada. + """ + provinceCode: String + + """The zip or postal code of the address.""" + zip: String +} + +"""Highest level of validation concerns identified for the address.""" +enum MailingAddressValidationResult { + """ + Indicates that the address has been validated and no issues were found. + """ + NO_ISSUES + + """ + Indicates that the address has been validated and is very likely to contain invalid information. + """ + ERROR + + """ + Indicates that the address has been validated and might contain invalid information. + """ + WARNING +} + +"""The type of resource a payment mandate can be used for.""" +enum MandateResourceType { + """ + A credential stored on file for merchant and customer initiated transactions. + """ + CREDENTIAL_ON_FILE + + """A credential stored on file for checkout.""" + CHECKOUT + + """A credential stored on file for a Draft Order.""" + DRAFT_ORDER + + """A credential stored on file for an Order.""" + ORDER + + """A credential stored for subscription billing attempts.""" + SUBSCRIPTIONS +} + +""" +Manual discount applications capture the intentions of a discount that was manually created for an order. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ManualDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """The description of the discount application.""" + description: String + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """How the discount amount is distributed on the discounted lines.""" + targetSelection: DiscountApplicationTargetSelection! + + """Whether the discount is applied on line items or shipping lines.""" + targetType: DiscountApplicationTargetType! + + """The title of the discount application.""" + title: String! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +A 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketCatalogConnection! + + """The number of catalogs that belong to the market.""" + catalogsCount: Count + + """The conditions under which a visitor is in the market.""" + conditions: MarketConditions + + """The market’s currency settings.""" + currencySettings: MarketCurrencySettings + + """ + Whether the market is enabled to receive visitors and sales. **Note**: Regions in inactive + markets can't be selected on the storefront or in checkout. + """ + enabled: Boolean! @deprecated(reason: "Use `status` instead.") + + """ + A short, human-readable unique identifier for the market. This is changeable by the merchant. + """ + handle: String! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The name of the market. Not shown to customers.""" + name: String! + + """ + The inclusive pricing strategy for a market. This determines if prices include duties and / or taxes. + """ + priceInclusions: MarketPriceInclusions + + """ + The market’s price list, which specifies a percentage-based price adjustment as well as + fixed price overrides for specific variants. + + Markets with multiple catalogs can have multiple price lists. To query which price lists are connected to + a market, please query for price lists through the catalogs connection. + """ + priceList: PriceList @deprecated(reason: "Use `catalogs` instead.") + + """Whether the market is the shop’s primary market.""" + primary: Boolean! @deprecated(reason: "This field is deprecated and will be removed in the future.") + + """The regions that comprise the market.""" + regions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketRegionConnection! @deprecated(reason: "This field is deprecated and will be removed in the future. Use `conditions.regionConditions` instead.") + + """Status of the market. Replaces the enabled field.""" + status: MarketStatus! + + """The type of the market.""" + type: MarketType! + + """ + The market’s web presence, which defines its SEO strategy. This can be a different domain, + subdomain, or subfolders of the primary domain. Each web presence comprises one or more + language variants. If a market doesn't have its own web presence, then the market is accessible on the + primary market's domains using [country + selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + If it's the primary market and it has multiple web presences, then this field will return the primary domain web presence. + """ + webPresence: MarketWebPresence @deprecated(reason: "Use `webPresences` instead.") + + """ + The market’s web presences, which defines its SEO strategy. This can be a different domain, + subdomain, or subfolders of the primary domain. Each web presence comprises one or more + language variants. If a market doesn't have any web presences, then the market is accessible on the + primary market's domains using [country + selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + """ + webPresences( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketWebPresenceConnection! +} + +""" +A 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( + """Filters markets by type.""" + type: MarketType = null + + """Filters markets by status.""" + status: MarketStatus = null + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketConnection! + + """The number of markets associated with the catalog.""" + marketsCount( + """Filters markets by type.""" + type: MarketType = null + + """Filters markets by status.""" + status: MarketStatus = null + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int + ): Count + + """Most recent catalog operations.""" + operations: [ResourceOperation!]! + + """The price list associated with the catalog.""" + priceList: PriceList + + """A group of products and collections that's published to a catalog.""" + publication: Publication + + """The status of the catalog.""" + status: CatalogStatus! + + """The name of the catalog.""" + title: String! +} + +"""An auto-generated type for paginating through multiple MarketCatalogs.""" +type MarketCatalogConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketCatalogEdge!]! + + """ + A list of nodes that are contained in MarketCatalogEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketCatalog!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketCatalog and a cursor during pagination. +""" +type MarketCatalogEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketCatalogEdge.""" + node: MarketCatalog! +} + +"""The application level for a market condition.""" +enum MarketConditionApplicationType { + """The condition matches specified records of a given type.""" + SPECIFIED + + """The condition matches all records of a given type.""" + ALL +} + +"""The 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 { + """A list of company location IDs to include in the market condition.""" + companyLocationIds: [ID!] + + """A type of market condition (e.g. ALL) to apply.""" + applicationLevel: MarketConditionApplicationType +} + +"""The input fields required to create or update the market conditions.""" +input MarketConditionsInput { + """The company locations to include in the market conditions.""" + companyLocationsCondition: MarketConditionsCompanyLocationsInput + + """The locations to include in the market conditions.""" + locationsCondition: MarketConditionsLocationsInput + + """The regions to include in the market conditions.""" + regionsCondition: MarketConditionsRegionsInput +} + +""" +The input fields required to create or update a location market condition. +""" +input MarketConditionsLocationsInput { + """A list of location IDs to include in the market condition.""" + locationIds: [ID!] + + """A type of market condition (e.g. ALL) to apply.""" + applicationLevel: MarketConditionApplicationType +} + +"""The input fields to specify a region condition.""" +input MarketConditionsRegionInput { + """A country code to which this condition should apply.""" + countryCode: CountryCode! +} + +""" +The input fields required to create or update a region market condition. +""" +input MarketConditionsRegionsInput { + """A list of market region IDs to include in the market condition.""" + regionIds: [ID!] + + """A list of market regions to include in the market condition.""" + regions: [MarketConditionsRegionInput!] + + """A type of market condition (e.g. ALL) to apply.""" + applicationLevel: MarketConditionApplicationType +} + +"""The input fields required to update a market condition.""" +input MarketConditionsUpdateInput { + """The conditions to update to the market condition.""" + conditionsToAdd: MarketConditionsInput + + """The conditions to delete from the market condition.""" + conditionsToDelete: MarketConditionsInput +} + +"""The condition types for the condition set.""" +enum MarketConditionType { + """The condition checks the visitor's region.""" + REGION + + """The condition checks the location that the visitor is shopping from.""" + LOCATION + + """ + The condition checks the company location that the visitor is purchasing for. + """ + COMPANY_LOCATION +} + +"""An auto-generated type for paginating through multiple Markets.""" +type MarketConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketEdge!]! + + """ + A list of nodes that are contained in MarketEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Market!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields required to create a market.""" +input MarketCreateInput { + """The name of the market. Not shown to customers.""" + name: String! + + """ + A unique identifier for the market. For example `"ca"`. + If the handle isn't provided, then the handle is auto-generated based on the country or name. + """ + handle: String + + """The conditions that apply to the market.""" + conditions: MarketConditionsInput + + """Catalog IDs to include in the market.""" + catalogs: [ID!] + + """ + Whether to update duplicate region or wildcard markets' status to draft. + """ + makeDuplicateUniqueMarketsDraft: Boolean + + """The status of the market.""" + status: MarketStatus + + """Web presence IDs to include in the market.""" + webPresences: [ID!] + + """Currency settings for the market.""" + currencySettings: MarketCurrencySettingsUpdateInput + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput +} + +"""Return type for `marketCreate` mutation.""" +type MarketCreatePayload { + """The market object.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""A market's currency settings.""" +type MarketCurrencySettings { + """ + The currency which this market's customers must use if local currencies are disabled. + """ + baseCurrency: CurrencySetting! + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean! + + """Whether or not rounding is enabled on multi-currency prices.""" + roundingEnabled: Boolean! +} + +"""The input fields used to update the currency settings of a market.""" +input MarketCurrencySettingsUpdateInput { + """ + The currency which this market’s customers must use if local currencies are disabled. + """ + baseCurrency: CurrencyCode + + """ + The manual exchange rate that will be used to convert shop currency prices. If + null, then the automatic exchange rates will be used. + """ + baseCurrencyManualRate: Decimal + + """ + Whether or not local currencies are enabled. If enabled, then prices will + be converted to give each customer the best experience based on their + region. If disabled, then all customers in this market will see prices + in the market's base currency. + """ + localCurrencies: Boolean + + """Whether or not rounding is enabled on multi-currency prices.""" + roundingEnabled: Boolean +} + +"""Return type for `marketCurrencySettingsUpdate` mutation.""" +type MarketCurrencySettingsUpdatePayload { + """The market object.""" + market: Market @deprecated(reason: "Use `marketCreate` and `marketUpdate` mutations instead.") + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketCurrencySettingsUserError!]! +} + +"""Error codes for failed market multi-currency operations.""" +type MarketCurrencySettingsUserError implements DisplayableError { + """The error code.""" + code: MarketCurrencySettingsUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MarketCurrencySettingsUserError`. +""" +enum MarketCurrencySettingsUserErrorCode { + """The specified market wasn't found.""" + MARKET_NOT_FOUND + + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """This action is restricted if unified markets is enabled.""" + UNIFIED_MARKETS_ENABLED + + """ + The shop's payment gateway does not support enabling more than one currency. + """ + MULTIPLE_CURRENCIES_NOT_SUPPORTED + + """Can't enable or disable local currencies on a single country market.""" + NO_LOCAL_CURRENCIES_ON_SINGLE_COUNTRY_MARKET + + """The specified currency is not supported.""" + UNSUPPORTED_CURRENCY + + """The primary market must use the shop currency.""" + PRIMARY_MARKET_USES_SHOP_CURRENCY +} + +"""Return type for `marketDelete` mutation.""" +type MarketDeletePayload { + """The ID of the deleted market.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one Market and a cursor during pagination. +""" +type MarketEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketEdge.""" + node: Market! +} + +"""Return type for `marketingActivitiesDeleteAllExternal` mutation.""" +type MarketingActivitiesDeleteAllExternalPayload { + """ + The asynchronous job that performs the deletion. The status of the job may be + used to determine when it's safe again to create new activities. + """ + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +""" +The marketing activity resource represents marketing that a + merchant created through an app. +""" +type MarketingActivity implements Node { + """ + The URL of the marketing activity listing page in the marketing section. + """ + activityListUrl: URL + + """The amount spent on the marketing activity.""" + adSpend: MoneyV2 + + """The app which created this marketing activity.""" + app: App! + + """The errors generated when an app publishes the marketing activity.""" + appErrors: MarketingActivityExtensionAppErrors + + """The allocated budget for the marketing activity.""" + budget: MarketingBudget + + """The date and time when the marketing activity was created.""" + createdAt: DateTime! + + """The completed content in the marketing activity creation form.""" + formData: String + + """The hierarchy level of the marketing activity.""" + hierarchyLevel: MarketingActivityHierarchyLevel + + """A globally-unique ID.""" + id: ID! + + """ + Whether the marketing activity is in the main workflow version of the marketing automation. + """ + inMainWorkflowVersion: Boolean! + + """The marketing activity represents an external marketing activity.""" + isExternal: Boolean! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannel: MarketingChannel! @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """Associated marketing event of this marketing activity.""" + marketingEvent: MarketingEvent + + """ID of the parent activity of this marketing activity.""" + parentActivityId: ID + + """ID of the parent activity of this marketing activity.""" + parentRemoteId: String + + """ + A contextual description of the marketing activity based on the platform and tactic used. + """ + sourceAndMedium: String! + + """The current state of the marketing activity.""" + status: MarketingActivityStatus! + + """The severity of the marketing activity's status.""" + statusBadgeType: MarketingActivityStatusBadgeType @deprecated(reason: "Use `statusBadgeTypeV2` instead.") + + """The severity of the marketing activity's status.""" + statusBadgeTypeV2: BadgeType + + """The rendered status of the marketing activity.""" + statusLabel: String! + + """ + The [date and time]( + https://help.shopify.com/https://en.wikipedia.org/wiki/ISO_8601 + ) when the activity's status last changed. + """ + statusTransitionedAt: DateTime + + """The method of marketing used for this marketing activity.""" + tactic: MarketingTactic! + + """The status to which the marketing activity is currently transitioning.""" + targetStatus: MarketingActivityStatus + + """ + The marketing activity's title, which is rendered on the marketing listing page. + """ + title: String! + + """The date and time when the marketing activity was updated.""" + updatedAt: DateTime! + + """ + The value portion of the URL query parameter used in attributing sessions to this activity. + """ + urlParameterValue: String + + """ + The set of [Urchin Tracking Module]( + https://help.shopify.com/https://en.wikipedia.org/wiki/UTM_parameters + ) used in the URL for tracking this marketing activity. + """ + utmParameters: UTMParameters +} + +""" +The input fields combining budget amount and its marketing budget type. +""" +input MarketingActivityBudgetInput { + """Budget type for marketing activity.""" + budgetType: MarketingBudgetBudgetType + + """Amount of budget for the marketing activity.""" + total: MoneyInput +} + +""" +An auto-generated type for paginating through multiple MarketingActivities. +""" +type MarketingActivityConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingActivityEdge!]! + + """ + A list of nodes that are contained in MarketingActivityEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingActivity!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for creating an externally-managed marketing activity. +""" +input MarketingActivityCreateExternalInput { + """The title of the marketing activity.""" + title: String! + + """ + Specifies the [Urchin Traffic Module (UTM) + parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated + with a related marketing campaign. Either the URL parameter value or UTM can + be set, but not both. + """ + utm: UTMInput + + """ + Value for a query parameter that gets inserted into storefront URLs for + matching storefront traffic to this activity. This feature is currently + available on a limited basis to some partners only. UTMs should continue to be + used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String + + """The budget for this marketing activity.""" + budget: MarketingActivityBudgetInput + + """The amount spent on the marketing activity.""" + adSpend: MoneyInput + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. + """ + remoteId: String + + """ + The status of the marketing activity. If status isn't set it will default to UNDEFINED. + """ + status: MarketingActivityExternalStatus + + """The URL for viewing and/or managing the activity outside of Shopify.""" + remoteUrl: URL! + + """The URL for a preview image that's used for the marketing activity.""" + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic + determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """The domain from which ad clicks are forwarded to the shop.""" + referringDomain: String + + """ + The unique string identifier of the channel to which this activity belongs. + For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """The date and time at which the activity is scheduled to start.""" + scheduledStart: DateTime + + """The date and time at which the activity is scheduled to end.""" + scheduledEnd: DateTime + + """ + The date and time at which the activity started. If omitted or set to `null`, the current time will be used. + """ + start: DateTime + + """ + The date and time at which the activity ended. If omitted or set to `null`, + the current time will be used if the status is set to `INACTIVE` or + `DELETED_EXTERNALLY`. + """ + end: DateTime + + """ + The ID for the parent marketing activity, if creating hierarchical activities. + """ + parentActivityId: ID + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel +} + +"""Return type for `marketingActivityCreateExternal` mutation.""" +type MarketingActivityCreateExternalPayload { + """The external marketing activity that was created.""" + marketingActivity: MarketingActivity + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to create a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityCreateInput { + """The ID of the marketing activity extension.""" + marketingActivityExtensionId: ID! + + """The current state of the marketing activity.""" + status: MarketingActivityStatus! +} + +"""Return type for `marketingActivityCreate` mutation.""" +type MarketingActivityCreatePayload { + """The created marketing activity.""" + marketingActivity: MarketingActivity @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """The path to return back to shopify admin from embedded editor.""" + redirectPath: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `marketingActivityDeleteExternal` mutation.""" +type MarketingActivityDeleteExternalPayload { + """The ID of the marketing activity that was deleted, if one was deleted.""" + deletedMarketingActivityId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +""" +An auto-generated type which holds one MarketingActivity and a cursor during pagination. +""" +type MarketingActivityEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketingActivityEdge.""" + node: MarketingActivity! +} + +""" +The error code resulted from the marketing activity extension integration. +""" +enum MarketingActivityExtensionAppErrorCode { + """The shop/user must be onboarded to use the app.""" + NOT_ONBOARDED_ERROR + + """The app has returned validation errors.""" + VALIDATION_ERROR + + """The app is either not responding or returning unexpected data.""" + API_ERROR + + """The app has returned an error when invoking the platform.""" + PLATFORM_ERROR + + """The app needs to be installed.""" + INSTALL_REQUIRED_ERROR +} + +""" +Represents errors returned from apps when using the marketing activity extension. +""" +type MarketingActivityExtensionAppErrors { + """The app error type.""" + code: MarketingActivityExtensionAppErrorCode! + + """The list of errors returned by the app.""" + userErrors: [UserError!]! +} + +"""Set of possible statuses for an external marketing activity.""" +enum MarketingActivityExternalStatus { + """This marketing activity is currently running.""" + ACTIVE + + """This marketing activity has completed running.""" + INACTIVE + + """This marketing activity is currently not running.""" + PAUSED + + """This marketing activity is scheduled to run.""" + SCHEDULED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """The marketing activity's status is unknown.""" + UNDEFINED +} + +"""Hierarchy levels for external marketing activities.""" +enum MarketingActivityHierarchyLevel { + """ + An advertisement activity. Must be parented by an ad group or a campaign + activity, and must be assigned tracking parameters (URL or UTM). + """ + AD + + """ + A group of advertisement activities. Must be parented by a campaign activity. + """ + AD_GROUP + + """ + A campaign activity. May contain either ad groups or ads as child activities. + If childless, then the campaign activity should have tracking parameters + assigned (URL or UTM) otherwise it won't appear in marketing reports. + """ + CAMPAIGN +} + +"""The set of valid sort keys for the MarketingActivity query.""" +enum MarketingActivitySortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `title` value.""" + TITLE +} + +""" +Status helps to identify if this marketing activity has been completed, queued, failed etc. +""" +enum MarketingActivityStatus { + """This marketing activity is currently running.""" + ACTIVE + + """This marketing activity is permanently unavailable.""" + DELETED + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """This marketing activity is disconnected and no longer editable.""" + DISCONNECTED + + """This marketing activity has been edited, but it is not yet created.""" + DRAFT + + """This marketing activity is unable to run.""" + FAILED + + """This marketing activity has completed running.""" + INACTIVE + + """This marketing activity is currently not running.""" + PAUSED + + """ + This marketing activity is pending creation on the app's marketing platform. + """ + PENDING + + """This marketing activity is scheduled to run.""" + SCHEDULED + + """The marketing activity's status is unknown.""" + UNDEFINED +} + +"""StatusBadgeType helps to identify the color of the status badge.""" +enum MarketingActivityStatusBadgeType { + """This status badge has type default.""" + DEFAULT + + """This status badge has type success.""" + SUCCESS + + """This status badge has type attention.""" + ATTENTION + + """This status badge has type warning.""" + WARNING + + """This status badge has type info.""" + INFO + + """This status badge has type critical.""" + CRITICAL +} + +""" +The input fields required to update an externally managed marketing activity. +""" +input MarketingActivityUpdateExternalInput { + """The title of the marketing activity.""" + title: String + + """The budget for this marketing activity.""" + budget: MarketingActivityBudgetInput + + """The amount spent on the marketing activity.""" + adSpend: MoneyInput + + """The URL for viewing and/or managing the activity outside of Shopify.""" + remoteUrl: URL + + """The URL for a preview image that's used for the marketing activity.""" + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic + determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """The domain from which ad clicks are forwarded to the shop.""" + referringDomain: String + + """The date and time at which the activity is scheduled to start.""" + scheduledStart: DateTime + + """The date and time at which the activity is scheduled to end.""" + scheduledEnd: DateTime + + """The date and time at which the activity started.""" + start: DateTime + + """The date and time at which the activity ended.""" + end: DateTime + + """The status of the marketing activity.""" + status: MarketingActivityExternalStatus +} + +"""Return type for `marketingActivityUpdateExternal` mutation.""" +type MarketingActivityUpdateExternalPayload { + """The updated marketing activity.""" + marketingActivity: MarketingActivity + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +""" +The input fields required to update a marketing activity. Marketing activity app +extensions are deprecated and will be removed in the near future. +""" +input MarketingActivityUpdateInput { + """The ID of the marketing activity.""" + id: ID! +} + +"""Return type for `marketingActivityUpdate` mutation.""" +type MarketingActivityUpdatePayload { + """The updated marketing activity.""" + marketingActivity: MarketingActivity + + """The redirect path from the embedded editor to the Shopify admin.""" + redirectPath: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The input fields for creating or updating an externally-managed marketing activity. +""" +input MarketingActivityUpsertExternalInput { + """The title of the marketing activity.""" + title: String! + + """ + Specifies the [Urchin Traffic Module (UTM) + parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated + with a related marketing campaign. Either the URL parameter value or UTM can + be set, but not both. + """ + utm: UTMInput + + """The budget for this marketing activity.""" + budget: MarketingActivityBudgetInput + + """The amount spent on the marketing activity.""" + adSpend: MoneyInput + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. + """ + remoteId: String! + + """The status of the marketing activity.""" + status: MarketingActivityExternalStatus! + + """The URL for viewing and/or managing the activity outside of Shopify.""" + remoteUrl: URL! + + """The URL for a preview image that's used for the marketing activity.""" + remotePreviewImageUrl: URL + + """ + The method of marketing used for this marketing activity. The marketing tactic + determines which default fields are included in the marketing activity. + """ + tactic: MarketingTactic! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """The domain from which ad clicks are forwarded to the shop.""" + referringDomain: String + + """ + The unique string identifier of the channel to which this activity belongs. + For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """The date and time at which the activity is scheduled to start.""" + scheduledStart: DateTime + + """The date and time at which the activity is scheduled to end.""" + scheduledEnd: DateTime + + """ + The date and time at which the activity started. On creation, if this field is + omitted or set to `null`, the current time will be used. + """ + start: DateTime + + """ + The date and time at which the activity started. On creation, if this field is + omitted or set to `null`, the current time will be used if the status is set + to `INACTIVE` or `DELETED_EXTERNALLY` . + """ + end: DateTime + + """ + Value for a query parameter that gets inserted into storefront URLs for + matching storefront traffic to this activity. This feature is currently + available on a limited basis to some partners only. UTMs should continue to be + used for most partners. Both the URL parameter value and UTM parameters can be set. + """ + urlParameterValue: String + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel +} + +"""Return type for `marketingActivityUpsertExternal` mutation.""" +type MarketingActivityUpsertExternalPayload { + """The external marketing activity that was created or updated.""" + marketingActivity: MarketingActivity + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +""" +An error that occurs during the execution of marketing activity and engagement mutations. +""" +type MarketingActivityUserError implements DisplayableError { + """The error code.""" + code: MarketingActivityUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MarketingActivityUserError`. +""" +enum MarketingActivityUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """Marketing activity does not exist.""" + MARKETING_ACTIVITY_DOES_NOT_EXIST + + """A marketing activity with the same remote ID already exists.""" + MARKETING_ACTIVITY_WITH_REMOTE_ID_ALREADY_EXISTS + + """ + A marketing activity with the same UTM campaign, medium, and source already exists. + """ + MARKETING_ACTIVITY_WITH_UTM_CAMPAIGN_ALREADY_EXISTS + + """A marketing activity with the same URL parameter value already exists.""" + MARKETING_ACTIVITY_WITH_URL_PARAMETER_VALUE_ALREADY_EXISTS + + """ + Marketing activity is not valid, the associated marketing event does not exist. + """ + MARKETING_EVENT_DOES_NOT_EXIST + + """All currency codes provided in the input need to match.""" + CURRENCY_CODE_MISMATCH_INPUT + + """ + The currency codes provided need to match the referenced marketing activity's currency code. + """ + MARKETING_ACTIVITY_CURRENCY_CODE_MISMATCH + + """The job to delete all external activities failed to enqueue.""" + DELETE_JOB_FAILED_TO_ENQUEUE + + """ + Non-hierarchical marketing activities must have UTM parameters or a URL parameter value. + """ + NON_HIERARCHIAL_REQUIRES_UTM_URL_PARAMETER + + """ + A mutation can not be ran because a job to delete all external activities has + been enqueued, which happens either from calling the + marketingActivitiesDeleteAllExternal mutation or as a result of an app uninstall. + """ + DELETE_JOB_ENQUEUED + + """The marketing activity must be an external activity.""" + ACTIVITY_NOT_EXTERNAL + + """The channel handle value cannot be modified.""" + IMMUTABLE_CHANNEL_HANDLE + + """The URL parameter value cannot be modified.""" + IMMUTABLE_URL_PARAMETER + + """The UTM parameters cannot be modified.""" + IMMUTABLE_UTM_PARAMETERS + + """The parent activity cannot be modified.""" + IMMUTABLE_PARENT_ID + + """The hierarchy level cannot be modified.""" + IMMUTABLE_HIERARCHY_LEVEL + + """The remote ID does not correspond to an existing activity.""" + INVALID_REMOTE_ID + + """The channel handle is not recognized.""" + INVALID_CHANNEL_HANDLE + + """ + Either the marketing activity ID or remote ID must be provided for the activity to be deleted. + """ + INVALID_DELETE_ACTIVITY_EXTERNAL_ARGUMENTS + + """ + Either the channel_handle or delete_engagements_for_all_channels must be provided when deleting a marketing engagement. + """ + INVALID_DELETE_ENGAGEMENTS_ARGUMENTS + + """Either the marketing activity ID, remote ID, or UTM must be provided.""" + INVALID_MARKETING_ACTIVITY_EXTERNAL_ARGUMENTS + + """ + For activity level engagement, either the marketing activity ID or remote ID + must be provided. For channel level engagement, the channel handle must be provided. + """ + INVALID_MARKETING_ENGAGEMENT_ARGUMENTS + + """ + No identifier found. For activity level engagement, either the marketing + activity ID or remote ID must be provided. For channel level engagement, the + channel handle must be provided. + """ + INVALID_MARKETING_ENGAGEMENT_ARGUMENT_MISSING + + """ + This activity has child activities and thus cannot be deleted. Child activities must be deleted before a parent activity. + """ + CANNOT_DELETE_ACTIVITY_WITH_CHILD_EVENTS + + """ + The activity's tactic can not be updated to STOREFRONT_APP. This type of + tactic can only be specified when creating a new activity. + """ + CANNOT_UPDATE_TACTIC_TO_STOREFRONT_APP + + """The activity's tactic can not be updated from STOREFRONT_APP.""" + CANNOT_UPDATE_TACTIC_IF_ORIGINALLY_STOREFRONT_APP +} + +"""This type combines budget amount and its marketing budget type.""" +type MarketingBudget { + """The budget type for a marketing activity.""" + budgetType: MarketingBudgetBudgetType! + + """The amount of budget for marketing activity.""" + total: MoneyV2! +} + +"""The budget type for a marketing activity.""" +enum MarketingBudgetBudgetType { + """A daily budget.""" + DAILY + + """A budget for the lifetime of a marketing activity.""" + LIFETIME +} + +""" +The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. +""" +enum MarketingChannel { + """Paid search.""" + SEARCH + + """Displayed ads.""" + DISPLAY + + """Social media.""" + SOCIAL + + """Email.""" + EMAIL + + """Referral links.""" + REFERRAL +} + +""" +Marketing engagement represents customer activity taken on a marketing activity or a marketing channel. +""" +type MarketingEngagement { + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or + yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyV2 + + """ + The 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 calendar date (in the time zone offset specified by the utcOffset field) + for which the metrics are being reported. For example, a shop in UTC-5 would + set utcOffset="-05:00" and aggregate all engagements from 05:00:00Z up to + 29:00:00Z (5am UTC next day) for each call. + """ + occurredOn: Date! + + """ + The total number of times marketing content was displayed to users, whether or + not an interaction occurred. For message-based platforms such as email or SMS, + this represents the number of marketing emails or messages that were delivered. + """ + impressionsCount: Int + + """ + The total number of views on the marketing content. For message-based + platforms such as email or SMS, this represents the number of times marketing + emails or messages were opened. For video-based content, this represents the + number of times videos were played. + """ + viewsCount: Int + + """ + The total number of interactions, such as a button press or a screen touch, that occurred on the marketing content. + """ + clicksCount: Int + + """ + The total number of times marketing content was distributed or reposted to + either one's own network of followers through a social media platform or other + digital channels. For message-based platforms such as email or SMS, this + represents the number of times marketing emails or messages were forwarded. + """ + sharesCount: Int + + """ + The total number of favorites, likes, saves, or bookmarks on the marketing content. + """ + favoritesCount: Int + + """The total number of comments on the marketing content.""" + commentsCount: Int + + """ + The total number of unsubscribes on the marketing content. For social media + platforms, this represents the number of unfollows. + """ + unsubscribesCount: Int + + """ + The total number of complaints on the marketing content. For message-based + platforms such as email or SMS, this represents the number of marketing emails + or messages that were marked as spam. For social media platforms, this + represents the number of dislikes or the number of times marketing content was reported. + """ + complaintsCount: Int + + """ + The total number of fails for the marketing content. For message-based + platforms such as email or SMS, this represents the number of bounced + marketing emails or messages. + """ + failsCount: Int + + """The total number of marketing emails or messages that were sent.""" + sendsCount: Int + + """ + The total number of all users who saw marketing content since it was + published. For message-based platforms such as email or SMS, this represents + the number of unique users that opened a marketing email or message. For + video-based content, this represents the number of unique users that played video content. + """ + uniqueViewsCount: Int + + """The total number of unique clicks on the marketing content.""" + uniqueClicksCount: Int + + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or + yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyInput + + """ + Specifies how the provided metrics have been aggregated. Cumulative metrics + are aggregated from the first day of reporting up to and including + `occuredOn`. Non-cumulative metrics are aggregated over the single day + indicated in `occuredOn`. Cumulative metrics will monotonically increase in + time as each record includes the previous day's values, and so on. + Non-cumulative is strongly preferred, and support for cumulative metrics may + be deprecated in the future. + """ + isCumulative: Boolean! + + """ + The UTC offset for the time zone in which the metrics are being reported, in + the format `"+HH:MM"` or `"-HH:MM"`. Used in combination with occurredOn when + aggregating daily metrics. Must match the account settings for the shop to + minimize eventual discrepancies in reporting. + """ + utcOffset: UtcOffset! + + """The amount of sales generated from the marketing content.""" + sales: MoneyInput + + """ + The number of online store sessions generated from the marketing content. + """ + sessionsCount: Int + + """The number of orders generated from the marketing content.""" + orders: Decimal + + """ + The number of customers that have placed their first order. Doesn't include + adjustments such as edits, exchanges, or returns. + """ + firstTimeCustomers: Decimal + + """ + The number of returning customers that have placed an order. Doesn't include + adjustments such as edits, exchanges, or returns. + """ + returningCustomers: Decimal +} + +"""Return type for `marketingEngagementsDelete` mutation.""" +type MarketingEngagementsDeletePayload { + """ + Informational message about the engagement data that has been marked for deletion. + """ + result: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketingActivityUserError!]! +} + +"""Represents actions that market a merchant's store or products.""" +type MarketingEvent implements LegacyInteroperability & Node { + """The app that the marketing event is attributed to.""" + app: App! + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + channel: MarketingChannel @deprecated(reason: "Use `marketingChannelType` instead.") + + """ + The unique string identifier of the channel to which this activity belongs. + For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """A human-readable description of the marketing event.""" + description: String + + """The date and time when the marketing event ended.""" + endedAt: DateTime + + """A globally-unique ID.""" + id: ID! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The URL where the marketing event can be managed.""" + manageUrl: URL + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel + + """The URL where the marketing event can be previewed.""" + previewUrl: URL + + """An optional ID that helps Shopify validate engagement data.""" + remoteId: String + + """The date and time when the marketing event is scheduled to end.""" + scheduledToEndAt: DateTime + + """ + Where the `MarketingEvent` occurred and what kind of content was used. + Because `utmSource` and `utmMedium` are often used interchangeably, this is + based on a combination of `marketingChannel`, `referringDomain`, and `type` to + provide a consistent representation for any given piece of marketing + regardless of the app that created it. + """ + sourceAndMedium: String! + + """The date and time when the marketing event started.""" + startedAt: DateTime! + + """The display text for the marketing event type.""" + targetTypeDisplayText: String! @deprecated(reason: "Use `sourceAndMedium` instead.") + + """The marketing event type.""" + type: MarketingTactic! + + """The name of the marketing campaign.""" + utmCampaign: String + + """ + The medium that the marketing campaign is using. Example values: `cpc`, `banner`. + """ + utmMedium: String + + """ + The referrer of the marketing event. Example values: `google`, `newsletter`. + """ + utmSource: String +} + +""" +An auto-generated type for paginating through multiple MarketingEvents. +""" +type MarketingEventConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketingEventEdge!]! + + """ + A list of nodes that are contained in MarketingEventEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketingEvent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketingEvent and a cursor during pagination. +""" +type MarketingEventEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketingEventEdge.""" + node: MarketingEvent! +} + +"""The set of valid sort keys for the MarketingEvent query.""" +enum MarketingEventSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `started_at` value.""" + STARTED_AT +} + +"""The available types of tactics for a marketing activity.""" +enum MarketingTactic { + """An abandoned cart recovery email.""" + ABANDONED_CART + + """An ad, such as a Facebook ad.""" + AD + + """An affiliate link.""" + AFFILIATE + + """A link.""" + LINK + + """A loyalty program.""" + LOYALTY + + """A messaging app, such as Facebook Messenger.""" + MESSAGE + + """A newsletter.""" + NEWSLETTER + + """A notification in the Shopify admin.""" + NOTIFICATION + + """A blog post.""" + POST + + """A retargeting ad.""" + RETARGETING + + """A transactional email.""" + TRANSACTIONAL + + """A popup on the online store.""" + STOREFRONT_APP + + """Search engine optimization.""" + SEO +} + +"""The market localizable content of a resource's field.""" +type MarketLocalizableContent { + """The hash digest representation of the content value.""" + digest: String + + """The resource field that's being localized.""" + key: String! + + """The content value.""" + value: String +} + +"""A resource that has market localizable fields.""" +type MarketLocalizableResource { + """The market localizable content.""" + marketLocalizableContent: [MarketLocalizableContent!]! + + """Market localizations for the market localizable content.""" + marketLocalizations( + """Filters market localizations by market ID.""" + marketId: ID! + ): [MarketLocalization!]! + + """The GID of the resource.""" + resourceId: ID! +} + +""" +An auto-generated type for paginating through multiple MarketLocalizableResources. +""" +type MarketLocalizableResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketLocalizableResourceEdge!]! + + """ + A list of nodes that are contained in MarketLocalizableResourceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MarketLocalizableResource!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MarketLocalizableResource and a cursor during pagination. +""" +type MarketLocalizableResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketLocalizableResourceEdge.""" + node: MarketLocalizableResource! +} + +"""The type of resources that are market localizable.""" +enum MarketLocalizableResourceType { + """A metafield. Market localizable fields: `value`.""" + METAFIELD + + """ + A Metaobject. Market Localizable fields are determined by the Metaobject type. + """ + METAOBJECT +} + +""" +The market localization of a field within a resource, which is determined by the market ID. +""" +type MarketLocalization { + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """The market that the localization is specific to.""" + market: Market! + + """ + Whether the original content has changed since this market localization was updated. + """ + outdated: Boolean! + + """The date and time when the market localization was updated.""" + updatedAt: DateTime + + """The value of the market localization.""" + value: String +} + +""" +The input fields and values for creating or updating a market localization. +""" +input MarketLocalizationRegisterInput { + """The ID of the market that the localization is specific to.""" + marketId: ID! + + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """The value of the market localization.""" + value: String! + + """A hash digest representation of the content being localized.""" + marketLocalizableContentDigest: String! +} + +"""Return type for `marketLocalizationsRegister` mutation.""" +type MarketLocalizationsRegisterPayload { + """The market localizations that were created or updated.""" + marketLocalizations: [MarketLocalization!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [TranslationUserError!]! +} + +"""Return type for `marketLocalizationsRemove` mutation.""" +type MarketLocalizationsRemovePayload { + """The market localizations that were deleted.""" + marketLocalizations: [MarketLocalization!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [TranslationUserError!]! +} + +"""The inclusive pricing strategy for a market.""" +type MarketPriceInclusions { + """ + The inclusive duties pricing strategy of the market. This determines if prices include duties. + """ + inclusiveDutiesPricingStrategy: InclusiveDutiesPricingStrategy! + + """ + The inclusive tax pricing strategy of the market. This determines if prices include taxes. + """ + inclusiveTaxPricingStrategy: InclusiveTaxPricingStrategy! +} + +"""The input fields used to create a price inclusion.""" +input MarketPriceInclusionsInput { + """The inclusive tax pricing strategy for the market.""" + taxPricingStrategy: InclusiveTaxPricingStrategy + + """The inclusive duties pricing strategy for the market.""" + dutiesPricingStrategy: InclusiveDutiesPricingStrategy +} + +"""A geographic region which comprises a market.""" +interface MarketRegion { + """A globally-unique ID.""" + id: ID! + + """The name of the region.""" + name: String! +} + +"""An auto-generated type for paginating through multiple MarketRegions.""" +type MarketRegionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketRegionEdge!]! + + """ + A list of nodes that are contained in MarketRegionEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketRegion!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""A country which comprises a market.""" +type MarketRegionCountry implements MarketRegion & Node { + """The ISO code identifying the country.""" + code: CountryCode! + + """The currency which this country uses given its market settings.""" + currency: CurrencySetting! + + """A globally-unique ID.""" + id: ID! + + """The name of the region.""" + name: String! +} + +""" +The input fields for creating a market region with exactly one required option. +""" +input MarketRegionCreateInput { + """A country code for the region.""" + countryCode: CountryCode! +} + +"""Return type for `marketRegionDelete` mutation.""" +type MarketRegionDeletePayload { + """The ID of the deleted market region.""" + deletedId: ID + + """The parent market object of the deleted region.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketRegion and a cursor during pagination. +""" +type MarketRegionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketRegionEdge.""" + node: MarketRegion! +} + +"""Return type for `marketRegionsCreate` mutation.""" +type MarketRegionsCreatePayload { + """The market object.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""Return type for `marketRegionsDelete` mutation.""" +type MarketRegionsDeletePayload { + """The ID of the deleted market region.""" + deletedIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""The entitlements for B2B markets.""" +type MarketsB2BEntitlement { + """The entitlements for B2B market catalogs.""" + catalogs: MarketsCatalogsEntitlement! + + """Whether B2B markets are enabled.""" + enabled: Boolean! +} + +"""The entitlements for catalogs.""" +type MarketsCatalogsEntitlement { + """Whether catalogs are enabled.""" + enabled: Boolean! +} + +"""The entitlements for region markets.""" +type MarketsRegionsEntitlement { + """The entitlements for region market catalogs.""" + catalogs: MarketsCatalogsEntitlement! + + """Whether region markets are enabled.""" + enabled: Boolean! +} + +""" +The resolved values based on the markets configuration for a buyer signal. +Resolved values include the resolved catalogs, web presences, currency, and +price inclusivity. +""" +type MarketsResolvedValues { + """The resolved catalogs.""" + catalogs( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketCatalogConnection! + + """The resolved currency code.""" + currencyCode: CurrencyCode! + + """The resolved price inclusivity attributes.""" + priceInclusivity: ResolvedPriceInclusivity! + + """The resolved web presences ordered by priority.""" + webPresences( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketWebPresenceConnection! +} + +"""The entitlements for retail markets.""" +type MarketsRetailEntitlement { + """The entitlements for retail market catalogs.""" + catalogs: MarketsCatalogsEntitlement! + + """Whether retail markets are enabled.""" + enabled: Boolean! +} + +"""The set of valid sort keys for the Markets query.""" +enum MarketsSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `market_condition_types` value.""" + MARKET_CONDITION_TYPES + + """Sort by the `market_type` value.""" + MARKET_TYPE + + """Sort by the `name` value.""" + NAME + + """Sort by the `status` value.""" + STATUS + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The possible market statuses.""" +enum MarketStatus { + """The market is active.""" + ACTIVE + + """The market is in draft.""" + DRAFT +} + +"""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! +} + +"""The market types.""" +enum MarketType { + """The market does not apply to any visitor.""" + NONE + + """The market applies to the visitor based on region.""" + REGION + + """The market applies to the visitor based on the location.""" + LOCATION + + """The market applies to the visitor based on the company location.""" + COMPANY_LOCATION +} + +"""The input fields used to update a market.""" +input MarketUpdateInput { + """The name of the market. Not shown to customers.""" + name: String + + """A unique identifier for the market. For example `"ca"`.""" + handle: String + + """The conditions to update.""" + conditions: MarketConditionsUpdateInput + + """Catalog IDs to include in the market.""" + catalogsToAdd: [ID!] + + """Catalog IDs to remove from the market.""" + catalogsToDelete: [ID!] + + """The web presences to add to the market.""" + webPresencesToAdd: [ID!] + + """The web presences to remove from the market.""" + webPresencesToDelete: [ID!] + + """ + Whether to update duplicate region or wildcard markets' status to draft. + """ + makeDuplicateUniqueMarketsDraft: Boolean + + """The status of the market.""" + status: MarketStatus + + """Currency settings for the market.""" + currencySettings: MarketCurrencySettingsUpdateInput + + """Remove any currency settings that are defined for the market.""" + removeCurrencySettings: Boolean + + """The price inclusions to remove from the market.""" + removePriceInclusions: Boolean + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput +} + +"""Return type for `marketUpdate` mutation.""" +type MarketUpdatePayload { + """The market object.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""Defines errors encountered while managing a Market.""" +type MarketUserError implements DisplayableError { + """The error code.""" + code: MarketUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MarketUserError`.""" +enum MarketUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is blank.""" + BLANK + + """The input value isn't included in the list.""" + INCLUSION + + """The market wasn't found.""" + MARKET_NOT_FOUND + + """The market region wasn't found.""" + REGION_NOT_FOUND + + """The province doesn't exist.""" + PROVINCE_DOES_NOT_EXIST + + """The market web presence wasn't found.""" + WEB_PRESENCE_NOT_FOUND + + """Can't add regions to the primary market.""" + CANNOT_ADD_REGIONS_TO_PRIMARY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """Can't delete the only region in a market.""" + CANNOT_DELETE_ONLY_REGION + + """Exactly one input option is required.""" + REQUIRES_EXACTLY_ONE_OPTION @deprecated(reason: "No longer used") + + """Can't delete the primary market.""" + CANNOT_DELETE_PRIMARY_MARKET + + """Exceeds max multi-context markets.""" + EXCEEDS_MAX_MULTI_CONTEXT_MARKETS + + """Domain was not found.""" + DOMAIN_NOT_FOUND + + """The subfolder suffix must contain only letters.""" + SUBFOLDER_SUFFIX_MUST_CONTAIN_ONLY_LETTERS @deprecated(reason: "No longer used") + + """The subfolder suffix must be at least 2 letters.""" + SUBFOLDER_SUFFIX_MUST_BE_AT_LEAST_2_LETTERS + + """The subfolder suffix is invalid, please provide a different value.""" + SUBFOLDER_SUFFIX_CANNOT_BE_SCRIPT_CODE + + """No languages selected.""" + NO_LANGUAGES + + """Can't enable or disable local currencies on a single country market.""" + NO_LOCAL_CURRENCIES_ON_SINGLE_COUNTRY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """Rounding is not supported if unified markets are not enabled.""" + NO_ROUNDING_ON_LEGACY_MARKET @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """Duplicates found in languages.""" + DUPLICATE_LANGUAGES + + """Duplicate region market.""" + DUPLICATE_REGION_MARKET + + """Duplicate unique market.""" + DUPLICATE_UNIQUE_MARKET + + """Cannot add region-specific language.""" + REGION_SPECIFIC_LANGUAGE + + """Can't pass both `subfolderSuffix` and `domainId`.""" + CANNOT_HAVE_SUBFOLDER_AND_DOMAIN + + """Can't add the web presence to the primary market.""" + CANNOT_ADD_WEB_PRESENCE_TO_PRIMARY_MARKET @deprecated(reason: "No longer used") + + """Can't add another web presence to the market.""" + MARKET_REACHED_WEB_PRESENCE_LIMIT + + """Market and condition types are not compatible with each other.""" + MARKET_NOT_COMPATIBLE_WITH_CONDITION_TYPES @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """The province code is missing.""" + MISSING_PROVINCE_CODE + + """Can't have multiple subfolder web presences per market.""" + CANNOT_HAVE_MULTIPLE_SUBFOLDERS_PER_MARKET + + """Can't have both subfolder and domain web presences.""" + CANNOT_HAVE_BOTH_SUBFOLDER_AND_DOMAIN_WEB_PRESENCES + + """One of `subfolderSuffix` or `domainId` is required.""" + REQUIRES_DOMAIN_OR_SUBFOLDER + + """The primary market must use the primary domain.""" + PRIMARY_MARKET_MUST_USE_PRIMARY_DOMAIN @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """Can't delete the primary market's web presence.""" + CANNOT_DELETE_PRIMARY_MARKET_WEB_PRESENCE @deprecated(reason: "No longer used") + + """Can't have more than 50 markets.""" + SHOP_REACHED_MARKETS_LIMIT @deprecated(reason: "No longer used") + + """Can't disable the primary market.""" + CANNOT_DISABLE_PRIMARY_MARKET + + """The language isn't published to the store.""" + UNPUBLISHED_LANGUAGE + + """The language isn't enabled on the store.""" + DISABLED_LANGUAGE + + """Can't set default locale to null.""" + CANNOT_SET_DEFAULT_LOCALE_TO_NULL + + """Can't add unsupported country or region.""" + UNSUPPORTED_COUNTRY_REGION + + """Can't add customer account domain to a market.""" + CANNOT_ADD_CUSTOMER_DOMAIN + + """An error occurred. See the message for details.""" + GENERIC_ERROR + + """Invalid combination of status and enabled.""" + INVALID_STATUS_AND_ENABLED_COMBINATION + + """The province format is invalid.""" + INVALID_PROVINCE_FORMAT + + """One or more condition IDs were not found.""" + CONDITIONS_NOT_FOUND + + """Specified conditions cannot be empty.""" + SPECIFIED_CONDITIONS_CANNOT_BE_EMPTY + + """One or more customizations were not found.""" + CUSTOMIZATIONS_NOT_FOUND + + """Matching ALL or NONE isn't supported for this driver type.""" + WILDCARD_NOT_SUPPORTED + + """With an ID list in input, SPECIFIED is not needed.""" + SPECIFIED_NOT_VALID_FOR_INPUT + + """Web presences and condition types are not compatible with each other.""" + WEB_PRESENCE_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """Catalogs and condition types are not compatible with each other.""" + CATALOG_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """A market can only have market catalogs.""" + CATALOG_TYPE_NOT_SUPPORTED + + """ + Inclusive pricing cannot be added to a market with the specified condition types. + """ + INCLUSIVE_PRICING_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """The specified conditions are not compatible with each other.""" + INCOMPATIBLE_CONDITIONS + + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """ + The shop's payment gateway does not support enabling more than one currency. + """ + MULTIPLE_CURRENCIES_NOT_SUPPORTED + + """The specified currency is not supported.""" + UNSUPPORTED_CURRENCY + + """The shop must have a web presence that uses the primary domain.""" + SHOP_MUST_HAVE_PRIMARY_DOMAIN_WEB_PRESENCE + + """Can’t delete, disable, or change the type of the last region market.""" + MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET + + """The user doesn't have permission access to create or edit markets.""" + USER_LACKS_PERMISSION + + """Contains regions that cannot be managed.""" + CONTAINS_REGIONS_THAT_CANNOT_BE_MANAGED + + """Unified markets are not enabled.""" + UNIFIED_MARKETS_NOT_ENABLED @deprecated(reason: "This will no longer be used after legacy markets are removed in April 2026") + + """Can't add web presence to the another market.""" + WEB_PRESENCE_REACHED_MARKETS_LIMIT + + """A web presence cannot be added to a market with type retail location.""" + WEB_PRESENCE_RETAIL_LOCATION @deprecated(reason: "No longer used") + + """ + Catalog condition types must be the same for all conditions on a catalog. + """ + CATALOG_CONDITION_TYPES_MUST_BE_THE_SAME + + """A direct connection catalog can't be attached to a market.""" + MARKET_CANT_HAVE_DIRECT_CONNECTION_CATALOG + + """Your shop is not entitled to activate markets of this type.""" + NOT_ENTITLED_TO_ACTIVATE_MARKET + + """B2B markets must be merchant managed.""" + B2B_MARKET_MUST_BE_MERCHANT_MANAGED + + """POS location markets must be merchant managed.""" + POS_LOCATION_MARKET_MUST_BE_MERCHANT_MANAGED + + """Catalogs created by Managed Markets cannot be added to a market.""" + MANAGED_MARKETS_CATALOG_NOT_ALLOWED + + """Retail location currency must be local.""" + RETAIL_LOCATION_CURRENCY_MUST_BE_LOCAL + + """ + Catalogs with volume pricing or quantity rules are not supported for the specified condition types. + """ + CATALOGS_WITH_VOLUME_PRICING_OR_QUANTITY_RULES_NOT_SUPPORTED + + """All retail locations in a market must be in the same country.""" + MIXED_COUNTRY_LOCATIONS_NOT_ALLOWED + + """Location match all is only valid with one non-match all region.""" + LOCATION_MATCH_ALL_REQUIRES_ONE_SPECIFIC_REGION + + """A location's country does not match the region's country.""" + LOCATION_REGION_COUNTRY_MISMATCH + + """Managing this catalog is not supported by your plan.""" + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """Can't add selected responders to a province driven market.""" + INVALID_RESPONDER_FOR_PROVINCE_DRIVEN_MARKET @deprecated(reason: "No longer used") +} + +""" +The market’s web presence, which defines its SEO strategy. This can be a different domain +(e.g. `example.ca`), subdomain (e.g. `ca.example.com`), or subfolders of the primary +domain (e.g. `example.com/en-ca`). Each web presence comprises one or more language +variants. If a market does not have its own web presence, it is accessible on the shop’s +primary domain via [country +selectors](https://shopify.dev/themes/internationalization/multiple-currencies-languages#the-country-selector). + +Note: while the domain/subfolders defined by a market’s web presence are not applicable to +custom storefronts, which must manage their own domains and routing, the languages chosen +here do govern [the languages available on the Storefront +API](https://shopify.dev/custom-storefronts/internationalization/multiple-languages) for the countries in +this market. +""" +type MarketWebPresence implements Node { + """ + The ShopLocale object for the alternate locales. When a domain is used, these locales will be + available as language-specific subfolders. For example, if English is an + alternate locale, and `example.ca` is the market’s domain, then + `example.ca/en` will load in English. + """ + alternateLocales: [ShopLocale!]! + + """ + The ShopLocale object for the default locale. When a domain is used, this is the locale that will + be used when the domain root is accessed. For example, if French is the default locale, + and `example.ca` is the market’s domain, then `example.ca` will load in French. + """ + defaultLocale: ShopLocale! + + """ + The web presence’s domain. + This field will be null if `subfolderSuffix` isn't null. + """ + domain: Domain + + """A globally-unique ID.""" + id: ID! + + """ + The associated market. This can be null for a web presence that isn't associated with a market. + """ + market: Market @deprecated(reason: "Use `markets` instead.") + + """The associated markets for this web presence.""" + markets( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketConnection + + """ + The list of root URLs for each of the web presence’s locales. As of version + `2024-04` this value will no longer have a trailing slash. + """ + rootUrls: [MarketWebPresenceRootUrl!]! + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. This field will be null if + `domain` isn't null. + """ + subfolderSuffix: String +} + +""" +An auto-generated type for paginating through multiple MarketWebPresences. +""" +type MarketWebPresenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MarketWebPresenceEdge!]! + + """ + A list of nodes that are contained in MarketWebPresenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MarketWebPresence!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields used to create a web presence for a market.""" +input MarketWebPresenceCreateInput { + """ + The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. + """ + domainId: ID + + """The default locale for the market’s web presence.""" + defaultLocale: String! + + """The alternate locales for the market’s web presence.""" + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. + """ + subfolderSuffix: String +} + +"""Return type for `marketWebPresenceCreate` mutation.""" +type MarketWebPresenceCreatePayload { + """The market object.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""Return type for `marketWebPresenceDelete` mutation.""" +type MarketWebPresenceDeletePayload { + """The ID of the deleted web presence.""" + deletedId: ID + + """The market for which the web presence was deleted.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +""" +An auto-generated type which holds one MarketWebPresence and a cursor during pagination. +""" +type MarketWebPresenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MarketWebPresenceEdge.""" + node: MarketWebPresence! +} + +""" +The URL for the homepage of the online store in the context of a particular market and a +particular locale. +""" +type MarketWebPresenceRootUrl { + """The locale that the storefront loads in.""" + locale: String! + + """The URL.""" + url: URL! +} + +"""The input fields used to update a web presence for a market.""" +input MarketWebPresenceUpdateInput { + """ + The web presence's domain ID. This field must be null if `subfolderSuffix` is not null. + """ + domainId: ID + + """The default locale for the market’s web presence.""" + defaultLocale: String + + """The alternate locales for the market’s web presence.""" + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be null if `domainId` is not null. + """ + subfolderSuffix: String +} + +"""Return type for `marketWebPresenceUpdate` mutation.""" +type MarketWebPresenceUpdatePayload { + """The market object.""" + market: Market + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MarketUserError!]! +} + +"""Represents a media interface.""" +interface Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """A globally-unique ID.""" + id: ID! + + """The media content type.""" + mediaContentType: MediaContentType! + + """Any errors which have occurred on the media.""" + mediaErrors: [MediaError!]! + + """The warnings attached to the media.""" + mediaWarnings: [MediaWarning!]! + + """The preview image for the media.""" + preview: MediaPreviewImage + + """Current status of the media.""" + status: MediaStatus! +} + +"""An auto-generated type for paginating through multiple Media.""" +type MediaConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MediaEdge!]! + + """ + A list of nodes that are contained in MediaEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Media!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The possible content types for a media object.""" +enum MediaContentType { + """A Shopify-hosted video.""" + VIDEO + + """An externally hosted video.""" + EXTERNAL_VIDEO + + """A 3d model.""" + MODEL_3D + + """A Shopify-hosted image.""" + IMAGE +} + +""" +An auto-generated type which holds one Media and a cursor during pagination. +""" +type MediaEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MediaEdge.""" + node: Media! +} + +""" +Represents a media error. This typically occurs when there is an issue with the media itself causing it to fail validation. +Check the media before attempting to upload again. +""" +type MediaError { + """Code representing the type of error.""" + code: MediaErrorCode! + + """Additional details regarding the error.""" + details: String + + """Translated error message.""" + message: String! +} + +"""Error types for media.""" +enum MediaErrorCode { + """Media error has occured for unknown reason.""" + UNKNOWN + + """Media could not be processed because the signed URL was invalid.""" + INVALID_SIGNED_URL + + """ + Media could not be processed because the image could not be downloaded. + """ + IMAGE_DOWNLOAD_FAILURE + + """Media could not be processed because the image could not be processed.""" + IMAGE_PROCESSING_FAILURE + + """ + Media timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_ERROR + + """ + Media could not be created because the external video could not be found. + """ + EXTERNAL_VIDEO_NOT_FOUND + + """ + Media could not be created because the external video is not listed or is private. + """ + EXTERNAL_VIDEO_UNLISTED + + """ + Media could not be created because the external video has an invalid aspect ratio. + """ + EXTERNAL_VIDEO_INVALID_ASPECT_RATIO + + """ + Media could not be created because embed permissions are disabled for this video. + """ + EXTERNAL_VIDEO_EMBED_DISABLED + + """ + Media could not be created because video is either not found or still transcoding. + """ + EXTERNAL_VIDEO_EMBED_NOT_FOUND_OR_TRANSCODING + + """ + File could not be processed because the source could not be downloaded. + """ + GENERIC_FILE_DOWNLOAD_FAILURE + + """File could not be created because the size is too large.""" + GENERIC_FILE_INVALID_SIZE + + """Media could not be created because the metadata could not be read.""" + VIDEO_METADATA_READ_ERROR + + """Media could not be created because it has an invalid file type.""" + VIDEO_INVALID_FILETYPE_ERROR + + """ + Media could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + Media could not be created because it does not meet the maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + Media could not be created because it does not meet the minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + Media could not be created because it does not meet the maximum height requirement. + """ + VIDEO_MAX_HEIGHT_ERROR + + """ + Media could not be created because it does not meet the minimum duration requirement. + """ + VIDEO_MIN_DURATION_ERROR + + """ + Media could not be created because it does not meet the maximum duration requirement. + """ + VIDEO_MAX_DURATION_ERROR + + """Video failed validation.""" + VIDEO_VALIDATION_ERROR + + """Model failed validation.""" + MODEL3D_VALIDATION_ERROR + + """ + Media could not be created because the model's thumbnail generation failed. + """ + MODEL3D_THUMBNAIL_GENERATION_ERROR + + """There was an issue while trying to generate a new thumbnail.""" + MODEL3D_THUMBNAIL_REGENERATION_ERROR + + """ + Media could not be created because the model can't be converted to USDZ format. + """ + MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR + + """Media could not be created because the model file failed processing.""" + MODEL3D_GLB_OUTPUT_CREATION_ERROR + + """Media could not be created because the model file failed processing.""" + MODEL3D_PROCESSING_FAILURE + + """ + Media could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """Media could not be created because the image size is too large.""" + INVALID_IMAGE_FILE_SIZE + + """ + Media could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + Media could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + Media could not be created because the cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + Media could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR +} + +"""Host for a Media Resource.""" +enum MediaHost { + """Host for YouTube embedded videos.""" + YOUTUBE + + """Host for Vimeo embedded videos.""" + VIMEO +} + +""" +The `MediaImage` object represents an image hosted on Shopify's +[content delivery network (CDN)](https://shopify.dev/docs/storefronts/themes/best-practices/performance/platform#shopify-cdn). +Shopify CDN is a content system that serves as the primary way to store, +manage, and deliver visual content for products, variants, and other resources across the Shopify platform. + +The `MediaImage` object provides information to: + +- Store and display product and variant images across online stores, admin interfaces, and mobile apps. +- Retrieve visual branding elements, including logos, banners, favicons, and background images in checkout flows. +- Retrieve signed URLs for secure, time-limited access to original image files. + +Each `MediaImage` object provides both the processed image data (with automatic optimization and CDN delivery) +and access to the original source file. The image processing is handled asynchronously, so images +might not be immediately available after upload. The +[`status`](https://shopify.dev/docs/api/admin-graphql/latest/objects/mediaimage#field-MediaImage.fields.status) +field indicates when processing is complete and the image is ready for use. + +The `MediaImage` object implements the [`Media`](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Media) +interface alongside other media types, like videos and 3D models. + +Learn about +managing media for [products](https://shopify.dev/docs/apps/build/online-store/product-media), +[product variants](https://shopify.dev/docs/apps/build/online-store/product-variant-media), and +[asynchronous media management](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components#asynchronous-media-management). +""" +type MediaImage implements File & HasMetafields & HasPublishedTranslations & Media & Node { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was created. + """ + createdAt: DateTime! + + """Any errors that have occurred on the file.""" + fileErrors: [FileError!]! + + """The status of the file.""" + fileStatus: FileStatus! + + """A globally-unique ID.""" + id: ID! + + """The image for the media. Returns `null` until `status` is `READY`.""" + image: Image + + """The media content type.""" + mediaContentType: MediaContentType! + + """Any errors which have occurred on the media.""" + mediaErrors: [MediaError!]! + + """The warnings attached to the media.""" + mediaWarnings: [MediaWarning!]! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """The MIME type of the image.""" + mimeType: String + + """The original source of the image.""" + originalSource: MediaImageOriginalSource + + """The preview image for the media.""" + preview: MediaPreviewImage + + """Current status of the media.""" + status: MediaStatus! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +"""The original source for an image.""" +type MediaImageOriginalSource { + """The size of the original file in bytes.""" + fileSize: Int + + """The URL of the original image, valid only for a short period.""" + url: URL +} + +"""Represents the preview image for a media.""" +type MediaPreviewImage { + """ + The preview image for the media. Returns `null` until `status` is `READY`. + """ + image: Image + + """Current status of the preview image.""" + status: MediaPreviewImageStatus! +} + +"""The possible statuses for a media preview image.""" +enum MediaPreviewImageStatus { + """Preview image is uploaded but not yet processed.""" + UPLOADED + + """Preview image is being processed.""" + PROCESSING + + """Preview image is ready to be displayed.""" + READY + + """Preview image processing has failed.""" + FAILED +} + +"""The possible statuses for a media object.""" +enum MediaStatus { + """Media has been uploaded but not yet processed.""" + UPLOADED + + """Media is being processed.""" + PROCESSING + + """Media is ready to be displayed.""" + READY + + """Media processing has failed.""" + FAILED +} + +""" +Represents an error that happens during execution of a Media query or mutation. +""" +type MediaUserError implements DisplayableError { + """The error code.""" + code: MediaUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MediaUserError`.""" +enum MediaUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """Video validation failed.""" + VIDEO_VALIDATION_ERROR + + """Model validation failed.""" + MODEL3D_VALIDATION_ERROR + + """Video creation throttle was exceeded.""" + VIDEO_THROTTLE_EXCEEDED + + """Model3d creation throttle was exceeded.""" + MODEL3D_THROTTLE_EXCEEDED + + """Exceeded the limit of media per product.""" + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """Exceeded the limit of media per shop.""" + SHOP_MEDIA_LIMIT_EXCEEDED + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Media does not exist.""" + MEDIA_DOES_NOT_EXIST + + """Media does not exist on the given product.""" + MEDIA_DOES_NOT_EXIST_ON_PRODUCT + + """Only one mediaId is allowed per variant-media input pair.""" + TOO_MANY_MEDIA_PER_INPUT_PAIR + + """ + Exceeded the maximum number of 100 variant-media pairs per mutation call. + """ + MAXIMUM_VARIANT_MEDIA_PAIRS_EXCEEDED + + """Invalid media type.""" + INVALID_MEDIA_TYPE + + """Variant specified in more than one pair.""" + PRODUCT_VARIANT_SPECIFIED_MULTIPLE_TIMES + + """Variant does not exist on the given product.""" + PRODUCT_VARIANT_DOES_NOT_EXIST_ON_PRODUCT + + """Non-ready media are not supported.""" + NON_READY_MEDIA + + """Product variant already has attached media.""" + PRODUCT_VARIANT_ALREADY_HAS_MEDIA + + """The specified media is not attached to the specified variant.""" + MEDIA_IS_NOT_ATTACHED_TO_VARIANT + + """ + Media cannot be modified. It is currently being modified by another operation. + """ + MEDIA_CANNOT_BE_MODIFIED + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Missing arguments.""" + MISSING_ARGUMENTS +} + +""" +Represents a media warning. This occurs when there is a non-blocking concern regarding your media. +Consider reviewing your media to ensure it is correct and its parameters are as expected. +""" +type MediaWarning { + """The code representing the type of warning.""" + code: MediaWarningCode! + + """Translated warning message.""" + message: String +} + +"""Warning types for media.""" +enum MediaWarningCode { + """ + 3D model physical size might be invalid. The dimensions of your model are very + small. Consider reviewing your model to ensure they are correct. + """ + MODEL_SMALL_PHYSICAL_SIZE + + """ + 3D model physical size might be invalid. The dimensions of your model are very + large. Consider reviewing your model to ensure they are correct. + """ + MODEL_LARGE_PHYSICAL_SIZE + + """ + The thumbnail failed to regenerate.Try applying the changes again to regenerate the thumbnail. + """ + MODEL_PREVIEW_IMAGE_FAIL +} + +"""A menu for display on the storefront.""" +type Menu implements HasPublishedTranslations & Node { + """The menu's handle.""" + handle: String! + + """A globally-unique ID.""" + id: ID! + + """ + Whether the menu is a default. The handle for default menus can't be updated and default menus can't be deleted. + """ + isDefault: Boolean! + + """A list of items on the menu sorted by position.""" + items( + """The number of menu items to be returned.""" + limit: Int + ): [MenuItem!]! + + """The menu's title.""" + title: String! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +"""An auto-generated type for paginating through multiple Menus.""" +type MenuConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MenuEdge!]! + + """ + A list of nodes that are contained in MenuEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Menu!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `menuCreate` mutation.""" +type MenuCreatePayload { + """The created menu.""" + menu: Menu + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MenuCreateUserError!]! +} + +"""An error that occurs during the execution of `MenuCreate`.""" +type MenuCreateUserError implements DisplayableError { + """The error code.""" + code: MenuCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MenuCreateUserError`.""" +enum MenuCreateUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The menu cannot be nested more than 3 level deep.""" + NESTING_TOO_DEEP +} + +"""Return type for `menuDelete` mutation.""" +type MenuDeletePayload { + """The ID of the deleted menu.""" + deletedMenuId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MenuDeleteUserError!]! +} + +"""An error that occurs during the execution of `MenuDelete`.""" +type MenuDeleteUserError implements DisplayableError { + """The error code.""" + code: MenuDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MenuDeleteUserError`.""" +enum MenuDeleteUserErrorCode { + """Menu does not exist.""" + MENU_DOES_NOT_EXIST + + """Default menu cannot be deleted.""" + UNABLE_TO_DELETE_DEFAULT_MENU +} + +""" +An auto-generated type which holds one Menu and a cursor during pagination. +""" +type MenuEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MenuEdge.""" + node: Menu! +} + +"""A menu item for display on the storefront.""" +type MenuItem { + """A globally-unique ID of the navigation menu item.""" + id: ID! + + """List of the menu items nested under this item sorted by position.""" + items: [MenuItem!]! + + """The ID of the resource to link to.""" + resourceId: ID + + """The menu item's tags to filter a collection.""" + tags: [String!]! + + """The menu item's title.""" + title: String! + + """The menu item's type.""" + type: MenuItemType! + + """The menu item's url.""" + url: String +} + +"""The input fields required to create a valid menu item.""" +input MenuItemCreateInput { + """The menu item's title.""" + title: String! + + """The menu item's type.""" + type: MenuItemType! + + """The menu item's association with an existing resource.""" + resourceId: ID + + """ + The menu item's url to be used when the item doesn't point to a resource. + """ + url: String + + """The menu item's tags to filter a collection.""" + tags: [String!] + + """List of the menu items nested under this item sorted by position.""" + items: [MenuItemCreateInput!] +} + +"""A menu item type.""" +enum MenuItemType { + """The frontpage menu item type.""" + FRONTPAGE + + """The collection menu item type.""" + COLLECTION + + """The collections menu item type.""" + COLLECTIONS + + """The product menu item type.""" + PRODUCT + + """The catalog menu item type.""" + CATALOG + + """The page menu item type.""" + PAGE + + """The blog menu item type.""" + BLOG + + """The article menu item type.""" + ARTICLE + + """The search menu item type.""" + SEARCH + + """The shop_policy menu item type.""" + SHOP_POLICY + + """The http menu item type.""" + HTTP + + """The metaobject menu item type.""" + METAOBJECT + + """The customer_account_page menu item type.""" + CUSTOMER_ACCOUNT_PAGE +} + +"""The input fields required to update a valid menu item.""" +input MenuItemUpdateInput { + """The menu item's title.""" + title: String! + + """The menu item's type.""" + type: MenuItemType! + + """The menu item's association with an existing resource.""" + resourceId: ID + + """ + The menu item's url to be used when the item doesn't point to a resource. + """ + url: String + + """The menu item's tags to filter a collection.""" + tags: [String!] + + """A globally-unique ID of the online store navigation menu item.""" + id: ID + + """List of the menu items nested under this item sorted by position.""" + items: [MenuItemUpdateInput!] +} + +"""The set of valid sort keys for the Menu query.""" +enum MenuSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""Return type for `menuUpdate` mutation.""" +type MenuUpdatePayload { + """The updated menu.""" + menu: Menu + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MenuUpdateUserError!]! +} + +"""An error that occurs during the execution of `MenuUpdate`.""" +type MenuUpdateUserError implements DisplayableError { + """The error code.""" + code: MenuUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MenuUpdateUserError`.""" +enum MenuUpdateUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The menu cannot be nested more than 3 level deep.""" + NESTING_TOO_DEEP +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum MerchandiseDiscountClass { + """ + The discount is combined with a + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT + + """ + The discount is combined with an + [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + ORDER +} + +""" +Merchant approval for accelerated onboarding to channel integration apps. +""" +type MerchantApprovalSignals { + """ + Whether the shop's Shopify Payments account identity is verified. Returns + `false` if the identity is unverified or if the shop doesn't have a Shopify + Payments account. + """ + identityVerified: Boolean! + + """ + Whether Shopify has pre-verified the merchant's business for onboarding to + channel integration apps. Returns `false` if the shop isn't marked for verification. + """ + verifiedByShopify: Boolean! + + """ + Which tier of the Shopify verification was determined for the merchant's + business for onboarding to channel integration apps. + """ + verifiedByShopifyTier: String! +} + +""" +Metafields enable you to attach additional information to a Shopify resource, such +as a [Product](https://shopify.dev/api/admin-graphql/latest/objects/product) or +a [Collection](https://shopify.dev/api/admin-graphql/latest/objects/collection). +For more information about where you can attach metafields refer to [HasMetafields](https://shopify.dev/api/admin-graphql/latest/interfaces/HasMetafields). +Some examples of the data that metafields enable you to store are +specifications, size charts, downloadable documents, release dates, images, or part numbers. +Metafields are identified by an owner resource, namespace, and key. and store a +value along with type information for that value. +""" +type Metafield implements HasCompareDigest & LegacyInteroperability & Node { + """The data stored in the resource, represented as a digest.""" + compareDigest: String! + + """The date and time when the metafield was created.""" + createdAt: DateTime! + + """The metafield definition that the metafield belongs to, if any.""" + definition: MetafieldDefinition + + """The description of the metafield.""" + description: String @deprecated(reason: "This field will be removed in a future release. Use the `description` on the metafield definition instead.\n") + + """A globally-unique ID.""" + id: ID! + + """The data stored in the metafield in JSON format.""" + jsonValue: JSON! + + """The unique identifier for the metafield within its namespace.""" + key: String! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """ + The container for a group of metafields that the metafield is associated with. + """ + namespace: String! + + """The resource that the metafield is attached to.""" + owner: HasMetafields! + + """The type of resource that the metafield is attached to.""" + ownerType: MetafieldOwnerType! + + """ + Returns a reference object if the metafield definition's type is a resource reference. + """ + reference: MetafieldReference + + """ + A list of reference objects if the metafield's type is a resource reference list. + """ + references( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): MetafieldReferenceConnection + + """ + The type of data that 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 access permitted on the Storefront API.""" + storefront: MetafieldStorefrontAccess +} + +""" +The input fields that set access permissions for the definition's metafields. +""" +input MetafieldAccessInput { + """The access permitted on the Admin API.""" + admin: MetafieldAdminAccessInput + + """The access permitted on the Storefront API.""" + storefront: MetafieldStorefrontAccessInput + + """The access permitted on the Customer Account API.""" + customerAccount: MetafieldCustomerAccountAccessInput +} + +""" +The input fields for the access settings for the metafields under the definition. +""" +input MetafieldAccessUpdateInput { + """ + The admin access setting to use for the metafields under this definition. + """ + admin: MetafieldAdminAccessInput + + """ + The storefront access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput +} + +"""Metafield access permissions for the Admin API.""" +enum MetafieldAdminAccess { + """The merchant and other apps have no access.""" + PRIVATE + + """The merchant and other apps have read-only access.""" + PUBLIC_READ + + """The merchant and other apps have read and write access.""" + PUBLIC_READ_WRITE + + """The merchant has read-only access. No other apps have access.""" + MERCHANT_READ + + """The merchant has read and write access. No other apps have access.""" + MERCHANT_READ_WRITE +} + +"""Metafield access permissions for the Admin API.""" +enum MetafieldAdminAccessInput { + """The merchant has read-only access. No other apps have access.""" + MERCHANT_READ + + """The merchant has read and write access. No other apps have access.""" + MERCHANT_READ_WRITE +} + +"""Provides the capabilities of a metafield definition.""" +type MetafieldCapabilities { + """Indicate whether a metafield definition is configured for filtering.""" + adminFilterable: MetafieldCapabilityAdminFilterable! + + """ + Indicate whether a metafield definition can be used as a smart collection condition. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionCondition! + + """ + Indicate whether the metafield values for a metafield definition are required to be unique. + """ + uniqueValues: MetafieldCapabilityUniqueValues! +} + +""" +Information about the admin filterable capability on a metafield definition. +""" +type MetafieldCapabilityAdminFilterable { + """Indicates if the definition is eligible to have the capability.""" + eligible: Boolean! + + """Indicates if the capability is enabled.""" + enabled: Boolean! + + """ + Determines the metafield definition's filter status for use in admin filtering. + """ + status: MetafieldDefinitionAdminFilterStatus! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetafieldCapabilityAdminFilterableInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +"""The input fields for creating a metafield capability.""" +input MetafieldCapabilityCreateInput { + """The input for updating the smart collection condition capability.""" + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """The input for updating the admin filterable capability.""" + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """The input for updating the unique values capability.""" + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +""" +Information about the smart collection condition capability on a metafield definition. +""" +type MetafieldCapabilitySmartCollectionCondition { + """Indicates if the definition is eligible to have the capability.""" + eligible: Boolean! + + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the smart collection condition capability. +""" +input MetafieldCapabilitySmartCollectionConditionInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +""" +Information about the unique values capability on a metafield definition. +""" +type MetafieldCapabilityUniqueValues { + """Indicates if the definition is eligible to have the capability.""" + eligible: Boolean! + + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the unique values capability. +""" +input MetafieldCapabilityUniqueValuesInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +"""The input fields for updating a metafield capability.""" +input MetafieldCapabilityUpdateInput { + """The input for updating the smart collection condition capability.""" + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """The input for updating the admin filterable capability.""" + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """The input for updating the unique values capability.""" + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +"""An auto-generated type for paginating through multiple Metafields.""" +type MetafieldConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldEdge!]! + + """ + A list of nodes that are contained in MetafieldEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Metafield!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Metafield access permissions for the Customer Account API.""" +enum MetafieldCustomerAccountAccess { + """Read and write access.""" + READ_WRITE + + """Read-only access.""" + READ + + """No access.""" + NONE +} + +"""Metafield access permissions for the Customer Account API.""" +enum MetafieldCustomerAccountAccessInput { + """Read and write access.""" + READ_WRITE + + """Read-only access.""" + READ + + """No access.""" + NONE +} + +""" +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 capabilities of the metafield definition.""" + capabilities: MetafieldCapabilities! + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what subtypes of resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraints + + """The description of the metafield definition.""" + description: String + + """A globally-unique ID.""" + id: ID! + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """The metafields that belong to the metafield definition.""" + metafields( + """Returns the metafields filtered by the validation status.""" + validationStatus: MetafieldValidationStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The count of the metafields that belong to the metafield definition.""" + metafieldsCount( + """The current validation status.""" + validationStatus: MetafieldValidationStatus + ): Int! + + """The human-readable name of the metafield definition.""" + name: String! + + """ + The container for a group of metafields that the metafield definition is associated with. + """ + namespace: String! + + """The resource type that the metafield definition is attached to.""" + ownerType: MetafieldOwnerType! + + """The position of the metafield definition in the pinned list.""" + pinnedPosition: Int + + """ + The standard metafield definition template associated with the metafield definition. + """ + standardTemplate: StandardMetafieldDefinitionTemplate + + """ + The type of data that each of the metafields that belong to the metafield definition will store. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: MetafieldDefinitionType! + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean! + + """ + The validation status for the metafields that belong to the metafield definition. + """ + validationStatus: MetafieldDefinitionValidationStatus! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidation!]! +} + +""" +Possible filter statuses associated with a metafield definition for use in admin filtering. +""" +enum MetafieldDefinitionAdminFilterStatus { + """The metafield definition cannot be used for admin filtering.""" + NOT_FILTERABLE + + """ + The metafield definition's metafields are currently being processed for admin filtering. + """ + IN_PROGRESS + + """ + The metafield definition allows admin filtering by matching metafield values. + """ + FILTERABLE + + """The metafield definition has failed to be enabled for admin filtering.""" + FAILED +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitions. +""" +type MetafieldDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldDefinitionEdge!]! + + """ + A list of nodes that are contained in MetafieldDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) +that determine what subtypes of resources a metafield definition applies to. +""" +type MetafieldDefinitionConstraints { + """The category of resource subtypes that the definition applies to.""" + key: String + + """The specific constraint subtype values that the definition applies to.""" + values( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldDefinitionConstraintValueConnection! +} + +""" +The input fields required to create metafield definition [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions). +Each constraint applies a metafield definition to a subtype of a resource. +""" +input MetafieldDefinitionConstraintsInput { + """The category of resource subtypes that the definition applies to.""" + key: String! + + """The specific constraint subtype values that the definition applies to.""" + values: [String!]! +} + +""" +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! +} + +""" +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!] +} + +"""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 +} + +"""Return type for `metafieldDefinitionCreate` mutation.""" +type MetafieldDefinitionCreatePayload { + """The metafield definition that was created.""" + createdDefinition: MetafieldDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldDefinitionCreateUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionCreate`. +""" +type MetafieldDefinitionCreateUserError implements DisplayableError { + """The error code.""" + code: MetafieldDefinitionCreateUserErrorCode + + """The index of the array element that's causing the error.""" + elementIndex: Int + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionCreateUserError`. +""" +enum MetafieldDefinitionCreateUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value isn't included in the list.""" + INCLUSION + + """The input value needs to be blank.""" + PRESENT + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is blank.""" + BLANK + + """A capability is required for the definition type but is disabled.""" + CAPABILITY_REQUIRED_BUT_DISABLED + + """The definition limit per owner type has exceeded.""" + RESOURCE_TYPE_LIMIT_EXCEEDED + + """The definition limit per owner type for the app has exceeded.""" + RESOURCE_TYPE_LIMIT_EXCEEDED_BY_APP + + """The maximum limit of definitions per owner type has exceeded.""" + LIMIT_EXCEEDED + + """An invalid option.""" + INVALID_OPTION + + """A duplicate option.""" + DUPLICATE_OPTION + + """ + This namespace and key combination is reserved for standard definitions. + """ + RESERVED_NAMESPACE_KEY + + """The pinned limit has been reached for the owner type.""" + PINNED_LIMIT_REACHED + + """ + This namespace and key combination is already in use for a set of your metafields. + """ + UNSTRUCTURED_ALREADY_EXISTS + + """The metafield definition does not support pinning.""" + UNSUPPORTED_PINNING + + """A field contains an invalid character.""" + INVALID_CHARACTER + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + You have reached the maximum allowed definitions for automated collections. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_AUTOMATED_COLLECTIONS + + """The metafield definition constraints are invalid.""" + INVALID_CONSTRAINTS + + """The input combination is invalid.""" + INVALID_INPUT_COMBINATION + + """The metafield definition capability is invalid.""" + INVALID_CAPABILITY + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED +} + +"""Return type for `metafieldDefinitionDelete` mutation.""" +type MetafieldDefinitionDeletePayload { + """The metafield definition that was deleted.""" + deletedDefinition: MetafieldDefinitionIdentifier + + """The ID of the deleted metafield definition.""" + deletedDefinitionId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldDefinitionDeleteUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionDelete`. +""" +type MetafieldDefinitionDeleteUserError implements DisplayableError { + """The error code.""" + code: MetafieldDefinitionDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionDeleteUserError`. +""" +enum MetafieldDefinitionDeleteUserErrorCode { + """The input value needs to be blank.""" + PRESENT + + """Definition not found.""" + NOT_FOUND + + """An internal error occurred.""" + INTERNAL_ERROR + + """ + Deleting an id type metafield definition requires deletion of its associated metafields. + """ + ID_TYPE_DELETION_ERROR + + """ + Deleting a reference type metafield definition requires deletion of its associated metafields. + """ + REFERENCE_TYPE_DELETION_ERROR + + """ + Deleting a definition in a reserved namespace requires deletion of its associated metafields. + """ + RESERVED_NAMESPACE_ORPHANED_METAFIELDS + + """Action cannot proceed. Definition is currently in use.""" + METAFIELD_DEFINITION_IN_USE + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """Definition is required by an installed app and cannot be deleted.""" + STANDARD_METAFIELD_DEFINITION_DEPENDENT_ON_APP + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE +} + +""" +An auto-generated type which holds one MetafieldDefinition and a cursor during pagination. +""" +type MetafieldDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetafieldDefinitionEdge.""" + node: MetafieldDefinition! +} + +""" +Identifies a metafield definition by its owner type, namespace, and key. +""" +type MetafieldDefinitionIdentifier { + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + The container for a group of metafields that the metafield definition is associated with. + """ + namespace: String! + + """The resource type that the metafield definition is attached to.""" + ownerType: MetafieldOwnerType! +} + +"""The input fields that identify metafield definitions.""" +input MetafieldDefinitionIdentifierInput { + """The resource type that the metafield definition is attached to.""" + ownerType: MetafieldOwnerType! + + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! +} + +"""The input fields required to create a metafield definition.""" +input MetafieldDefinitionInput { + """ + The container for a group of metafields that the metafield definition will be associated with. If omitted, the + app-reserved namespace will be used. + + Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. + + Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """The human-readable name for the metafield definition.""" + name: String! + + """The description for the metafield definition.""" + description: String + + """The resource type that the metafield definition is attached to.""" + ownerType: MetafieldOwnerType! + + """ + The type of data that each of the metafields that belong to the metafield definition will store. + Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + type: String! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) + the metafield definition. + """ + pin: Boolean = false + + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessInput + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what resources a metafield definition applies to. + """ + constraints: MetafieldDefinitionConstraintsInput + + """The capabilities of the metafield definition.""" + capabilities: MetafieldCapabilityCreateInput +} + +"""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 +} + +"""Return type for `metafieldDefinitionPin` mutation.""" +type MetafieldDefinitionPinPayload { + """The metafield definition that was pinned.""" + pinnedDefinition: MetafieldDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldDefinitionPinUserError!]! +} + +"""An error that occurs during the execution of `MetafieldDefinitionPin`.""" +type MetafieldDefinitionPinUserError implements DisplayableError { + """The error code.""" + code: MetafieldDefinitionPinUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionPinUserError`. +""" +enum MetafieldDefinitionPinUserErrorCode { + """The metafield definition was not found.""" + NOT_FOUND + + """The pinned limit has been reached for owner type.""" + PINNED_LIMIT_REACHED + + """The metafield definition is already pinned.""" + ALREADY_PINNED + + """An internal error occurred.""" + INTERNAL_ERROR + + """The metafield definition does not support pinning.""" + UNSUPPORTED_PINNING + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE +} + +"""The set of valid sort keys for the MetafieldDefinition query.""" +enum MetafieldDefinitionSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `name` value.""" + NAME + + """Sort by the `pinned_position` value.""" + PINNED_POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +""" +The type and name for the optional validation configuration of a metafield. + +For example, a supported validation might consist of a `max` name and a `number_integer` type. +This validation can then be used to enforce a maximum character length for a `single_line_text_field` metafield. +""" +type MetafieldDefinitionSupportedValidation { + """The name of the metafield definition validation.""" + name: String! + + """The type of input for the validation.""" + type: String! +} + +""" +A metafield definition type provides basic foundation and validation for a metafield. +""" +type MetafieldDefinitionType { + """The category associated with the metafield definition type.""" + category: String! + + """ + The name of the type for the metafield definition. + See the list of [supported types](https://shopify.dev/apps/metafields/types). + """ + name: String! + + """The supported validations for a metafield definition type.""" + supportedValidations: [MetafieldDefinitionSupportedValidation!]! + + """ + Whether metafields without a definition can be migrated to a definition of this type. + """ + supportsDefinitionMigrations: Boolean! + + """The value type for a metafield created with this definition type.""" + valueType: MetafieldValueType! @deprecated(reason: "`valueType` is deprecated and `name` should be used for type information.") +} + +"""Return type for `metafieldDefinitionUnpin` mutation.""" +type MetafieldDefinitionUnpinPayload { + """The metafield definition that was unpinned.""" + unpinnedDefinition: MetafieldDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldDefinitionUnpinUserError!]! +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUnpin`. +""" +type MetafieldDefinitionUnpinUserError implements DisplayableError { + """The error code.""" + code: MetafieldDefinitionUnpinUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUnpinUserError`. +""" +enum MetafieldDefinitionUnpinUserErrorCode { + """The metafield definition was not found.""" + NOT_FOUND + + """The metafield definition isn't pinned.""" + NOT_PINNED + + """An internal error occurred.""" + INTERNAL_ERROR + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE +} + +"""The input fields required to update a metafield definition.""" +input MetafieldDefinitionUpdateInput { + """ + The container for a group of metafields that the metafield definition is associated with. Used to help identify + the metafield definition, but cannot be updated itself. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + The unique identifier for the metafield definition within its namespace. Used to help identify the metafield + definition, but can't be updated itself. + """ + key: String! + + """The human-readable name for the metafield definition.""" + name: String + + """The description for the metafield definition.""" + description: String + + """ + The resource type that the metafield definition is attached to. Used to help identify the metafield definition, + but can't be updated itself. + """ + ownerType: MetafieldOwnerType! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the metafields that belong to the metafield definition. For example, for a metafield definition with the + type `date`, you can set a minimum date validation so that each of the metafields that belong to it can only + store dates after the specified minimum. + """ + validations: [MetafieldDefinitionValidationInput!] + + """Whether to pin the metafield definition.""" + pin: Boolean + + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessUpdateInput + + """ + The [constraints](https://shopify.dev/apps/build/custom-data/metafields/conditional-metafield-definitions) + that determine what resources a metafield definition applies to. + """ + constraintsUpdates: MetafieldDefinitionConstraintsUpdatesInput + + """The capabilities of the metafield definition.""" + capabilities: MetafieldCapabilityUpdateInput +} + +"""Return type for `metafieldDefinitionUpdate` mutation.""" +type MetafieldDefinitionUpdatePayload { + """The metafield definition that was updated.""" + updatedDefinition: MetafieldDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldDefinitionUpdateUserError!]! + + """ + The asynchronous job updating the metafield definition's validation_status. + """ + validationJob: Job +} + +""" +An error that occurs during the execution of `MetafieldDefinitionUpdate`. +""" +type MetafieldDefinitionUpdateUserError implements DisplayableError { + """The error code.""" + code: MetafieldDefinitionUpdateUserErrorCode + + """The index of the array element that's causing the error.""" + elementIndex: Int + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `MetafieldDefinitionUpdateUserError`. +""" +enum MetafieldDefinitionUpdateUserErrorCode { + """The input value needs to be blank.""" + PRESENT + + """The input value is too long.""" + TOO_LONG + + """The input value is blank.""" + BLANK + + """The input value is invalid.""" + INVALID + + """The metafield definition wasn't found.""" + NOT_FOUND + + """An invalid input.""" + INVALID_INPUT + + """A capability is required for the definition type but is disabled.""" + CAPABILITY_REQUIRED_BUT_DISABLED + + """The pinned limit has been reached for the owner type.""" + PINNED_LIMIT_REACHED + + """An internal error occurred.""" + INTERNAL_ERROR + + """The metafield definition does not support pinning.""" + UNSUPPORTED_PINNING + + """An invalid option.""" + INVALID_OPTION + + """A duplicate option.""" + DUPLICATE_OPTION + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """Action cannot proceed. Definition is currently in use.""" + METAFIELD_DEFINITION_IN_USE + + """ + You have reached the maximum allowed definitions for automated collections. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_AUTOMATED_COLLECTIONS + + """ + You cannot change the metaobject definition pointed to by a metaobject reference metafield definition. + """ + METAOBJECT_DEFINITION_CHANGED + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE + + """The input combination is invalid.""" + INVALID_INPUT_COMBINATION + + """The metafield definition constraints are invalid.""" + INVALID_CONSTRAINTS + + """The metafield definition capability is invalid.""" + INVALID_CAPABILITY + + """The metafield definition capability cannot be disabled.""" + CAPABILITY_CANNOT_BE_DISABLED + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED +} + +""" +A configured metafield definition validation. + +For example, for a metafield definition of `number_integer` type, you can set a validation with the name `max` +and a value of `15`. This validation will ensure that the value of the metafield is a number less than or equal to 15. + +Refer to the [list of supported validations](https://shopify.dev/api/admin/graphql/reference/common-objects/metafieldDefinitionTypes#examples-Fetch_all_metafield_definition_types). +""" +type MetafieldDefinitionValidation { + """The validation name.""" + name: String! + + """The name for the metafield type of this validation.""" + type: String! + + """The validation value.""" + value: String +} + +""" +The name and value for a metafield definition validation. + +For example, for a metafield definition of `single_line_text_field` type, you +can set a validation with the name `min` and a value of `10`. +This validation will ensure that the value of the metafield is at least 10 characters. + +Refer to the [list of supported validations](https://shopify.dev/apps/build/custom-data/metafields/list-of-validation-options). +""" +input MetafieldDefinitionValidationInput { + """The name for the metafield definition validation.""" + name: String! + + """The value for the metafield definition validation.""" + value: String! +} + +"""Possible metafield definition validation statuses.""" +enum MetafieldDefinitionValidationStatus { + """All of this definition's metafields are valid.""" + ALL_VALID + + """ + Asynchronous validation of this definition's metafields is in progress. + """ + IN_PROGRESS + + """Some of this definition's metafields are invalid.""" + SOME_INVALID +} + +""" +An auto-generated type which holds one Metafield and a cursor during pagination. +""" +type MetafieldEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetafieldEdge.""" + node: Metafield! +} + +"""Identifies a metafield by its owner resource, namespace, and key.""" +type MetafieldIdentifier { + """The key of the metafield.""" + key: String! + + """The namespace of the metafield.""" + namespace: String! + + """GID of the owner resource that the metafield belongs to.""" + ownerId: ID! +} + +"""The input fields that identify metafields.""" +input MetafieldIdentifierInput { + """The unique ID of the resource that the metafield is attached to.""" + ownerId: ID! + + """The namespace of the metafield.""" + namespace: String! + + """The key of the metafield.""" + key: String! +} + +""" +The input fields to use to create or update a metafield through a mutation on the owning resource. +An alternative way to create or update a metafield is by using the +[metafieldsSet](https://shopify.dev/api/admin-graphql/latest/mutations/metafieldsSet) mutation. +""" +input MetafieldInput { + """ + The unique ID of the metafield. Using `owner_id`, `namespace`, and `key` is preferred for creating and updating. + """ + id: ID + + """ + The container for a group of metafields that the metafield is or will be associated with. Used in tandem with + `key` to lookup a metafield on a resource, preventing conflicts with other metafields with the same `key`. + + Required when creating a metafield, but optional when updating. Used to help identify the metafield when + updating, but can't be updated itself. + + Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for a metafield within its namespace. + + Required when creating a metafield, but optional when updating. Used to help identify the metafield when + updating, but can't be updated itself. + + Must be 2-64 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + key: String + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String + + """ + The type of data that 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 +} + +"""Possible types of a metafield's owner resource.""" +enum MetafieldOwnerType { + """The Api Permission metafield owner type.""" + API_PERMISSION + + """The Company metafield owner type.""" + COMPANY + + """The Company Location metafield owner type.""" + COMPANY_LOCATION + + """The Payment Customization metafield owner type.""" + PAYMENT_CUSTOMIZATION + + """The Validation metafield owner type.""" + VALIDATION + + """The Customer metafield owner type.""" + CUSTOMER + + """The Delivery Customization metafield owner type.""" + DELIVERY_CUSTOMIZATION + + """The draft order metafield owner type.""" + DRAFTORDER + + """The GiftCardTransaction metafield owner type.""" + GIFT_CARD_TRANSACTION + + """The Market metafield owner type.""" + MARKET + + """The Cart Transform metafield owner type.""" + CARTTRANSFORM + + """The Collection metafield owner type.""" + COLLECTION + + """The Media Image metafield owner type.""" + MEDIA_IMAGE @deprecated(reason: "`MEDIA_IMAGE` is deprecated.") + + """The Product metafield owner type.""" + PRODUCT + + """The Product Variant metafield owner type.""" + PRODUCTVARIANT + + """The Selling Plan metafield owner type.""" + SELLING_PLAN + + """The Article metafield owner type.""" + ARTICLE + + """The Blog metafield owner type.""" + BLOG + + """The Page metafield owner type.""" + PAGE + + """The Fulfillment Constraint Rule metafield owner type.""" + FULFILLMENT_CONSTRAINT_RULE + + """The Order Routing Location Rule metafield owner type.""" + ORDER_ROUTING_LOCATION_RULE + + """The Discount metafield owner type.""" + DISCOUNT + + """The Order metafield owner type.""" + ORDER + + """The Location metafield owner type.""" + LOCATION + + """The Shop metafield owner type.""" + SHOP +} + +"""The resource referenced by the metafield value.""" +union MetafieldReference = Article | Collection | Company | Customer | GenericFile | MediaImage | Metaobject | Model3d | Order | Page | Product | ProductVariant | TaxonomyValue | Video + +""" +An auto-generated type for paginating through multiple MetafieldReferences. +""" +type MetafieldReferenceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldReferenceEdge!]! + + """ + A list of nodes that are contained in MetafieldReferenceEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldReference]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldReference and a cursor during pagination. +""" +type MetafieldReferenceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetafieldReferenceEdge.""" + node: MetafieldReference +} + +""" +Types of resources that may use metafields to reference other resources. +""" +union MetafieldReferencer = AppInstallation | Article | Blog | Collection | Company | CompanyLocation | Customer | DeliveryCustomization | DiscountAutomaticNode | DiscountCodeNode | DiscountNode | DraftOrder | FulfillmentOrder | Location | Market | Metaobject | Order | Page | PaymentCustomization | Product | ProductVariant | Shop + +""" +Defines a relation between two resources via a reference metafield. +The referencer owns the joining field with a given namespace and key, +while the target is referenced by the field. +""" +type MetafieldRelation { + """The key of the field making the reference.""" + key: String! + + """The name of the field making the reference.""" + name: String! + + """ + The namespace of the metafield making the reference, or type of the metaobject. + """ + namespace: String! + + """The resource making the reference.""" + referencer: MetafieldReferencer! + + """The referenced resource.""" + target: MetafieldReference! @deprecated(reason: "No longer supported. Access the object directly instead.") +} + +""" +An auto-generated type for paginating through multiple MetafieldRelations. +""" +type MetafieldRelationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetafieldRelationEdge!]! + + """ + A list of nodes that are contained in MetafieldRelationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetafieldRelation!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MetafieldRelation and a cursor during pagination. +""" +type MetafieldRelationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetafieldRelationEdge.""" + node: MetafieldRelation! +} + +"""Return type for `metafieldsDelete` mutation.""" +type MetafieldsDeletePayload { + """ + List of metafield identifiers that were deleted, null if the corresponding metafield isn't found. + """ + deletedMetafields: [MetafieldIdentifier] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for a metafield value to set.""" +input MetafieldsSetInput { + """The unique ID of the resource that the metafield is attached to.""" + ownerId: ID! + + """ + The container for a group of metafields that the metafield is or will be associated with. Used in tandem + with `key` to lookup a metafield on a resource, preventing conflicts with other metafields with the + same `key`. If omitted the app-reserved namespace will be used. + + Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + namespace: String + + """ + The unique identifier for a metafield within its namespace. + + Must be 2-64 characters long and can contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! + + """ + The `compareDigest` value obtained from a previous query. Provide this with + updates to ensure the metafield is modified safely. + """ + compareDigest: String + + """ + The type of data that 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 +} + +"""Return type for `metafieldsSet` mutation.""" +type MetafieldsSetPayload { + """The list of metafields that were set.""" + metafields: [Metafield!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetafieldsSetUserError!]! +} + +"""An error that occurs during the execution of `MetafieldsSet`.""" +type MetafieldsSetUserError implements DisplayableError { + """The error code.""" + code: MetafieldsSetUserErrorCode + + """The index of the array element that's causing the error.""" + elementIndex: Int + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MetafieldsSetUserError`.""" +enum MetafieldsSetUserErrorCode { + """The metafield violates a capability restriction.""" + CAPABILITY_VIOLATION + + """The metafield has been modified since it was loaded.""" + STALE_OBJECT + + """The compareDigest is invalid.""" + INVALID_COMPARE_DIGEST + + """The type is invalid.""" + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is already taken.""" + TAKEN + + """The input value needs to be blank.""" + PRESENT + + """The input value is blank.""" + BLANK + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """The input value is invalid.""" + INVALID + + """An internal error occurred.""" + INTERNAL_ERROR +} + +"""Metafield access permissions for the Storefront API.""" +enum MetafieldStorefrontAccess { + """Read-only access.""" + PUBLIC_READ + + """No access.""" + NONE +} + +"""Metafield access permissions for the Storefront API.""" +enum MetafieldStorefrontAccessInput { + """Read-only access.""" + PUBLIC_READ + + """No access.""" + NONE +} + +"""Possible metafield validation statuses.""" +enum MetafieldValidationStatus { + """Any validation status (valid or invalid).""" + ANY + + """Valid (according to definition).""" + VALID + + """Invalid (according to definition).""" + INVALID +} + +""" +Legacy type information for the stored value. +Replaced by `type`. +""" +enum MetafieldValueType { + """A text field.""" + STRING + + """A whole number.""" + INTEGER + + """A JSON string.""" + JSON_STRING + + """A `true` or `false` value.""" + BOOLEAN +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldRelationConnection! + + """The staff member who created the metaobject.""" + staffMember: StaffMember @deprecated(reason: "Use `createdByStaff` instead.") + + """ + The recommended field to visually represent this metaobject. May be a file reference or color field. + """ + thumbnailField: MetaobjectField + + """The type of the metaobject.""" + type: String! + + """When the object was last updated.""" + updatedAt: DateTime! +} + +"""Access permissions for the definition's metaobjects.""" +type MetaobjectAccess { + """The access permitted on the Admin API.""" + admin: MetaobjectAdminAccess! + + """The access permitted on the Storefront API.""" + storefront: MetaobjectStorefrontAccess! +} + +""" +The input fields that set access permissions for the definition's metaobjects. +""" +input MetaobjectAccessInput { + """The access permitted on the Admin API.""" + admin: MetaobjectAdminAccessInput + + """The access permitted on the Storefront API.""" + storefront: MetaobjectStorefrontAccess +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccess { + """The merchant and other apps have no access.""" + PRIVATE + + """The merchant has read-only access. No other apps have access.""" + MERCHANT_READ + + """The merchant has read and write access. No other apps have access.""" + MERCHANT_READ_WRITE + + """The merchant and other apps have read-only access.""" + PUBLIC_READ + + """The merchant and other apps have read and write access.""" + PUBLIC_READ_WRITE +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccessInput { + """The merchant has read-only access. No other apps have access.""" + MERCHANT_READ + + """The merchant has read and write access. No other apps have access.""" + MERCHANT_READ_WRITE +} + +"""Return type for `metaobjectBulkDelete` mutation.""" +type MetaobjectBulkDeletePayload { + """The asynchronous job that deletes the metaobjects.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +""" +Specifies the condition by which metaobjects are deleted. +Exactly one field of input is required. +""" +input MetaobjectBulkDeleteWhereCondition { + """Deletes all metaobjects with the specified `type`.""" + type: String + + """A list of metaobjects IDs to delete.""" + ids: [ID!] +} + +"""Provides the capabilities of a metaobject definition.""" +type MetaobjectCapabilities { + """ + Indicates whether a metaobject definition can be displayed as a page on the Online Store. + """ + onlineStore: MetaobjectCapabilitiesOnlineStore + + """Indicate whether a metaobject definition is publishable.""" + publishable: MetaobjectCapabilitiesPublishable! + + """ + Indicate whether a metaobject definition is renderable and exposes SEO data. + """ + renderable: MetaobjectCapabilitiesRenderable + + """Indicate whether a metaobject definition is translatable.""" + translatable: MetaobjectCapabilitiesTranslatable! +} + +"""The Online Store capability of a metaobject definition.""" +type MetaobjectCapabilitiesOnlineStore { + """The data associated with the Online Store capability.""" + data: MetaobjectCapabilityDefinitionDataOnlineStore + + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +"""The publishable capability of a metaobject definition.""" +type MetaobjectCapabilitiesPublishable { + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +"""The renderable capability of a metaobject definition.""" +type MetaobjectCapabilitiesRenderable { + """The data associated with the renderable capability.""" + data: MetaobjectCapabilityDefinitionDataRenderable + + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +"""The translatable capability of a metaobject definition.""" +type MetaobjectCapabilitiesTranslatable { + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +"""The input fields for creating a metaobject capability.""" +input MetaobjectCapabilityCreateInput { + """The input for enabling the publishable capability.""" + publishable: MetaobjectCapabilityPublishableInput + + """The input for enabling the translatable capability.""" + translatable: MetaobjectCapabilityTranslatableInput + + """The input for enabling the renderable capability.""" + renderable: MetaobjectCapabilityRenderableInput + + """The input for enabling the Online Store capability.""" + onlineStore: MetaobjectCapabilityOnlineStoreInput +} + +"""Provides the capabilities of a metaobject.""" +type MetaobjectCapabilityData { + """The Online Store capability for this metaobject.""" + onlineStore: MetaobjectCapabilityDataOnlineStore + + """The publishable capability for this metaobject.""" + publishable: MetaobjectCapabilityDataPublishable +} + +"""The input fields for metaobject capabilities.""" +input MetaobjectCapabilityDataInput { + """Publishable capability input.""" + publishable: MetaobjectCapabilityDataPublishableInput + + """Online Store capability input.""" + onlineStore: MetaobjectCapabilityDataOnlineStoreInput +} + +"""The Online Store capability for the parent metaobject.""" +type MetaobjectCapabilityDataOnlineStore { + """The theme template used when viewing the metaobject in a store.""" + templateSuffix: String +} + +""" +The input fields for the Online Store capability to control renderability on the Online Store. +""" +input MetaobjectCapabilityDataOnlineStoreInput { + """The theme template used when viewing the metaobject in a store.""" + templateSuffix: String +} + +"""The publishable capability for the parent metaobject.""" +type MetaobjectCapabilityDataPublishable { + """The visibility status of this metaobject across all channels.""" + status: MetaobjectStatus! +} + +""" +The input fields for publishable capability to adjust visibility on channels. +""" +input MetaobjectCapabilityDataPublishableInput { + """The visibility status of this metaobject across all channels.""" + status: MetaobjectStatus! +} + +"""The Online Store capability data for the metaobject definition.""" +type MetaobjectCapabilityDefinitionDataOnlineStore { + """ + Flag indicating if a sufficient number of redirects are available to redirect all published entries. + """ + canCreateRedirects: Boolean! + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! +} + +"""The input fields of the Online Store capability.""" +input MetaobjectCapabilityDefinitionDataOnlineStoreInput { + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! + + """ + Whether to redirect published metaobjects automatically when the URL handle changes. + """ + createRedirects: Boolean = false +} + +"""The renderable capability data for the metaobject definition.""" +type MetaobjectCapabilityDefinitionDataRenderable { + """The metaobject field used as an alias for the SEO page description.""" + metaDescriptionKey: String + + """The metaobject field used as an alias for the SEO page title.""" + metaTitleKey: String +} + +"""The input fields of the renderable capability for SEO aliases.""" +input MetaobjectCapabilityDefinitionDataRenderableInput { + """The metaobject field used as an alias for the SEO page title.""" + metaTitleKey: String + + """The metaobject field used as an alias for the SEO page description.""" + metaDescriptionKey: String +} + +""" +The input fields for enabling and disabling the Online Store capability. +""" +input MetaobjectCapabilityOnlineStoreInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! + + """The data associated with the Online Store capability.""" + data: MetaobjectCapabilityDefinitionDataOnlineStoreInput +} + +""" +The input fields for enabling and disabling the publishable capability. +""" +input MetaobjectCapabilityPublishableInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +"""The input fields for enabling and disabling the renderable capability.""" +input MetaobjectCapabilityRenderableInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! + + """The data associated with the renderable capability.""" + data: MetaobjectCapabilityDefinitionDataRenderableInput +} + +""" +The input fields for enabling and disabling the translatable capability. +""" +input MetaobjectCapabilityTranslatableInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +"""Metaobject Capabilities types which can be enabled.""" +enum MetaobjectCapabilityType { + """Allows for a Metaobject to be conditionally publishable.""" + PUBLISHABLE + + """Allows for a Metaobject to be translated using the translation api.""" + TRANSLATABLE + + """ + Allows for a Metaobject to have attributes of a renderable page such as SEO. + """ + RENDERABLE + + """Allows for a Metaobject to be rendered as an Online Store page.""" + ONLINE_STORE +} + +"""The input fields for updating a metaobject capability.""" +input MetaobjectCapabilityUpdateInput { + """The input for updating the publishable capability.""" + publishable: MetaobjectCapabilityPublishableInput + + """The input for updating the translatable capability.""" + translatable: MetaobjectCapabilityTranslatableInput + + """The input for enabling the renderable capability.""" + renderable: MetaobjectCapabilityRenderableInput + + """The input for enabling the Online Store capability.""" + onlineStore: MetaobjectCapabilityOnlineStoreInput +} + +"""An auto-generated type for paginating through multiple Metaobjects.""" +type MetaobjectConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectEdge!]! + + """ + A list of nodes that are contained in MetaobjectEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Metaobject!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields for creating a metaobject.""" +input MetaobjectCreateInput { + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! + + """ + A unique handle for the metaobject. This value is auto-generated when omitted. + """ + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """Capabilities for the metaobject.""" + capabilities: MetaobjectCapabilityDataInput +} + +"""Return type for `metaobjectCreate` mutation.""" +type MetaobjectCreatePayload { + """The created metaobject.""" + metaobject: Metaobject + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetaobjectConnection! + + """The count of metaobjects created for the definition.""" + metaobjectsCount: Int! + + """The human-readable name.""" + name: String! + + """The standard metaobject template associated with the definition.""" + standardTemplate: StandardMetaobjectDefinitionTemplate + + """ + The type of the object definition. Defines the namespace of associated metafields. + """ + type: String! +} + +""" +An auto-generated type for paginating through multiple MetaobjectDefinitions. +""" +type MetaobjectDefinitionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MetaobjectDefinitionEdge!]! + + """ + A list of nodes that are contained in MetaobjectDefinitionEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [MetaobjectDefinition!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields for creating a metaobject definition.""" +input MetaobjectDefinitionCreateInput { + """ + A human-readable name for the definition. This can be changed at any time. + """ + name: String + + """An administrative description of the definition.""" + description: String + + """ + The type of the metaobject definition. This can't be changed. + + Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + type: String! + + """A set of field definitions to create on this metaobject definition.""" + fieldDefinitions: [MetaobjectFieldDefinitionCreateInput!]! + + """Access configuration for the metaobjects created with this definition.""" + access: MetaobjectAccessInput + + """ + The key of a field to reference as the display name for metaobjects of this type. + """ + displayNameKey: String + + """The capabilities of the metaobject definition.""" + capabilities: MetaobjectCapabilityCreateInput +} + +"""Return type for `metaobjectDefinitionCreate` mutation.""" +type MetaobjectDefinitionCreatePayload { + """The created metaobject definition.""" + metaobjectDefinition: MetaobjectDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +"""Return type for `metaobjectDefinitionDelete` mutation.""" +type MetaobjectDefinitionDeletePayload { + """The ID of the deleted metaobjects definition.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one MetaobjectDefinition and a cursor during pagination. +""" +type MetaobjectDefinitionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetaobjectDefinitionEdge.""" + node: MetaobjectDefinition! +} + +"""The input fields for updating a metaobject definition.""" +input MetaobjectDefinitionUpdateInput { + """A human-readable name for the definition.""" + name: String + + """An administrative description of the definition.""" + description: String + + """A set of operations for modifying field definitions.""" + fieldDefinitions: [MetaobjectFieldDefinitionOperationInput!] + + """Access configuration for the metaobjects created with this definition.""" + access: MetaobjectAccessInput + + """ + The key of a metafield to reference as the display name for objects of this type. + """ + displayNameKey: String + + """ + Whether the field order should be reset while updating. + If `true`, then the order is assigned based on submitted fields followed by alphabetized field omissions. + If `false`, then no changes are made to the existing field order and new fields are appended at the end. + """ + resetFieldOrder: Boolean = false + + """The capabilities of the metaobject definition.""" + capabilities: MetaobjectCapabilityUpdateInput +} + +"""Return type for `metaobjectDefinitionUpdate` mutation.""" +type MetaobjectDefinitionUpdatePayload { + """The updated metaobject definition.""" + metaobjectDefinition: MetaobjectDefinition + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +"""Return type for `metaobjectDelete` mutation.""" +type MetaobjectDeletePayload { + """The ID of the deleted metaobject.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +""" +An auto-generated type which holds one Metaobject and a cursor during pagination. +""" +type MetaobjectEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MetaobjectEdge.""" + node: Metaobject! +} + +"""Provides a field definition and the data value assigned to it.""" +type MetaobjectField { + """The field definition for this object key.""" + definition: MetaobjectFieldDefinition! + + """The assigned field value in JSON format.""" + jsonValue: JSON + + """The object key of this field.""" + key: String! + + """For resource reference fields, provides the referenced object.""" + reference: MetafieldReference + + """ + For resource reference list fields, provides the list of referenced objects. + """ + references( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): MetafieldReferenceConnection + + """ + For file reference or color fields, provides visual attributes for this field. + """ + thumbnail: MetaobjectThumbnail + + """The type of the field.""" + type: String! + + """ + The assigned field value, always stored as a string regardless of the field type. + """ + value: String +} + +"""Information about the admin filterable capability.""" +type MetaobjectFieldCapabilityAdminFilterable { + """Indicates if the definition is eligible to have the capability.""" + eligible: Boolean! + + """Indicates if the capability is enabled.""" + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the admin filterable capability. +""" +input MetaobjectFieldCapabilityAdminFilterableInput { + """Indicates whether the capability should be enabled or disabled.""" + enabled: Boolean! +} + +""" +Defines a field for a MetaobjectDefinition with properties +such as the field's data type and validations. +""" +type MetaobjectFieldDefinition { + """Capabilities available for this metaobject field definition.""" + capabilities: MetaobjectFieldDefinitionCapabilities! + + """The administrative description.""" + description: String + + """ + A key name used to identify the field within the metaobject composition. + """ + key: String! + + """The human-readable name.""" + name: String! + + """Required status of the field within the metaobject composition.""" + required: Boolean! + + """The type of data that the field stores.""" + type: MetafieldDefinitionType! + + """ + A list of [validation options](https://shopify.dev/apps/metafields/definitions/validation) for + the field. For example, a field with the type `date` can set a minimum date requirement. + """ + validations: [MetafieldDefinitionValidation!]! +} + +"""Capabilities available for a metaobject field definition.""" +type MetaobjectFieldDefinitionCapabilities { + """ + Indicate whether a metaobject field definition is configured for filtering. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterable! +} + +""" +The input fields for creating capabilities on a metaobject field definition. +""" +input MetaobjectFieldDefinitionCapabilityCreateInput { + """The input for configuring the admin filterable capability.""" + adminFilterable: MetaobjectFieldCapabilityAdminFilterableInput +} + +"""The input fields for creating a metaobject field definition.""" +input MetaobjectFieldDefinitionCreateInput { + """ + The key of the new field definition. This can't be changed. + + Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters. + """ + key: String! + + """The metafield type applied to values of the field.""" + type: String! + + """A human-readable name for the field. This can be changed at any time.""" + name: String + + """An administrative description of the field.""" + description: String + + """Whether metaobjects require a saved value for the field.""" + required: Boolean = false + + """Custom validations that apply to values assigned to the field.""" + validations: [MetafieldDefinitionValidationInput!] + + """Capabilities configuration for this field.""" + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput +} + +"""The input fields for deleting a metaobject field definition.""" +input MetaobjectFieldDefinitionDeleteInput { + """The key of the field definition to delete.""" + key: String! +} + +""" +The input fields for possible operations for modifying field definitions. Exactly one option is required. +""" +input MetaobjectFieldDefinitionOperationInput { + """The input fields for creating a metaobject field definition.""" + create: MetaobjectFieldDefinitionCreateInput + + """The input fields for updating a metaobject field definition.""" + update: MetaobjectFieldDefinitionUpdateInput + + """The input fields for deleting a metaobject field definition.""" + delete: MetaobjectFieldDefinitionDeleteInput +} + +"""The input fields for updating a metaobject field definition.""" +input MetaobjectFieldDefinitionUpdateInput { + """The key of the field definition to update.""" + key: String! + + """A human-readable name for the field.""" + name: String + + """An administrative description of the field.""" + description: String + + """Whether metaobjects require a saved value for the field.""" + required: Boolean + + """Custom validations that apply to values assigned to the field.""" + validations: [MetafieldDefinitionValidationInput!] + + """Capabilities configuration for this field.""" + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput +} + +"""The input fields for a metaobject field value.""" +input MetaobjectFieldInput { + """The key of the field.""" + key: String! + + """The value of the field.""" + value: String! +} + +"""The input fields for retrieving a metaobject by handle.""" +input MetaobjectHandleInput { + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! + + """The handle of the metaobject to create or update.""" + handle: String! +} + +"""Defines visibility status for metaobjects.""" +enum MetaobjectStatus { + """The metaobjects is an internal record.""" + DRAFT + + """The metaobjects is active for public use.""" + ACTIVE +} + +"""Metaobject access permissions for the Storefront API.""" +enum MetaobjectStorefrontAccess { + """No access.""" + NONE + + """Read-only access.""" + PUBLIC_READ +} + +"""Provides attributes for visual representation.""" +type MetaobjectThumbnail { + """The file to be used for visual representation of this metaobject.""" + file: File + + """ + The hexadecimal color code to be used for respresenting this metaobject. + """ + hex: String +} + +"""The input fields for updating a metaobject.""" +input MetaobjectUpdateInput { + """A unique handle for the metaobject.""" + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """Capabilities for the metaobject.""" + capabilities: MetaobjectCapabilityDataInput + + """Whether to create a redirect for the metaobject.""" + redirectNewHandle: Boolean = false +} + +"""Return type for `metaobjectUpdate` mutation.""" +type MetaobjectUpdatePayload { + """The updated metaobject.""" + metaobject: Metaobject + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +"""The input fields for upserting a metaobject.""" +input MetaobjectUpsertInput { + """The handle of the metaobject.""" + handle: String + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """Capabilities for the metaobject.""" + capabilities: MetaobjectCapabilityDataInput +} + +"""Return type for `metaobjectUpsert` mutation.""" +type MetaobjectUpsertPayload { + """The created or updated metaobject.""" + metaobject: Metaobject + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MetaobjectUserError!]! +} + +"""Defines errors encountered while managing metaobject resources.""" +type MetaobjectUserError implements DisplayableError { + """The error code.""" + code: MetaobjectUserErrorCode + + """The index of the failing list element in an array.""" + elementIndex: Int + + """The key of the failing object element.""" + elementKey: String + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `MetaobjectUserError`.""" +enum MetaobjectUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value needs to be blank.""" + PRESENT + + """The input value is blank.""" + BLANK + + """The metafield type is invalid.""" + INVALID_TYPE + + """The value is invalid for the metafield type or the definition options.""" + INVALID_VALUE + + """The value for the metafield definition option was invalid.""" + INVALID_OPTION + + """Duplicate inputs were provided for this field key.""" + DUPLICATE_FIELD_INPUT + + """No metaobject definition found for this type.""" + UNDEFINED_OBJECT_TYPE + + """No field definition found for this key.""" + UNDEFINED_OBJECT_FIELD + + """The specified field key is already in use.""" + OBJECT_FIELD_TAKEN + + """Missing required fields were found for this object.""" + OBJECT_FIELD_REQUIRED + + """The requested record couldn't be found.""" + RECORD_NOT_FOUND + + """An unexpected error occurred.""" + INTERNAL_ERROR + + """The maximum number of metaobjects definitions has been exceeded.""" + MAX_DEFINITIONS_EXCEEDED + + """The maximum number of metaobjects per shop has been exceeded.""" + MAX_OBJECTS_EXCEEDED + + """The maximum number of input metaobjects has been exceeded.""" + INPUT_LIMIT_EXCEEDED + + """The targeted object cannot be modified.""" + IMMUTABLE + + """Not authorized.""" + NOT_AUTHORIZED + + """The provided name is reserved for system use.""" + RESERVED_NAME + + """ + The display name cannot be the same when using the metaobject as a product option. + """ + DISPLAY_NAME_CONFLICT + + """ + Admin access can only be specified on metaobject definitions that have an app-reserved type. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + Definition is managed by app configuration and cannot be modified through the API. + """ + APP_CONFIG_MANAGED + + """Definition is required by an installed app and cannot be deleted.""" + STANDARD_METAOBJECT_DEFINITION_DEPENDENT_ON_APP + + """The capability you are using is not enabled.""" + CAPABILITY_NOT_ENABLED + + """The Online Store URL handle is already taken.""" + URL_HANDLE_TAKEN + + """The Online Store URL handle is invalid.""" + URL_HANDLE_INVALID + + """The Online Store URL handle cannot be blank.""" + URL_HANDLE_BLANK + + """Renderable data input is referencing an invalid field.""" + FIELD_TYPE_INVALID + + """The input is missing required keys.""" + MISSING_REQUIRED_KEYS + + """ + The action cannot be completed because associated metaobjects are referenced by another resource. + """ + REFERENCE_EXISTS_ERROR +} + +"""The set of valid sort keys for the MethodDefinition query.""" +enum MethodDefinitionSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `rate_provider_type` value.""" + RATE_PROVIDER_TYPE +} + +""" +You can use the `MobilePlatformApplication` resource to enable +[shared web credentials](https://developer.apple.com/documentation/security/shared_web_credentials) for Shopify iOS apps, +as well as to create [iOS universal link](https://developer.apple.com/ios/universal-links/) +or [Android app link](https://developer.android.com/training/app-links/) +verification endpoints for merchant Shopify iOS or Android apps. +Shared web credentials let iOS users access a native app after logging into the +respective website in Safari without re-entering +their username and password. If a user changes their credentials in the app, then those changes are reflected in Safari. +You must use a custom domain to integrate shared web credentials with Shopify. With each platform's link system, +users can tap a link to a shop's website and get seamlessly redirected to a merchant's installed app without going +through a browser or manually selecting an app. + +For full configuration instructions on iOS shared web credentials, +see the [associated domains setup](https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains) +technical documentation. + +For full configuration instructions on iOS universal links or Android App Links, +see the respective [iOS universal link](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content) +or [Android app link](https://developer.android.com/training/app-links) technical documentation. +""" +union MobilePlatformApplication = AndroidApplication | AppleApplication + +""" +An auto-generated type for paginating through multiple MobilePlatformApplications. +""" +type MobilePlatformApplicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [MobilePlatformApplicationEdge!]! + + """ + A list of nodes that are contained in MobilePlatformApplicationEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [MobilePlatformApplication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields for an Android based mobile platform application.""" +input MobilePlatformApplicationCreateAndroidInput { + """Android application ID.""" + applicationId: String + + """The SHA256 fingerprints of the app’s signing certificate.""" + sha256CertFingerprints: [String!]! + + """Whether Android App Links are supported by this app.""" + appLinksEnabled: Boolean! +} + +"""The input fields for an Apple based mobile platform application.""" +input MobilePlatformApplicationCreateAppleInput { + """Apple application ID.""" + appId: String + + """Whether Apple Universal Links are supported by this app.""" + universalLinksEnabled: Boolean! + + """Whether Apple shared web credentials are enabled for this app.""" + sharedWebCredentialsEnabled: Boolean! + + """Whether Apple app clips are enabled for this app.""" + appClipsEnabled: Boolean + + """The Apple app clip application ID.""" + appClipApplicationId: String +} + +"""The input fields for a mobile application platform type.""" +input MobilePlatformApplicationCreateInput { + """Android based mobile platform application.""" + android: MobilePlatformApplicationCreateAndroidInput + + """Apple based mobile platform application.""" + apple: MobilePlatformApplicationCreateAppleInput +} + +"""Return type for `mobilePlatformApplicationCreate` mutation.""" +type MobilePlatformApplicationCreatePayload { + """Created mobile platform application.""" + mobilePlatformApplication: MobilePlatformApplication + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MobilePlatformApplicationUserError!]! +} + +"""Return type for `mobilePlatformApplicationDelete` mutation.""" +type MobilePlatformApplicationDeletePayload { + """The ID of the mobile platform application that was just deleted.""" + deletedMobilePlatformApplicationId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MobilePlatformApplicationUserError!]! +} + +""" +An auto-generated type which holds one MobilePlatformApplication and a cursor during pagination. +""" +type MobilePlatformApplicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of MobilePlatformApplicationEdge.""" + node: MobilePlatformApplication! +} + +"""The input fields for an Android based mobile platform application.""" +input MobilePlatformApplicationUpdateAndroidInput { + """Android application ID.""" + applicationId: String + + """The SHA256 fingerprints of the app’s signing certificate.""" + sha256CertFingerprints: [String!] + + """Whether Android App Links are supported by this app.""" + appLinksEnabled: Boolean +} + +"""The input fields for an Apple based mobile platform application.""" +input MobilePlatformApplicationUpdateAppleInput { + """Apple application ID.""" + appId: String + + """Whether Apple Universal Links are supported by this app.""" + universalLinksEnabled: Boolean + + """Whether Apple shared web credentials are enabled for this app.""" + sharedWebCredentialsEnabled: Boolean + + """Whether Apple App Clips are enabled for this app.""" + appClipsEnabled: Boolean + + """The Apple App Clip application ID.""" + appClipApplicationId: String +} + +"""The input fields for the mobile platform application platform type.""" +input MobilePlatformApplicationUpdateInput { + """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! +} + +""" +An input collection of monetary values in their respective currencies. +Represents an amount in the shop's currency and the amount as converted to the +customer's currency of choice (the presentment currency). +""" +input MoneyBagInput { + """Amount in shop currency.""" + shopMoney: MoneyInput! + + """ + Amount in presentment currency. If this isn't given then we assume that the + presentment currency is the same as the shop's currency. + """ + presentmentMoney: MoneyInput +} + +"""The input fields for a monetary value with currency.""" +input MoneyInput { + """Decimal money amount.""" + amount: Decimal! + + """Currency of the money.""" + currencyCode: CurrencyCode! +} + +""" +A precise monetary value and its associated currency. For example, 12.99 USD. +""" +type MoneyV2 { + """ + A monetary value in decimal format, allowing for precise representation of cents or fractional + currency. For example, 12.99. + """ + amount: Decimal! + + """ + The three-letter currency code that represents a world currency used in a store. Currency codes + include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, + and non-standard codes. For example, USD. + """ + currencyCode: CurrencyCode! +} + +""" +The input for moving a single object to a specific position in a set. + +Provide this input only for objects whose position actually changed; do not send inputs for the entire set. + +- id: The ID (GID) of the object to move. +- newPosition: The zero-based index of the object's position within the set at the time this move is applied. + +Moves are applied sequentially, so `newPosition` for each move is evaluated after all prior moves in the same list. +If `newPosition` is greater than or equal to the number of objects, the object is moved to the end of the set. +Values do not have to be unique. Objects not included in the move list keep +their relative order, aside from any displacement caused by the moves. +""" +input MoveInput { + """The ID of the object to be moved.""" + id: ID! + + """ + Zero-based index of the object's position at the time this move is applied. If + the value is >= the number of objects, the object is placed at the end. + """ + newPosition: UnsignedInt64! +} + +"""The schema's entry point for all mutation operations.""" +type Mutation { + """Updates the email state value for an abandonment.""" + abandonmentEmailStateUpdate( + """The ID of the abandonment that needs to be updated.""" + id: ID! + + """The new email state of the abandonment.""" + emailState: AbandonmentEmailState! + + """The date and time for when the email was sent, if that is the case.""" + emailSentAt: DateTime + + """The reason why the email was or was not sent.""" + emailStateChangeReason: String + ): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") + + """Updates the marketing activities delivery statuses for an abandonment.""" + abandonmentUpdateActivitiesDeliveryStatuses( + """The ID of the abandonment that needs to be updated.""" + abandonmentId: ID! + + """The ID of the marketing activity that needs to be updated.""" + marketingActivityId: ID! + + """ + The new delivery status of the marketing activity for this abandonment. + """ + deliveryStatus: AbandonmentDeliveryState! + + """The delivery timestamp if the activity delivered.""" + deliveredAt: DateTime + + """The reason why the activity was or was not delivered.""" + deliveryStatusChangeReason: String + ): AbandonmentUpdateActivitiesDeliveryStatusesPayload + + """ + Creates a one-time charge for app features or services that don't require + recurring billing. This mutation is ideal for apps that sell individual + features, premium content, or services on a per-use basis rather than + subscription models. + + For example, a design app might charge merchants once for premium templates, + or a marketing app could bill for individual campaign setups without ongoing monthly fees. + + Use the `AppPurchaseOneTimeCreate` mutation to: + - Charge for premium features or content purchases + - Bill for professional services or setup fees + - Generate revenue from one-time digital product sales + + The mutation returns a confirmation URL that merchants must visit to approve + the charge. Test and development stores are not charged, allowing safe testing + of billing flows. + + Explore one-time billing options on the [app purchases page](https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases). + """ + appPurchaseOneTimeCreate( + """The name of the one-time purchase from the app.""" + name: String! + + """The amount to be charged to the store for the app one-time purchase.""" + price: MoneyInput! + + """ + The URL where the merchant is redirected after approving the app one-time purchase. + """ + returnUrl: URL! + + """Whether the app one-time purchase is a test transaction.""" + test: Boolean = false + ): AppPurchaseOneTimeCreatePayload + + """ + Revokes previously granted access scopes from an app installation, allowing + merchants to reduce an app's permissions without completely uninstalling it. + This provides granular control over what data and functionality apps can access. + + For example, if a merchant no longer wants an app to access customer + information but still wants to use its inventory features, they can revoke the + customer-related scopes while keeping inventory permissions active. + + Use the `appRevokeAccessScopes` mutation to: + - Remove specific permissions from installed apps + - Maintain app functionality while minimizing data exposure + + The mutation returns details about which scopes were successfully revoked and + any errors that prevented certain permissions from being removed. + + Learn more about [managing app permissions](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/manage-access-scopes#revoke-granted-scopes-dynamically). + """ + appRevokeAccessScopes( + """The list of scope handles to revoke.""" + scopes: [String!]! + ): AppRevokeAccessScopesPayload + + """ + Cancels an active app subscription, stopping future billing cycles. The + cancellation behavior depends on the `replacementBehavior` setting - it can + either disable auto-renewal (allowing the subscription to continue until the + end of the current billing period) or immediately cancel with prorated refunds. + + When a merchant decides to discontinue using subscription features, this + mutation provides a clean cancellation workflow that respects billing periods + and merchant expectations. + + Use the `AppSubscriptionCancel` mutation to: + - Process merchant-initiated subscription cancellations + - Terminate subscriptions due to policy violations or account issues + - Handle subscription cancellations during app uninstallation workflows + + The cancellation timing and merchant access depends on the + `replacementBehavior` setting and the app's specific implementation of + subscription management. + + For subscription lifecycle management and cancellation best practices, consult + the [subscription management + guide](https://shopify.dev/docs/apps/launch/billing/subscription-billing). + """ + appSubscriptionCancel( + """The ID of the app subscription to be cancelled.""" + id: ID! + + """ + Whether to issue prorated credits for the unused portion of the app subscription. There will + 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( + """A descriptive name for the app subscription.""" + name: String! + + """ + Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type. + """ + lineItems: [AppSubscriptionLineItemInput!]! + + """Whether the app subscription is a test transaction.""" + test: Boolean = false + + """ + The number of days of the free trial period, beginning on the day that the merchant approves the app charges. + """ + trialDays: Int + + """ + The URL pointing to the page where the merchant is redirected after approving the app subscription. + """ + returnUrl: URL! + + """ + The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. + """ + replacementBehavior: AppSubscriptionReplacementBehavior = STANDARD + ): AppSubscriptionCreatePayload + + """ + Updates the capped amount on the usage pricing plan of an app subscription line item. + """ + appSubscriptionLineItemUpdate( + """The ID of the app subscription line item to be updated.""" + id: ID! + + """ + The new maximum amount of usage charges that can be incurred within a subscription billing interval. + """ + cappedAmount: MoneyInput! + ): AppSubscriptionLineItemUpdatePayload + + """ + Extends the trial period for an existing app subscription, 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 ID of the app subscription to extend the trial for.""" + id: ID! + + """ + The number of days to extend the trial. The value must be greater than 0 and less than or equal to 1000. + """ + days: Int! + ): AppSubscriptionTrialExtendPayload + + """ + Uninstalls an app from a shop. + + This mutation can only be used by apps to uninstall themselves. Apps with the + `apps` access scope can uninstall other apps by providing the app ID in the + input parameter. + + Use the `appUninstall` mutation to programmatically remove apps from shops. + + The mutation returns the uninstalled app and any errors that occurred during the uninstallation process. + + Learn more about [app lifecycle management](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/uninstall-app-api-request). + """ + appUninstall: AppUninstallPayload + + """ + 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 ID of the app subscription line item to create the usage record under. + This app subscription line item must have a usage pricing plan. + """ + subscriptionLineItemId: ID! + + """The price of the app usage record.""" + price: MoneyInput! + + """The description of the app usage record.""" + description: String! + + """ + A unique key generated by the client to avoid duplicate charges. Maximum length of 255 characters. + """ + idempotencyKey: String + ): AppUsageRecordCreatePayload + + """Creates an article.""" + articleCreate( + """The properties of the new article.""" + article: ArticleCreateInput! + + """The properties of the new blog.""" + blog: ArticleBlogInput + ): ArticleCreatePayload + + """Deletes an article.""" + articleDelete( + """The ID of the article to be deleted.""" + id: ID! + ): ArticleDeletePayload + + """Updates an article.""" + articleUpdate( + """The ID of the article to be updated.""" + id: ID! + + """The properties of the article to be updated.""" + article: ArticleUpdateInput! + + """The properties of the blog to be created.""" + blog: ArticleBlogInput + ): ArticleUpdatePayload + + """ + Update the backup region that is used when we have no better signal of what region a buyer is in. + """ + backupRegionUpdate( + """ + Optional input representing the region to be updated. If not provided, the existing regions remain unchanged. + """ + region: BackupRegionUpdateInput + ): BackupRegionUpdatePayload + + """Creates a blog.""" + blogCreate( + """The properties of the new blog.""" + blog: BlogCreateInput! + ): BlogCreatePayload + + """Deletes a blog.""" + blogDelete( + """The ID of the blog to be deleted.""" + id: ID! + ): BlogDeletePayload + + """Updates a blog.""" + blogUpdate( + """The ID of the blog to be updated.""" + id: ID! + + """The properties of the blog to be updated.""" + blog: BlogUpdateInput! + ): BlogUpdatePayload + + """ + Starts the cancelation process of a running bulk operation. + + There may be a short delay from when a cancelation starts until the operation is actually canceled. + """ + bulkOperationCancel( + """The ID of the bulk operation to cancel.""" + id: ID! + ): BulkOperationCancelPayload + + """ + Creates and runs a bulk operation 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( + """The mutation to be executed in bulk.""" + mutation: String! + + """The staged upload path of the file containing mutation variables.""" + stagedUploadPath: String! + + """ + Whether to group objects under their corresponding parent objects in the + JSONL output. Grouping is costly, causes bulk operations to take longer to + complete, and increases the chances of failures such as timeouts. + """ + groupObjects: Boolean! = true + + """An optional identifier which may be used for querying.""" + clientIdentifier: 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! + + """ + Whether to group objects under their corresponding parent objects in the + JSONL output. Grouping is costly, causes bulk operations to take longer to + complete, and increases the chances of failures such as timeouts. + """ + groupObjects: Boolean! = true + ): 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( + """The handle of the Function providing the cart transform.""" + functionHandle: String + + """Whether a run failure should block cart and checkout operations.""" + blockOnFailure: Boolean = false + + """Additional metafields to associate to the cart transform.""" + metafields: [MetafieldInput!] = [] + ): CartTransformCreatePayload + + """ + Removes an existing cart transform function from the merchant's store, + disabling any customized bundle or cart modification logic it provided. This + mutation persistently deletes the transform configuration and stops all + associated cart processing. + + For example, when discontinuing a bundle app or removing specific + merchandising features, you would delete the corresponding cart transform to + ensure customers no longer see the bundled products or modified cart behavior. + + Use `CartTransformDelete` to: + - Deactivate customized bundle logic when removing app features + - Clean up unused transform functions + - Disable cart modifications during app uninstallation + - Remove outdated merchandising strategies + - Restore default cart behavior for merchants + + The deletion processes immediately and returns the ID of the removed cart + transform for confirmation. Once deleted, the transform function stops + processing new cart operations, though existing cart sessions may retain their + current state until refresh. This ensures a clean transition without + disrupting active customer sessions. + + Consider the timing of deletions carefully, as removing transforms during peak + shopping periods could affect customer experience if they have active carts + with transformed items. + + Learn more about [managing cart transforms](https://shopify.dev/docs/apps/selling-strategies/bundles). + """ + cartTransformDelete( + """A globally-unique identifier for the cart transform.""" + id: ID! + ): CartTransformDeletePayload + + """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( + """The ID of the catalog to delete.""" + id: ID! + + """ + Whether to also delete the price list and the publication owned by the catalog. + """ + deleteDependentResources: Boolean = false + ): CatalogDeletePayload + + """Updates an existing catalog.""" + 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( + """A globally-unique identifier.""" + checkoutProfileId: ID! + + """ + The input fields to use to upsert the checkout branding settings (pass null to reset them to default). + """ + checkoutBrandingInput: CheckoutBrandingInput + ): CheckoutBrandingUpsertPayload + + """ + 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 ID of the parent product.""" + parentProductId: ID! + + """The updated title for the combined listing.""" + title: String + + """ + The child products to add and their assigned options and option values. + """ + productsAdded: [ChildProductRelationInput!] + + """ + The child products to edit and their assigned options and option values. + """ + productsEdited: [ChildProductRelationInput!] + + """The IDs of products to be removed from the combined listing.""" + productsRemovedIds: [ID!] + + """ + The ordered options and values to be used by the combined listing. Options + and values will be reordered to match the order specified here. + """ + optionsAndValues: [OptionAndValueInput!] + ): CombinedListingUpdatePayload + + """Approves a comment.""" + commentApprove( + """The ID of the comment to be approved.""" + id: ID! + ): CommentApprovePayload + + """Deletes a comment.""" + commentDelete( + """The ID of the comment to be deleted.""" + id: ID! + ): CommentDeletePayload + + """Marks a comment as not spam.""" + commentNotSpam( + """The ID of the comment to be marked as not spam.""" + id: ID! + ): CommentNotSpamPayload + + """Marks a comment as spam.""" + 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 + + """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 to assign the main contact to.""" + companyId: ID! + + """The ID of the company contact to be assigned as the main contact.""" + companyContactId: ID! + ): CompanyAssignMainContactPayload + + """Assigns a role to a contact for a location.""" + companyContactAssignRole( + """The ID of the contact to assign a role to.""" + companyContactId: ID! + + """The ID of the role to assign to a contact.""" + companyContactRoleId: ID! + + """The ID of the location to assign a role to a contact.""" + companyLocationId: ID! + ): CompanyContactAssignRolePayload + + """Assigns roles on a company contact.""" + companyContactAssignRoles( + """The contact whose roles are being assigned.""" + companyContactId: ID! + + """The new roles to assign.""" + rolesToAssign: [CompanyContactRoleAssign!]! + ): CompanyContactAssignRolesPayload + + """Creates a company contact and the associated customer.""" + companyContactCreate( + """The ID of the company that the company contact belongs to.""" + companyId: ID! + + """The fields to use to create the company contact.""" + input: CompanyContactInput! + ): CompanyContactCreatePayload + + """Deletes a company contact.""" + companyContactDelete( + """The ID of the company contact to delete.""" + companyContactId: ID! + ): CompanyContactDeletePayload + + """Removes a company contact from a Company.""" + companyContactRemoveFromCompany( + """The ID of the company contact to remove from the Company.""" + companyContactId: ID! + ): CompanyContactRemoveFromCompanyPayload + + """Revokes a role on a company contact.""" + companyContactRevokeRole( + """The ID of the contact to revoke a role from.""" + companyContactId: ID! + + """The ID of the role assignment to revoke from a contact.""" + companyContactRoleAssignmentId: ID! + ): CompanyContactRevokeRolePayload + + """Revokes roles on a company contact.""" + companyContactRevokeRoles( + """The contact whose roles are being revoked.""" + companyContactId: ID! + + """The current role assignment IDs to revoke.""" + roleAssignmentIds: [ID!] + + """Flag to revoke all roles on the contact.""" + revokeAll: Boolean = false + ): CompanyContactRevokeRolesPayload + + """Sends the company contact a welcome email.""" + companyContactSendWelcomeEmail( + """The ID of the company contact to send welcome email to.""" + companyContactId: ID! + + """The welcome email fields.""" + email: EmailInput + ): CompanyContactSendWelcomeEmailPayload + + """Updates a company contact.""" + companyContactUpdate( + """The ID of the company contact to be updated.""" + companyContactId: ID! + + """The fields to use to update the company contact.""" + input: CompanyContactInput! + ): CompanyContactUpdatePayload + + """Deletes one or more company contacts.""" + companyContactsDelete( + """The list of IDs of the company contacts to delete.""" + companyContactIds: [ID!]! + ): CompanyContactsDeletePayload + + """Creates a company.""" + companyCreate( + """The fields to use when creating the company.""" + input: CompanyCreateInput! + ): CompanyCreatePayload + + """Deletes a company.""" + companyDelete( + """The ID of the company to delete.""" + id: ID! + ): CompanyDeletePayload + + """Updates an address on a company location.""" + companyLocationAssignAddress( + """The ID of the company location to update addresses on.""" + locationId: ID! + + """The input fields to use to update the address.""" + address: CompanyAddressInput! + + """The list of address types on the location to update.""" + addressTypes: [CompanyAddressType!]! + ): CompanyLocationAssignAddressPayload + + """Assigns roles on a company location.""" + companyLocationAssignRoles( + """The location whose roles are being assigned.""" + companyLocationId: ID! + + """The roles to assign.""" + rolesToAssign: [CompanyLocationRoleAssign!]! + ): CompanyLocationAssignRolesPayload + + """ + Creates one or more mappings between a staff member at a shop and a company location. + """ + companyLocationAssignStaffMembers( + """The ID of the company location to assign the staff member to.""" + companyLocationId: ID! + + """The list of IDs of the staff members to assign.""" + staffMemberIds: [ID!]! + ): CompanyLocationAssignStaffMembersPayload + + """Assigns tax exemptions to the company location.""" + companyLocationAssignTaxExemptions( + """The location to which the tax exemptions will be assigned.""" + companyLocationId: ID! + + """The tax exemptions that are being assigned to the location.""" + taxExemptions: [TaxExemption!]! + ): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """Creates a 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 + + """ + Deletes one or more existing mappings between a staff member at a shop and a company location. + """ + companyLocationRemoveStaffMembers( + """ + The list of IDs of the company location staff member assignment to delete. + """ + companyLocationStaffMemberAssignmentIds: [ID!]! + ): CompanyLocationRemoveStaffMembersPayload + + """Revokes roles on a company location.""" + companyLocationRevokeRoles( + """The location whose roles are being revoked.""" + companyLocationId: ID! + + """The current roles to revoke.""" + rolesToRevoke: [ID!]! + ): CompanyLocationRevokeRolesPayload + + """Revokes tax exemptions from the company location.""" + companyLocationRevokeTaxExemptions( + """The location from which the tax exemptions will be revoked.""" + companyLocationId: ID! + + """The tax exemptions that are being revoked from the location.""" + taxExemptions: [TaxExemption!]! + ): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """Revokes tax registration on a company location.""" + companyLocationRevokeTaxRegistration( + """The location whose tax registration is being revoked.""" + companyLocationId: ID! + ): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") + + """Sets the tax settings for a company location.""" + companyLocationTaxSettingsUpdate( + """The ID of the company location that the tax settings get assigned to.""" + companyLocationId: ID! + + """The unique tax registration ID for the company location.""" + taxRegistrationId: String + + """Whether the location is exempt from taxes.""" + taxExempt: Boolean + + """The list of tax exemptions to assign to the company location.""" + exemptionsToAssign: [TaxExemption!] + + """The list of tax exemptions to remove from the company location.""" + exemptionsToRemove: [TaxExemption!] + ): CompanyLocationTaxSettingsUpdatePayload + + """Updates a company location.""" + 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 + + """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 + + """Create a new customer address.""" + customerAddressCreate( + """The ID of the customer.""" + customerId: ID! + + """Specifies the fields to use when creating the address.""" + address: MailingAddressInput! + + """Whether to set the address as the customer's default address.""" + setAsDefault: Boolean + ): CustomerAddressCreatePayload + + """Deletes a customer's address.""" + customerAddressDelete( + """The ID of the customer whose address is being deleted.""" + customerId: ID! + + """The ID of the address to be deleted from the customer.""" + addressId: ID! + ): CustomerAddressDeletePayload + + """Update a customer's address information.""" + customerAddressUpdate( + """The ID of the customer whose address is being updated.""" + customerId: ID! + + """The ID of the address to update.""" + addressId: ID! + + """Specifies the fields to use when updating the address.""" + address: MailingAddressInput! + + """Whether to set the address as the customer's default address.""" + setAsDefault: Boolean + ): CustomerAddressUpdatePayload + + """ + Cancels a pending erasure of a customer's data. Read more [here](https://help.shopify.com/manual/privacy-and-security/privacy/processing-customer-data-requests#cancel-customer-data-erasure). + + To request an erasure of a customer's data use the [customerRequestDataErasure mutation](https://shopify.dev/api/admin-graphql/unstable/mutations/customerRequestDataErasure). + """ + customerCancelDataErasure( + """The ID of the customer for whom to cancel a pending data erasure.""" + customerId: ID! + ): CustomerCancelDataErasurePayload + + """ + 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 ID of the customer.""" + customerId: ID! + + """The billing address.""" + billingAddress: MailingAddressInput! + + """The encrypted payment method data.""" + encryptedDuplicationData: String! + ): CustomerPaymentMethodCreateFromDuplicationDataPayload + + """ + Creates a credit card payment method for a customer using a session id. + These values are only obtained through card imports happening from a PCI compliant environment. + Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly. + """ + customerPaymentMethodCreditCardCreate( + """The ID of the customer.""" + customerId: ID! + + """The billing address.""" + billingAddress: MailingAddressInput! + + """ + The Cardserver session ID. Obtained by storing card data with Shopify's + Cardsink. Exchanging raw card data for a session ID must be done in a PCI + complaint environment. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardCreatePayload + + """Updates the credit card payment method for a customer.""" + customerPaymentMethodCreditCardUpdate( + """The ID of the customer payment method.""" + id: ID! + + """The billing address.""" + billingAddress: MailingAddressInput! + + """The Cardserver session ID.""" + sessionId: String! + ): CustomerPaymentMethodCreditCardUpdatePayload + + """ + Returns encrypted data that can be used to duplicate the payment method in another shop within the same organization. + + Currently, this only supports Shop Pay payment methods. This is only available for selected partner apps. + """ + customerPaymentMethodGetDuplicationData( + """The payment method to be duplicated.""" + customerPaymentMethodId: ID! + + """The shop the payment method will be duplicated into.""" + targetShopId: ID! + + """The customer the payment method will be duplicated into.""" + targetCustomerId: ID! + ): CustomerPaymentMethodGetDuplicationDataPayload + + """ + Returns a URL that allows the customer to update a specific payment method. + + Currently, `customerPaymentMethodGetUpdateUrl` only supports Shop Pay. + """ + customerPaymentMethodGetUpdateUrl( + """The payment method to be updated.""" + customerPaymentMethodId: ID! + ): CustomerPaymentMethodGetUpdateUrlPayload + + """Creates a PayPal billing agreement for a customer.""" + customerPaymentMethodPaypalBillingAgreementCreate( + """The ID of the customer.""" + customerId: ID! + + """The billing address.""" + billingAddress: MailingAddressInput + + """ + The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`). + """ + billingAgreementId: String! + + """Whether the PayPal billing agreement is inactive.""" + inactive: Boolean = false + ): CustomerPaymentMethodPaypalBillingAgreementCreatePayload + + """Updates a PayPal billing agreement for a customer.""" + customerPaymentMethodPaypalBillingAgreementUpdate( + """The ID of the customer payment method.""" + id: ID! + + """The billing address.""" + billingAddress: MailingAddressInput! + ): 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 + + """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 the customer an account invite email.""" + customerSendAccountInviteEmail( + """The ID of the customer to whom an account invite email is to be sent.""" + customerId: ID! + + """Specifies the account invite email fields.""" + email: EmailInput + ): CustomerSendAccountInviteEmailPayload + + """ + Creates or updates a customer in a single mutation. + + Use this mutation when syncing information from an external data source into Shopify. + + This mutation can be used to create a new customer, update an existing customer by id, or + upsert a customer by a unique key (email or phone). + + To create a new customer omit the `identifier` argument. + To update an existing customer, include the `identifier` with the id of the customer to update. + + To perform an 'upsert' by unique key (email or phone) + use the `identifier` argument to upsert a customer by a unique key (email or phone). If a customer + with the specified unique key exists, it will be updated. If not, a new customer will be created with + that unique key. + + As of API version 2022-10, apps using protected customer data must meet the + protected customer data [requirements](https://shopify.dev/apps/store/data-protection/protected-customer-data) + + Any list field (e.g. + [addresses](https://shopify.dev/api/admin-graphql/unstable/input-objects/MailingAddressInput), + will be updated so that all included entries are either created or updated, and all existing entries not + included will be deleted. + + All other fields will be updated to the value passed. Omitted fields will not be updated. + """ + customerSet( + """The properties of the customer.""" + input: CustomerSetInput! + + """Specifies the identifier that will be used to lookup the resource.""" + identifier: CustomerSetIdentifiers + ): CustomerSetPayload + + """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 whose default address is being updated.""" + customerId: ID! + + """The ID of the customer's new default address.""" + addressId: ID! + ): CustomerUpdateDefaultAddressPayload + + """Opt out a customer from data sale.""" + dataSaleOptOut( + """The email address of the customer to opt out of data sale.""" + email: String! + ): DataSaleOptOutPayload + + """ + Creates a 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 global IDs of the delivery customizations.""" + ids: [ID!]! + + """The enabled status of the delivery customizations.""" + enabled: Boolean! + ): DeliveryCustomizationActivationPayload + + """Creates a delivery customization.""" + deliveryCustomizationCreate( + """The input data used to create the delivery customization.""" + deliveryCustomization: DeliveryCustomizationInput! + ): DeliveryCustomizationCreatePayload + + """Creates a delivery customization.""" + deliveryCustomizationDelete( + """The global ID of the delivery customization.""" + id: ID! + ): DeliveryCustomizationDeletePayload + + """Updates a delivery customization.""" + deliveryCustomizationUpdate( + """The global ID of the delivery customization.""" + id: ID! + + """The input data used to update the delivery customization.""" + deliveryCustomization: DeliveryCustomizationInput! + ): DeliveryCustomizationUpdatePayload + + """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! + + """Specifies the input fields for a delivery profile.""" + profile: DeliveryProfileInput! + + """Whether this delivery profile should leave legacy mode.""" + leaveLegacyModeProfiles: Boolean + ): DeliveryProfileUpdatePayload + + """ + Updates the delivery promise participants by adding or removing owners based on a branded promise handle. + """ + deliveryPromiseParticipantsUpdate( + """ + The branded promise handle to update the delivery promise participants for. + """ + brandedPromiseHandle: String! + + """The owners to add to the delivery promise participants.""" + ownersToAdd: [ID!] = [] + + """The owners to remove from the delivery promise participants.""" + ownersToRemove: [ID!] = [] + ): DeliveryPromiseParticipantsUpdatePayload + + """ + Creates or updates a delivery promise provider. Currently restricted to select approved delivery promise partners. + """ + deliveryPromiseProviderUpsert( + """ + Whether the delivery promise provider is active. Defaults to `true` when creating a provider. + """ + active: Boolean + + """ + The number of seconds to add to the current time as a buffer when looking up + delivery promises. Represents how long the shop requires before releasing an + order to the fulfillment provider. + """ + fulfillmentDelay: Int + + """ + The time zone to be used for interpreting day of week and cutoff times in + delivery schedules when looking up delivery promises. Defaults to `UTC` when + creating a provider. + """ + timeZone: String + + """ + The ID of the location that will be associated with the delivery promise provider. + """ + locationId: ID! + ): DeliveryPromiseProviderUpsertPayload + + """Set the delivery settings for a shop.""" + deliverySettingUpdate( + """Specifies the input fields for the delivery shop level settings.""" + setting: DeliverySettingInput! + ): DeliverySettingUpdatePayload + + """ + Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles. + """ + 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 ID of the automatic discount to update.""" + id: ID! + + """The input fields required to update the automatic discount.""" + automaticAppDiscount: DiscountAutomaticAppInput! + ): DiscountAutomaticAppUpdatePayload + + """ + Creates an + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate) + mutation. + """ + discountAutomaticBasicCreate( + """The input data used to create the automatic amount off discount.""" + automaticBasicDiscount: DiscountAutomaticBasicInput! + ): DiscountAutomaticBasicCreatePayload + + """ + Updates an existing + [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicUpdate) + mutation instead. + """ + discountAutomaticBasicUpdate( + """The ID of the automatic amount off discount to update.""" + id: ID! + + """The input data used to update the automatic amount off discount.""" + automaticBasicDiscount: DiscountAutomaticBasicInput! + ): DiscountAutomaticBasicUpdatePayload + + """ + Deletes multiple automatic discounts in a single operation, providing + efficient bulk management for stores with extensive discount catalogs. This + mutation processes deletions asynchronously to handle large volumes without + blocking other operations. + + For example, when cleaning up expired seasonal promotions or removing outdated + automatic discounts across product categories, merchants can delete dozens of + discounts simultaneously rather than processing each individually. + + Use `DiscountAutomaticBulkDelete` to: + - Remove multiple automatic discounts efficiently + - Clean up expired or obsolete promotions + - Streamline discount management workflows + - Process large-scale discount removals asynchronously + + The operation returns a job object for tracking deletion progress and any validation errors encountered during processing. + + Learn more about [discount management](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomatic). + """ + discountAutomaticBulkDelete( + """ + The search query for filtering automatic discounts to delete. + + 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 + + """ + The ID of the saved search to use for filtering automatic discounts to delete. + """ + savedSearchId: ID + + """The IDs of the automatic discounts to delete.""" + ids: [ID!] + ): DiscountAutomaticBulkDeletePayload + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To create code discounts, use the + [`discountCodeBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyCreate) + mutation. + """ + discountAutomaticBxgyCreate( + """The input data used to create the automatic BXGY discount.""" + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + ): DiscountAutomaticBxgyCreatePayload + + """ + Updates an existing + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's automatically applied on a cart and at checkout. + + > Note: + > To update code discounts, use the + [`discountCodeBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBxgyUpdate) + mutation instead. + """ + discountAutomaticBxgyUpdate( + """The ID of the automatic BXGY discount to update.""" + id: ID! + + """The input data used to update the automatic BXGY discount.""" + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + ): DiscountAutomaticBxgyUpdatePayload + + """Deactivates an automatic discount.""" + discountAutomaticDeactivate( + """The ID of the automatic discount to deactivate.""" + id: ID! + ): DiscountAutomaticDeactivatePayload + + """ + Deletes an existing automatic discount from the store, permanently removing it + from all future order calculations. This mutation provides a clean way to + remove promotional campaigns that are no longer needed. + + For example, when a seasonal promotion ends or a flash sale concludes, + merchants can use this mutation to ensure the discount no longer applies to + new orders while preserving historical order data. + + Use `DiscountAutomaticDelete` to: + - Remove expired promotional campaigns + - Clean up test discounts during development + - Delete automatic discounts that conflict with new promotions + - Maintain a clean discount configuration + + The mutation returns the ID of the deleted discount for confirmation and any + validation errors if the deletion cannot be completed. Once deleted, the + automatic discount will no longer appear in discount lists or apply to new + customer orders. + """ + discountAutomaticDelete( + """The ID of the automatic discount to delete.""" + id: ID! + ): DiscountAutomaticDeletePayload + + """ + Creates automatic free shipping discounts that apply to qualifying orders + without requiring discount codes. These promotions automatically activate when + customers meet specified criteria, streamlining the checkout experience. + + For example, a store might create an automatic free shipping discount for + orders over variable pricing to encourage larger purchases, or offer free + shipping to specific customer segments during promotional periods. + + Use `DiscountAutomaticFreeShippingCreate` to: + - Set up code-free shipping promotions + - Create order value-based shipping incentives + - Target specific customer groups with shipping benefits + - Establish location-based shipping discounts + + The mutation validates discount configuration and returns the created + automatic discount node along with any configuration errors that need resolution. + + Learn more about [automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticNode). + """ + discountAutomaticFreeShippingCreate( + """The input data used to create the automatic free shipping discount.""" + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + ): DiscountAutomaticFreeShippingCreatePayload + + """ + Updates existing automatic free shipping discounts, allowing merchants to + modify promotion criteria, shipping destinations, and eligibility requirements + without recreating the entire discount structure. + + For example, extending a holiday free shipping promotion to include additional + countries, adjusting the minimum order value threshold, or expanding customer + eligibility to include new segments. + + Use `DiscountAutomaticFreeShippingUpdate` to: + - Modify shipping discount thresholds and criteria + - Expand or restrict geographic availability + - Update customer targeting and eligibility rules + - Adjust promotion timing and activation periods + + Changes take effect immediately for new orders, while the mutation validates + all modifications and reports any configuration conflicts through user errors. + + Learn more about [managing automatic discounts](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAutomaticFreeShipping). + """ + discountAutomaticFreeShippingUpdate( + """The ID of the automatic free shipping discount to update.""" + id: ID! + + """The input data used to update the automatic free shipping discount.""" + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + ): DiscountAutomaticFreeShippingUpdatePayload + + """ + Activates a previously created code discount, making it available for + customers to use during checkout. This mutation transitions inactive discount + codes into an active state where they can be applied to orders. + + For example, after creating a "SUMMER20" discount code but leaving it inactive + during setup, merchants can activate it when ready to launch their summer + promotion campaign. + + Use `DiscountCodeActivate` to: + - Launch scheduled promotional campaigns + - Reactivate previously paused discount codes + - Enable discount codes after configuration changes + - Control the timing of discount availability + + The mutation returns the updated discount code node with its new active status + and handles any validation errors that might prevent activation, such as + conflicting discount rules or invalid date ranges. + """ + discountCodeActivate( + """The ID of the code discount to activate.""" + id: ID! + ): DiscountCodeActivatePayload + + """ + Creates a code discount. The discount type must be provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Functions can implement + [order](https://shopify.dev/docs/api/functions/reference/order-discounts), + [product](https://shopify.dev/docs/api/functions/reference/product-discounts), or [shipping](https://shopify.dev/docs/api/functions/reference/shipping-discounts) + discount functions. Use this mutation with Shopify Functions when you need + custom logic beyond [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + For example, use this mutation to create a code discount using an app's + "Volume" discount type that applies a percentage off when customers purchase + more than the minimum quantity + of a product. For an example implementation, refer to [our tutorial](https://shopify.dev/docs/apps/build/discounts/build-discount-function). + + > Note: + > To create automatic discounts with custom logic, use [`discountAutomaticAppCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppCreate). + """ + discountCodeAppCreate( + """The input data used to create the discount.""" + codeAppDiscount: DiscountCodeAppInput! + ): DiscountCodeAppCreatePayload + + """ + Updates a code discount, where the discount type is provided by an app + extension that uses [Shopify + Functions](https://shopify.dev/docs/apps/build/functions). Use this mutation + when you need advanced, custom, or dynamic discount capabilities that aren't + supported by [Shopify's native discount + types](https://help.shopify.com/manual/discounts/discount-types). + + > Note: + > To update automatic discounts, use [`discountAutomaticAppUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticAppUpdate). + """ + discountCodeAppUpdate( + """The ID of the discount to update.""" + id: ID! + + """The input fields required to update the discount.""" + codeAppDiscount: DiscountCodeAppInput! + ): DiscountCodeAppUpdatePayload + + """ + Creates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicCreate) mutation. + """ + discountCodeBasicCreate( + """The input data used to create the discount code.""" + basicCodeDiscount: DiscountCodeBasicInput! + ): DiscountCodeBasicCreatePayload + + """ + Updates an [amount off discount](https://help.shopify.com/manual/discounts/discount-types/percentage-fixed-amount) + that's applied on a cart and at checkout when a customer enters a code. Amount + off discounts can be a percentage off or a fixed amount off. + + > Note: + > To update discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticBasicUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBasicUpdate) mutation. + """ + discountCodeBasicUpdate( + """The ID of the discount code to update.""" + id: ID! + + """The input data used to update the discount code.""" + basicCodeDiscount: DiscountCodeBasicInput! + ): DiscountCodeBasicUpdatePayload + + """ + Activates multiple [code discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can activate discounts for all codes that match a search + criteria, or activate a predefined set of discount codes. + """ + discountCodeBulkActivate( + """ + The search query for filtering discounts. +

+ 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 + + """ + The ID of the saved search for filtering discounts to activate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """The IDs of the discounts to activate.""" + ids: [ID!] + ): DiscountCodeBulkActivatePayload + + """ + Deactivates multiple [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can deactivate discounts for all codes that match a search + criteria, or deactivate a predefined set of discount codes. + """ + discountCodeBulkDeactivate( + """ + The search query for filtering discounts. +

+ 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 + + """ + The ID of the saved search for filtering discounts to deactivate. Saved + searches represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """The IDs of the discounts to deactivate.""" + ids: [ID!] + ): DiscountCodeBulkDeactivatePayload + + """ + Deletes multiple [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount code IDs + + For example, you can delete discounts for all codes that match a search + criteria, or delete a predefined set of discount codes. + """ + discountCodeBulkDelete( + """ + The search query for filtering discounts. +

+ 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 + + """ + The ID of the saved search for filtering discounts to delete. Saved searches + represent [customer + segments](https://help.shopify.com/manual/customers/customer-segments) that + merchants have built in the Shopify admin. + """ + savedSearchId: ID + + """The IDs of the discounts to delete.""" + ids: [ID!] + ): DiscountCodeBulkDeletePayload + + """ + Creates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyCreate) + mutation. + """ + discountCodeBxgyCreate( + """The input data used to create the BXGY code discount.""" + bxgyCodeDiscount: DiscountCodeBxgyInput! + ): DiscountCodeBxgyCreatePayload + + """ + Updates a + [buy X get Y discount (BXGY)](https://help.shopify.com/manual/discounts/discount-types/buy-x-get-y) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update discounts that are automatically applied on a cart and at checkout, use the + [`discountAutomaticBxgyUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticBxgyUpdate) + mutation. + """ + discountCodeBxgyUpdate( + """The ID of the BXGY code discount to update.""" + id: ID! + + """The input data used to update the BXGY code discount.""" + bxgyCodeDiscount: DiscountCodeBxgyInput! + ): DiscountCodeBxgyUpdatePayload + + """ + Temporarily suspends a code discount without permanently removing it from the + store. Deactivation allows merchants to pause promotional campaigns while + preserving the discount configuration for potential future use. + + For example, when a flash sale needs to end immediately or a discount code + requires temporary suspension due to inventory issues, merchants can + deactivate it to stop new redemptions while keeping the discount structure intact. + + Use `DiscountCodeDeactivate` to: + - Pause active promotional campaigns timely + - Temporarily suspend problematic discount codes + - Control discount availability during inventory shortages + - Maintain discount history while stopping usage + + Deactivated discounts remain in the system and can be reactivated later, + unlike deletion which persistently removes the code. Customers attempting to + use deactivated codes will receive appropriate error messages. + """ + discountCodeDeactivate( + """The ID of the code discount to deactivate.""" + id: ID! + ): DiscountCodeDeactivatePayload + + """ + Removes a code discount from the store, making it permanently unavailable for + customer use. This mutation provides a clean way to eliminate discount codes + that are no longer needed or have been replaced. + + For example, when a seasonal promotion ends or a discount code has been + compromised, merchants can delete it entirely rather than just deactivating + it, ensuring customers cannot attempt to use expired promotional codes. + + Use `DiscountCodeDelete` to: + - persistently remove outdated promotional codes + - Clean up discount code lists after campaigns end + - Eliminate compromised or leaked discount codes + - Maintain organized discount management + + Once deleted, the discount code cannot be recovered and any customer attempts + to use it will fail. This differs from deactivation, which preserves the code + for potential future reactivation. + """ + discountCodeDelete( + """The ID of the code discount to delete.""" + id: ID! + ): DiscountCodeDeletePayload + + """ + Creates an [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To create discounts that are automatically applied on a cart and at + checkout, use the [`discountAutomaticFreeShippingCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingCreate) mutation. + """ + discountCodeFreeShippingCreate( + """The input data used to create the discount code.""" + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + ): DiscountCodeFreeShippingCreatePayload + + """ + Updates a [free shipping discount](https://help.shopify.com/manual/discounts/discount-types/free-shipping) + that's applied on a cart and at checkout when a customer enters a code. + + > Note: + > To update a free shipping discount that's automatically applied on a cart + and at checkout, use the [`discountAutomaticFreeShippingUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountAutomaticFreeShippingUpdate) mutation. + """ + discountCodeFreeShippingUpdate( + """The ID of the discount code to update.""" + id: ID! + + """The input data used to update the discount code.""" + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + ): DiscountCodeFreeShippingUpdatePayload + + """ + Asynchronously delete + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. + """ + discountCodeRedeemCodeBulkDelete( + """ + The ID of the + [`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! + + """ + 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 + + """ + The ID of a + [saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id). + """ + savedSearchId: 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!] + ): DiscountCodeRedeemCodeBulkDeletePayload + + """ + Asynchronously add + [discount codes](https://help.shopify.com/manual/discounts/discount-types#discount-codes) + in bulk that customers can use to redeem a discount. You can use the `discountRedeemCodeBulkAdd` mutation + to automate the distribution of discount codes through emails or other + marketing channels. + """ + discountRedeemCodeBulkAdd( + """ + The ID of the + [`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! + + """ + 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!]! + ): 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 conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + + """The ID of the draft order saved search for filtering draft orders on.""" + savedSearchId: ID + + """The IDs of the draft orders to add tags to.""" + ids: [ID!] + + """List of tags to be added.""" + tags: [String!]! + ): DraftOrderBulkAddTagsPayload + + """Deletes multiple draft orders.""" + draftOrderBulkDelete( + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + + """The ID of the draft order saved search for filtering draft orders on.""" + savedSearchId: ID + + """The IDs of the draft orders to delete.""" + ids: [ID!] + ): DraftOrderBulkDeletePayload + + """Removes tags from multiple draft orders.""" + draftOrderBulkRemoveTags( + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + + """The ID of the draft order saved search for filtering draft orders on.""" + savedSearchId: ID + + """The IDs of the draft orders to remove tags from.""" + ids: [ID!] + + """List of tags to be removed.""" + tags: [String!]! + ): DraftOrderBulkRemoveTagsPayload + + """ + Calculates the properties of a 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 + + """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.""" + id: ID + ): DraftOrderDuplicatePayload + + """Previews a draft order invoice email.""" + draftOrderInvoicePreview( + """Specifies the draft order invoice email to preview.""" + id: ID! + + """Specifies the draft order invoice email fields.""" + email: EmailInput + ): DraftOrderInvoicePreviewPayload + + """Sends an email invoice for a draft order.""" + draftOrderInvoiceSend( + """Specifies the draft order to send the invoice for.""" + id: ID! + + """Specifies the draft order invoice email fields.""" + email: EmailInput + ): DraftOrderInvoiceSendPayload + + """ + Updates a draft order. + + If a checkout has been started for a draft order, any update to the draft will unlink the checkout. Checkouts + are created but not immediately completed when opening the merchant credit card modal in the admin, and when a + buyer opens the invoice URL. This is usually fine, but there is an edge case where a checkout is in progress + and the draft is updated before the checkout completes. This will not interfere with the checkout and order + creation, but if the link from draft to checkout is broken the draft will remain open even after the order is + created. + """ + draftOrderUpdate( + """Specifies the draft order to update.""" + id: ID! + + """The draft order properties to update.""" + input: DraftOrderInput! + ): DraftOrderUpdatePayload + + """ + Updates the server pixel to connect to an EventBridge endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + eventBridgeServerPixelUpdate( + """ + The ARN for the EventBridge endpoint to which customer events are to be sent. + """ + arn: ARN! + ): EventBridgeServerPixelUpdatePayload + + """ + Creates a 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 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 handle of the function providing the constraint rule.""" + functionHandle: String + + """Associate the function with one or multiple delivery method types.""" + deliveryMethodTypes: [DeliveryMethodType!]! + + """Metafields to associate to the fulfillment constraint rule.""" + metafields: [MetafieldInput!] = [] + ): FulfillmentConstraintRuleCreatePayload + + """Deletes a fulfillment constraint rule and its metafields.""" + fulfillmentConstraintRuleDelete( + """A globally-unique identifier for the fulfillment constraint rule.""" + id: ID! + ): FulfillmentConstraintRuleDeletePayload + + """Update a fulfillment constraint rule.""" + fulfillmentConstraintRuleUpdate( + """A globally-unique identifier for the fulfillment constraint rule.""" + id: ID! + + """ + Specifies the delivery method types to be updated. + If not provided or providing an empty list will associate the function with all delivery methods. + """ + deliveryMethodTypes: [DeliveryMethodType!]! + ): FulfillmentConstraintRuleUpdatePayload + + """ + 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. + """ + 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 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 + + """ + The estimated date and time when the fulfillment order will be shipped. + """ + estimatedShippedAt: DateTime + ): 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 ID of the fulfillment order on which a fulfillment hold is applied. + """ + id: ID! + + """The details of the fulfillment hold applied on the fulfillment order.""" + fulfillmentHold: FulfillmentOrderHoldInput! + ): FulfillmentOrderHoldPayload + + """ + 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 ID of the fulfillment order to be moved.""" + id: ID! + + """The ID of the location where the fulfillment order will be moved.""" + newLocationId: ID! + + """ + The fulfillment order line items to be moved. + If left blank, all unfulfilled line items belonging to the fulfillment order are moved. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + ): FulfillmentOrderMovePayload + + """ + Marks a scheduled fulfillment order as open. + + From API version 2026-01, this will also mark a fulfillment order as open when + it is assigned to a merchant managed location and has had progress reported. + """ + fulfillmentOrderOpen( + """The ID of the fulfillment order to mark as open.""" + id: ID! + ): FulfillmentOrderOpenPayload + + """ + Rejects a cancellation request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectCancellationRequest( + """ + The ID of the fulfillment order associated with the cancellation request. + """ + id: ID! + + """An optional reason for rejecting the cancellation request.""" + message: String + ): FulfillmentOrderRejectCancellationRequestPayload + + """ + Rejects a fulfillment request sent to a fulfillment service for a fulfillment order. + """ + fulfillmentOrderRejectFulfillmentRequest( + """ + The ID of the fulfillment order associated with the fulfillment request. + """ + id: ID! + + """The reason for the fulfillment order rejection.""" + reason: FulfillmentOrderRejectionReason + + """An optional reason for rejecting the fulfillment request.""" + message: String + + """ + An optional array of line item rejection details. If none are provided, all + line items will be assumed to be unfulfillable. + + **Note**: After the fulfillment request has been rejected, none of the line + items will be able to be fulfilled. This field documents which line items + specifically were unable to be fulfilled and why. + """ + lineItems: [IncomingRequestLineItemInput!] + ): FulfillmentOrderRejectFulfillmentRequestPayload + + """Releases the fulfillment hold on a fulfillment order.""" + fulfillmentOrderReleaseHold( + """ + The ID of the fulfillment order for which to release the fulfillment hold. + """ + id: ID! + + """ + The IDs of the fulfillment holds to release.
+
+ 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!] + + """ + A configurable ID used to track the automation system releasing this hold. + """ + externalId: String + ): FulfillmentOrderReleaseHoldPayload + + """ + Reschedules a scheduled fulfillment order. + + Updates the value of the `fulfillAt` field on a scheduled fulfillment order. + + The fulfillment order will be marked as ready for fulfillment at this date and time. + """ + fulfillmentOrderReschedule( + """The ID of the fulfillment order to reschedule.""" + id: ID! + + """ + A future date and time when the fulfillment order will be marked as ready for fulfillment. + """ + fulfillAt: DateTime! + ): FulfillmentOrderReschedulePayload + + """ + Splits 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 ID of the fulfillment order associated with fulfillment request.""" + id: ID! + + """An optional message for the fulfillment request.""" + message: String + + """ + Whether the customer should be notified when fulfillments are created for this fulfillment order. + """ + notifyCustomer: Boolean + + """ + The fulfillment order line items to be requested for fulfillment. + If left blank, all line items of the fulfillment order are requested for fulfillment. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + ): FulfillmentOrderSubmitFulfillmentRequestPayload + + """ + Route the fulfillment orders to an alternative location, according to the shop's order routing settings. This involves: + * Finding an alternate location that can fulfill the fulfillment orders. + * Assigning the fulfillment orders to the new location. + """ + fulfillmentOrdersReroute( + """The list of IDs of the fulfillment orders.""" + fulfillmentOrderIds: [ID!]! + + """ + The list of IDs of the locations to include for rerouting. By default, all locations are included. + """ + includedLocationIds: [ID!] + + """ + The list of IDs of the locations to exclude for rerouting. Excluded + locations specified here take precedence over included locations provided + through included_location_ids. + """ + excludedLocationIds: [ID!] + ): FulfillmentOrdersReroutePayload + + """ + Sets the latest date and time by which the fulfillment orders need to be fulfilled. + """ + fulfillmentOrdersSetFulfillmentDeadline( + """The IDs of the fulfillment orders for which the deadline is being set.""" + fulfillmentOrderIds: [ID!]! + + """The new fulfillment deadline of the fulfillment orders.""" + fulfillmentDeadline: DateTime! + ): FulfillmentOrdersSetFulfillmentDeadlinePayload + + """ + Creates a fulfillment service. + + ## Fulfillment service location + + When creating a fulfillment service, a new location will be automatically created on the shop + and will be associated with this fulfillment service. + This location will be named after the fulfillment service and inherit the shop's address. + + If you are using API version `2023-10` or later, and you need to specify + custom attributes for the fulfillment service location + (for example, to change its address to a country different from the shop's country), + use the + [LocationEdit](https://shopify.dev/api/admin-graphql/latest/mutations/locationEdit) + mutation after creating the fulfillment service. + """ + fulfillmentServiceCreate( + """The name of the fulfillment service.""" + name: String! + + """ + The URL to send requests for the fulfillment service. + + 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 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 + + """ + 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 + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean = true + ): FulfillmentServiceCreatePayload + + """Deletes a fulfillment service.""" + fulfillmentServiceDelete( + """The ID of the fulfillment service to delete.""" + id: ID! + + """ + The ID of an active merchant managed location where inventory and commitments will be relocated + 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 action to take with the location after the fulfillment service is deleted. + """ + inventoryAction: FulfillmentServiceDeleteInventoryAction = TRANSFER + ): 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 id of the fulfillment service.""" + id: ID! + + """The name of the fulfillment service.""" + name: String + + """ + 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 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 + + """ + 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 + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean = true + ): FulfillmentServiceUpdatePayload + + """Updates tracking information for a fulfillment.""" + fulfillmentTrackingInfoUpdate( + """The ID of the fulfillment.""" + fulfillmentId: ID! + + """ + The tracking input for the mutation, including tracking URL, number, and company. + """ + trackingInfoInput: FulfillmentTrackingInput! + + """ + Whether the customer will be notified of this update and future updates for the fulfillment. + If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. + """ + notifyCustomer: Boolean + ): FulfillmentTrackingInfoUpdatePayload + + """Updates tracking information for a fulfillment.""" + fulfillmentTrackingInfoUpdateV2( + """The ID of the fulfillment.""" + fulfillmentId: ID! + + """ + The tracking input for the mutation, including tracking URL, number, and company. + """ + trackingInfoInput: FulfillmentTrackingInput! + + """ + Whether the customer will be notified of this update and future updates for the fulfillment. + If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. + """ + notifyCustomer: Boolean + ): FulfillmentTrackingInfoUpdateV2Payload @deprecated(reason: "Use `fulfillmentTrackingInfoUpdate` instead.") + + """Create a gift card.""" + giftCardCreate( + """The input fields to create a gift card.""" + input: GiftCardCreateInput! + ): GiftCardCreatePayload + + """Credit a gift card.""" + giftCardCredit( + """The ID of the gift card to be credited.""" + id: ID! + + """The input fields to credit a gift card.""" + creditInput: GiftCardCreditInput! + ): GiftCardCreditPayload + + """ + Deactivate a gift card. A deactivated gift card cannot be used by a customer. + A deactivated gift card cannot be re-enabled. + """ + giftCardDeactivate( + """The ID of the gift card to deactivate.""" + id: ID! + ): GiftCardDeactivatePayload + + """Debit a gift card.""" + giftCardDebit( + """The ID of the gift card to be debited.""" + id: ID! + + """The input fields to debit a gift card.""" + debitInput: GiftCardDebitInput! + ): 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 + + """Activate an inventory item at a location.""" + inventoryActivate( + """The ID of the inventory item to activate.""" + inventoryItemId: ID! + + """The ID of the location of the inventory item being activated.""" + locationId: ID! + + """ + The initial available quantity of the inventory item being activated at the location. + """ + available: Int + + """ + The initial on_hand quantity of the inventory item being activated at the location. + """ + onHand: Int + + """ + Allow activation at or away from fulfillment service location with sku + sharing off. This will deactivate inventory at all other locations. + """ + stockAtLegacyLocation: Boolean = false + ): InventoryActivatePayload + + """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 + + """Adds items to an inventory shipment.""" + 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.""" + inventoryShipmentCreate( + """The input fields for the inventory shipment.""" + input: InventoryShipmentCreateInput! + ): InventoryShipmentCreatePayload + + """Adds an in-transit shipment to an inventory transfer.""" + inventoryShipmentCreateInTransit( + """The input fields for the inventory shipment.""" + input: InventoryShipmentCreateInput! + ): InventoryShipmentCreateInTransitPayload + + """Deletes an inventory shipment. Only draft shipments can be deleted.""" + inventoryShipmentDelete( + """The ID of the inventory shipment to be deleted.""" + id: ID! + ): InventoryShipmentDeletePayload + + """Marks a draft inventory shipment as in transit.""" + inventoryShipmentMarkInTransit( + """The ID of the inventory shipment to mark in transit.""" + id: ID! + + """The date the shipment was shipped.""" + dateShipped: DateTime + ): InventoryShipmentMarkInTransitPayload + + """Receive an inventory shipment.""" + inventoryShipmentReceive( + """The ID of the inventory shipment to receive.""" + id: ID! + + """The list of receive line items for the inventory shipment.""" + lineItems: [InventoryShipmentReceiveItemInput!] + + """The date the inventory shipment was initially received.""" + dateReceived: DateTime + + """The bulk receive action for the inventory shipment.""" + bulkReceiveAction: InventoryShipmentReceiveLineItemReason + ): InventoryShipmentReceivePayload + + """Remove items from an inventory shipment.""" + inventoryShipmentRemoveItems( + """The ID of the inventory shipment to remove items from.""" + id: ID! + + """ + A list of inventory shipment line item ids representing the items to be removed from the shipment. + """ + lineItems: [ID!]! + ): InventoryShipmentRemoveItemsPayload + + """Edits the tracking info on an inventory shipment.""" + inventoryShipmentSetTracking( + """The ID of the inventory shipment whose tracking info is being edited.""" + id: ID! + + """The tracking info to edit on the inventory shipment.""" + tracking: InventoryShipmentTrackingInput! + ): InventoryShipmentSetTrackingPayload + + """Updates items on an inventory shipment.""" + inventoryShipmentUpdateItemQuantities( + """The ID of the inventory shipment to update item quantities.""" + id: ID! + + """The list of line items to be updated to the shipment.""" + items: [InventoryShipmentUpdateItemQuantitiesInput!] = [] + ): InventoryShipmentUpdateItemQuantitiesPayload + + """Cancels an inventory transfer.""" + inventoryTransferCancel( + """The ID of the inventory transfer to cancel.""" + id: ID! + ): InventoryTransferCancelPayload + + """Creates an inventory transfer.""" + inventoryTransferCreate( + """The input fields for the inventory transfer.""" + input: InventoryTransferCreateInput! + ): InventoryTransferCreatePayload + + """Creates an inventory transfer in ready to ship.""" + 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. + """ + 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. + """ + 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. + """ + 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 location to deactivate.""" + locationId: ID! + + """ + The ID of a destination location to which inventory, pending orders and + moving transfers will be moved from the location to deactivate. + """ + destinationLocationId: ID + ): LocationDeactivatePayload + + """Deletes a location.""" + locationDelete( + """The ID of a location to delete.""" + locationId: ID! + ): LocationDeletePayload + + """ + 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( + """The ID of the market definition to target.""" + marketId: ID! + + """Properties to update for the market currency settings.""" + input: MarketCurrencySettingsUpdateInput! + ): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") + + """Deletes a market definition.""" + marketDelete( + """The ID of the market to delete.""" + id: ID! + ): MarketDeletePayload + + """Creates or updates market localizations.""" + marketLocalizationsRegister( + """ + The ID of the resource that is being localized within the context of a market. + """ + resourceId: ID! + + """The input fields for a market localization.""" + marketLocalizations: [MarketLocalizationRegisterInput!]! + ): MarketLocalizationsRegisterPayload + + """Deletes market localizations.""" + marketLocalizationsRemove( + """ + The ID of the resource for which market localizations are being deleted. + """ + resourceId: ID! + + """The list of market localization keys.""" + marketLocalizationKeys: [String!]! + + """The list of market IDs.""" + marketIds: [ID!]! + ): MarketLocalizationsRemovePayload + + """Deletes a market region.""" + marketRegionDelete( + """The ID of the market region to delete.""" + id: ID! + ): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """Creates regions that belong to an existing market.""" + marketRegionsCreate( + """The ID of the market to add the regions to.""" + marketId: ID! + + """The regions to be created.""" + regions: [MarketRegionCreateInput!]! + ): MarketRegionsCreatePayload @deprecated(reason: "This mutation is deprecated and will be removed in the future. Use `marketCreate` or `marketUpdate` instead.") + + """Deletes a list of market regions.""" + marketRegionsDelete( + """A list of IDs of the market regions to delete.""" + ids: [ID!]! + ): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") + + """Updates the properties of a market.""" + marketUpdate( + """The ID of the market to update.""" + id: ID! + + """The properties to update.""" + input: MarketUpdateInput! + ): MarketUpdatePayload + + """Creates a web presence for a market.""" + marketWebPresenceCreate( + """The ID of the market for which to create a web presence.""" + marketId: ID! + + """The details of the web presence to be created.""" + webPresence: MarketWebPresenceCreateInput! + ): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") + + """Deletes a market web presence.""" + marketWebPresenceDelete( + """The ID of the web presence to delete.""" + webPresenceId: ID! + ): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") + + """Updates a market web presence.""" + marketWebPresenceUpdate( + """The ID of the web presence to update.""" + webPresenceId: ID! + + """The web_presence fields used to update the market's web presence.""" + webPresence: MarketWebPresenceUpdateInput! + ): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") + + """ + Deletes all external marketing activities. Deletion is performed by a + background job, as it may take a bit of time to complete if a large number of + activities are to be deleted. Attempting to create or modify external + activities before the job has completed will result in the + create/update/upsert mutation returning an error. + """ + marketingActivitiesDeleteAllExternal: MarketingActivitiesDeleteAllExternalPayload + + """ + Create new marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future. + """ + marketingActivityCreate( + """The Input of marketing activity create.""" + input: MarketingActivityCreateInput! + ): MarketingActivityCreatePayload + + """Creates a new external marketing activity.""" + marketingActivityCreateExternal( + """The input field for creating an external marketing activity.""" + input: MarketingActivityCreateExternalInput! + ): MarketingActivityCreateExternalPayload + + """Deletes an external marketing activity.""" + marketingActivityDeleteExternal( + """ + The ID of the marketing activity. A marketing activity ID or remote ID must be provided. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. A marketing activity ID or remote ID + must be provided. + """ + remoteId: String + ): MarketingActivityDeleteExternalPayload + + """ + Updates a marketing activity with the latest information. Marketing activity + app extensions are deprecated and will be removed in the near future. + """ + marketingActivityUpdate( + """The Input of the marketing activity.""" + input: MarketingActivityUpdateInput! + ): MarketingActivityUpdatePayload + + """Update an external marketing activity.""" + marketingActivityUpdateExternal( + """The input field for updating an external marketing activity.""" + input: MarketingActivityUpdateExternalInput! + + """ + The ID of the marketing activity. Specify either the marketing activity ID, + remote ID, or UTM to update the marketing activity. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. Specify either the marketing activity + ID, remote ID, or UTM to update the marketing activity. + """ + remoteId: String + + """ + Specifies the [Urchin Traffic Module (UTM) + parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are + associated with a related marketing campaign. Specify either the marketing + activity ID, remote ID, or UTM to update the marketing activity. + """ + utm: UTMInput + ): MarketingActivityUpdateExternalPayload + + """ + Creates a new external marketing activity or updates an existing one. When + optional fields are absent or null, associated information will be removed + from an existing marketing activity. + """ + marketingActivityUpsertExternal( + """ + The input field for creating or updating an external marketing activity. + """ + input: MarketingActivityUpsertExternalInput! + ): MarketingActivityUpsertExternalPayload + + """ + Creates a new marketing engagement for a marketing activity or a marketing channel. + """ + marketingEngagementCreate( + """ + The identifier of the marketing activity for which the engagement metrics + are being provided. This or the remoteId should be set when and only when + providing activity-level engagements. This should be nil when providing + channel-level engagements. + """ + marketingActivityId: ID + + """ + A custom unique identifier for the marketing activity, which can be used to + manage the activity and send engagement metrics without having to store our + marketing activity ID in your systems. This or the marketingActivityId + should be set when and only when providing activity-level engagements. This + should be nil when providing channel-level engagements. + """ + remoteId: String + + """ + The unique string identifier of the channel to which the engagement metrics + are being provided. This should be set when and only when providing + channel-level engagements. This should be nil when providing activity-level + engagements. For the correct handle for your channel, contact your partner manager. + """ + channelHandle: String + + """The marketing engagement's attributes.""" + marketingEngagement: MarketingEngagementInput! + ): MarketingEngagementCreatePayload + + """ + Marks channel-level engagement data such that it no longer appears in reports. + Activity-level data cannot be deleted directly, instead the MarketingActivity itself should be deleted to + hide it from reports. + """ + marketingEngagementsDelete( + """The handle of the channel for which engagement data should be deleted.""" + channelHandle: String + + """ + When true, engagements for all channels that belong to the api client will be deleted. + """ + deleteEngagementsForAllChannels: Boolean = false + ): MarketingEngagementsDeletePayload + + """Creates a menu.""" + menuCreate( + """The menu's title.""" + title: String! + + """The menu's handle.""" + handle: String! + + """List of the menu's items.""" + items: [MenuItemCreateInput!]! + ): MenuCreatePayload + + """Deletes a menu.""" + menuDelete( + """The ID of the menu to be deleted.""" + id: ID! + ): MenuDeletePayload + + """Updates a menu.""" + menuUpdate( + """ID of the menu to be updated.""" + id: ID! + + """The menu's title.""" + title: String! + + """The menu's handle.""" + handle: String + + """List of the menu's items.""" + items: [MenuItemUpdateInput!]! + ): MenuUpdatePayload + + """ + Creates a 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( + """ + The id of the metafield definition to delete. Using `identifier` is preferred. + """ + id: ID + + """The identifier of the metafield definition to delete.""" + identifier: MetafieldDefinitionIdentifierInput + + """Whether to delete all associated metafields.""" + deleteAllAssociatedMetafields: Boolean = false + ): MetafieldDefinitionDeletePayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionPin( + """ + The id of the metafield definition to pin. Using `identifier` is preferred. + """ + definitionId: ID + + """The identifier of the metafield definition to pin.""" + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionPinPayload + + """ + You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. + The order of your pinned metafield definitions determines the order in which your metafields are displayed + on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed. + """ + metafieldDefinitionUnpin( + """ + The ID of the metafield definition to unpin. Using `identifier` is preferred. + """ + definitionId: ID + + """The identifier of the metafield definition to unpin.""" + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionUnpinPayload + + """Updates a metafield definition.""" + metafieldDefinitionUpdate( + """The input fields for the metafield definition update.""" + definition: MetafieldDefinitionUpdateInput! + ): MetafieldDefinitionUpdatePayload + + """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 ID of the metaobject definition to update.""" + id: ID! + + """The input fields for updating a metaobject definition.""" + definition: MetaobjectDefinitionUpdateInput! + ): MetaobjectDefinitionUpdatePayload + + """Deletes the specified metaobject and its associated metafields.""" + metaobjectDelete( + """The ID of the metaobject to delete.""" + id: ID! + ): MetaobjectDeletePayload + + """Updates 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( + """The ID of the order to be canceled.""" + orderId: ID! + + """ + Indicates how to refund the amount paid by the customer. Authorized payments will be voided regardless of this setting. + """ + refundMethod: OrderCancelRefundMethodInput + + """ + Whether to restock the inventory committed to the order. For unpaid orders + fulfilled from locations that have been deactivated, inventory will not be + restocked to the deactivated locations even if this argument is set to true. + """ + restock: Boolean! + + """The reason for canceling the order.""" + reason: OrderCancelReason! + + """ + Whether to send a notification to the customer about the order cancellation. + """ + notifyCustomer: Boolean = false + + """ + A staff-facing note about the order cancellation. This is not visible to the customer. Maximum length of 255 characters. + """ + staffNote: String = null + ): OrderCancelPayload + + """ + Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously + reserved by an authorization transaction. + + The `orderCapture` mutation can be used in the following scenarios: + + - To capture the full amount of an authorized transaction + - To capture a partial payment by specifying an amount less than the total order amount + - To perform multiple captures on the same order, as long as the order transaction is + [multi-capturable](https://shopify.dev/docs/api/admin-graphql/latest/objects/ordertransaction#field-OrderTransaction.fields.multiCapturable) + + > Note: + > Multi-capture functionality is only available to stores on a + [Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan). + For multi-currency orders, the [`currency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.currency) + field is required and should match the presentment currency from the order. + + After capturing a payment, you can: + + - View the transaction details including status, amount, and processing information. + - Track the captured amount in both shop and presentment currencies. + - Monitor the transaction's settlement status. + + Learn more about [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction). + """ + orderCapture( + """The input for the mutation.""" + input: OrderCaptureInput! + ): OrderCapturePayload + + """Closes an open order.""" + orderClose( + """The input for the mutation.""" + input: OrderCloseInput! + ): OrderClosePayload + + """ + Creates an order with attributes such as customer information, line items, and shipping and billing addresses. + + Use the `orderCreate` mutation to programmatically generate orders in scenarios where + orders aren't created through the standard checkout process, such as when importing orders from an external + system or creating orders for wholesale customers. + + The `orderCreate` mutation doesn't support applying multiple discounts, such as discounts on line items. + Automatic discounts won't be applied unless you replicate the logic of those discounts in your custom + implementation. You can [apply a discount code](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCreateDiscountCodeInput), + but only one discount code can be set for each order. + + > Note: + > If you're using the `orderCreate` mutation with a + > [trial](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/free-trial) or + > [development store](https://shopify.dev/docs/api/development-stores), then you can create a + > maximum of five new orders per minute. + + After you create an order, you can make subsequent edits to the order using one of the following mutations: + * [`orderUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderUpdate): + Used for simple updates to an order, such as changing the order's note, tags, or customer information. + * [`orderEditBegin`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin): + Used when you need to make significant updates to an order, such as adding or removing line items, changing + quantities, or modifying discounts. The `orderEditBegin` mutation initiates an order editing session, + allowing you to make multiple changes before finalizing them. Learn more about using the `orderEditBegin` + mutation to [edit existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). + + Learn how to build apps that integrate with + [order management and fulfillment processes](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + orderCreate( + """The attributes of the new order.""" + order: OrderCreateOrderInput! + + """ + The strategies for updating inventory and whether to send shipping and order confirmations to customers. + """ + options: OrderCreateOptionsInput + ): OrderCreatePayload + + """Creates a payment for an order by mandate.""" + orderCreateMandatePayment( + """The ID of the order to collect the balance for.""" + id: ID! + + """The ID of the payment schedule to collect the balance for.""" + paymentScheduleId: ID + + """A unique key to identify the payment request.""" + idempotencyKey: String! + + """The mandate ID used for payment.""" + mandateId: ID! + + """The payment amount to collect.""" + amount: MoneyInput + + """ + Whether the payment should be authorized or captured. If `false`, then the authorization of + the payment is triggered. + """ + autoCapture: Boolean = true + ): OrderCreateMandatePaymentPayload + + """ + Create a manual payment for an order. You can only create a manual payment for an order if it isn't already + fully paid. + """ + orderCreateManualPayment( + """The ID of the order to create a manual payment for.""" + id: ID! + + """The manual payment amount to be created.""" + amount: MoneyInput + + """ + The name of the payment method used for creating the payment. If none is + provided, then the default manual payment method ('Other') will be used. + """ + paymentMethodName: String + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format) when a manual payment was processed. If you're importing + transactions from an app or another platform, then you can set processedAt + to a date and time in the past to match when the original transaction was created. + """ + processedAt: DateTime + ): OrderCreateManualPaymentPayload + + """Removes customer from an order.""" + orderCustomerRemove( + """The ID of the order having its customer removed.""" + orderId: ID! + ): OrderCustomerRemovePayload + + """Sets a customer on an order.""" + orderCustomerSet( + """The ID of the order having a customer set.""" + orderId: ID! + + """The ID of the customer being set on the order.""" + customerId: ID! + ): OrderCustomerSetPayload + + """ + 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) + or the order edit session to edit. This is the edit to which the custom item is added. + """ + id: ID! + + """The name of the custom item to add.""" + title: String! + + """ + The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/location) + (if applicable) from which the custom item is sold. Used for tax + calculations. A default location will be chosen automatically if none is provided. + """ + locationId: ID + + """The unit price of the custom item. This value can't be negative.""" + price: MoneyInput! + + """The quantity of the custom item. This value must be greater than zero.""" + quantity: Int! + + """Whether the custom item is taxable. Defaults to `true`.""" + taxable: Boolean + + """Whether the custom item requires shipping. Defaults to `false`.""" + requiresShipping: Boolean + ): OrderEditAddCustomItemPayload + + """ + 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 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! + + """The discount to add to the line item.""" + discount: OrderEditAppliedDiscountInput! + ): 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) + 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 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( + """ + 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 variant to add.""" + variantId: 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! + + """ + Whether the mutation can create a line item for a variant that's already on the calculated order. + """ + allowDuplicates: Boolean = false + ): 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) + 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 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! + + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! + ): OrderEditRemoveDiscountPayload + + """ + Removes a line item discount that was applied as part of an order edit. + """ + orderEditRemoveLineItemDiscount( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit from which the line item discount is removed. + """ + id: ID! + + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! + ): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") + + """ + Removes a shipping line from an existing order. For more information on how to + use the GraphQL Admin API to edit an existing order, refer to [Edit existing orders](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). + """ + orderEditRemoveShippingLine( + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + 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 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) + 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 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 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! + + """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! + ): 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.""" + orderInvoiceSend( + """The order associated with the invoice.""" + id: ID! + + """ + The email input fields for the order invoice. The `bcc` and `from` fields should be store or staff account emails. + """ + email: EmailInput + ): OrderInvoiceSendPayload + + """ + Marks an order as paid by recording a payment transaction for the outstanding amount. + + Use the `orderMarkAsPaid` mutation to record payments received outside the standard checkout + process. The `orderMarkAsPaid` mutation is particularly useful in scenarios where: + + - Orders were created with manual payment methods (cash on delivery, bank deposit, money order) + - Payments were received offline and need to be recorded in the system + - Previously authorized payments need to be captured manually + - Orders require manual payment reconciliation due to external payment processing + + The mutation validates that the order can be marked as paid before processing. + An order can be marked as paid only if it has a positive outstanding balance and its + [financial status](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.displayFinancialStatus) + isn't already `PAID`. The mutation will either create a new sale transaction for the full + outstanding amount or capture an existing authorized transaction, depending on the order's current payment state. + + After successfully marking an order as paid, the order's financial status is updated to + reflect the payment, and payment events are logged for tracking and analytics + purposes. + + Learn more about [managing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + in apps. + """ + orderMarkAsPaid( + """The input for the mutation.""" + input: OrderMarkAsPaidInput! + ): OrderMarkAsPaidPayload + + """Opens a closed order.""" + orderOpen( + """The input for the mutation.""" + input: OrderOpenInput! + ): OrderOpenPayload + + """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.""" + pageCreate( + """The properties of the new page.""" + page: PageCreateInput! + ): PageCreatePayload + + """Deletes a page.""" + pageDelete( + """The ID of the page to be deleted.""" + id: ID! + ): PageDeletePayload + + """Updates a page.""" + 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 global IDs of the payment customizations.""" + ids: [ID!]! + + """The enabled status of the payment customizations.""" + enabled: Boolean! + ): 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( + """Specifies the reference orderId to add the payment terms for.""" + referenceId: ID! + + """The attributes used to create the payment terms.""" + paymentTermsAttributes: PaymentTermsCreateInput! + ): PaymentTermsCreatePayload + + """ + Delete payment terms for an order. To delete payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsDelete( + """The input fields used to delete the payment terms.""" + input: PaymentTermsDeleteInput! + ): PaymentTermsDeletePayload + + """ + Update payment terms on an order. To update payment terms on a draft order, + use a draft order mutation and include the request with the `DraftOrderInput`. + """ + paymentTermsUpdate( + """The input fields used to update the payment terms.""" + input: PaymentTermsUpdateInput! + ): PaymentTermsUpdatePayload + + """ + Creates a 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( + """ + A list of `PriceListProductPriceInput` that identifies which products to update the fixed prices for. + """ + pricesToAdd: [PriceListProductPriceInput!] + + """ + A list of product IDs that identifies which products to remove the fixed prices for. + """ + pricesToDeleteByProductIds: [ID!] + + """The price list to update the prices for.""" + priceListId: ID! + ): PriceListFixedPricesByProductUpdatePayload + + """ + Deletes specific fixed prices from a price list using a product variant ID. + You can use the `priceListFixedPricesDelete` mutation to delete a set of fixed + prices from a price list. After deleting the set of fixed prices from the + price list, the price of each product variant reverts to the original price + that was determined by the price list adjustment. + """ + priceListFixedPricesDelete( + """The ID of the price list from which the fixed prices will be removed.""" + priceListId: ID! + + """ + A list of product variant IDs whose fixed prices will be removed from the price list. + """ + variantIds: [ID!]! + ): PriceListFixedPricesDeletePayload + + """ + Updates fixed prices on a 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 + + """Disable a shop's privacy features.""" + privacyFeaturesDisable( + """The list of privacy features to disable.""" + featuresToDisable: [PrivacyFeaturesEnum!]! + ): PrivacyFeaturesDisablePayload + + """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 attributes of the new product.""" + product: ProductCreateInput + + """The media to add to the product.""" + media: [CreateMediaInput!] + ): ProductCreatePayload + + """Creates media for a product.""" + productCreateMedia( + """Specifies the product associated with the media.""" + productId: ID! + + """List of new media to be added to a product.""" + media: [CreateMediaInput!]! + ): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") + + """ + Permanently deletes a product and all its associated data, including variants, media, publications, and inventory items. + + Use the `productDelete` mutation to programmatically remove products from your store when they need to be + permanently deleted from your catalog, such as when removing discontinued items, cleaning up test data, or + synchronizing with external inventory management systems. + + The `productDelete` mutation removes the product from all associated collections, + and removes all associated data for the product, including: + + - All product variants and their inventory items + - Product media (images, videos) that are not referenced by other products + - [Product options](https://shopify.dev/api/admin-graphql/latest/objects/ProductOption) and [option values](https://shopify.dev/api/admin-graphql/latest/objects/ProductOptionValue) + - Product publications across all sales channels + - Product tags and metadata associations + + The `productDelete` mutation also has the following effects on existing orders and transactions: + + - **Draft orders**: Existing draft orders that reference this product will + retain the product information as stored data, but the product reference will + be removed. Draft orders can still be completed with the stored product details. + - **Completed orders and refunds**: Previously completed orders that included + this product aren't affected. The product information in completed orders is + preserved for record-keeping, and existing refunds for this product remain + valid and processable. + + > Caution: + > Product deletion is irreversible. After a product is deleted, it can't be recovered. Consider archiving + > or unpublishing products instead if you might need to restore them later. + + If you need to delete a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/objects/Location), + you might encounter timeout errors. To avoid these timeout errors, you can set the + [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productDelete#arguments-synchronous) + parameter to `false` to run the deletion asynchronously, which returns a + [`ProductDeleteOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductDeleteOperation) + that you can monitor for completion status. + + If you need more granular control over product cleanup, consider using these alternative mutations: + + - [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate): + Update the product status to archived or unpublished instead of deleting. + - [`productVariantsBulkDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkDelete): + Delete specific variants while keeping the product. + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete): + Delete the choices available for a product, such as size, color, or material. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model). + """ + productDelete( + """Specifies the product to delete by its ID.""" + input: ProductDeleteInput! + + """Specifies whether or not to run the mutation synchronously.""" + synchronous: Boolean = true + ): ProductDeletePayload + + """Deletes media for a product.""" + productDeleteMedia( + """Specifies the product ID from which the media will be deleted.""" + productId: ID! + + """The media IDs to be deleted.""" + mediaIds: [ID!]! + ): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Duplicates a product. + + If you need to duplicate a large product, such as one that has many + [variants](https://shopify.dev/api/admin-graphql/latest/input-objects/ProductVariantInput) + that are active at several + [locations](https://shopify.dev/api/admin-graphql/latest/input-objects/InventoryLevelInput), + you might encounter timeout errors. + + To avoid these timeout errors, you can instead duplicate the product asynchronously. + + In API version 2024-10 and higher, include `synchronous: false` argument in + this mutation to perform the duplication asynchronously. + + In API version 2024-07 and lower, use the asynchronous [`ProductDuplicateAsyncV2`](https://shopify.dev/api/admin-graphql/2024-07/mutations/productDuplicateAsyncV2). + + Metafield values are not duplicated if the unique values capability is enabled. + """ + productDuplicate( + """The ID of the product to be duplicated.""" + productId: ID! + + """The new title of the product.""" + newTitle: String! + + """ + The new status of the product. If no value is provided the status will be inherited from the original product. + """ + newStatus: ProductStatus + + """Specifies whether or not to duplicate images.""" + includeImages: Boolean = false + + """Specifies whether or not to duplicate translations.""" + includeTranslations: Boolean = false + + """Specifies whether or not to run the mutation synchronously.""" + synchronous: Boolean = true + ): ProductDuplicatePayload + + """Creates a product feed for a specific publication.""" + productFeedCreate( + """The properties of the new product feed.""" + input: ProductFeedInput + ): ProductFeedCreatePayload + + """Deletes a product feed for a specific publication.""" + productFeedDelete( + """The ID of the product feed to be deleted.""" + id: ID! + ): ProductFeedDeletePayload + + """Runs the full product sync for a given shop.""" + productFullSync( + """ + Syncs only products that haven't changed since the specified timestamp. + """ + beforeUpdatedAt: DateTime + + """The product feed which needs syncing.""" + id: ID! + + """Syncs only products that have changed since the specified timestamp.""" + updatedAtSince: DateTime + ): ProductFullSyncPayload + + """Adds multiple selling plan groups to a product.""" + productJoinSellingPlanGroups( + """The ID of the product.""" + id: ID! + + """The IDs of the selling plan groups to add.""" + sellingPlanGroupIds: [ID!]! + ): ProductJoinSellingPlanGroupsPayload + + """Removes multiple groups from a product.""" + productLeaveSellingPlanGroups( + """The ID of the product.""" + id: ID! + + """The IDs of the selling plan groups to add.""" + sellingPlanGroupIds: [ID!]! + ): ProductLeaveSellingPlanGroupsPayload + + """ + Updates an [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) + on a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + such as size, color, or material. Each option includes a name, position, and a list of values. The combination + of a product option and value creates a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + + Use the `productOptionUpdate` mutation for the following use cases: + + - **Update product choices**: Modify an existing option, like "Size" (Small, Medium, Large) or + "Color" (Red, Blue, Green), so customers can select their preferred variant. + - **Enable personalization features**: Update an option (for example, + "Engraving text") to let customers customize their purchase. + - **Offer seasonal or limited edition products**: Update a value + (for example, "Holiday red") on an existing option to support limited-time or seasonal variants. + - **Integrate with apps that manage product configuration**: Allow third-party apps to update options, like + "Bundle size", when customers select or customize + [product bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles). + - **Link options to metafields**: Associate a product option with a custom + [metafield](https://shopify.dev/docs/apps/build/custom-data), like "Fabric code", for + richer integrations with other systems or apps. + + > Note: + > The `productOptionUpdate` mutation enforces strict data integrity for product options and variants. + All option positions must be sequential, and every option should be used by at least one variant. + + After you update a product option, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionUpdate( + """Option to update.""" + option: OptionUpdateInput! + + """The ID of the Product the Option belongs to.""" + productId: ID! + + """New option values to create.""" + optionValuesToAdd: [OptionValueCreateInput!] + + """Existing option values to update.""" + optionValuesToUpdate: [OptionValueUpdateInput!] + + """IDs of the existing option values to delete.""" + optionValuesToDelete: [ID!] + + """ + The strategy defines which behavior the mutation should observe regarding variants, + 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( + """The ID of the product to update.""" + productId: ID! + + """Options to add to the product.""" + options: [OptionCreateInput!]! + + """ + The strategy defines which behavior the mutation should observe regarding variants. + 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( + """ID of the product from which to delete the options.""" + productId: ID! + + """IDs of the options to delete from the product.""" + options: [ID!]! + + """ + The strategy defines which behavior the mutation should observe,such as how + to handle a situation where deleting an option would result in duplicate variants. + """ + strategy: ProductOptionDeleteStrategy = DEFAULT + ): ProductOptionsDeletePayload + + """ + Reorders the [options](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption) and + [option values](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOptionValue) on a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + updating the order in which [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + are presented to customers. + + The `productOptionsReorder` mutation accepts a list of product options, each identified by `id` or `name`, and an + optional list of values (also by `id` or `name`) specifying the new order. The order of options in the + mutation's input determines their new positions (for example, the first option becomes `option1`). + The order of values within each option determines their new positions. The mutation recalculates the order of + variants based on the new option and value order. + + Suppose a product has the following variants: + + 1. `"Red / Small"` + 2. `"Green / Medium"` + 3. `"Blue / Small"` + + You reorder options and values: + + ``` + options: [ + { name: "Size", values: [{ name: "Small" }, { name: "Medium" }] }, + { name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } + ] + ``` + + The resulting variant order will be: + + 1. `"Small / Green"` + 2. `"Small / Red"` + 3. `"Small / Blue"` + 4. `"Medium / Green"` + + Use the `productOptionsReorder` mutation for the following use cases: + + - **Change the order of product options**: For example, display "Color" before "Size" in a store. + - **Reorder option values within an option**: For example, show "Red" before "Blue" in a color picker. + - **Control the order of product variants**: The order of options and their + values determines the sequence in which variants are listed and selected. + - **Highlight best-selling options**: Present the most popular or relevant options and values first. + - **Promote merchandising strategies**: Highlight seasonal colors, limited editions, or featured sizes. + + > Note: + > The `productOptionsReorder` mutation enforces strict data integrity for product options and variants. + > All option positions must be sequential, and every option should be used by at least one variant. + + After you reorder product options, you can further manage a product's configuration using related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + - [`productVariantsBulkCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkCreate) + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [managing product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productOptionsReorder( + """The ID of the product to update.""" + productId: ID! + + """Options to reorder on the product.""" + options: [OptionReorderInput!]! + ): ProductOptionsReorderPayload + + """ + Publishes a product. 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 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 + + """Specifies the identifier that will be used to lookup the resource.""" + identifier: ProductSetIdentifiers + ): ProductSetPayload + + """Unpublishes a product.""" + productUnpublish( + """ + Specifies the product to unpublish and the channel to unpublish it from. + """ + input: ProductUnpublishInput! + ): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") + + """ + Updates a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + with attributes such as title, description, vendor, and media. + + The `productUpdate` mutation helps you modify many products at once, avoiding the tedious or time-consuming + process of updating them one by one in the Shopify admin. Common examples including updating + product details like status or tags. + + The `productUpdate` mutation doesn't support updating + [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + To update multiple product variants for a single product and manage prices, use the + [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate) + mutation. + + > Note: + > The `productUpdate` mutation has a [throttle](https://shopify.dev/docs/api/usage/rate-limits#resource-based-rate-limits) + > that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than + > 1,000 new product variants can be updated per day. + + After updating a product, you can make additional changes using one of the following mutations: + + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + - [`publishablePublish`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/publishablePublish): + Used to publish the product and make it available to customers, if the product is currently unpublished. + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productUpdate( + """The updated properties for a product.""" + product: ProductUpdateInput + + """List of new media to be added to the product.""" + media: [CreateMediaInput!] + ): ProductUpdatePayload + + """Updates media for a product.""" + productUpdateMedia( + """Specifies the product on which media will be updated.""" + productId: ID! + + """A list of media updates.""" + media: [UpdateMediaInput!]! + ): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") + + """ + Appends existing media from a product to specific variants of that product, + creating associations between media files and particular product options. This + allows different variants to showcase relevant images or videos. + + For example, a t-shirt product might have color variants where each color + variant displays only the images showing that specific color, helping + customers see exactly what they're purchasing. + + Use `ProductVariantAppendMedia` to: + - Associate specific images with product variants for accurate display + - Build variant-specific media management in product interfaces + - Implement automated media assignment based on variant attributes + + The operation links existing product media to variants without duplicating + files, maintaining efficient media storage while enabling variant-specific displays. + + Learn more about [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant). + """ + productVariantAppendMedia( + """Specifies the product associated to the media.""" + productId: ID! + + """A list of pairs of variants and media to be attached to the variants.""" + variantMedia: [ProductVariantAppendMediaInput!]! + ): ProductVariantAppendMediaPayload + + """Detaches media from product variants.""" + productVariantDetachMedia( + """Specifies the product to which the variants and media are associated.""" + productId: ID! + + """A list of pairs of variants and media to be deleted from the variants.""" + variantMedia: [ProductVariantDetachMediaInput!]! + ): ProductVariantDetachMediaPayload + + """Adds multiple selling plan groups to a product variant.""" + productVariantJoinSellingPlanGroups( + """The ID of the product variant.""" + id: ID! + + """The IDs of the selling plan groups to add.""" + sellingPlanGroupIds: [ID!]! + ): ProductVariantJoinSellingPlanGroupsPayload + + """Remove multiple groups from a product variant.""" + productVariantLeaveSellingPlanGroups( + """The ID of the product variant.""" + id: ID! + + """The IDs of the selling plan groups to leave.""" + sellingPlanGroupIds: [ID!]! + ): ProductVariantLeaveSellingPlanGroupsPayload + + """ + Creates new bundles, updates existing bundles, and removes bundle components for one or multiple bundles. + """ + productVariantRelationshipBulkUpdate( + """The input options for the product variant being updated.""" + input: [ProductVariantRelationshipUpdateInput!]! + ): ProductVariantRelationshipBulkUpdatePayload + + """ + Creates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk + operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkCreate` mutation to efficiently add new product variants—such as different sizes, + colors, or materials—to an existing product. The mutation is helpful if you need to add product variants in bulk, + such as importing from an external system. + + The mutation supports: + + - Creating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using one of the following mutations: + + - [`productVariantsBulkUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productVariantsBulkUpdate): + Updates multiple product variants for a single product in one operation. + - [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet): + Used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkCreate( + """An array of product variants to be created.""" + variants: [ProductVariantsBulkInput!]! + + """The ID of the product on which to create the variants.""" + productId: ID! + + """List of new media to be added to the product.""" + media: [CreateMediaInput!] + + """ + The strategy defines which behavior the mutation should observe, such as + whether to keep or delete the standalone variant (when product has only a + single or default variant) when creating new variants in bulk. + """ + strategy: ProductVariantsBulkCreateStrategy = DEFAULT + ): ProductVariantsBulkCreatePayload + + """ + Deletes multiple variants in a single product. This mutation can be called directly or via the bulkOperation. + """ + productVariantsBulkDelete( + """An array of product variants IDs to delete.""" + variantsIds: [ID!]! + + """The ID of the product with the variants to update.""" + productId: ID! + ): ProductVariantsBulkDeletePayload + + """ + Reorders multiple variants in a single product. This mutation can be called directly or via the bulkOperation. + """ + productVariantsBulkReorder( + """The product ID of the variants to be reordered.""" + productId: ID! + + """An array of variant positions.""" + positions: [ProductVariantPositionInput!]! + ): ProductVariantsBulkReorderPayload + + """ + Updates multiple [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + for a single [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) in one operation. + You can run this mutation directly or as part of a [bulk + operation](https://shopify.dev/docs/api/usage/bulk-operations/imports) + for large-scale catalog updates. + + Use the `productVariantsBulkUpdate` mutation to efficiently modify product variants—such as different sizes, + colors, or materials—associated with an existing product. The mutation is helpful if you need to update a + product's variants in bulk, such as importing from an external system. + + The mutation supports: + + - Updating variants with custom option values + - Associating media (for example, images, videos, and 3D models) with the product or its variants + - Handling complex product configurations + + > Note: + > By default, stores have a limit of 2048 product variants for each product. + + After creating variants, you can make additional changes using the + [`productSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productSet) mutation, + which is used to perform multiple operations on products, such as creating or modifying product options and variants. + + You can also specifically manage product options through related mutations: + + - [`productOptionsCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsCreate) + - [`productOptionUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionUpdate) + - [`productOptionsReorder`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsReorder) + - [`productOptionsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productOptionsDelete) + + Learn more about the [product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) + and [adding product data](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/add-data). + """ + productVariantsBulkUpdate( + """An array of product variants to update.""" + variants: [ProductVariantsBulkInput!]! + + """The ID of the product associated with the variants to update.""" + productId: ID! + + """List of new media to be added to the product.""" + media: [CreateMediaInput!] + + """ + When partial updates are allowed, valid variant changes may be persisted even if some of + 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 + ): 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 ID of the price list for which quantity pricing will be updated.""" + priceListId: ID! + + """The input data used to update the quantity pricing in the price list.""" + input: QuantityPricingByVariantUpdateInput! + ): QuantityPricingByVariantUpdatePayload + + """ + Creates or updates existing quantity rules on a price list. + You can use the `quantityRulesAdd` mutation to set order level minimums, + maximumums and increments for specific product variants. + """ + quantityRulesAdd( + """ + The ID of the price list to which the quantity rules will be added or updated. + """ + priceListId: ID! + + """The list of quantity rules to add or update in the price list.""" + quantityRules: [QuantityRuleInput!]! + ): QuantityRulesAddPayload + + """ + Deletes specific quantity rules from a price list using a product variant ID. + You can use the `quantityRulesDelete` mutation to delete a set of quantity rules from a price list. + """ + quantityRulesDelete( + """ + The ID of the price list from which the quantity rules will be deleted. + """ + priceListId: ID! + + """ + A list of product variant IDs whose quantity rules will be removed from the price list. + """ + variantIds: [ID!]! + ): QuantityRulesDeletePayload + + """ + Creates a refund for an order, allowing you to process returns and issue payments back to customers. + + Use the `refundCreate` mutation to programmatically process refunds in scenarios where you need to + return money to customers, such as when handling returns, processing chargebacks, or correcting + order errors. + + The `refundCreate` mutation supports various refund scenarios: + + - Refunding line items with optional restocking + - Refunding shipping costs + - Refunding duties and import taxes + - Refunding additional fees + - Processing refunds through different payment methods + - Issuing store credit refunds (when enabled) + + You can create both full and partial refunds, and optionally allow over-refunding in specific + cases. + + After creating a refund, you can track its status and details through the order's + [`refunds`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.refunds) + field. The refund is associated with the order and can be used for reporting and reconciliation purposes. + + Learn more about + [managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + and [refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties). + + > Note: + > The refunding behavior of the `refundCreate` mutation is similar to the + [`refundReturn`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/returnRefund) + mutation. The key difference is that the `refundCreate` mutation lets you to specify restocking behavior + for line items, whereas the `returnRefund` mutation focuses solely on handling the financial refund without + any restocking input. + """ + refundCreate( + """The input fields that are used in the mutation for creating a refund.""" + input: RefundInput! + ): RefundCreatePayload + + """Removes return and/or exchange lines from a return.""" + removeFromReturn( + """The ID of the return for line item removal.""" + returnId: ID! + + """The return line items to remove from the return.""" + returnLineItems: [ReturnLineItemRemoveFromReturnInput!] + + """The exchange line items to remove from the return.""" + exchangeLineItems: [ExchangeLineItemRemoveFromReturnInput!] + ): RemoveFromReturnPayload + + """ + Approves a customer's return request. + If this mutation is successful, then the `Return.status` field of the + approved return is set to `OPEN`. + """ + returnApproveRequest( + """The input fields to approve a return.""" + input: ReturnApproveRequestInput! + ): ReturnApproveRequestPayload + + """ + Cancels a return and restores the items back to being fulfilled. + Canceling a return is only available before any work has been done + on the return (such as an inspection or refund). + """ + returnCancel( + """The ID of the return to cancel.""" + id: ID! + ): 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.") + + """Process a return.""" + returnProcess( + """Specifies the input fields for processing a return.""" + input: ReturnProcessInput! + ): ReturnProcessPayload + + """ + 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 ID of the reverse fulfillment order that's associated to the reverse delivery. + """ + reverseFulfillmentOrderId: ID! + + """ + The reverse delivery line items to be created. If an empty array is provided, then this mutation + 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 tracking information for the reverse delivery.""" + trackingInput: ReverseDeliveryTrackingInput = null + + """The return label file information for the reverse delivery.""" + labelInput: ReverseDeliveryLabelInput = null + + """ + When `true` the customer is notified with delivery instructions if the `ReverseFulfillmentOrder.order.email` is present. + """ + notifyCustomer: Boolean = true + ): ReverseDeliveryCreateWithShippingPayload + + """ + Updates a reverse delivery with associated external shipping information. + """ + reverseDeliveryShippingUpdate( + """The ID of the reverse delivery to update.""" + reverseDeliveryId: ID! + + """The tracking information for the reverse delivery.""" + trackingInput: ReverseDeliveryTrackingInput = null + + """The return label file information for the reverse delivery.""" + labelInput: ReverseDeliveryLabelInput = null + + """ + If `true` and an email address exists on the + `ReverseFulfillmentOrder.order`, then the customer is notified with the + updated delivery instructions. + """ + notifyCustomer: Boolean = true + ): ReverseDeliveryShippingUpdatePayload + + """Disposes reverse fulfillment order line items.""" + reverseFulfillmentOrderDispose( + """ + The input parameters required to dispose reverse fulfillment order line items. + """ + dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]! + ): ReverseFulfillmentOrderDisposePayload + + """Creates a saved search.""" + savedSearchCreate( + """Specifies the input fields for a saved search.""" + input: SavedSearchCreateInput! + ): SavedSearchCreatePayload + + """Delete a saved search.""" + savedSearchDelete( + """The input fields to delete a saved search.""" + input: SavedSearchDeleteInput! + ): SavedSearchDeletePayload + + """Updates a saved search.""" + savedSearchUpdate( + """The input fields to update a saved search.""" + input: SavedSearchUpdateInput! + ): SavedSearchUpdatePayload + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + Updates a script tag. + """ + scriptTagUpdate( + """The ID of the script tag to update.""" + id: ID! + + """Specifies the input fields for a script tag.""" + input: ScriptTagInput! + ): ScriptTagUpdatePayload + + """Creates a segment.""" + segmentCreate( + """The name of the segment to be created. Segment names must be unique.""" + name: String! + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String! + ): SegmentCreatePayload + + """Deletes a segment.""" + segmentDelete( + """Specifies the segment to delete.""" + id: ID! + ): SegmentDeletePayload + + """Updates a segment.""" + segmentUpdate( + """Specifies the segment to be updated.""" + id: ID! + + """The new name for the segment.""" + name: String + + """ + A precise definition of the segment. The definition is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + ): SegmentUpdatePayload + + """Adds multiple product variants to a selling plan group.""" + sellingPlanGroupAddProductVariants( + """The ID of the selling plan group.""" + id: ID! + + """The IDs of the product variants to add.""" + productVariantIds: [ID!]! + ): SellingPlanGroupAddProductVariantsPayload + + """Adds multiple products to a selling plan group.""" + sellingPlanGroupAddProducts( + """The ID of the selling plan group.""" + id: ID! + + """The IDs of the products to add.""" + productIds: [ID!]! + ): SellingPlanGroupAddProductsPayload + + """Creates a Selling Plan Group.""" + 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 resource type that the metafield definition is scoped to.""" + ownerType: MetafieldOwnerType! + + """The ID of the standard metafield definition template to enable.""" + id: ID + + """ + The namespace of the standard metafield to enable. Used in combination with `key`. + """ + namespace: String + + """ + The key of the standard metafield to enable. Used in combination with `namespace`. + """ + key: String + + """Whether to pin the metafield definition.""" + pin: Boolean = null + + """The capabilities of the metafield definition.""" + capabilities: MetafieldCapabilityCreateInput + + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: StandardMetafieldDefinitionAccessInput + ): StandardMetafieldDefinitionEnablePayload + + """ + Enables the specified standard metaobject definition from its template. + """ + standardMetaobjectDefinitionEnable( + """The type of the metaobject definition to enable.""" + type: String! + ): StandardMetaobjectDefinitionEnablePayload + + """ + 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 ID of the store credit account or the ID of the account owner.""" + id: ID! + + """The input fields for a store credit account credit transaction.""" + creditInput: StoreCreditAccountCreditInput! + ): StoreCreditAccountCreditPayload + + """ + Creates a debit transaction that decreases the store credit account balance by the given amount. + """ + storeCreditAccountDebit( + """The ID of the store credit account or the ID of the account owner.""" + id: ID! + + """The input fields for a store credit account debit transaction.""" + debitInput: StoreCreditAccountDebitInput! + ): StoreCreditAccountDebitPayload + + """ + Creates a storefront access token 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 ID of the subscription contract.""" + subscriptionContractId: ID! + + """The information to apply as a billing attempt.""" + subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput! + ): SubscriptionBillingAttemptCreatePayload + + """ + Asynchronously queries and charges all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkCharge( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """Criteria to filter the billing cycles on which the action is executed.""" + filters: SubscriptionBillingCycleBulkFilters + + """The behaviour to use when updating inventory.""" + inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY + ): SubscriptionBillingCycleBulkChargePayload + + """ + Asynchronously queries all subscription billing cycles whose [billingAttemptExpectedDate](https://shopify.dev/api/admin-graphql/latest/objects/SubscriptionBillingCycle#field-billingattemptexpecteddate) + values fall within a specified date range and meet additional filtering + criteria. The results of this action can be retrieved using the [subscriptionBillingCycleBulkResults](https://shopify.dev/api/admin-graphql/latest/queries/subscriptionBillingCycleBulkResults) query. + """ + subscriptionBillingCycleBulkSearch( + """ + Specifies the date range within which the `billingAttemptExpectedDate` values of the billing cycles should fall. + """ + billingAttemptExpectedDateRange: SubscriptionBillingCyclesDateRangeSelector! + + """Criteria to filter the billing cycles on which the action is executed.""" + filters: SubscriptionBillingCycleBulkFilters + ): SubscriptionBillingCycleBulkSearchPayload + + """ + Creates a new subscription billing attempt for a specified billing cycle. This + is the alternative mutation for [subscriptionBillingAttemptCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingAttemptCreate). + For more information, refer to [Create a subscription contract](https://shopify.dev/docs/apps/selling-strategies/subscriptions/contracts/create#step-4-create-a-billing-attempt). + """ + subscriptionBillingCycleCharge( + """The ID of the subscription contract.""" + subscriptionContractId: ID! + + """ + Select the specific billing cycle to be billed. + 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 + ): SubscriptionBillingCycleChargePayload + + """Commits the updates of a Subscription Billing Cycle Contract draft.""" + subscriptionBillingCycleContractDraftCommit( + """The gid of the Subscription Contract draft to commit.""" + draftId: ID! + ): SubscriptionBillingCycleContractDraftCommitPayload + + """Concatenates a contract to a Subscription Draft.""" + subscriptionBillingCycleContractDraftConcatenate( + """The gid of the Subscription Contract draft to update.""" + draftId: ID! + + """ + An array of Subscription Contracts with their selected billing cycles to concatenate to the subscription draft. + """ + concatenatedBillingCycleContracts: [SubscriptionBillingCycleInput!]! + ): SubscriptionBillingCycleContractDraftConcatenatePayload + + """ + Edit the contents of a subscription contract for the specified billing cycle. + """ + subscriptionBillingCycleContractEdit( + """Input object for selecting and using billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleContractEditPayload + + """ + Delete the schedule and contract edits of the selected subscription billing cycle. + """ + subscriptionBillingCycleEditDelete( + """Input object used to select and use billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleEditDeletePayload + + """ + Delete the current and future schedule and contract edits of a list of subscription billing cycles. + """ + subscriptionBillingCycleEditsDelete( + """ + The globally-unique identifier of the subscription contract that the billing cycle belongs to. + """ + contractId: ID! + + """Select billing cycles to be deleted.""" + targetSelection: SubscriptionBillingCyclesTargetSelection! + ): SubscriptionBillingCycleEditsDeletePayload + + """Modify the schedule of a specific billing cycle.""" + subscriptionBillingCycleScheduleEdit( + """Input object for selecting and using billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + + """Data used to create or modify billing cycle schedule edit.""" + input: SubscriptionBillingCycleScheduleEditInput! + ): SubscriptionBillingCycleScheduleEditPayload + + """Skips a Subscription Billing Cycle.""" + subscriptionBillingCycleSkip( + """Input object for selecting and using billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleSkipPayload + + """Unskips a Subscription Billing Cycle.""" + subscriptionBillingCycleUnskip( + """Input object for selecting and using billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleUnskipPayload + + """ + Activates a Subscription Contract. Contract status must be either active, paused, or failed. + """ + subscriptionContractActivate( + """The ID of the Subscription Contract.""" + subscriptionContractId: ID! + ): SubscriptionContractActivatePayload + + """Creates a Subscription Contract.""" + subscriptionContractAtomicCreate( + """The properties of the new Subscription Contract.""" + input: SubscriptionContractAtomicCreateInput! + ): SubscriptionContractAtomicCreatePayload + + """Cancels a Subscription Contract.""" + subscriptionContractCancel( + """The ID of the Subscription Contract.""" + subscriptionContractId: ID! + ): SubscriptionContractCancelPayload + + """ + Creates a Subscription Contract Draft. + 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 ID of the subscription contract.""" + subscriptionContractId: ID! + + """The gid of the Subscription Line to update.""" + lineId: ID! + + """The properties of the Product changes.""" + input: SubscriptionContractProductChangeInput! + ): SubscriptionContractProductChangePayload + + """ + Sets the next billing date of a Subscription Contract. This field is managed by the apps. + Alternatively you can utilize our + [Billing Cycles APIs](https://shopify.dev/docs/apps/selling-strategies/subscriptions/billing-cycles), + which provide auto-computed billing dates and additional functionalities. + """ + subscriptionContractSetNextBillingDate( + """The gid of the Subscription Contract to set the next billing date for.""" + contractId: ID! + + """The next billing date.""" + date: DateTime! + ): SubscriptionContractSetNextBillingDatePayload + + """ + 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 contract draft to remove a subscription discount from. + """ + draftId: ID! + + """The gid of the subscription draft discount to remove.""" + discountId: ID! + ): SubscriptionDraftDiscountRemovePayload + + """Updates a subscription discount on a subscription draft.""" + subscriptionDraftDiscountUpdate( + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """The gid of the Subscription Discount to update.""" + discountId: ID! + + """The properties to update on the Subscription Discount.""" + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountUpdatePayload + + """Adds a subscription free shipping discount to a subscription draft.""" + subscriptionDraftFreeShippingDiscountAdd( + """ + The ID of the subscription contract draft to add a subscription free shipping discount to. + """ + draftId: ID! + + """The properties of the new subscription free shipping discount.""" + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountAddPayload + + """Updates a subscription free shipping discount on a subscription draft.""" + subscriptionDraftFreeShippingDiscountUpdate( + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! + + """The gid of the Subscription Discount to update.""" + discountId: ID! + + """The properties to update on the Subscription Free Shipping Discount.""" + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountUpdatePayload + + """Adds a subscription line to a subscription draft.""" + subscriptionDraftLineAdd( + """ + The gid of the Subscription Contract draft to add a subscription line to. + """ + draftId: ID! + + """The properties of the new Subscription Line.""" + input: SubscriptionLineInput! + ): SubscriptionDraftLineAddPayload + + """Removes a subscription line from a subscription draft.""" + subscriptionDraftLineRemove( + """ + The gid of the Subscription Contract draft to remove a subscription line from. + """ + draftId: ID! + + """The gid of the Subscription Line to remove.""" + lineId: ID! + ): SubscriptionDraftLineRemovePayload + + """Updates a subscription line on a subscription draft.""" + subscriptionDraftLineUpdate( + """ + The gid of the Subscription Contract draft to update a subscription line from. + """ + draftId: ID! + + """The gid of the Subscription Line to update.""" + lineId: ID! + + """The properties of the new Subscription Line.""" + input: SubscriptionLineUpdateInput! + ): SubscriptionDraftLineUpdatePayload + + """Updates a Subscription Draft.""" + subscriptionDraftUpdate( + """The gid of the Subscription Draft to update.""" + draftId: ID! + + """The properties of the new Subscription Contract.""" + input: SubscriptionDraftInput! + ): SubscriptionDraftUpdatePayload + + """ + 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 + + """ + Creates a theme using an external URL or for files that were previously uploaded using the + [stagedUploadsCreate mutation](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate). + These themes are added to the [Themes page](https://admin.shopify.com/themes) in Shopify admin. + """ + themeCreate( + """ + An external URL or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate) + of the theme to import. + """ + source: URL! + + """The name of the theme to be created.""" + name: String + + """ + The role of the theme to be created. Only UNPUBLISHED and DEVELOPMENT roles are permitted. + """ + role: ThemeRole = UNPUBLISHED + ): ThemeCreatePayload + + """Deletes a theme.""" + themeDelete( + """The ID of the theme to be deleted.""" + id: ID! + ): ThemeDeletePayload + + """Duplicates a theme.""" + themeDuplicate( + """ID of the theme to be duplicated.""" + id: ID! + + """Name of the new theme.""" + name: String + ): ThemeDuplicatePayload + + """Copy theme files. Copying to existing theme files will overwrite them.""" + themeFilesCopy( + """The theme to update.""" + themeId: ID! + + """The files to update.""" + files: [ThemeFilesCopyFileInput!]! + ): ThemeFilesCopyPayload + + """Deletes a theme's files.""" + themeFilesDelete( + """Specifies the theme to deleted.""" + themeId: ID! + + """The files to delete.""" + files: [String!]! + ): ThemeFilesDeletePayload + + """Create or update theme files.""" + themeFilesUpsert( + """The theme to update.""" + themeId: ID! + + """The files to update.""" + files: [OnlineStoreThemeFilesUpsertFileInput!]! + ): ThemeFilesUpsertPayload + + """Publishes a theme.""" + themePublish( + """ID of the theme to be published.""" + id: ID! + ): ThemePublishPayload + + """Updates a theme.""" + themeUpdate( + """The ID of the theme to be updated.""" + id: ID! + + """The attributes of the theme to be updated.""" + input: OnlineStoreThemeInput! + ): ThemeUpdatePayload + + """Trigger the voiding of an uncaptured authorization transaction.""" + transactionVoid( + """An uncaptured authorization transaction.""" + parentTransactionId: ID! + ): TransactionVoidPayload + + """Creates or updates translations.""" + translationsRegister( + """ID of the resource that is being translated.""" + resourceId: ID! + + """Specifies the input fields for a translation.""" + translations: [TranslationInput!]! + ): TranslationsRegisterPayload + + """Deletes translations.""" + translationsRemove( + """ + ID of the translatable resource for which translations are being deleted. + """ + resourceId: ID! + + """The list of translation keys.""" + translationKeys: [String!]! + + """ + The list of translation locales. Only locales returned in `shopLocales` are valid. + """ + locales: [String!]! + + """The list of market IDs.""" + marketIds: [ID!] + ): TranslationsRemovePayload + + """ + Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. + """ + urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload + + """ + Asynchronously delete [URLRedirect](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) + objects in bulk by IDs. + Learn more about [URLRedirect](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect) + objects. + """ + urlRedirectBulkDeleteByIds( + """ + A list of [`URLRedirect`]( + 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 input fields to update a validation.""" + validation: ValidationUpdateInput! + + """The ID representing the validation to update.""" + id: ID! + ): ValidationUpdatePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by creating a web pixel record on the store where you installed your app. + + When you run the `webPixelCreate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelCreate( + """The web pixel settings in JSON format.""" + webPixel: WebPixelInput! + ): WebPixelCreatePayload + + """Deletes the web pixel shop settings.""" + webPixelDelete( + """The ID of the web pixel to delete.""" + id: ID! + ): WebPixelDeletePayload + + """ + Activate a [web pixel extension](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by updating a web pixel record on the store where you installed your app. + + When you run the `webPixelUpdate` mutation, Shopify validates it + against the settings definition in `shopify.extension.toml`. If the `settings` input field doesn't match + the schema that you defined, then the mutation fails. Learn how to + define [web pixel settings](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#step-2-define-your-web-pixel-settings). + """ + webPixelUpdate( + """The ID of the web pixel to update.""" + id: ID! + + """The web pixel settings in JSON format.""" + webPixel: WebPixelInput! + ): WebPixelUpdatePayload + + """Creates a web presence.""" + webPresenceCreate( + """The details of the web presence to be created.""" + input: WebPresenceCreateInput! + ): WebPresenceCreatePayload + + """Deletes a web presence.""" + webPresenceDelete( + """The ID of the web presence to delete.""" + id: ID! + ): WebPresenceDeletePayload + + """Updates a web presence.""" + webPresenceUpdate( + """The ID of the web presence to update.""" + id: ID! + + """The web presence properties to update.""" + input: WebPresenceUpdateInput! + ): WebPresenceUpdatePayload + + """ + 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 valid values for the notification usage, specifying the intended notification environment usage for certain operations. +""" +enum NotificationUsage { + """The notification environment is web.""" + WEB + + """The notification environment is sms.""" + SMS +} + +"""The input fields for dimensions of an object.""" +input ObjectDimensionsInput { + """The length in `unit`s.""" + length: Float! + + """The width in `unit`s.""" + width: Float! + + """The height in `unit`s.""" + height: Float! + + """Unit of measurement for `length`, `width`, and `height`.""" + unit: LengthUnit! +} + +"""The shop's online store channel.""" +type OnlineStore { + """Storefront password information.""" + passwordProtection: OnlineStorePasswordProtection! +} + +"""Storefront password information.""" +type OnlineStorePasswordProtection { + """Whether the storefront password is enabled.""" + enabled: Boolean! +} + +"""Online Store preview URL of the object.""" +interface OnlineStorePreviewable { + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL +} + +"""A theme for display on the storefront.""" +type OnlineStoreTheme implements HasPublishedTranslations & Node { + """The date and time when the theme was created.""" + createdAt: DateTime! + + """The files in the theme.""" + files( + """ + The filenames of the theme files. At most 50 filenames can be specified. Use '*' to match zero or more characters. + """ + filenames: [String!] + + """ + Returns at most the first n files for this theme. Fewer than n files may be + returned to stay within the payload size limit, or when the end of the list + is reached. At most 2500 can be fetched at once. + """ + first: Int = 50 + + """A cursor for use in pagination.""" + after: String + ): OnlineStoreThemeFileConnection + + """A globally-unique ID.""" + id: ID! + + """The name of the theme, set by the merchant.""" + name: String! + + """The prefix of the theme.""" + prefix: String! + + """Whether the theme is processing.""" + processing: Boolean! + + """Whether the theme processing failed.""" + processingFailed: Boolean! + + """The role of the theme.""" + role: ThemeRole! + + """The theme store ID.""" + themeStoreId: Int + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The date and time when the theme was last updated.""" + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemes. +""" +type OnlineStoreThemeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OnlineStoreTheme!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OnlineStoreTheme and a cursor during pagination. +""" +type OnlineStoreThemeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of OnlineStoreThemeEdge.""" + node: OnlineStoreTheme! +} + +"""Represents a theme file.""" +type OnlineStoreThemeFile { + """The body of the theme file.""" + body: OnlineStoreThemeFileBody! + + """The md5 digest of the theme file for data integrity.""" + checksumMd5: String + + """The content type of the theme file.""" + contentType: String! + + """The date and time when the theme file was created.""" + createdAt: DateTime! + + """The unique identifier of the theme file.""" + filename: String! + + """The size of the theme file in bytes.""" + size: UnsignedInt64! + + """The date and time when the theme file was last updated.""" + updatedAt: DateTime! +} + +"""Represents the body of a theme file.""" +union OnlineStoreThemeFileBody = OnlineStoreThemeFileBodyBase64 | OnlineStoreThemeFileBodyText | OnlineStoreThemeFileBodyUrl + +"""Represents the base64 encoded body of a theme file.""" +type OnlineStoreThemeFileBodyBase64 { + """The body of the theme file, base64 encoded.""" + contentBase64: String! +} + +"""The input fields for the theme file body.""" +input OnlineStoreThemeFileBodyInput { + """The input type of the theme file body.""" + type: OnlineStoreThemeFileBodyInputType! + + """The body of the theme file.""" + value: String! +} + +"""The input type for a theme file body.""" +enum OnlineStoreThemeFileBodyInputType { + """The text body of the theme file.""" + TEXT + + """The base64 encoded body of a theme file.""" + BASE64 + + """The url of the body of a theme file.""" + URL +} + +"""Represents the body of a theme file.""" +type OnlineStoreThemeFileBodyText { + """The body of the theme file.""" + content: String! +} + +"""Represents the url of the body of a theme file.""" +type OnlineStoreThemeFileBodyUrl { + """The short lived url for the body of the theme file.""" + url: URL! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemeFiles. +""" +type OnlineStoreThemeFileConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OnlineStoreThemeFileEdge!]! + + """ + A list of nodes that are contained in OnlineStoreThemeFileEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OnlineStoreThemeFile!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """List of errors that occurred during the request.""" + userErrors: [OnlineStoreThemeFileReadResult!]! +} + +""" +An auto-generated type which holds one OnlineStoreThemeFile and a cursor during pagination. +""" +type OnlineStoreThemeFileEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of OnlineStoreThemeFileEdge.""" + node: OnlineStoreThemeFile! +} + +""" +Represents the result of a copy, delete, or write operation performed on a theme file. +""" +type OnlineStoreThemeFileOperationResult { + """The md5 digest of the theme file for data integrity.""" + checksumMd5: String + + """The date and time when the theme file was created.""" + createdAt: DateTime! + + """Unique identifier of the theme file.""" + filename: String! + + """The size of the theme file in bytes.""" + size: UnsignedInt64! + + """The date and time when the theme file was last updated.""" + updatedAt: DateTime! +} + +"""Represents the result of a read operation performed on a theme asset.""" +type OnlineStoreThemeFileReadResult { + """Type that indicates the result of the operation.""" + code: OnlineStoreThemeFileResultType! + + """Unique identifier associated with the operation and the theme file.""" + filename: String! +} + +"""Type of a theme file operation result.""" +enum OnlineStoreThemeFileResultType { + """Operation was successful.""" + SUCCESS + + """Operation encountered an error.""" + ERROR + + """Operation faced a conflict with the current state of the file.""" + CONFLICT + + """Operation could not be processed due to issues with input data.""" + UNPROCESSABLE_ENTITY + + """Operation was malformed or invalid.""" + BAD_REQUEST + + """Operation timed out.""" + TIMEOUT + + """Operation file could not be found.""" + NOT_FOUND +} + +"""The input fields for the file to create or update.""" +input OnlineStoreThemeFilesUpsertFileInput { + """The filename of the theme file.""" + filename: String! + + """The body of the theme file.""" + body: OnlineStoreThemeFileBodyInput! +} + +"""User errors for theme file operations.""" +type OnlineStoreThemeFilesUserErrors implements DisplayableError { + """The error code.""" + code: OnlineStoreThemeFilesUserErrorsCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The filename of the theme file.""" + filename: String + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OnlineStoreThemeFilesUserErrors`. +""" +enum OnlineStoreThemeFilesUserErrorsCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """There are theme files with conflicts.""" + THEME_FILES_CONFLICT + + """There are files with the same filename.""" + DUPLICATE_FILE_INPUT + + """Access denied.""" + ACCESS_DENIED + + """ + This action is not available on your current plan. Please upgrade to access theme editing features. + """ + THEME_LIMITED_PLAN + + """The file is invalid.""" + FILE_VALIDATION_ERROR + + """Error.""" + ERROR + + """Too many updates in a short period. Please try again later.""" + THROTTLED +} + +"""The input fields for Theme attributes to update.""" +input OnlineStoreThemeInput { + """The new name of the theme.""" + name: String +} + +"""The input fields for the options and values of the combined listing.""" +input OptionAndValueInput { + """The name of the Product's Option.""" + name: String! + + """The ordered values of the Product's Option.""" + values: [String!]! + + """ + The ID of the option to update. If not present, the option will be created. + """ + optionId: ID + + """The linked metafield for the product's option.""" + linkedMetafield: LinkedMetafieldInput +} + +"""The input fields for creating a product option.""" +input OptionCreateInput { + """Name of the option.""" + name: String + + """Position of the option.""" + position: Int + + """Values associated with the option.""" + values: [OptionValueCreateInput!] + + """Specifies the metafield the option is linked to.""" + linkedMetafield: LinkedMetafieldCreateInput +} + +"""The input fields for reordering a product option and/or its values.""" +input OptionReorderInput { + """Specifies the product option to reorder by ID.""" + id: ID + + """Specifies the product option to reorder by name.""" + name: String + + """Values associated with the option.""" + values: [OptionValueReorderInput!] +} + +"""The input fields for creating or updating a product option.""" +input OptionSetInput { + """Specifies the product option to update.""" + id: ID + + """Name of the option.""" + name: String + + """Position of the option.""" + position: Int + + """Value associated with an option.""" + values: [OptionValueSetInput!] + + """Specifies the metafield the option is linked to.""" + linkedMetafield: LinkedMetafieldCreateInput +} + +"""The input fields for updating a product option.""" +input OptionUpdateInput { + """Specifies the product option to update.""" + id: ID! + + """Name of the option.""" + name: String + + """Position of the option.""" + position: Int + + """Specifies the metafield the option is linked to.""" + linkedMetafield: LinkedMetafieldUpdateInput +} + +"""The input fields required to create a product option value.""" +input OptionValueCreateInput { + """Value associated with an option.""" + name: String + + """Metafield value associated with an option.""" + linkedMetafieldValue: String +} + +"""The input fields for reordering a product option value.""" +input OptionValueReorderInput { + """Specifies the product option value by ID.""" + id: ID + + """Specifies the product option value by name.""" + name: String +} + +"""The input fields for creating or updating a product option value.""" +input OptionValueSetInput { + """Specifies the product option value.""" + id: ID + + """Value associated with an option.""" + name: String +} + +"""The input fields for updating a product option value.""" +input OptionValueUpdateInput { + """Specifies the product option value.""" + id: ID! + + """Value associated with an option.""" + name: String + + """Metafield value associated with an option.""" + linkedMetafieldValue: String +} + +""" +The `Order` object represents a customer's request to purchase one or more +products from a store. Use the `Order` object to handle the complete purchase +lifecycle from checkout to fulfillment. + +Use the `Order` object when you need to: + +- Display order details on customer account pages or admin dashboards. +- Create orders for phone sales, wholesale customers, or subscription services. +- Update order information like shipping addresses, notes, or fulfillment status. +- Process returns, exchanges, and partial refunds. +- Generate invoices, receipts, and shipping labels. + +The `Order` object serves as the central hub connecting customer information, +product details, payment processing, and fulfillment data within the GraphQL +Admin API schema. + +> Note: +> Only the last 60 days' worth of orders from a store are accessible from the +`Order` object by default. If you want to access older records, +> then you need to [request access to all +orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). If +your app is granted +> access, then you can add the `read_all_orders`, `read_orders`, and `write_orders` scopes. + +> Caution: +> Only use orders data if it's required for your app's functionality. Shopify +will restrict [access to scopes](https://shopify.dev/docs/api/usage/access-scopes#requesting-specific-permissions) +for apps that don't have a legitimate use for the associated data. + +Learn more about [building apps for orders and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment). +""" +type Order implements CommentEventSubject & HasEvents & HasLocalizationExtensions & HasLocalizedFields & HasMetafieldDefinitions & HasMetafields & LegacyInteroperability & Node { + """ + A list of additional fees applied to an order, such as duties, import fees, or [tax lines](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.additionalFees.taxLines). + """ + additionalFees: [AdditionalFee!]! + + """ + A list of sales agreements associated with the order, such as contracts + defining payment terms, or delivery schedules between merchants and customers. + """ + agreements( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DiscountApplicationConnection! + + """ + The discount code used for an order. Returns `null` if no discount code was applied. + """ + discountCode: String + + """ + The discount codes used for the order. Multiple codes can be applied to a single order. + """ + discountCodes: [String!]! + + """ + The primary address of the customer, prioritizing shipping address over billing address when both are available. + Returns `null` if neither shipping address nor billing address was provided. + """ + displayAddress: MailingAddress + + """An order's financial status for display in the Shopify admin.""" + displayFinancialStatus: OrderDisplayFinancialStatus + + """ + The order's fulfillment status that displays in the Shopify admin to + merchants. For example, an order might be unfulfilled or scheduled. + For detailed processing, use the [`FulfillmentOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + displayFulfillmentStatus: OrderDisplayFulfillmentStatus! + + """ + A list of payment disputes associated with the order, such as chargebacks or payment inquiries. + Disputes occur when customers challenge transactions with their bank or payment provider. + """ + disputes: [OrderDisputeSummary!]! + + """ + Whether duties are included in the subtotal price of the order. + Duties are import taxes charged by customs authorities when goods cross international borders. + """ + dutiesIncluded: Boolean! + + """ + Whether the order has had any edits applied. For example, adding or removing + line items, updating quantities, or changing prices. + """ + edited: Boolean! + + """ + The email address associated with the customer for this order. + Used for sending order confirmations, shipping notifications, and other order-related communications. + Returns `null` if no email address was provided during checkout. + """ + email: String + + """ + Whether taxes on the order are estimated. + This field returns `false` when taxes on the order are finalized and aren't subject to any changes. + """ + estimatedTaxes: Boolean! + + """ + A list of events associated with the order. Events track significant changes + and activities related to the order, such as creation, payment, fulfillment, + and cancellation. + """ + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A list of ExchangeV2s for the order.""" + exchangeV2s( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): ExchangeV2Connection! @deprecated(reason: "Use `returns` instead.") + + """ + Whether there are line items that can be fulfilled. + This field returns `false` when the order has no fulfillable line items. + For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + fulfillable: Boolean! + + """ + A list of [fulfillment orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) for an order. + Each fulfillment order groups [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-Order.fields.lineItems) + that are fulfilled together, + allowing an order to be processed in parts if needed. + """ + fulfillmentOrders( + """ + If false, all fulfillment orders will be returned. If true, fulfillment + orders that are normally hidden from the merchant will be excluded. + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LineItemConnection! + + """List of localization extensions for the resource.""" + localizationExtensions( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizationExtensionPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizationExtensionConnection! @deprecated(reason: "This connection will be removed in a future version. Use `localizedFields` instead.") + + """List of localized fields for the resource.""" + localizedFields( + """The country codes of the extensions.""" + countryCodes: [CountryCode!] + + """The purpose of the extensions.""" + purposes: [LocalizedFieldPurpose!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocalizedFieldConnection! + + """ + The legal business structure that the merchant operates under for this order, such as an LLC, corporation, or partnership. + Used for tax reporting, legal compliance, and determining which business entity is responsible for the order. + """ + merchantBusinessEntity: BusinessEntity! + + """ + Whether the order can be edited by the merchant. Returns `false` for orders + that can't be modified, such as canceled orders or orders with specific + payment statuses. + """ + merchantEditable: Boolean! + + """ + A list of reasons why the order can't be edited. For example, canceled orders can't be edited. + """ + merchantEditableErrors: [String!]! + + """ + The application acting as the Merchant of Record for the order. The Merchant + of Record is responsible for tax collection and remittance. + """ + merchantOfRecordApp: OrderApp + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The unique identifier for the order that appears on the order page in the Shopify admin and the **Order status** page. + For example, "#1001", "EN1001", or "1001-A". + This value isn't unique across multiple stores. Use this field to identify + orders in the Shopify admin and for order tracking. + """ + name: String! + + """ + The net payment for the order, based on the total amount received minus the total amount refunded, in shop currency. + """ + netPayment: Money! @deprecated(reason: "Use `netPaymentSet` instead.") + + """ + The net payment for the order, based on the total amount received minus the + total amount refunded, in shop and presentment currencies. + """ + netPaymentSet: MoneyBag! + + """ + A list of line items that can't be fulfilled. + For example, tips and fully refunded line items can't be fulfilled. + For a more granular view of the fulfillment status, refer to the [FulfillmentOrder](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentOrder) object. + """ + nonFulfillableLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LineItemConnection! + + """ + The note associated with the order. + Contains additional information or instructions added by merchants or customers during the order process. + Commonly used for special delivery instructions, gift messages, or internal processing notes. + """ + note: String + + """ + The order number used to generate the name using the store's configured order + number prefix/suffix. This number isn't guaranteed to follow a consecutive + integer sequence (e.g. 1, 2, 3..), nor is it guaranteed to be unique across + multiple stores, or even for a single store. + """ + number: Int! + + """ + The total amount of all additional fees, such as import fees or taxes, that were applied when an order was created. + Returns `null` if additional fees aren't applicable. + """ + originalTotalAdditionalFeesSet: MoneyBag + + """ + The total amount of duties calculated when an order was created, before any + modifications. Modifications include returns, refunds, order edits, and + cancellations. Use [`currentTotalDutiesSet`](https://shopify.dev/docs/api/admin-graphql/latest/objects/order#field-Order.fields.currentTotalDutiesSet) + to retrieve the current duties amount after adjustments. + """ + originalTotalDutiesSet: MoneyBag + + """ + The total price of the order at the time of order creation, in shop and presentment currencies. + Use this to compare the original order value against the current total after edits, returns, or refunds. + """ + originalTotalPriceSet: MoneyBag! + + """ + The payment collection details for the order, including payment status, outstanding amounts, and collection information. + Use this to understand when and how payments should be collected, especially + for orders with deferred or installment payment terms. + """ + paymentCollectionDetails: OrderPaymentCollectionDetails! + + """ + A list of the names of all payment gateways used for the order. + For example, "Shopify Payments" and "Cash on Delivery (COD)". + """ + paymentGatewayNames: [String!]! + + """ + The payment terms associated with the order, such as net payment due dates or + early payment discounts. Payment terms define when and how an order should be + paid. Returns `null` if no specific payment terms were set for the order. + """ + paymentTerms: PaymentTerms + + """ + The phone number associated with the customer for this order. + Useful for contacting customers about shipping updates, delivery notifications, or order issues. + Returns `null` if no phone number was provided during checkout. + """ + phone: String + + """ + The fulfillment location that was assigned when the order was created. + Orders can have multiple fulfillment orders. These fulfillment orders can each + be assigned to a different location which is responsible for fulfilling a + subset of the items in an order. The `Order.physicalLocation` field will only + point to one of these locations. + Use the [`FulfillmentOrder`](https://shopify.dev/api/admin-graphql/latest/objects/fulfillmentorder) + object for up to date fulfillment location information. + """ + physicalLocation: Location @deprecated(reason: "Use `fulfillmentOrders` to get the fulfillment location for the order") + + """ + The purchase order (PO) number that's associated with an order. + This is typically provided by business customers who require a PO number for their procurement. + """ + poNumber: String + + """ + The currency used by the customer when placing the order. For example, "USD", "EUR", or "CAD". + This may differ from the shop's base currency when serving international customers or using multi-currency pricing. + """ + presentmentCurrencyCode: CurrencyCode! + + """ + The date and time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601) when the order was processed. + This date and time might not match the date and time when the order was created. + """ + processedAt: DateTime! + + """ + Whether the customer also purchased items from other stores in the network. + """ + productNetwork: Boolean! + + """ + The sales channel that the order was created from, such as the [Online + Store](https://shopify.dev/docs/apps/build/app-surfaces#online-store) or + [Shopify POS](https://shopify.dev/docs/apps/build/app-surfaces#point-of-sale). + """ + publication: Publication + + """ + The business entity that placed the order, including company details and purchasing relationships. + Used for B2B transactions to track which company or organization is responsible for the purchase and payment terms. + """ + purchasingEntity: PurchasingEntity + + """ + The marketing referral code from the link that the customer clicked to visit the store. + Supports the following URL attributes: "ref", "source", or "r". + For example, if the URL is `{shop}.myshopify.com/products/slide?ref=j2tj1tn2`, then this value is `j2tj1tn2`. + """ + referralCode: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.referralCode` instead") + + """ + A web domain or short description of the source that sent the customer to your + online store. For example, "shopify.com" or "email". + """ + referrerDisplayText: String @deprecated(reason: "Use `customerJourneySummary.lastVisit.referralInfoHtml` instead") + + """ + The URL of the webpage where the customer clicked a link that sent them to your online store. + """ + referrerUrl: URL @deprecated(reason: "Use `customerJourneySummary.lastVisit.referrerUrl` instead") + + """ + The difference between the suggested and actual refund amount of all refunds that have been applied to the order. + A positive value indicates a difference in the merchant's favor, and a + negative value indicates a difference in the customer's favor. + """ + refundDiscrepancySet: MoneyBag! + + """ + Whether the order can be refunded based on its payment transactions. + Returns `false` for orders with no eligible payment transactions, such as + fully refunded orders or orders with non-refundable payment methods. + """ + refundable: Boolean! + + """ + A list of refunds that have been applied to the order. + Refunds represent money returned to customers for returned items, cancellations, or adjustments. + """ + refunds( + """Truncate the array result to this size.""" + first: Int + ): [Refund!]! + + """ + The URL of the source that the order originated from, if found in the domain + registry. Returns `null` if the source URL isn't in the domain registry. + """ + registeredSourceUrl: URL + + """ + Whether the order requires physical shipping to the customer. + Returns `false` for digital-only orders (such as gift cards or downloadable + products) and `true` for orders with physical products that need delivery. + Use this to determine shipping workflows and logistics requirements. + """ + requiresShipping: Boolean! + + """ + Whether any line items on the order can be restocked into inventory. + Returns `false` for digital products, custom items, or items that can't be resold. + """ + restockable: Boolean! + + """ + The physical location where a retail order is created or completed, except for + draft POS orders completed using the "mark as paid" flow in the Shopify admin, + which return `null`. Transactions associated with the order might have been + processed at a different location. + """ + retailLocation: Location + + """ + The order's aggregated return status for display purposes. + Indicates the overall state of returns for the order, helping merchants track and manage the return process. + """ + returnStatus: OrderReturnStatus! + + """ + The returns associated with the order. + Contains information about items that customers have requested to return, + including return reasons, status, and refund details. + Use this to track and manage the return process for order items. + """ + returns( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): ReturnConnection! + + """ + The risk assessment summary for the order. + Provides fraud analysis and risk scoring to help you identify potentially fraudulent orders. + Use this to make informed decisions about order fulfillment and payment processing. + """ + risk: OrderRiskSummary! + + """The fraud risk level of the order.""" + riskLevel: OrderRiskLevel! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """A list of risks associated with the order.""" + risks( + """Truncate the array result to this size.""" + first: Int + ): [OrderRisk!]! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment, which provides enhanced capabilities such as distinguishing risks from their provider.") + + """ + The shipping address where the order will be delivered. + Contains the customer's delivery location for fulfillment and shipping label generation. + Returns `null` for digital orders or orders that don't require shipping. + """ + shippingAddress: MailingAddress + + """ + A summary of all shipping costs on the order. + Aggregates shipping charges, discounts, and taxes to provide a single view of delivery costs. + """ + shippingLine: ShippingLine + + """ + The shipping methods applied to the order. + Each shipping line represents a shipping option chosen during checkout, including the carrier, service level, and cost. + Use this to understand shipping charges and delivery options for the order. + """ + shippingLines( + """Whether results should contain removed shipping lines.""" + includeRemovals: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ShippingLineConnection! + + """ + The Shopify Protect details for the order, including fraud protection status and coverage information. + Shopify Protect helps protect eligible orders against fraudulent chargebacks. + Returns `null` if Shopify Protect is disabled for the shop or the order isn't eligible for protection. + Learn more about [Shopify Protect](https://www.shopify.com/protect). + """ + shopifyProtect: ShopifyProtectOrderSummary + + """ + A unique POS or third party order identifier. + For example, "1234-12-1000" or "111-98567-54". The [`receiptNumber`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order#field-receiptNumber) + field is derived from this value for POS orders. + """ + sourceIdentifier: String + + """ + The name of the source associated with the order, such as "web", "mobile_app", + or "pos". Use this field to identify the platform where the order was placed. + """ + sourceName: String + + """ + The staff member who created or is responsible for the order. + Useful for tracking which team member handled phone orders, manual orders, or order modifications. + Returns `null` for orders created directly by customers through the online store. + """ + staffMember: StaffMember + + """ + The URL where customers can check their order's current status, including tracking information and delivery updates. + Provides order tracking links in emails, apps, or customer communications. + """ + statusPageUrl( + """Specifies the intended audience for the status page URL.""" + audience: Audience + + """Specifies the intended notification usage for the status page URL.""" + notificationUsage: NotificationUsage + ): URL! + + """ + The sum of quantities for all line items that contribute to the order's subtotal price. + This excludes quantities for items like tips, shipping costs, or gift cards that don't affect the subtotal. + Use this to quickly understand the total item count for pricing calculations. + """ + subtotalLineItemsQuantity: Int! + + """ + The sum of the prices for all line items after discounts and before returns, in shop currency. + If `taxesIncluded` is `true`, then the subtotal also includes tax. + """ + subtotalPrice: Money @deprecated(reason: "Use `subtotalPriceSet` instead.") + + """ + The sum of the prices for all line items after discounts and before returns, in shop and presentment currencies. + If `taxesIncluded` is `true`, then the subtotal also includes tax. + """ + subtotalPriceSet: MoneyBag + + """ + A calculated refund suggestion for the order based on specified line items, shipping, and duties. + Use this to preview refund amounts, taxes, and processing fees before creating an actual refund. + """ + suggestedRefund( + """ + The amount to refund for shipping. Overrides the `refundShipping` argument. + """ + shippingAmount: Money + + """Whether to refund the full shipping amount.""" + refundShipping: Boolean + + """The line items from the order to include in the refund.""" + refundLineItems: [RefundLineItemInput!] + + """The duties from the order to include in the refund.""" + refundDuties: [RefundDutyInput!] + + """ + Whether the suggested refund should be created from all refundable line items on the order. + If `true`, the `refundLineItems` argument will be ignored. + """ + suggestFullRefund: Boolean = false + + """ + Specifies which refund methods to allocate the suggested refund amount to. + """ + refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS + ): SuggestedRefund + + """ + A comma separated list of tags associated with the order. Updating `tags` overwrites + any existing tags that were previously added to the order. To add new tags without overwriting + existing tags, use the [tagsAdd](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!]! + + """ + Whether taxes are exempt on the order. + Returns `true` for orders where the customer or business has a valid tax + exemption, such as non-profit organizations or tax-free purchases. + Use this to understand if tax calculations were skipped during checkout. + """ + taxExempt: Boolean! + + """ + A list of all tax lines applied to line items on the order, before returns. + Tax line prices represent the total price for all tax lines with the same `rate` and `title`. + """ + taxLines: [TaxLine!]! + + """ + Whether taxes are included in the subtotal price of the order. + When `true`, the subtotal and line item prices include tax amounts. When + `false`, taxes are calculated and displayed separately. + """ + taxesIncluded: Boolean! + + """ + Whether the order is a test. + Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. + A test order can't be converted into a real order and vice versa. + """ + test: Boolean! + + """ + The authorized amount that's uncaptured or undercaptured, in shop currency. + This amount isn't adjusted for returns. + """ + totalCapturable: Money! @deprecated(reason: "Use `totalCapturableSet` instead.") + + """ + The authorized amount that's uncaptured or undercaptured, in shop and presentment currencies. + This amount isn't adjusted for returns. + """ + totalCapturableSet: MoneyBag! + + """ + The total rounding adjustment applied to payments or refunds for an order + involving cash payments. Applies to some countries where cash transactions are + rounded to the nearest currency denomination. + """ + totalCashRoundingAdjustment: CashRoundingAdjustment! + + """ + The total amount discounted on the order before returns, in shop currency. + This includes both order and line level discounts. + """ + totalDiscounts: Money @deprecated(reason: "Use `totalDiscountsSet` instead.") + + """ + The total amount discounted on the order before returns, in shop and presentment currencies. + This includes both order and line level discounts. + """ + totalDiscountsSet: MoneyBag + + """ + The total amount not yet transacted for the order, in shop and presentment currencies. + A positive value indicates a difference in the merchant's favor (payment from + customer to merchant) and a negative value indicates a difference in the + customer's favor (refund from merchant to customer). + """ + totalOutstandingSet: MoneyBag! + + """ + The total price of the order, before returns, in shop currency. + This includes taxes and discounts. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceSet` instead.") + + """ + The total price of the order, before returns, in shop and presentment currencies. + This includes taxes and discounts. + """ + totalPriceSet: MoneyBag! + + """ + The total amount received from the customer before returns, in shop currency. + """ + totalReceived: Money! @deprecated(reason: "Use `totalReceivedSet` instead.") + + """ + The total amount received from the customer before returns, in shop and presentment currencies. + """ + totalReceivedSet: MoneyBag! + + """The total amount that was refunded, in shop currency.""" + totalRefunded: Money! @deprecated(reason: "Use `totalRefundedSet` instead.") + + """ + The total amount that was refunded, in shop and presentment currencies. + """ + totalRefundedSet: MoneyBag! + + """ + The total amount of shipping that was refunded, in shop and presentment currencies. + """ + totalRefundedShippingSet: MoneyBag! + + """ + The total shipping amount before discounts and returns, in shop currency. + """ + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceSet` instead.") + + """ + The total shipping costs returned to the customer, in shop and presentment + currencies. This includes fees and any related discounts that were refunded. + """ + totalShippingPriceSet: MoneyBag! + + """The total tax amount before returns, in shop currency.""" + totalTax: Money @deprecated(reason: "Use `totalTaxSet` instead.") + + """ + The total tax amount before returns, in shop and presentment currencies. + """ + totalTaxSet: MoneyBag + + """The sum of all tip amounts for the order, in shop currency.""" + totalTipReceived: MoneyV2! @deprecated(reason: "Use `totalTipReceivedSet` instead.") + + """ + The sum of all tip amounts for the order, in shop and presentment currencies. + """ + totalTipReceivedSet: MoneyBag! + + """The total weight of the order before returns, in grams.""" + totalWeight: UnsignedInt64 + + """A list of transactions associated with the order.""" + transactions( + """Truncate the array result to this size.""" + first: Int + + """Filter transactions by whether they are capturable.""" + capturable: Boolean + + """ + Filter transactions by whether they can be resolved manually. + 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 restocking.""" + RESTOCK + + """The discrepancy reason is damage.""" + DAMAGE + + """The discrepancy reason is customer.""" + CUSTOMER + + """The discrepancy reason is not one of the predefined reasons.""" + REFUND_DISCREPANCY + + """The discrepancy reason is balance adjustment.""" + FULL_RETURN_BALANCING_ADJUSTMENT + + """The discrepancy reason is pending refund.""" + PENDING_REFUND_DISCREPANCY +} + +""" +An auto-generated type which holds one OrderAdjustment and a cursor during pagination. +""" +type OrderAdjustmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of OrderAdjustmentEdge.""" + node: OrderAdjustment! +} + +"""Discrepancy reasons for order adjustments.""" +enum OrderAdjustmentInputDiscrepancyReason { + """The discrepancy reason is restocking.""" + RESTOCK + + """The discrepancy reason is damage.""" + DAMAGE + + """The discrepancy reason is customer.""" + CUSTOMER + + """The discrepancy reason is not one of the predefined reasons.""" + OTHER +} + +"""An agreement associated with an order placement.""" +type OrderAgreement implements SalesAgreement { + """The application that created the agreement.""" + app: App + + """The date and time at which the agreement occured.""" + happenedAt: DateTime! + + """The unique ID for the agreement.""" + id: ID! + + """The order associated with the agreement.""" + order: Order! + + """The reason the agremeent was created.""" + reason: OrderActionType! + + """The sales associated with the agreement.""" + sales( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SaleConnection! + + """The staff member associated with the agreement.""" + user: StaffMember +} + +"""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! +} + +"""Details about the order cancellation.""" +type OrderCancellation { + """Staff provided note for the order cancellation.""" + staffNote: String +} + +"""Return type for `orderCancel` mutation.""" +type OrderCancelPayload { + """The job that asynchronously cancels the order.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + orderCancelUserErrors: [OrderCancelUserError!]! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `orderCancelUserErrors` instead.") +} + +"""Represents the reason for the order's cancellation.""" +enum OrderCancelReason { + """The customer wanted to cancel the order.""" + CUSTOMER + + """Payment was declined.""" + DECLINED + + """The order was fraudulent.""" + FRAUD + + """There was insufficient inventory.""" + INVENTORY + + """Staff made an error.""" + STAFF + + """The order was canceled for an unlisted reason.""" + OTHER +} + +""" +The input fields used to specify the refund method for an order cancellation. +""" +input OrderCancelRefundMethodInput { + """Whether to refund to the original payment method.""" + originalPaymentMethodsRefund: Boolean + + """Whether to refund to store credit.""" + storeCreditRefund: OrderCancelStoreCreditRefundInput +} + +"""The input fields used to refund to store credit.""" +input OrderCancelStoreCreditRefundInput { + """The expiration date of the store credit.""" + expiresAt: DateTime +} + +"""Errors related to order cancellation.""" +type OrderCancelUserError implements DisplayableError { + """The error code.""" + code: OrderCancelUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `OrderCancelUserError`.""" +enum OrderCancelUserErrorCode { + """ + An order refund was requested but the user does not have the refund_orders permission. + """ + NO_REFUND_PERMISSION + + """ + An order refund was requested but the user does not have the refund_to_store_credit permission. + """ + NO_REFUND_TO_STORE_CREDIT_PERMISSION + + """ + A store credit order refund was requested but the expiration date is in the past. + """ + STORE_CREDIT_REFUND_EXPIRATION_IN_PAST + + """ + A store credit order refund was requested but the order has no customer. + """ + STORE_CREDIT_REFUND_MISSING_CUSTOMER + + """ + A store credit order refund was requested but the order is a B2B order. + """ + STORE_CREDIT_REFUND_B2B_NOT_SUPPORTED + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID + + """Unexpected internal error happened.""" + INTERNAL_ERROR +} + +""" +The input fields for the authorized transaction to capture and the total amount to capture from it. +""" +input OrderCaptureInput { + """The ID of the order to capture.""" + id: ID! + + """The ID of the authorized transaction to capture.""" + parentTransactionId: ID! + + """ + The amount to capture. The capture amount can't be greater than the amount of the authorized transaction. + """ + amount: Money! + + """ + The currency (in ISO format) that's used to capture the order. This must be + the presentment currency (the currency used by the customer) and is a required + field for orders where the currency and presentment currency differ. + """ + currency: CurrencyCode + + """ + Indicates whether this is to be the final capture for the order transaction. Only applies to + Shopify Payments authorizations which are multi-capturable. If true, any uncaptured amount from the + authorization will be voided after the capture is completed. If false, the authorization will remain open + for future captures. + + For multi-capturable authorizations, this defaults to false if not provided. This field has no effect on + authorizations which aren't multi-capturable (can only be captured once), or on other types of + transactions. + """ + finalCapture: Boolean +} + +"""Return type for `orderCapture` mutation.""" +type OrderCapturePayload { + """The created capture transaction.""" + transaction: OrderTransaction + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for specifying an open order to close.""" +input OrderCloseInput { + """The ID of the order to close.""" + id: ID! +} + +"""Return type for `orderClose` mutation.""" +type OrderClosePayload { + """The closed order.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""An auto-generated type for paginating through multiple Orders.""" +type OrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderEdge!]! + + """ + A list of nodes that are contained in OrderEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Order!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The input fields for identifying an existing customer to associate with the order. +""" +input OrderCreateAssociateCustomerAttributesInput { + """The customer to associate to the order.""" + id: ID + + """ + The email of the customer to associate to the order. + + > Note: + > If both this email input field and the email on `OrderCreateOrderInput` are provided, this field will + > take precedence. + """ + email: String +} + +"""The input fields for a note attribute for an order.""" +input OrderCreateCustomAttributeInput { + """The key or name of the custom attribute.""" + key: String! + + """The value of the custom attribute.""" + value: String! +} + +"""The input fields for creating a customer's mailing address.""" +input OrderCreateCustomerAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The name of the customer's company or organization.""" + company: String + + """The name of the country.""" + country: String + + """The first name of the customer.""" + firstName: String + + """The last name of the customer.""" + lastName: String + + """ + A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """The zip or postal code of the address.""" + zip: String +} + +""" +The input fields for a customer to associate with an order. Allows creation of a new customer or specifying an existing one. +""" +input OrderCreateCustomerInput { + """An existing customer to associate with the order, specified by ID.""" + toAssociate: OrderCreateAssociateCustomerAttributesInput + + """A new customer to create or update and associate with the order.""" + toUpsert: OrderCreateUpsertCustomerAttributesInput +} + +""" +The input fields for a discount code to apply to an order. Only one type of discount can be applied to an order. +""" +input OrderCreateDiscountCodeInput { + """A percentage discount code applied to the line items on the order.""" + itemPercentageDiscountCode: OrderCreatePercentageDiscountCodeAttributesInput + + """A fixed amount discount code applied to the line items on the order.""" + itemFixedDiscountCode: OrderCreateFixedDiscountCodeAttributesInput + + """A free shipping discount code applied to the shipping on an order.""" + freeShippingDiscountCode: OrderCreateFreeShippingDiscountCodeAttributesInput +} + +""" +The status of payments associated with the order. Can only be set when the order is created. +""" +enum OrderCreateFinancialStatus { + """ + The payments are pending. Payment might fail in this state. Check again to + confirm whether the payments have been paid successfully. + """ + PENDING + + """The payments have been authorized.""" + AUTHORIZED + + """The order has been partially paid.""" + PARTIALLY_PAID + + """The payments have been paid.""" + PAID + + """The payments have been partially refunded.""" + PARTIALLY_REFUNDED + + """The payments have been refunded.""" + REFUNDED + + """The payments have been voided.""" + VOIDED + + """The payments have been expired.""" + EXPIRED +} + +""" +The input fields for a fixed amount discount code to apply to an order. +""" +input OrderCreateFixedDiscountCodeAttributesInput { + """The discount code that was entered at checkout.""" + code: String! + + """ + The amount that's deducted from the order total. When you create an order, this value is the monetary amount to deduct. + """ + amountSet: MoneyBagInput +} + +""" +The input fields for a free shipping discount code to apply to an order. +""" +input OrderCreateFreeShippingDiscountCodeAttributesInput { + """The discount code that was entered at checkout.""" + code: String! +} + +"""The input fields for a fulfillment to create for an order.""" +input OrderCreateFulfillmentInput { + """The ID of the location to fulfill the order from.""" + locationId: ID! + + """The address at which the fulfillment occurred.""" + originAddress: FulfillmentOriginAddressInput + + """ + Whether the customer should be notified of changes with the fulfillment. + """ + notifyCustomer: Boolean = false + + """The status of the shipment.""" + shipmentStatus: FulfillmentEventStatus + + """ + The tracking number of the fulfillment. + + The tracking number will be clickable in the interface if one of the following applies + (the highest in the list has the highest priority): + + * [Shopify-known tracking company name](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + specified in the `company` field. + Shopify will build the tracking URL automatically based on the tracking number specified. + * The tracking number has a Shopify-known format. + Shopify will guess the tracking provider and build the tracking url based on the tracking number format. + Not all tracking carriers are supported, and multiple tracking carriers may use similarly formatted tracking numbers. + This can result in an invalid tracking URL. + """ + trackingNumber: String + + """ + The name of the tracking company. + + If you specify a tracking company name from + [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), + Shopify will automatically build tracking URLs for all provided tracking numbers, + which will make the tracking numbers clickable in the interface. + The same tracking company will be applied to all tracking numbers specified. + + Additionally, for the tracking companies listed on the + [Shipping Carriers help page](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-carriers#integrated-shipping-carriers) + Shopify will automatically update the fulfillment's `shipment_status` field during the fulfillment process. + + > Note: + > Send the tracking company name exactly as written in + > [the list](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies) + > (capitalization matters). + """ + trackingCompany: String +} + +"""The order's status in terms of fulfilled line items.""" +enum OrderCreateFulfillmentStatus { + """Every line item in the order has been fulfilled.""" + FULFILLED + + """At least one line item in the order has been fulfilled.""" + PARTIAL + + """ + Every line item in the order has been restocked and the order canceled. + """ + RESTOCKED +} + +"""The types of behavior to use when updating inventory.""" +enum OrderCreateInputsInventoryBehavior { + """Do not claim inventory.""" + BYPASS + + """Ignore the product's inventory policy and claim inventory.""" + DECREMENT_IGNORING_POLICY + + """ + Follow the product's inventory policy and claim inventory, if possible. + """ + DECREMENT_OBEYING_POLICY +} + +"""The input fields for a line item to create for an order.""" +input OrderCreateLineItemInput { + """ + The handle of a fulfillment service that stocks the product variant belonging to a line item. + + This is a third-party fulfillment service in the following scenarios: + + **Scenario 1** + - The product variant is stocked by a single fulfillment service. + - The + [FulfillmentService](/api/admin-graphql/latest/objects/FulfillmentService) is + a third-party fulfillment service. Third-party fulfillment services don't have + a handle with the value `manual`. + + **Scenario 2** + - Multiple fulfillment services stock the product variant. + - The last time that the line item was unfulfilled, it was + awaiting fulfillment by a third-party fulfillment service. Third-party + fulfillment services don't have a handle with the value `manual`. + + If none of the above conditions are met, then the fulfillment service has the `manual` handle. + """ + fulfillmentService: String + + """ + Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges. + """ + giftCard: Boolean = false + + """ + The price of the item before discounts have been applied in the shop currency. + """ + priceSet: MoneyBagInput + + """ + The ID of the product that the line item belongs to. Can be `null` if the + original product associated with the order is deleted at a later date. + """ + productId: ID + + """ + An array of custom information for the item that has been added to the cart. + Often used to provide product customization options. + """ + properties: [OrderCreateLineItemPropertyInput!] + + """The number of items that were purchased.""" + quantity: Int! + + """Whether the item requires shipping.""" + requiresShipping: Boolean = false + + """The item's SKU (stock keeping unit).""" + sku: String + + """ + A list of tax line objects, each of which details a tax applied to the item. + """ + taxLines: [OrderCreateTaxLineInput!] + + """Whether the item was taxable.""" + taxable: Boolean = true + + """The title of the product.""" + title: String + + """ + The ID of the product variant. If both `productId` and `variantId` are + provided, then the product ID that corresponds to the `variantId` is used. + """ + variantId: ID + + """The title of the product variant.""" + variantTitle: String + + """The name of the item's supplier.""" + vendor: String + + """ + The weight of the line item. This will take precedence over the weight of the product variant, if one was specified. + """ + weight: WeightInput +} + +"""The input fields for a line item property for an order.""" +input OrderCreateLineItemPropertyInput { + """The name of the line item property.""" + name: String! + + """The value of the line item property.""" + value: String! +} + +"""Return type for `orderCreateMandatePayment` mutation.""" +type OrderCreateMandatePaymentPayload { + """The async job used for charging the payment.""" + job: Job + + """The Unique ID for the created payment.""" + paymentReferenceId: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderCreateMandatePaymentUserError!]! +} + +""" +An error that occurs during the execution of `OrderCreateMandatePayment`. +""" +type OrderCreateMandatePaymentUserError implements DisplayableError { + """The error code.""" + code: OrderCreateMandatePaymentUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateMandatePaymentUserError`. +""" +enum OrderCreateMandatePaymentUserErrorCode { + """Errors for mandate payment on order.""" + ORDER_MANDATE_PAYMENT_ERROR_CODE +} + +""" +An error that occurs during the execution of a order create manual payment mutation. +""" +type OrderCreateManualPaymentOrderCreateManualPaymentError implements DisplayableError { + """The error code.""" + code: OrderCreateManualPaymentOrderCreateManualPaymentErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderCreateManualPaymentOrderCreateManualPaymentError`. +""" +enum OrderCreateManualPaymentOrderCreateManualPaymentErrorCode { + """Order is not found.""" + ORDER_NOT_FOUND + + """Amount must be positive.""" + AMOUNT_NOT_POSITIVE + + """Payment gateway is not found.""" + GATEWAY_NOT_FOUND + + """Amount exceeds the remaining balance.""" + AMOUNT_EXCEEDS_BALANCE + + """Order is temporarily unavailable.""" + ORDER_IS_TEMPORARILY_UNAVAILABLE + + """ + Indicates that the processedAt field is invalid, such as when it references a future date. + """ + PROCESSED_AT_INVALID +} + +"""Return type for `orderCreateManualPayment` mutation.""" +type OrderCreateManualPaymentPayload { + """The order recorded a manual payment.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderCreateManualPaymentOrderCreateManualPaymentError!]! +} + +""" +The input fields that define the strategies for updating inventory and +whether to send shipping and order confirmations to customers. +""" +input OrderCreateOptionsInput { + """ + The strategy for handling updates to inventory: not claiming inventory, ignoring inventory policies, + or following policies when claiming inventory. + """ + inventoryBehaviour: OrderCreateInputsInventoryBehavior = BYPASS + + """Whether to send an order confirmation to the customer.""" + sendReceipt: Boolean = false + + """Whether to send a shipping confirmation to the customer.""" + sendFulfillmentReceipt: Boolean = false +} + +"""The input fields for creating an order.""" +input OrderCreateOrderInput { + """ + The mailing address associated with the payment method. This address is an optional field that won't be + available on orders that don't require a payment method. + + > Note: + > If a customer is provided, this field or `shipping_address` (which has precedence) will be set as the + > customer's default address. Additionally, if the provided customer is new or hasn't created an order yet + > then their name will be set to the first/last name from this address (if provided). + """ + billingAddress: MailingAddressInput + + """Whether the customer consented to receive email updates from the shop.""" + buyerAcceptsMarketing: Boolean = null + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) + when the order was closed. Returns null if the order isn't closed. + """ + closedAt: DateTime + + """The ID of the purchasing company's location for the order.""" + companyLocationId: ID + + """ + The shop-facing currency for the order. If not specified, then the shop's default currency is used. + """ + currency: CurrencyCode + + """ + A list of extra information that's added to the order. Appears in the + **Additional details** section of an order details page. + """ + customAttributes: [OrderCreateCustomAttributeInput!] + + """The customer to associate to the order.""" + customer: OrderCreateCustomerInput + + """A discount code applied to the order.""" + discountCode: OrderCreateDiscountCodeInput + + """ + A new customer email address for the order. + + > Note: + > If a customer is provided, and no email is provided, the customer's email will be set to this field. + """ + email: String + + """ + The financial status of the order. If not specified, then this will be derived + through the given transactions. Note that it's possible to specify a status + that doesn't match the given transactions and it will persist, but if an + operation later occurs on the order, the status may then be recalculated to + match the current state of transactions. + """ + financialStatus: OrderCreateFinancialStatus + + """ + The fulfillment to create for the order. This will apply to all line items. + """ + fulfillment: OrderCreateFulfillmentInput + + """ + The fulfillment status of the order. Will default to `unfulfilled` if not included. + """ + fulfillmentStatus: OrderCreateFulfillmentStatus + + """The line items to create for the order.""" + lineItems: [OrderCreateLineItemInput!] + + """A list of metafields to add to the order.""" + metafields: [MetafieldInput!] + + """ + The order name, generated by combining the `order_number` property with the + order prefix and suffix that are set in the merchant's [general + settings](https://www.shopify.com/admin/settings/general). This is different + from the `id` property, which is the ID of the order used by the API. This + field can also be set by the API to be any string value. + """ + name: String + + """The new contents for the note associated with the order.""" + note: String + + """A new customer phone number for the order.""" + phone: String + + """The purchase order number associated to this order.""" + poNumber: String + + """ + The presentment currency that was used to display prices to the customer. This + must be specified if any presentment currencies are used in the order. + """ + presentmentCurrency: CurrencyCode + + """ + The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) + when an order was processed. This value is the date that appears on your + orders and that's used in the analytic reports. If you're importing orders + from an app or another platform, then you can set processed_at to a date and + time in the past to match when the original order was created. + """ + 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!] + + """Whether taxes are included in the order subtotal.""" + taxesIncluded: Boolean = false + + """ + An array of tax line objects, each of which details a tax applicable to the + order. When creating an order through the API, tax lines can be specified on + the order or the line items but not both. Tax lines specified on the order are + split across the _taxable_ line items in the created order. + """ + taxLines: [OrderCreateTaxLineInput!] + + """Whether this is a test order.""" + test: Boolean = false + + """The payment transactions to create for the order.""" + transactions: [OrderCreateOrderTransactionInput!] + + """ + The ID of the user 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 of tax to be charged on the item.""" + priceSet: MoneyBagInput + + """The proportion of the item price that the tax represents as a decimal.""" + rate: Decimal! + + """The name of the tax line to create.""" + title: String! +} + +""" +The input fields for creating a new customer object or identifying an existing +customer to update & associate with the order. +""" +input OrderCreateUpsertCustomerAttributesInput { + """A list of addresses to associate with the customer.""" + addresses: [OrderCreateCustomerAddressInput!] + + """ + The email address to update the customer with. If no `id` is provided, this is used to uniquely identify + the customer. + + > Note: + > If both this email input field and the email on `OrderCreateOrderInput` are provided, this field will + > take precedence. + """ + email: String + + """The first name of the customer.""" + firstName: String + + """The id of the customer to associate to the order.""" + id: ID + + """The last name of the customer.""" + lastName: String + + """ + A unique identifier for the customer that's used with [Multipass login](https://shopify.dev/api/multipass). + """ + multipassIdentifier: String + + """A note about the customer.""" + note: String + + """ + The unique phone number ([E.164 format](https://en.wikipedia.org/wiki/E.164)) for this customer. + Attempting to assign the same phone number to multiple customers returns an error. The property can be + set using different formats, but each format must represent a number that can be dialed from anywhere + in the world. The following formats are all valid: + - 6135551212 + - +16135551212 + - (613)555-1212 + - +1 613-555-1212 + """ + phone: String + + """ + Tags that the shop owner has attached to the customer. A customer can have up + to 250 tags. Each tag can have up to 255 characters. + """ + tags: [String!] + + """ + Whether the customer is exempt from paying taxes on their order. If `true`, + then taxes won't be applied to an order at checkout. If `false`, then taxes + will be applied at checkout. + """ + taxExempt: Boolean +} + +"""An error that occurs during the execution of `OrderCreate`.""" +type OrderCreateUserError implements DisplayableError { + """The error code.""" + code: OrderCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `OrderCreateUserError`.""" +enum OrderCreateUserErrorCode { + """The input value is invalid.""" + INVALID + + """Indicates that the line item fulfillment service handle is invalid.""" + FULFILLMENT_SERVICE_INVALID + + """Indicates that the inventory claim failed during order creation.""" + INVENTORY_CLAIM_FAILED + + """ + Indicates that the processed_at field is invalid, such as when it references a future date. + """ + PROCESSED_AT_INVALID + + """ + Indicates that the tax line rate is missing - only enforced for LineItem or ShippingLine-level tax lines. + """ + TAX_LINE_RATE_MISSING + + """ + Indicates that both customer_id and customer were provided - only one is permitted. + """ + REDUNDANT_CUSTOMER_FIELDS + + """Indicates that the shop is dormant and cannot create orders.""" + SHOP_DORMANT +} + +"""Return type for `orderCustomerRemove` mutation.""" +type OrderCustomerRemovePayload { + """The order that had its customer removed.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderCustomerRemoveUserError!]! +} + +"""Errors related to order customer removal.""" +type OrderCustomerRemoveUserError implements DisplayableError { + """The error code.""" + code: OrderCustomerRemoveUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerRemoveUserError`. +""" +enum OrderCustomerRemoveUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID + + """An error ocurred while saving the order.""" + NOT_SAVED +} + +"""Return type for `orderCustomerSet` mutation.""" +type OrderCustomerSetPayload { + """The order that had a customer set.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderCustomerSetUserError!]! +} + +"""Errors related to order customer set.""" +type OrderCustomerSetUserError implements DisplayableError { + """The error code.""" + code: OrderCustomerSetUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderCustomerSetUserError`. +""" +enum OrderCustomerSetUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID + + """An error ocurred while saving the order.""" + NOT_SAVED + + """The customer does not have the permissions to place this order.""" + NOT_PERMITTED +} + +"""Return type for `orderDelete` mutation.""" +type OrderDeletePayload { + """Deleted order ID.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderDeleteUserError!]! +} + +"""Errors related to deleting an order.""" +type OrderDeleteUserError implements DisplayableError { + """The error code.""" + code: OrderDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `OrderDeleteUserError`.""" +enum OrderDeleteUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is invalid.""" + INVALID +} + +"""Represents the order's current financial status.""" +enum OrderDisplayFinancialStatus { + """ + Displayed as **Pending**. Orders have this status when the payment provider + needs time to complete the payment, or when manual payment methods are being used. + """ + PENDING + + """ + Displayed as **Authorized**. The payment provider has validated the customer's + payment information. This status appears only for manual payment capture and + indicates payments should be captured before the authorization period expires. + """ + AUTHORIZED + + """ + Displayed as **Partially paid**. A payment was manually captured for the order + with an amount less than the full order value. + """ + PARTIALLY_PAID + + """ + Displayed as **Partially refunded**. The amount refunded to a customer is less than the full amount paid for an order. + """ + PARTIALLY_REFUNDED + + """ + Displayed as **Voided**. An unpaid (payment authorized but not captured) order was manually + canceled. + """ + VOIDED + + """ + Displayed as **Paid**. Payment was automatically or manually captured, or the order was marked as paid. + """ + PAID + + """ + Displayed as **Refunded**. The full amount paid for an order was refunded to the customer. + """ + REFUNDED + + """ + Displayed as **Expired**. Payment wasn't captured before the payment + provider's deadline on an authorized order. Some payment providers use this + status to indicate failed payment processing. + """ + EXPIRED +} + +""" +Represents the order's aggregated fulfillment status for display purposes. +""" +enum OrderDisplayFulfillmentStatus { + """ + Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. + """ + UNFULFILLED + + """ + Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. + """ + PARTIALLY_FULFILLED + + """ + Displayed as **Fulfilled**. All the items in the order have been fulfilled. + """ + FULFILLED + + """ + Displayed as **Restocked**. All the items in the order have been restocked. Replaced by the "UNFULFILLED" status. + """ + RESTOCKED + + """ + Displayed as **Pending fulfillment**. A request for fulfillment of some items + awaits a response from the fulfillment service. Replaced by the "IN_PROGRESS" status. + """ + PENDING_FULFILLMENT + + """ + Displayed as **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. + """ + OPEN + + """ + Displayed as **In progress**. All of the items in the order have had a request + for fulfillment sent to the fulfillment service or all of the items have been + marked as in progress. + """ + IN_PROGRESS + + """ + Displayed as **On hold**. All of the unfulfilled items in this order are on hold. + """ + ON_HOLD + + """ + Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. + """ + SCHEDULED + + """ + Displayed as **Request declined**. Some of the items in the order have been + rejected for fulfillment by the fulfillment service. + """ + REQUEST_DECLINED +} + +"""A summary of the important details for a dispute on an order.""" +type OrderDisputeSummary implements Node { + """A globally-unique ID.""" + id: ID! + + """The type that the dispute was initiated as.""" + initiatedAs: DisputeType! + + """The current status of the dispute.""" + status: DisputeStatus! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. +""" +type OrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of OrderEdge.""" + node: Order! +} + +"""Return type for `orderEditAddCustomItem` mutation.""" +type OrderEditAddCustomItemPayload { + """ + The custom line item that will be added to the order based on the current edits. + """ + calculatedLineItem: CalculatedLineItem + + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `orderEditAddLineItemDiscount` mutation.""" +type OrderEditAddLineItemDiscountPayload { + """The discount applied to a line item during this order edit.""" + addedDiscountStagedChange: OrderStagedChangeAddLineItemDiscount + + """The line item with the edits applied but not saved.""" + calculatedLineItem: CalculatedLineItem + + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields used to add a shipping line.""" +input OrderEditAddShippingLineInput { + """The price of the shipping line.""" + price: MoneyInput! + + """The title of the shipping line.""" + title: String! +} + +"""Return type for `orderEditAddShippingLine` mutation.""" +type OrderEditAddShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """ + The [calculated shipping line](https://shopify.dev/api/admin-graphql/latest/objects/calculatedshippingline) + that's added during this order edit. + """ + calculatedShippingLine: CalculatedShippingLine + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderEditAddShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditAddShippingLine`. +""" +type OrderEditAddShippingLineUserError implements DisplayableError { + """The error code.""" + code: OrderEditAddShippingLineUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditAddShippingLineUserError`. +""" +enum OrderEditAddShippingLineUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""Return type for `orderEditAddVariant` mutation.""" +type OrderEditAddVariantPayload { + """ + The [calculated line item](https://shopify.dev/api/admin-graphql/latest/objects/calculatedlineitem) + that's added during this order edit. + """ + calculatedLineItem: CalculatedLineItem + + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""An agreement associated with an edit to the order.""" +type OrderEditAgreement implements SalesAgreement { + """The application that created the agreement.""" + app: App + + """The date and time at which the agreement occured.""" + happenedAt: DateTime! + + """The unique ID for the agreement.""" + id: ID! + + """The reason the agremeent was created.""" + reason: OrderActionType! + + """The sales associated with the agreement.""" + sales( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SaleConnection! + + """The staff member associated with the agreement.""" + user: StaffMember +} + +"""The input fields used to add a discount during an order edit.""" +input OrderEditAppliedDiscountInput { + """The description of the discount.""" + description: String + + """The value of the discount as a fixed amount.""" + fixedValue: MoneyInput + + """The value of the discount as a percentage.""" + percentValue: Float +} + +"""Return type for `orderEditBegin` mutation.""" +type OrderEditBeginPayload { + """The order that will be edited.""" + calculatedOrder: CalculatedOrder + + """The order edit session that was created.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `orderEditCommit` mutation.""" +type OrderEditCommitPayload { + """The order with changes applied.""" + order: Order + + """ + Messages to display to the user after the staged changes are commmitted. + """ + successMessages: [String!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `orderEditRemoveDiscount` mutation.""" +type OrderEditRemoveDiscountPayload { + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderEditRemoveDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveDiscount`. +""" +type OrderEditRemoveDiscountUserError implements DisplayableError { + """The error code.""" + code: OrderEditRemoveDiscountUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveDiscountUserError`. +""" +enum OrderEditRemoveDiscountUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""Return type for `orderEditRemoveLineItemDiscount` mutation.""" +type OrderEditRemoveLineItemDiscountPayload { + """The calculated line item after removal of the discount.""" + calculatedLineItem: CalculatedLineItem + + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `orderEditRemoveShippingLine` mutation.""" +type OrderEditRemoveShippingLinePayload { + """ + The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + with the edits applied but not saved. + """ + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderEditRemoveShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditRemoveShippingLine`. +""" +type OrderEditRemoveShippingLineUserError implements DisplayableError { + """The error code.""" + code: OrderEditRemoveShippingLineUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditRemoveShippingLineUserError`. +""" +enum OrderEditRemoveShippingLineUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""An edit session for an order.""" +type OrderEditSession implements Node { + """The unique ID of the order edit session.""" + id: ID! +} + +"""Return type for `orderEditSetQuantity` mutation.""" +type OrderEditSetQuantityPayload { + """The calculated line item with the edits applied but not saved.""" + calculatedLineItem: CalculatedLineItem + + """The calculated order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `orderEditUpdateDiscount` mutation.""" +type OrderEditUpdateDiscountPayload { + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderEditUpdateDiscountUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateDiscount`. +""" +type OrderEditUpdateDiscountUserError implements DisplayableError { + """The error code.""" + code: OrderEditUpdateDiscountUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateDiscountUserError`. +""" +enum OrderEditUpdateDiscountUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""The input fields used to update a shipping line.""" +input OrderEditUpdateShippingLineInput { + """The price of the shipping line.""" + price: MoneyInput + + """The title of the shipping line.""" + title: String +} + +"""Return type for `orderEditUpdateShippingLine` mutation.""" +type OrderEditUpdateShippingLinePayload { + """An order with the edits applied but not saved.""" + calculatedOrder: CalculatedOrder + + """The order edit session with the edits applied but not saved.""" + orderEditSession: OrderEditSession + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderEditUpdateShippingLineUserError!]! +} + +""" +An error that occurs during the execution of `OrderEditUpdateShippingLine`. +""" +type OrderEditUpdateShippingLineUserError implements DisplayableError { + """The error code.""" + code: OrderEditUpdateShippingLineUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderEditUpdateShippingLineUserError`. +""" +enum OrderEditUpdateShippingLineUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""The input fields for identifying a order.""" +input OrderIdentifierInput { + """The ID of the order.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the order. + """ + customId: UniqueMetafieldValueInput +} + +""" +The input fields for specifying the information to be updated on an order when using the orderUpdate mutation. +""" +input OrderInput { + """The ID of the order to update.""" + id: ID! + + """ + A new customer email address for the order. Overwrites the existing email address. + """ + email: String + + """ + The new contents for the note associated with the order. Overwrites the existing note. + """ + note: String + + """A new list of tags for the order. Overwrites the existing tags.""" + tags: [String!] + + """ + The new shipping address for the order. Overwrites the existing shipping address. + """ + shippingAddress: MailingAddressInput + + """ + A new list of custom attributes for the order. Overwrites the existing custom attributes. + """ + customAttributes: [AttributeInput!] + + """ + A list of new metafields to add to the existing metafields for the order. + """ + metafields: [MetafieldInput!] + + """ + A list of new [localized + fields](https://shopify.dev/api/admin-graphql/latest/objects/localizedfield) + to add to the existing list of localized fields for the order. + """ + localizedFields: [LocalizedFieldInput!] + + """The new purchase order number for the order.""" + poNumber: String +} + +"""Return type for `orderInvoiceSend` mutation.""" +type OrderInvoiceSendPayload { + """The order associated with the invoice email.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderInvoiceSendUserError!]! +} + +"""An error that occurs during the execution of `OrderInvoiceSend`.""" +type OrderInvoiceSendUserError implements DisplayableError { + """The error code.""" + code: OrderInvoiceSendUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderInvoiceSendUserError`. +""" +enum OrderInvoiceSendUserErrorCode { + """An error occurred while sending the invoice.""" + ORDER_INVOICE_SEND_UNSUCCESSFUL +} + +"""The input fields for specifying the order to mark as paid.""" +input OrderMarkAsPaidInput { + """The ID of the order to mark as paid.""" + id: ID! +} + +"""Return type for `orderMarkAsPaid` mutation.""" +type OrderMarkAsPaidPayload { + """The order marked as paid.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for specifying a closed order to open.""" +input OrderOpenInput { + """The ID of the order to open.""" + id: ID! +} + +"""Return type for `orderOpen` mutation.""" +type OrderOpenPayload { + """The opened order.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The payment collection details for an order that requires additional payment following an edit to the order. +""" +type OrderPaymentCollectionDetails { + """The URL to use for collecting an additional payment on the order.""" + additionalPaymentCollectionUrl: URL + + """ + The list of vaulted payment methods for the order with their permissions. + """ + vaultedPaymentMethods: [PaymentMandate!] +} + +"""The status of a customer's payment for an order.""" +type OrderPaymentStatus { + """ + A message describing an error during the asynchronous processing of a payment. + """ + errorMessage: String + + """ + The ID of the payment, initially returned by an `orderCreateMandatePayment` or `orderCreatePayment` mutation. + """ + paymentReferenceId: String! + + """The status of the payment.""" + status: OrderPaymentStatusResult! + + """The transaction associated with the payment.""" + transactions: [OrderTransaction!]! + + """ + A translated message describing an error during the asynchronous processing of a payment. + """ + translatedErrorMessage: String +} + +"""The type of a payment status.""" +enum OrderPaymentStatusResult { + """The payment succeeded.""" + SUCCESS + + """The payment is authorized.""" + AUTHORIZED + + """The payment is voided.""" + VOIDED + + """The payment is refunded.""" + REFUNDED + + """The payment is captured.""" + CAPTURED + + """The payment is in purchased status.""" + PURCHASED + + """There was an error initiating the payment.""" + ERROR + + """The payment is still being processed.""" + PROCESSING + + """Redirect required.""" + REDIRECT_REQUIRED + + """Payment can be retried.""" + RETRYABLE + + """Status is unknown.""" + UNKNOWN + + """The payment is awaiting processing.""" + INITIATED + + """The payment is pending with the provider, and may take a while.""" + PENDING +} + +""" +The order's aggregated return status that's used for display purposes. +An order might have multiple returns, so this field communicates the prioritized return status. +The `OrderReturnStatus` enum is a supported filter parameter in the [`orders` query](https://shopify.dev/api/admin-graphql/latest/queries/orders#:~:text=reference_location_id-,return_status,-risk_level). +""" +enum OrderReturnStatus { + """Some items in the order are being returned.""" + IN_PROGRESS + + """All return shipments from a return in this order were inspected.""" + INSPECTION_COMPLETE + + """No items in the order were returned.""" + NO_RETURN + + """Some items in the order were returned.""" + RETURNED + + """Some returns in the order were not completed successfully.""" + RETURN_FAILED + + """A return was requested for some items in the order.""" + RETURN_REQUESTED +} + +""" +Represents a fraud check on an order. This object is deprecated in favor of [OrderRiskAssessment](https://shopify.dev/api/admin-graphql/latest/objects/OrderRiskAssessment) +and its enhanced capabilities. +""" +type OrderRisk { + """ + Whether the risk level is shown in the Shopify admin. If false, then this + order risk is ignored when Shopify determines the overall risk level for the order. + """ + display: Boolean! @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") + + """ + The likelihood that an order is fraudulent, based on this order risk. The + level can be set by Shopify risk analysis or by an app. + """ + level: OrderRiskLevel @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.riskLevel which allows for more granular risk levels, including PENDING and NONE.") + + """The risk message that's shown to the merchant in the Shopify admin.""" + message: String @deprecated(reason: "This field is deprecated in favor of OrderRiskAssessment.facts.") +} + +""" +The risk assessments for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskAssessment { + """ + Optional facts used to describe the risk assessment. The values in here are specific to the provider. + See the [examples for the mutation orderRiskAssessmentCreate](https://shopify.dev/api/admin-graphql/unstable/mutations/orderRiskAssessmentCreate#section-examples). + """ + facts: [RiskFact!]! + + """ + The app that provided the assessment, `null` if the assessment was provided by Shopify. + """ + provider: App + + """ + The likelihood that the order is fraudulent, based on this risk assessment. + """ + riskLevel: RiskAssessmentResult! +} + +"""The input fields for an order risk assessment.""" +input OrderRiskAssessmentCreateInput { + """The ID of the order receiving the fraud assessment.""" + orderId: ID! + + """The risk level of the fraud assessment.""" + riskLevel: RiskAssessmentResult! + + """The list of facts used to determine the fraud assessment.""" + facts: [OrderRiskAssessmentFactInput!]! +} + +"""Return type for `orderRiskAssessmentCreate` mutation.""" +type OrderRiskAssessmentCreatePayload { + """The order risk assessment created.""" + orderRiskAssessment: OrderRiskAssessment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [OrderRiskAssessmentCreateUserError!]! +} + +""" +An error that occurs during the execution of `OrderRiskAssessmentCreate`. +""" +type OrderRiskAssessmentCreateUserError implements DisplayableError { + """The error code.""" + code: OrderRiskAssessmentCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `OrderRiskAssessmentCreateUserError`. +""" +enum OrderRiskAssessmentCreateUserErrorCode { + """Too many facts were provided for the risk assessment.""" + TOO_MANY_FACTS + + """ + The order is marked as fulfilled and can no longer accept new risk assessments. + """ + ORDER_ALREADY_FULFILLED + + """The input value is invalid.""" + INVALID + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND +} + +"""The input fields to create a fact on an order risk assessment.""" +input OrderRiskAssessmentFactInput { + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! + + """ + A description of the fact. Large values are truncated to 256 characters. + """ + description: String! +} + +""" +The likelihood that an order is fraudulent. +This enum is deprecated in favor of +[RiskAssessmentResult](https://shopify.dev/api/admin-graphql/latest/enums/RiskAssessmentResult) +which allows for more granular risk levels, including PENDING and NONE. +""" +enum OrderRiskLevel { + """There is a low level of risk that this order is fraudulent.""" + LOW + + """There is a medium level of risk that this order is fraudulent.""" + MEDIUM + + """There is a high level of risk that this order is fraudulent.""" + HIGH +} + +"""List of possible values for an OrderRiskRecommendation recommendation.""" +enum OrderRiskRecommendationResult { + """Recommends cancelling the order.""" + CANCEL + + """Recommends investigating the order by contacting buyers.""" + INVESTIGATE + + """Recommends fulfilling the order.""" + ACCEPT + + """There is no recommended action for the order.""" + NONE +} + +""" +Summary of risk characteristics for an order. + +See the [example query "Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order). +""" +type OrderRiskSummary { + """The list of risk assessments for the order.""" + assessments: [OrderRiskAssessment!]! + + """ + The recommendation for the order based on the results of the risk assessments. + This suggests the action the merchant should take with regards to its risk of fraud. + """ + recommendation: OrderRiskRecommendationResult! +} + +"""The set of valid sort keys for the Order query.""" +enum OrderSortKeys { + """Sorts by the date and time the order was created.""" + CREATED_AT + + """ + Sorts by the current total price of an order in the shop currency, including any returns/refunds/removals. + """ + CURRENT_TOTAL_PRICE + + """Sorts by the customer's name.""" + CUSTOMER_NAME + + """ + Sort by shipping address to analyze regional sales patterns or plan logistics. + """ + DESTINATION + + """Sorts by the financial status of the order.""" + FINANCIAL_STATUS + + """Sorts by the order's fulfillment status.""" + FULFILLMENT_STATUS + + """Sort by the `id` value.""" + ID + + """Sorts by the order number.""" + ORDER_NUMBER + + """ + Sort by the purchase order number to match external procurement systems or track recent orders. + """ + PO_NUMBER + + """Sorts by the date and time the order was processed.""" + PROCESSED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """ + Sort by the total quantity of all line items to identify large purchases or analyze inventory demand patterns. + """ + TOTAL_ITEMS_QUANTITY + + """ + Sorts by the total sold price of an order in the shop currency, excluding any returns/refunds/removals. + """ + TOTAL_PRICE + + """Sorts by the date and time the order was last updated.""" + UPDATED_AT +} + +"""A change that has been applied to an order.""" +union OrderStagedChange = OrderStagedChangeAddCustomItem | OrderStagedChangeAddLineItemDiscount | OrderStagedChangeAddShippingLine | OrderStagedChangeAddVariant | OrderStagedChangeDecrementItem | OrderStagedChangeIncrementItem | OrderStagedChangeRemoveDiscount | OrderStagedChangeRemoveShippingLine + +""" +A change to the order representing the addition of a +custom line item. For example, you might want to add gift wrapping service +as a custom line item. +""" +type OrderStagedChangeAddCustomItem { + """ + The price of an individual item without any discounts applied. This value can't be negative. + """ + originalUnitPrice: MoneyV2! + + """ + The quantity of the custom item to add to the order. This value must be greater than zero. + """ + quantity: Int! + + """The title of the custom item.""" + title: String! +} + +""" +The discount applied to an item that was added during the current order edit. +""" +type OrderStagedChangeAddLineItemDiscount { + """The description of the discount.""" + description: String! + + """A globally-unique ID.""" + id: ID! + + """The pricing value of the discount.""" + value: PricingValue! +} + +""" +A new [shipping line](https://shopify.dev/api/admin-graphql/latest/objects/shippingline) +added as part of an order edit. +""" +type OrderStagedChangeAddShippingLine { + """The phone number at the shipping address.""" + phone: String + + """The shipping line's title that's shown to the buyer.""" + presentmentTitle: String + + """The price that applies to the shipping line.""" + price: MoneyV2! + + """The title of the shipping line.""" + title: String +} + +""" +A change to the order representing the addition of an existing product variant. +""" +type OrderStagedChangeAddVariant { + """The quantity of the product variant that was added.""" + quantity: Int! + + """The product variant that was added.""" + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple OrderStagedChanges. +""" +type OrderStagedChangeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [OrderStagedChangeEdge!]! + + """ + A list of nodes that are contained in OrderStagedChangeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [OrderStagedChange!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""An removal of items from an existing line item on the order.""" +type OrderStagedChangeDecrementItem { + """The number of items removed.""" + delta: Int! + + """The original line item.""" + lineItem: LineItem! + + """The intention to restock the removed items.""" + restock: Boolean! +} + +""" +An auto-generated type which holds one OrderStagedChange and a cursor during pagination. +""" +type OrderStagedChangeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of OrderStagedChangeEdge.""" + node: OrderStagedChange! +} + +"""An addition of items to an existing line item on the order.""" +type OrderStagedChangeIncrementItem { + """The number of items added.""" + delta: Int! + + """The original line item.""" + lineItem: LineItem! +} + +"""A discount application removed during an order edit.""" +type OrderStagedChangeRemoveDiscount { + """The removed discount application.""" + discountApplication: DiscountApplication! +} + +"""A shipping line removed during an order edit.""" +type OrderStagedChangeRemoveShippingLine { + """The removed shipping line.""" + shippingLine: ShippingLine! +} + +""" +The `OrderTransaction` object represents a payment transaction that's associated with an order. An order +transaction is a specific action or event that happens within the context of an order, such as a customer paying +for a purchase or receiving a refund, or other payment-related activity. + +Use the `OrderTransaction` object to capture the complete lifecycle of a payment, from initial +authorization to final settlement, including refunds and currency exchanges. Common use cases for using the +`OrderTransaction` object include: + +- Processing new payments for orders +- Managing payment authorizations and captures +- Processing refunds for returned items +- Tracking payment status and errors +- Managing multi-currency transactions +- Handling payment gateway integrations + +Each `OrderTransaction` object has a [`kind`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionKind) +that defines the type of transaction and a [`status`](https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionStatus) +that indicates the current state of the transaction. The object stores detailed information about payment +methods, gateway processing, and settlement details. + +Learn more about [payment processing](https://help.shopify.com/manual/payments) +and [payment gateway integrations](https://www.shopify.com/ca/payment-gateways). +""" +type OrderTransaction implements Node { + """The masked account number associated with the payment method.""" + accountNumber: String + + """The amount of money.""" + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The rounding adjustment applied on the cash amount in shop and presentment currencies. + """ + amountRoundingSet: MoneyBag + + """ + The amount and currency of the transaction in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """The amount and currency of the transaction.""" + amountV2: MoneyV2! @deprecated(reason: "Use `amountSet` instead.") + + """Authorization code associated with the transaction.""" + authorizationCode: String + + """ + The time when the authorization expires. This field is available only to stores on a Shopify Plus plan. + """ + authorizationExpiresAt: DateTime + + """Date and time when the transaction was created.""" + createdAt: DateTime! + + """ + An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. + """ + currencyExchangeAdjustment: CurrencyExchangeAdjustment + + """The Shopify Point of Sale device used to process the transaction.""" + device: PointOfSaleDevice + + """A standardized error code, independent of the payment provider.""" + errorCode: OrderTransactionErrorCode + + """ + The transaction fees charged on the order transaction. Only present for Shopify Payments transactions. + """ + fees: [TransactionFee!]! + + """ + The human-readable payment gateway name used to process the transaction. + """ + formattedGateway: String + + """The payment gateway used to process the transaction.""" + gateway: String + + """A globally-unique ID.""" + id: ID! + + """The kind of transaction.""" + kind: OrderTransactionKind! + + """The physical location where the transaction was processed.""" + location: Location + + """Whether the transaction is processed by manual payment gateway.""" + manualPaymentGateway: Boolean! + + """Whether the transaction can be manually captured.""" + manuallyCapturable: Boolean! + + """ + Specifies the available amount to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableV2` instead.") + + """ + Specifies the available amount with currency to refund on the gateway. + This value is only available for transactions of type `SuggestedRefund`. + """ + maximumRefundableV2: MoneyV2 + + """Whether the transaction can be captured multiple times.""" + multiCapturable: Boolean! + + """The associated order.""" + order: Order + + """ + The associated parent transaction, for example the authorization of a capture. + """ + parentTransaction: OrderTransaction + + """The payment details for the transaction.""" + paymentDetails: PaymentDetails + + """The payment icon to display for the transaction.""" + paymentIcon: Image + + """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 card number is incorrect.""" + INCORRECT_NUMBER + + """The format of the card number is incorrect.""" + INVALID_NUMBER + + """The format of the expiry date is incorrect.""" + INVALID_EXPIRY_DATE + + """The format of the CVC is incorrect.""" + INVALID_CVC + + """The card is expired.""" + EXPIRED_CARD + + """The CVC does not match the card number.""" + INCORRECT_CVC + + """The ZIP or postal code does not match the card number.""" + INCORRECT_ZIP + + """The address does not match the card number.""" + INCORRECT_ADDRESS + + """The entered PIN is incorrect.""" + INCORRECT_PIN + + """The card was declined.""" + CARD_DECLINED + + """There was an error while processing the payment.""" + PROCESSING_ERROR + + """Call the card issuer.""" + CALL_ISSUER + + """ + The card has been reported as lost or stolen, and the card issuer has + requested that the merchant keep the card and call the number on the back. + """ + PICK_UP_CARD + + """There is an error in the gateway or merchant configuration.""" + CONFIG_ERROR + + """A real card was used but the gateway was in test mode.""" + TEST_MODE_LIVE_CARD + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE + + """There was an unknown error with processing the payment.""" + GENERIC_ERROR + + """The payment method is not available in the customer's country.""" + INVALID_COUNTRY + + """The amount is either too high or too low for the provider.""" + INVALID_AMOUNT + + """The payment method is momentarily unavailable.""" + PAYMENT_METHOD_UNAVAILABLE + + """The payment method was invalid.""" + AMAZON_PAYMENTS_INVALID_PAYMENT_METHOD + + """The maximum amount has been captured.""" + AMAZON_PAYMENTS_MAX_AMOUNT_CHARGED + + """The maximum amount has been refunded.""" + AMAZON_PAYMENTS_MAX_AMOUNT_REFUNDED + + """The maximum of 10 authorizations has been captured for an order.""" + AMAZON_PAYMENTS_MAX_AUTHORIZATIONS_CAPTURED + + """The maximum of 10 refunds has been processed for an order.""" + AMAZON_PAYMENTS_MAX_REFUNDS_PROCESSED + + """The order was canceled, which canceled all open authorizations.""" + AMAZON_PAYMENTS_ORDER_REFERENCE_CANCELED + + """The order was not confirmed within three hours.""" + AMAZON_PAYMENTS_STALE +} + +""" +The input fields for the information needed to create an order transaction. +""" +input OrderTransactionInput { + """The amount of money for this transaction.""" + amount: Money! + + """The payment gateway to use for this transaction.""" + gateway: String! + + """The kind of transaction.""" + kind: OrderTransactionKind! + + """The ID of the order associated with the transaction.""" + orderId: ID! + + """ + The ID of the optional parent transaction, for example the authorization of a capture. + """ + parentId: ID +} + +"""The different kinds of order transactions.""" +enum OrderTransactionKind { + """An authorization and capture performed together in a single step.""" + SALE + + """A transfer of the money that was reserved by an authorization.""" + CAPTURE + + """ + An amount reserved against the cardholder's funding source. + Money does not change hands until the authorization is captured. + """ + AUTHORIZATION + + """A cancelation of an authorization transaction.""" + VOID + + """ + A partial or full return of captured funds to the cardholder. + A refund can happen only after a capture is processed. + """ + REFUND + + """ + The money returned to the customer when they've paid too much during a cash transaction. + """ + CHANGE + + """An authorization for a payment taken with an EMV credit card reader.""" + EMV_AUTHORIZATION + + """A suggested refund transaction that can be used to create a refund.""" + SUGGESTED_REFUND +} + +"""The different states that an `OrderTransaction` can have.""" +enum OrderTransactionStatus { + """The transaction succeeded.""" + SUCCESS + + """The transaction failed.""" + FAILURE + + """The transaction is pending.""" + PENDING + + """There was an error while processing the transaction.""" + ERROR + + """Awaiting a response.""" + AWAITING_RESPONSE + + """The transaction status is unknown.""" + UNKNOWN +} + +"""Return type for `orderUpdate` mutation.""" +type OrderUpdatePayload { + """The updated order.""" + order: Order + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""A page on the Online Store.""" +type Page implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node { + """The text content of the page, complete with HTML markup.""" + body: HTML! + + """ + The first 150 characters of the page body. If the page body contains more than + 150 characters, additional characters are truncated by ellipses. + """ + bodySummary: String! + + """The date and time (ISO 8601 format) of the page creation.""" + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """ + A unique, human-friendly string for the page. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String! + + """A globally-unique ID.""" + id: ID! + + """Whether or not the page is visible.""" + isPublished: Boolean! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The date and time (ISO 8601 format) when the page became or will become visible. + Returns null when the page isn't visible. + """ + publishedAt: DateTime + + """The suffix of the template that's used to render the page.""" + templateSuffix: String + + """Title of the page.""" + title: String! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The date and time (ISO 8601 format) of the latest page update.""" + updatedAt: DateTime! +} + +"""An auto-generated type for paginating through multiple Pages.""" +type PageConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PageEdge!]! + + """ + A list of nodes that are contained in PageEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Page!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields to create a page.""" +input PageCreateInput { + """ + A unique, human-friendly string for the page. If no handle is specified, a + handle will be generated automatically from the page title. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String + + """The text content of the page, complete with HTML markup.""" + body: String + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the page should become visible. + """ + publishDate: DateTime + + """ + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default page template is used. + """ + templateSuffix: String + + """The input fields to create or update a metafield.""" + metafields: [MetafieldInput!] + + """The title of the page.""" + title: String! +} + +"""Return type for `pageCreate` mutation.""" +type PageCreatePayload { + """The page that was created.""" + page: Page + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PageCreateUserError!]! +} + +"""An error that occurs during the execution of `PageCreate`.""" +type PageCreateUserError implements DisplayableError { + """The error code.""" + code: PageCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `PageCreateUserError`.""" +enum PageCreateUserErrorCode { + """Can’t set isPublished to true and also set a future publish date.""" + INVALID_PUBLISH_DATE + + """The input value is blank.""" + BLANK + + """The input value is too long.""" + TOO_LONG + + """The input value is too big.""" + TOO_BIG + + """The input value is already taken.""" + TAKEN + + """The input value is invalid.""" + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """The metafield type is invalid.""" + INVALID_TYPE +} + +"""Return type for `pageDelete` mutation.""" +type PageDeletePayload { + """The ID of the deleted page.""" + deletedPageId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PageDeleteUserError!]! +} + +"""An error that occurs during the execution of `PageDelete`.""" +type PageDeleteUserError implements DisplayableError { + """The error code.""" + code: PageDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `PageDeleteUserError`.""" +enum PageDeleteUserErrorCode { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND +} + +""" +An auto-generated type which holds one Page and a cursor during pagination. +""" +type PageEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PageEdge.""" + node: Page! +} + +""" +Returns information about pagination in a connection, in accordance with the +[Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). +For more information, please read our [GraphQL Pagination Usage Guide](https://shopify.dev/api/usage/pagination-graphql). +""" +type PageInfo { + """The cursor corresponding to the last node in edges.""" + endCursor: String + + """Whether there are more pages to fetch following the current page.""" + hasNextPage: Boolean! + + """Whether there are any pages prior to the current page.""" + hasPreviousPage: Boolean! + + """The cursor corresponding to the first node in edges.""" + startCursor: String +} + +"""The set of valid sort keys for the Page query.""" +enum PageSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `published_at` value.""" + PUBLISHED_AT + + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""The input fields to update a page.""" +input PageUpdateInput { + """ + A unique, human-friendly string for the page. If no handle is specified, a + handle will be generated automatically from the page title. + In themes, the Liquid templating language refers to a page by its handle. + """ + handle: String + + """The text content of the page, complete with HTML markup.""" + body: String + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The date and time (ISO 8601 format) when the page should become visible. + """ + publishDate: DateTime + + """ + The suffix of the template that's used to render the page. + If the value is an empty string or `null`, then the default page template is used. + """ + templateSuffix: String + + """The input fields to create or update a metafield.""" + metafields: [MetafieldInput!] + + """The title of the page.""" + title: String + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean = false +} + +"""Return type for `pageUpdate` mutation.""" +type PageUpdatePayload { + """The page that was updated.""" + page: Page + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PageUpdateUserError!]! +} + +"""An error that occurs during the execution of `PageUpdate`.""" +type PageUpdateUserError implements DisplayableError { + """The error code.""" + code: PageUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `PageUpdateUserError`.""" +enum PageUpdateUserErrorCode { + """Can’t set isPublished to true and also set a future publish date.""" + INVALID_PUBLISH_DATE + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is blank.""" + BLANK + + """The input value is too long.""" + TOO_LONG + + """The input value is too big.""" + TOO_BIG + + """The input value is already taken.""" + TAKEN + + """The input value is invalid.""" + INVALID + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """The metafield type is invalid.""" + INVALID_TYPE +} + +"""A payment customization.""" +type PaymentCustomization implements HasMetafieldDefinitions & HasMetafields & Node { + """The enabled status of the payment customization.""" + enabled: Boolean! + + """ + The error history on the most recent version of the payment customization. + """ + errorHistory: FunctionsErrorHistory + + """The ID of the Shopify Function implementing the payment customization.""" + functionId: String! + + """A globally-unique ID.""" + id: ID! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The Shopify Function implementing the payment customization.""" + shopifyFunction: ShopifyFunction! + + """The title of the payment customization.""" + title: String! +} + +"""Return type for `paymentCustomizationActivation` mutation.""" +type PaymentCustomizationActivationPayload { + """The IDs of the updated payment customizations.""" + ids: [String!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type for paginating through multiple PaymentCustomizations. +""" +type PaymentCustomizationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentCustomizationEdge!]! + + """ + A list of nodes that are contained in PaymentCustomizationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentCustomization!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `paymentCustomizationCreate` mutation.""" +type PaymentCustomizationCreatePayload { + """Returns the created payment customization.""" + paymentCustomization: PaymentCustomization + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentCustomizationError!]! +} + +"""Return type for `paymentCustomizationDelete` mutation.""" +type PaymentCustomizationDeletePayload { + """Returns the deleted payment customization ID.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentCustomizationError!]! +} + +""" +An auto-generated type which holds one PaymentCustomization and a cursor during pagination. +""" +type PaymentCustomizationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PaymentCustomizationEdge.""" + node: PaymentCustomization! +} + +""" +An error that occurs during the execution of a payment customization mutation. +""" +type PaymentCustomizationError implements DisplayableError { + """The error code.""" + code: PaymentCustomizationErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PaymentCustomizationError`. +""" +enum PaymentCustomizationErrorCode { + """Shop plan not eligible to use Functions from a custom app.""" + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """Function does not implement the required interface.""" + FUNCTION_DOES_NOT_IMPLEMENT + + """Function not found.""" + FUNCTION_NOT_FOUND + + """Function is pending deletion.""" + FUNCTION_PENDING_DELETION + + """The input value is invalid.""" + INVALID + + """Payment customization not found.""" + PAYMENT_CUSTOMIZATION_NOT_FOUND + + """ + Shop must be on a Shopify Plus plan to activate payment customizations from a custom app. + """ + PAYMENT_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """Maximum payment customizations are already enabled.""" + MAXIMUM_ACTIVE_PAYMENT_CUSTOMIZATIONS + + """Required input field must be present.""" + REQUIRED_INPUT_FIELD + + """Could not create or update metafields.""" + INVALID_METAFIELDS + + """Function ID cannot be changed.""" + FUNCTION_ID_CANNOT_BE_CHANGED + + """Either function_id or function_handle must be provided.""" + MISSING_FUNCTION_IDENTIFIER + + """Only one of function_id or function_handle can be provided, not both.""" + MULTIPLE_FUNCTION_IDENTIFIERS +} + +"""The input fields to create and update a payment customization.""" +input PaymentCustomizationInput { + """Function handle scoped to your app ID.""" + functionHandle: String + + """The title of the payment customization.""" + title: String + + """The enabled status of the payment customization.""" + enabled: Boolean + + """Additional metafields to associate to the payment customization.""" + metafields: [MetafieldInput!] = [] +} + +"""Return type for `paymentCustomizationUpdate` mutation.""" +type PaymentCustomizationUpdatePayload { + """Returns the updated payment customization.""" + paymentCustomization: PaymentCustomization + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentCustomizationError!]! +} + +"""Payment details related to a transaction.""" +union PaymentDetails = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails + +"""All possible instrument outputs for Payment Mandates.""" +union PaymentInstrument = VaultCreditCard | VaultPaypalBillingAgreement + +""" +A payment instrument and the permission +the owner of the instrument gives to the merchant to debit it. +""" +type PaymentMandate implements Node { + """The unique ID of a payment mandate.""" + id: ID! + + """The outputs details of the payment instrument.""" + paymentInstrument: PaymentInstrument! +} + +""" +A payment mandate with resource information, representing the permission +the owner of the payment instrument gives to the merchant to debit it +for specific resources (e.g., Order, Subscriptions). +""" +type PaymentMandateResource { + """The ID of the resource that this payment method was created for.""" + resourceId: ID + + """ + The resource type that this payment method was created for (e.g., Order, Subscriptions). + """ + resourceType: MandateResourceType +} + +""" +An auto-generated type for paginating through multiple PaymentMandateResources. +""" +type PaymentMandateResourceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentMandateResourceEdge!]! + + """ + A list of nodes that are contained in PaymentMandateResourceEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [PaymentMandateResource!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentMandateResource and a cursor during pagination. +""" +type PaymentMandateResourceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PaymentMandateResourceEdge.""" + node: PaymentMandateResource! +} + +"""Some of the payment methods used in Shopify.""" +enum PaymentMethods { + VISA + MASTERCARD + DISCOVER + AMERICAN_EXPRESS + DINERS_CLUB + JCB + + """The payment method for UnionPay payment.""" + UNIONPAY + + """The payment method for Elo payment.""" + ELO + DANKORT + MAESTRO + FORBRUGSFORENINGEN + PAYPAL + BOGUS + BITCOIN + LITECOIN + DOGECOIN + + """The payment method for Interac payment.""" + INTERAC + + """The payment method for eftpos_au payment.""" + EFTPOS + + """The payment method for Cartes Bancaires payment.""" + CARTES_BANCAIRES + + """The payment method for Bancontact payment.""" + BANCONTACT +} + +"""Return type for `paymentReminderSend` mutation.""" +type PaymentReminderSendPayload { + """Whether the payment reminder email was successfully sent.""" + success: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentReminderSendUserError!]! +} + +"""An error that occurs during the execution of `PaymentReminderSend`.""" +type PaymentReminderSendUserError implements DisplayableError { + """The error code.""" + code: PaymentReminderSendUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PaymentReminderSendUserError`. +""" +enum PaymentReminderSendUserErrorCode { + """An error occurred while sending the payment reminder.""" + PAYMENT_REMINDER_SEND_UNSUCCESSFUL +} + +""" +Represents the payment schedule for a single payment defined in the payment terms. +""" +type PaymentSchedule implements Node { + """Amount owed for this payment schedule.""" + amount: MoneyV2! @deprecated(reason: "Use `balanceDue`, `totalBalance`, or `Order.totalOutstandingSet` instead.") + + """Remaining balance to be captured for this payment schedule.""" + balanceDue: MoneyV2! + + """Date and time when the payment schedule is paid or fulfilled.""" + completedAt: DateTime + + """Whether the payment schedule is due.""" + due: Boolean! + + """Date and time when the payment schedule is due.""" + dueAt: DateTime + + """A globally-unique ID.""" + id: ID! + + """Date and time when the invoice is sent.""" + issuedAt: DateTime + + """The payment terms the payment schedule belongs to.""" + paymentTerms: PaymentTerms! + + """ + Remaining balance to be paid or authorized by the customer for this payment schedule. + """ + totalBalance: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple PaymentSchedules. +""" +type PaymentScheduleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PaymentScheduleEdge!]! + + """ + A list of nodes that are contained in PaymentScheduleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PaymentSchedule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PaymentSchedule and a cursor during pagination. +""" +type PaymentScheduleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PaymentScheduleEdge.""" + node: PaymentSchedule! +} + +"""The input fields used to create a payment schedule for payment terms.""" +input PaymentScheduleInput { + """ + Specifies the date and time that the payment schedule was issued. This field must be provided for net type payment terms. + """ + issuedAt: DateTime + + """ + Specifies the date and time when the payment schedule is due. This field must be provided for fixed type payment terms. + """ + dueAt: DateTime +} + +"""Settings related to payments.""" +type PaymentSettings { + """List of the digital wallets which the shop supports.""" + supportedDigitalWallets: [DigitalWallet!]! +} + +"""Represents the payment terms for an order or draft order.""" +type PaymentTerms implements Node { + """The draft order associated with the payment terms.""" + draftOrder: DraftOrder + + """Whether payment terms have a payment schedule that's due.""" + due: Boolean! + + """ + Duration of payment terms in days based on the payment terms template used to create the payment terms. + """ + dueInDays: Int + + """A globally-unique ID.""" + id: ID! + + """The order associated with the payment terms.""" + order: Order + + """Whether the payment terms have overdue payment schedules.""" + overdue: Boolean! + + """List of schedules for the payment terms.""" + paymentSchedules( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PaymentScheduleConnection! + + """ + The name of the payment terms template used to create the payment terms. + """ + paymentTermsName: String! + + """The payment terms template type used to create the payment terms.""" + paymentTermsType: PaymentTermsType! + + """ + The payment terms name, translated into the shop admin's preferred language. + """ + translatedName: String! +} + +"""The input fields used to create a payment terms.""" +input PaymentTermsCreateInput { + """ + Specifies the payment terms template ID used to generate payment terms. + """ + paymentTermsTemplateId: ID! + + """Specifies the payment schedules for the payment terms.""" + paymentSchedules: [PaymentScheduleInput!] +} + +"""Return type for `paymentTermsCreate` mutation.""" +type PaymentTermsCreatePayload { + """The created payment terms.""" + paymentTerms: PaymentTerms + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentTermsCreateUserError!]! +} + +"""An error that occurs during the execution of `PaymentTermsCreate`.""" +type PaymentTermsCreateUserError implements DisplayableError { + """The error code.""" + code: PaymentTermsCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsCreateUserError`. +""" +enum PaymentTermsCreateUserErrorCode { + """An error occurred while creating payment terms.""" + PAYMENT_TERMS_CREATION_UNSUCCESSFUL +} + +"""The input fields used to delete the payment terms.""" +input PaymentTermsDeleteInput { + """The ID of the payment terms being deleted.""" + paymentTermsId: ID! +} + +"""Return type for `paymentTermsDelete` mutation.""" +type PaymentTermsDeletePayload { + """The deleted payment terms ID.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentTermsDeleteUserError!]! +} + +"""An error that occurs during the execution of `PaymentTermsDelete`.""" +type PaymentTermsDeleteUserError implements DisplayableError { + """The error code.""" + code: PaymentTermsDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsDeleteUserError`. +""" +enum PaymentTermsDeleteUserErrorCode { + """An error occurred while deleting payment terms.""" + PAYMENT_TERMS_DELETE_UNSUCCESSFUL +} + +""" +The input fields to create payment terms. Payment terms set the date that payment is due. +""" +input PaymentTermsInput { + """ + Specifies the ID of the payment terms template. + Payment terms templates provide preset configurations to create common payment terms. + Refer to the + [PaymentTermsTemplate](https://shopify.dev/api/admin-graphql/latest/objects/paymenttermstemplate) + object for more details. + """ + paymentTermsTemplateId: ID + + """Specifies the payment schedules for the payment terms.""" + paymentSchedules: [PaymentScheduleInput!] +} + +"""Represents the payment terms template object.""" +type PaymentTermsTemplate implements Node { + """The description of the payment terms template.""" + description: String! + + """ + The number of days between the issued date and due date if this is the net type of payment terms. + """ + dueInDays: Int + + """A globally-unique ID.""" + id: ID! + + """The name of the payment terms template.""" + name: String! + + """The type of the payment terms template.""" + paymentTermsType: PaymentTermsType! + + """The translated payment terms template name.""" + translatedName: String! +} + +"""The type of a payment terms or a payment terms template.""" +enum PaymentTermsType { + """The payment terms or payment terms template is due on receipt.""" + RECEIPT + + """ + The payment terms or payment terms template is a net type. It's due a number of days after issue. + """ + NET + + """ + The payment terms or payment terms template is a fixed type. It's due on a specified date. + """ + FIXED + + """The payment terms or payment terms template is due on fulfillment.""" + FULFILLMENT + + """The type of the payment terms or payment terms template is unknown.""" + UNKNOWN +} + +"""The input fields used to update the payment terms.""" +input PaymentTermsUpdateInput { + """The ID of the payment terms being updated.""" + paymentTermsId: ID! + + """The attributes used to update the payment terms.""" + paymentTermsAttributes: PaymentTermsInput! +} + +"""Return type for `paymentTermsUpdate` mutation.""" +type PaymentTermsUpdatePayload { + """The updated payment terms.""" + paymentTerms: PaymentTerms + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PaymentTermsUpdateUserError!]! +} + +"""An error that occurs during the execution of `PaymentTermsUpdate`.""" +type PaymentTermsUpdateUserError implements DisplayableError { + """The error code.""" + code: PaymentTermsUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PaymentTermsUpdateUserError`. +""" +enum PaymentTermsUpdateUserErrorCode { + """An error occurred while updating payment terms.""" + PAYMENT_TERMS_UPDATE_UNSUCCESSFUL +} + +"""The set of valid sort keys for the Payout query.""" +enum PayoutSortKeys { + """Sort by the `adjustment_gross` value.""" + ADJUSTMENT_GROSS + + """Sort by the `advance_gross` value.""" + ADVANCE_GROSS + + """Sort by the `amount` value.""" + AMOUNT + + """Sort by the `charge_gross` value.""" + CHARGE_GROSS + + """Sort by the `duties_gross` value.""" + DUTIES_GROSS + + """Sort by the `fee_amount` value.""" + FEE_AMOUNT + + """Sort by the `id` value.""" + ID + + """Sort by the `issued_at` value.""" + ISSUED_AT + + """Sort by the `refund_gross` value.""" + REFUND_GROSS + + """Sort by the `shipping_label_gross` value.""" + SHIPPING_LABEL_GROSS + + """Sort by the `status` value.""" + STATUS +} + +"""Represents a valid PayPal Express subscriptions gateway status.""" +enum PaypalExpressSubscriptionsGatewayStatus { + """The status is enabled.""" + ENABLED + + """The status is disabled.""" + DISABLED + + """The status is pending.""" + PENDING +} + +"""PayPal Wallet payment details related to a transaction.""" +type PaypalWalletPaymentDetails implements BasePaymentDetails { + """The name of payment method used by the buyer.""" + paymentMethodName: String +} + +"""A location for in-store pickup.""" +type PickupInStoreLocation { + """The code of the pickup location.""" + code: String! + + """Distance from the buyer to the pickup location.""" + distanceFromBuyer: Distance + + """A unique identifier for this pickup location.""" + handle: String! + + """Pickup instructions.""" + instructions: String! + + """The location ID of the pickup location.""" + locationId: ID! + + """The source of the pickup location.""" + source: String! + + """Title of the pickup location.""" + title: String! +} + +""" +Represents a mobile device that Shopify Point of Sale has been installed on. +""" +type PointOfSaleDevice implements Node { + """A globally-unique ID.""" + id: ID! +} + +""" +The input fields used to include the line items of a specified fulfillment order +that should be marked as prepared for pickup by a customer. +""" +input PreparedFulfillmentOrderLineItemsInput { + """The ID of the fulfillment order.""" + fulfillmentOrderId: ID! +} + +""" +How to calculate the parent product variant's price while bulk updating variant relationships. +""" +enum PriceCalculationType { + """ + The price of the parent will be the sum of the components price times their quantity. + """ + COMPONENTS_SUM + + """The price of the parent will be set to the price provided.""" + FIXED + + """The price of the parent will not be adjusted.""" + NONE +} + +"""The input fields for updating the price of a parent product variant.""" +input PriceInput { + """ + The specific type of calculation done to determine the price of the parent variant. + The price is calculated during Bundle creation. Updating a component variant won't recalculate the price. + """ + calculation: PriceCalculationType + + """ + The price of the parent product variant. This will be be used if calcualtion is set to 'FIXED'. + """ + price: Money +} + +""" +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 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 + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): PriceListPriceConnection! + + """ + A list of quantity rules associated with the price list, ordered by product variants. + """ + quantityRules( + """ + Whether the quantity rule is fixed (defined on the price list) or relative + (the default quantity rule for the shop). + """ + originType: QuantityRuleOriginType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): QuantityRuleConnection! +} + +""" +The type and value of a price list adjustment. + +For more information on price lists, refer to +[Support different pricing models](https://shopify.dev/apps/internationalization/product-price-lists). +""" +type PriceListAdjustment { + """The type of price adjustment, such as percentage increase or decrease.""" + type: PriceListAdjustmentType! + + """ + The value of price adjustment, where positive numbers reduce the prices and negative numbers + increase them. + """ + value: Float! +} + +"""The input fields to set a price list adjustment.""" +input PriceListAdjustmentInput { + """The value of the price adjustment as specified by the `type`.""" + value: Float! + + """The type of price adjustment, such as percentage increase or decrease.""" + type: PriceListAdjustmentType! +} + +"""Represents the settings of price list adjustments.""" +type PriceListAdjustmentSettings { + """The type of price list adjustment setting for compare at price.""" + compareAtMode: PriceListCompareAtMode! +} + +"""The input fields to set a price list's adjustment settings.""" +input PriceListAdjustmentSettingsInput { + """Determines how adjustments are applied to compare at prices.""" + compareAtMode: PriceListCompareAtMode! = ADJUSTED +} + +"""Represents a percentage price adjustment type.""" +enum PriceListAdjustmentType { + """Percentage decrease type. Prices will have a lower value.""" + PERCENTAGE_DECREASE + + """Percentage increase type. Prices will have a higher value.""" + PERCENTAGE_INCREASE +} + +""" +Represents how the compare at price will be determined for a price list. +""" +enum PriceListCompareAtMode { + """ + The compare at price is adjusted based on percentage specified in price list. + """ + ADJUSTED + + """ + The compare at prices are set to `null` unless explicitly defined by a fixed price value. + """ + NULLIFY +} + +"""An auto-generated type for paginating through multiple PriceLists.""" +type PriceListConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListEdge!]! + + """ + A list of nodes that are contained in PriceListEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceList!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields to create a price list.""" +input PriceListCreateInput { + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Three letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """Relative adjustments to other prices.""" + parent: PriceListParentCreateInput! + + """ + The ID of the catalog to associate with this price list.If the catalog was + already associated with another price list then it will be unlinked. + """ + catalogId: ID +} + +"""Return type for `priceListCreate` mutation.""" +type PriceListCreatePayload { + """The newly created price list.""" + priceList: PriceList + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PriceListUserError!]! +} + +"""Return type for `priceListDelete` mutation.""" +type PriceListDeletePayload { + """The ID of the deleted price list.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PriceListUserError!]! +} + +""" +An auto-generated type which holds one PriceList and a cursor during pagination. +""" +type PriceListEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PriceListEdge.""" + node: PriceList! +} + +"""Return type for `priceListFixedPricesAdd` mutation.""" +type PriceListFixedPricesAddPayload { + """ + The list of fixed prices that were added to or updated in the price list. + """ + prices: [PriceListPrice!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PriceListPriceUserError!]! +} + +""" +Error codes for failed price list fixed prices by product bulk update operations. +""" +type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError { + """The error code.""" + code: PriceListFixedPricesByProductBulkUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PriceListFixedPricesByProductBulkUpdateUserError`. +""" +enum PriceListFixedPricesByProductBulkUpdateUserErrorCode { + """No update operations specified.""" + NO_UPDATE_OPERATIONS_SPECIFIED + + """The currency specified does not match the price list's currency.""" + PRICES_TO_ADD_CURRENCY_MISMATCH + + """Price list does not exist.""" + PRICE_LIST_DOES_NOT_EXIST + + """Duplicate ID in input.""" + DUPLICATE_ID_IN_INPUT + + """IDs must be mutually exclusive across add or delete operations.""" + ID_MUST_BE_MUTUALLY_EXCLUSIVE + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Exceeded the 10000 prices to add limit.""" + PRICE_LIMIT_EXCEEDED +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: QuantityPriceBreakSortKeys = MINIMUM_QUANTITY + ): QuantityPriceBreakConnection! + + """The product variant associated with this price.""" + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple PriceListPrices. +""" +type PriceListPriceConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceListPriceEdge!]! + + """ + A list of nodes that are contained in PriceListPriceEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceListPrice!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceListPrice and a cursor during pagination. +""" +type PriceListPriceEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PriceListPriceEdge.""" + node: PriceListPrice! +} + +""" +The input fields for providing the fields and values to use when creating or updating a fixed price list price. +""" +input PriceListPriceInput { + """The product variant ID associated with the price list price.""" + variantId: ID! + + """The price of the product variant on this price list.""" + price: MoneyInput! + + """The compare-at price of the product variant on this price list.""" + compareAtPrice: MoneyInput +} + +""" +Represents the origin of a price, either fixed (defined on the price list) or +relative (calculated using a price list adjustment configuration). For examples, refer to [PriceList](https://shopify.dev/api/admin-graphql/latest/queries/priceList#section-examples). +""" +enum PriceListPriceOriginType { + """The price is defined on the price list.""" + FIXED + + """The price is relative to the adjustment type and value.""" + RELATIVE +} + +"""An error for a failed price list price operation.""" +type PriceListPriceUserError implements DisplayableError { + """The error code.""" + code: PriceListPriceUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PriceListPriceUserError`. +""" +enum PriceListPriceUserErrorCode { + """The input value is blank.""" + BLANK + + """The price list doesn't exist.""" + PRICE_LIST_NOT_FOUND + + """The specified currency doesn't match the price list's currency.""" + PRICE_LIST_CURRENCY_MISMATCH + + """A fixed price for the specified product variant doesn't exist.""" + VARIANT_NOT_FOUND + + """Only fixed prices can be deleted.""" + PRICE_NOT_FIXED +} + +"""The input fields representing the price for all variants of a product.""" +input PriceListProductPriceInput { + """Specifies the ID of the product to update its variants for.""" + productId: ID! + + """The price of the product to use for all variants with its currency.""" + price: MoneyInput! +} + +"""The set of valid sort keys for the PriceList query.""" +enum PriceListSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `name` value.""" + NAME +} + +"""The input fields used to update a price list.""" +input PriceListUpdateInput { + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String + + """ + The three-letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode + + """Relative adjustments to other prices.""" + parent: PriceListParentUpdateInput + + """The ID of the catalog to associate with this price list.""" + catalogId: ID +} + +"""Return type for `priceListUpdate` mutation.""" +type PriceListUpdatePayload { + """The updated price list.""" + priceList: PriceList + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PriceListUserError!]! +} + +"""Error codes for failed contextual pricing operations.""" +type PriceListUserError implements DisplayableError { + """The error code.""" + code: PriceListUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `PriceListUserError`.""" +enum PriceListUserErrorCode { + """The input value is already taken.""" + TAKEN + + """The input value is blank.""" + BLANK + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is too long.""" + TOO_LONG + + """The specified price list doesn't exist.""" + PRICE_LIST_NOT_FOUND + + """The price list is currently being modified. Please try again later.""" + PRICE_LIST_LOCKED + + """A price list’s currency must be the market currency.""" + CURRENCY_MARKET_MISMATCH + + """ + The adjustment value must be a positive value and not be greater than 100% for + `type` `PERCENTAGE_DECREASE` and not be greater than 1000% for `type` + `PERCENTAGE_INCREASE`. + """ + INVALID_ADJUSTMENT_VALUE + + """ + The adjustment value must not be greater than 100% for `type` `PERCENTAGE_DECREASE`. + """ + INVALID_ADJUSTMENT_MIN_VALUE + + """ + The adjustment value must not be greater than 1000% for `type` `PERCENTAGE_INCREASE`. + """ + INVALID_ADJUSTMENT_MAX_VALUE + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + Quantity price breaks can be associated only with company location catalogs or + catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_PRICE_BREAKS + + """Only one context rule option may be specified.""" + CONTEXT_RULE_LIMIT_ONE_OPTION + + """ + The price list currency is not supported by the shop's payment gateway. + """ + CURRENCY_NOT_SUPPORTED + + """Cannot create price list for a primary market.""" + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """The specified catalog does not exist.""" + CATALOG_DOES_NOT_EXIST + + """The price list currency must match the market catalog currency.""" + CATALOG_MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH + + """Catalog has a price list already assigned.""" + CATALOG_TAKEN + + """A country catalog cannot be assigned to a price list.""" + COUNTRY_PRICE_LIST_ASSIGNMENT + + """ + Something went wrong when trying to save the price list. Please try again. + """ + GENERIC_ERROR +} + +""" +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! @deprecated(reason: "Use `discountClasses` instead.") + + """The classes of the discount.""" + discountClasses: [DiscountClass!]! + + """List of the price rule's discount codes.""" + discountCodes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): PriceRuleDiscountCodeConnection! + + """How many discount codes associated with the price rule.""" + discountCodesCount: Count + + """ + The date and time when the price rule ends. For open-ended price rules, use `null`. + """ + endsAt: DateTime + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + entitlementToPrerequisiteQuantityRatio: PriceRuleEntitlementToPrerequisiteQuantityRatio @deprecated(reason: "Use `prerequisiteToEntitlementQuantityRatio` instead.") + + """The paginated list of events associated with the price rule.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A list of the price rule's features.""" + features: [PriceRuleFeature!]! + + """Indicates whether there are any timeline comments on the price rule.""" + hasTimelineComment: Boolean! + + """A globally-unique ID.""" + id: ID! + + """The items to which the price rule applies.""" + itemEntitlements: PriceRuleItemEntitlements! + + """The items required for the price rule to be applicable.""" + itemPrerequisites: PriceRuleLineItemPrerequisites! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """Whether the price rule can be applied only once per customer.""" + oncePerCustomer: Boolean! + + """ + The number of the entitled items must fall within this range for the price rule to be applicable. + """ + prerequisiteQuantityRange: PriceRuleQuantityRange + + """ + The shipping cost must fall within this range for the price rule to be applicable. + """ + prerequisiteShippingPriceRange: PriceRuleMoneyRange + + """ + The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable. + """ + prerequisiteSubtotalRange: PriceRuleMoneyRange + + """ + Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. + """ + prerequisiteToEntitlementQuantityRatio: PriceRulePrerequisiteToEntitlementQuantityRatio + + """URLs that can be used to share the discount.""" + shareableUrls: [PriceRuleShareableUrl!]! + + """The shipping lines to which the price rule applies.""" + shippingEntitlements: PriceRuleShippingLineEntitlements! + + """The date and time when the price rule starts.""" + startsAt: DateTime! + + """The status of the price rule.""" + status: PriceRuleStatus! + + """A detailed summary of the price rule.""" + summary: String + + """ + The type of lines (line_item or shipping_line) to which the price rule applies. + """ + target: PriceRuleTarget! + + """The title of the price rule.""" + title: String! + + """The total sales from orders where the price rule was used.""" + totalSales: MoneyV2 + + """A list of the price rule's features.""" + traits: [PriceRuleTrait!]! @deprecated(reason: "Use `features` instead.") + + """ + The number of times that the price rule has been used. This value is updated + asynchronously and can be different than the actual usage count. + """ + usageCount: Int! + + """The maximum number of times that the price rule can be used in total.""" + usageLimit: Int + + """A time period during which a price rule is applicable.""" + validityPeriod: PriceRuleValidityPeriod! + + """The value of the price rule.""" + value: PriceRuleValue! @deprecated(reason: "Use `valueV2` instead.") + + """The value of the price rule.""" + valueV2: PricingValue! +} + +""" +The method by which the price rule's value is allocated to its entitled items. +""" +enum PriceRuleAllocationMethod { + """The value will be applied to each of the entitled items.""" + EACH + + """The value will be applied once across the entitled items.""" + ACROSS +} + +"""A selection of customers for whom the price rule applies.""" +type PriceRuleCustomerSelection { + """List of customers to whom the price rule applies.""" + customers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CustomerSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): CustomerConnection! + + """Whether the price rule applies to all customers.""" + forAllCustomers: Boolean! + + """ + A list of customer segments that contain the customers who can use the price rule. + """ + segments: [Segment!]! +} + +"""A discount code of a price rule.""" +type PriceRuleDiscountCode implements Node { + """The application that created the discount code.""" + app: App + + """The code to apply the discount.""" + code: String! + + """A globally-unique ID.""" + id: ID! + + """ + The number of times that the price rule has been used. This value is updated + asynchronously and can be different than the actual usage count. + """ + usageCount: Int! +} + +""" +An auto-generated type for paginating through multiple PriceRuleDiscountCodes. +""" +type PriceRuleDiscountCodeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PriceRuleDiscountCodeEdge!]! + + """ + A list of nodes that are contained in PriceRuleDiscountCodeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [PriceRuleDiscountCode!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination. +""" +type PriceRuleDiscountCodeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PriceRuleDiscountCodeEdge.""" + node: PriceRuleDiscountCode! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRuleEntitlementToPrerequisiteQuantityRatio { + """The quantity of entitled items in the ratio.""" + entitlementQuantity: Int! + + """The quantity of prerequisite items in the ratio.""" + prerequisiteQuantity: Int! +} + +"""The list of features that can be supported by a price rule.""" +enum PriceRuleFeature { + """The price rule supports Buy X, Get Y (BXGY) discounts.""" + BUY_ONE_GET_ONE + + """ + The price rule supports Buy X, Get Y (BXGY) discounts that specify a custom allocation limit. + """ + BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT + + """The price rule supports bulk discounts.""" + BULK + + """The price rule targets specific customers.""" + SPECIFIC_CUSTOMERS + + """The price rule supports discounts that require a quantity.""" + QUANTITY_DISCOUNTS +} + +"""The value of a fixed amount price rule.""" +type PriceRuleFixedAmountValue { + """The monetary value of the price rule.""" + amount: Money! +} + +""" +The items to which this price rule applies. This may be multiple products, +product variants, collections or combinations of the aforementioned. +""" +type PriceRuleItemEntitlements { + """The collections to which the price rule applies.""" + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! + + """The product variants to which the price rule applies.""" + productVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """The products to which the price rule applies.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductConnection! + + """Whether the price rule applies to all line items.""" + targetAllLineItems: Boolean! +} + +""" +Single or multiple line item products, product variants or collections required +for the price rule to be applicable, can also be provided in combination. +""" +type PriceRuleLineItemPrerequisites { + """The collections required for the price rule to be applicable.""" + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! + + """The product variants required for the price rule to be applicable.""" + productVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """The products required for the price rule to be applicable.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductConnection! +} + +"""A money range within which the price rule is applicable.""" +type PriceRuleMoneyRange { + """The lower bound of the money range.""" + greaterThan: Money + + """The lower bound or equal of the money range.""" + greaterThanOrEqualTo: Money + + """The upper bound of the money range.""" + lessThan: Money + + """The upper bound or equal of the money range.""" + lessThanOrEqualTo: Money +} + +"""The value of a percent price rule.""" +type PriceRulePercentValue { + """The percent value of the price rule.""" + percentage: Float! +} + +""" +Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. +""" +type PriceRulePrerequisiteToEntitlementQuantityRatio { + """The quantity of entitled items in the ratio.""" + entitlementQuantity: Int! + + """The quantity of prerequisite items in the ratio.""" + prerequisiteQuantity: Int! +} + +"""A quantity range within which the price rule is applicable.""" +type PriceRuleQuantityRange { + """The lower bound of the quantity range.""" + greaterThan: Int + + """The lower bound or equal of the quantity range.""" + greaterThanOrEqualTo: Int + + """The upper bound of the quantity range.""" + lessThan: Int + + """The upper bound or equal of the quantity range.""" + lessThanOrEqualTo: Int +} + +"""Shareable URL for the discount code associated with the price rule.""" +type PriceRuleShareableUrl { + """ + The image URL of the item (product or collection) to which the discount applies. + """ + targetItemImage: Image + + """The type of page that's associated with the URL.""" + targetType: PriceRuleShareableUrlTargetType! + + """The title of the page that's associated with the URL.""" + title: String! + + """The URL for the discount code.""" + url: URL! +} + +"""The type of page where a shareable price rule URL lands.""" +enum PriceRuleShareableUrlTargetType { + """The URL lands on a home page.""" + HOME + + """The URL lands on a product page.""" + PRODUCT + + """The URL lands on a collection page.""" + COLLECTION +} + +"""The shipping lines to which the price rule applies to.""" +type PriceRuleShippingLineEntitlements { + """The codes for the countries to which the price rule applies to.""" + countryCodes: [CountryCode!]! + + """ + Whether the price rule is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean! + + """Whether the price rule applies to all shipping lines.""" + targetAllShippingLines: Boolean! +} + +"""The status of the price rule.""" +enum PriceRuleStatus { + """The price rule is active.""" + ACTIVE + + """The price rule is expired.""" + EXPIRED + + """The price rule is scheduled.""" + SCHEDULED +} + +""" +The type of lines (line_item or shipping_line) to which the price rule applies. +""" +enum PriceRuleTarget { + """The price rule applies to line items.""" + LINE_ITEM + + """The price rule applies to shipping lines.""" + SHIPPING_LINE +} + +"""The list of features that can be supported by a price rule.""" +enum PriceRuleTrait { + """The price rule supports Buy X, Get Y (BXGY) discounts.""" + BUY_ONE_GET_ONE + + """ + The price rule supports Buy X, Get Y (BXGY) discounts that specify a custom allocation limit. + """ + BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT + + """The price rule supports bulk discounts.""" + BULK + + """The price rule targets specific customers.""" + SPECIFIC_CUSTOMERS + + """The price rule supports discounts that require a quantity.""" + QUANTITY_DISCOUNTS +} + +"""A time period during which a price rule is applicable.""" +type PriceRuleValidityPeriod { + """The time after which the price rule becomes invalid.""" + end: DateTime + + """The time after which the price rule is valid.""" + start: DateTime! +} + +""" +The type of the price rule value. The price rule value might be a percentage value, or a fixed amount. +""" +union PriceRuleValue = PriceRuleFixedAmountValue | PriceRulePercentValue + +""" +One type of value given to a customer when a discount is applied to an order. +The application of a discount with this value gives the customer the specified percentage off a specified item. +""" +type PricingPercentageValue { + """ + The percentage value of the object. This is a number between -100 (free) and 0 (no discount). + """ + percentage: Float! +} + +""" +The type of value given to a customer when a discount is applied to an order. +For example, the application of the discount might give the customer a +percentage off a specified item. Alternatively, the application of the discount +might give the customer a monetary value in a given currency off an order. +""" +union PricingValue = MoneyV2 | PricingPercentageValue + +"""A country code from the `ISO 3166` standard. e.g. `CA` for Canada.""" +enum PrivacyCountryCode { + """The `ISO 3166` country code of `AN`.""" + AN + + """The `ISO 3166` country code of `AC`.""" + AC + + """The `ISO 3166` country code of `AD`.""" + AD + + """The `ISO 3166` country code of `AE`.""" + AE + + """The `ISO 3166` country code of `AF`.""" + AF + + """The `ISO 3166` country code of `AG`.""" + AG + + """The `ISO 3166` country code of `AI`.""" + AI + + """The `ISO 3166` country code of `AL`.""" + AL + + """The `ISO 3166` country code of `AM`.""" + AM + + """The `ISO 3166` country code of `AO`.""" + AO + + """The `ISO 3166` country code of `AQ`.""" + AQ + + """The `ISO 3166` country code of `AR`.""" + AR + + """The `ISO 3166` country code of `AS`.""" + AS + + """The `ISO 3166` country code of `AT`.""" + AT + + """The `ISO 3166` country code of `AU`.""" + AU + + """The `ISO 3166` country code of `AW`.""" + AW + + """The `ISO 3166` country code of `AX`.""" + AX + + """The `ISO 3166` country code of `AZ`.""" + AZ + + """The `ISO 3166` country code of `BA`.""" + BA + + """The `ISO 3166` country code of `BB`.""" + BB + + """The `ISO 3166` country code of `BD`.""" + BD + + """The `ISO 3166` country code of `BE`.""" + BE + + """The `ISO 3166` country code of `BF`.""" + BF + + """The `ISO 3166` country code of `BG`.""" + BG + + """The `ISO 3166` country code of `BH`.""" + BH + + """The `ISO 3166` country code of `BI`.""" + BI + + """The `ISO 3166` country code of `BJ`.""" + BJ + + """The `ISO 3166` country code of `BL`.""" + BL + + """The `ISO 3166` country code of `BM`.""" + BM + + """The `ISO 3166` country code of `BN`.""" + BN + + """The `ISO 3166` country code of `BO`.""" + BO + + """The `ISO 3166` country code of `BQ`.""" + BQ + + """The `ISO 3166` country code of `BR`.""" + BR + + """The `ISO 3166` country code of `BS`.""" + BS + + """The `ISO 3166` country code of `BT`.""" + BT + + """The `ISO 3166` country code of `BV`.""" + BV + + """The `ISO 3166` country code of `BW`.""" + BW + + """The `ISO 3166` country code of `BY`.""" + BY + + """The `ISO 3166` country code of `BZ`.""" + BZ + + """The `ISO 3166` country code of `CA`.""" + CA + + """The `ISO 3166` country code of `CC`.""" + CC + + """The `ISO 3166` country code of `CD`.""" + CD + + """The `ISO 3166` country code of `CF`.""" + CF + + """The `ISO 3166` country code of `CG`.""" + CG + + """The `ISO 3166` country code of `CH`.""" + CH + + """The `ISO 3166` country code of `CI`.""" + CI + + """The `ISO 3166` country code of `CK`.""" + CK + + """The `ISO 3166` country code of `CL`.""" + CL + + """The `ISO 3166` country code of `CM`.""" + CM + + """The `ISO 3166` country code of `CN`.""" + CN + + """The `ISO 3166` country code of `CO`.""" + CO + + """The `ISO 3166` country code of `CR`.""" + CR + + """The `ISO 3166` country code of `CU`.""" + CU + + """The `ISO 3166` country code of `CV`.""" + CV + + """The `ISO 3166` country code of `CW`.""" + CW + + """The `ISO 3166` country code of `CX`.""" + CX + + """The `ISO 3166` country code of `CY`.""" + CY + + """The `ISO 3166` country code of `CZ`.""" + CZ + + """The `ISO 3166` country code of `DE`.""" + DE + + """The `ISO 3166` country code of `DJ`.""" + DJ + + """The `ISO 3166` country code of `DK`.""" + DK + + """The `ISO 3166` country code of `DM`.""" + DM + + """The `ISO 3166` country code of `DO`.""" + DO + + """The `ISO 3166` country code of `DZ`.""" + DZ + + """The `ISO 3166` country code of `EC`.""" + EC + + """The `ISO 3166` country code of `EE`.""" + EE + + """The `ISO 3166` country code of `EG`.""" + EG + + """The `ISO 3166` country code of `EH`.""" + EH + + """The `ISO 3166` country code of `ER`.""" + ER + + """The `ISO 3166` country code of `ES`.""" + ES + + """The `ISO 3166` country code of `ET`.""" + ET + + """The `ISO 3166` country code of `FI`.""" + FI + + """The `ISO 3166` country code of `FJ`.""" + FJ + + """The `ISO 3166` country code of `FK`.""" + FK + + """The `ISO 3166` country code of `FM`.""" + FM + + """The `ISO 3166` country code of `FO`.""" + FO + + """The `ISO 3166` country code of `FR`.""" + FR + + """The `ISO 3166` country code of `GA`.""" + GA + + """The `ISO 3166` country code of `GB`.""" + GB + + """The `ISO 3166` country code of `GD`.""" + GD + + """The `ISO 3166` country code of `GE`.""" + GE + + """The `ISO 3166` country code of `GF`.""" + GF + + """The `ISO 3166` country code of `GG`.""" + GG + + """The `ISO 3166` country code of `GH`.""" + GH + + """The `ISO 3166` country code of `GI`.""" + GI + + """The `ISO 3166` country code of `GL`.""" + GL + + """The `ISO 3166` country code of `GM`.""" + GM + + """The `ISO 3166` country code of `GN`.""" + GN + + """The `ISO 3166` country code of `GP`.""" + GP + + """The `ISO 3166` country code of `GQ`.""" + GQ + + """The `ISO 3166` country code of `GR`.""" + GR + + """The `ISO 3166` country code of `GS`.""" + GS + + """The `ISO 3166` country code of `GT`.""" + GT + + """The `ISO 3166` country code of `GU`.""" + GU + + """The `ISO 3166` country code of `GW`.""" + GW + + """The `ISO 3166` country code of `GY`.""" + GY + + """The `ISO 3166` country code of `HK`.""" + HK + + """The `ISO 3166` country code of `HM`.""" + HM + + """The `ISO 3166` country code of `HN`.""" + HN + + """The `ISO 3166` country code of `HR`.""" + HR + + """The `ISO 3166` country code of `HT`.""" + HT + + """The `ISO 3166` country code of `HU`.""" + HU + + """The `ISO 3166` country code of `ID`.""" + ID + + """The `ISO 3166` country code of `IE`.""" + IE + + """The `ISO 3166` country code of `IL`.""" + IL + + """The `ISO 3166` country code of `IM`.""" + IM + + """The `ISO 3166` country code of `IN`.""" + IN + + """The `ISO 3166` country code of `IO`.""" + IO + + """The `ISO 3166` country code of `IQ`.""" + IQ + + """The `ISO 3166` country code of `IR`.""" + IR + + """The `ISO 3166` country code of `IS`.""" + IS + + """The `ISO 3166` country code of `IT`.""" + IT + + """The `ISO 3166` country code of `JE`.""" + JE + + """The `ISO 3166` country code of `JM`.""" + JM + + """The `ISO 3166` country code of `JO`.""" + JO + + """The `ISO 3166` country code of `JP`.""" + JP + + """The `ISO 3166` country code of `KE`.""" + KE + + """The `ISO 3166` country code of `KG`.""" + KG + + """The `ISO 3166` country code of `KH`.""" + KH + + """The `ISO 3166` country code of `KI`.""" + KI + + """The `ISO 3166` country code of `KM`.""" + KM + + """The `ISO 3166` country code of `KN`.""" + KN + + """The `ISO 3166` country code of `KP`.""" + KP + + """The `ISO 3166` country code of `KR`.""" + KR + + """The `ISO 3166` country code of `KW`.""" + KW + + """The `ISO 3166` country code of `KY`.""" + KY + + """The `ISO 3166` country code of `KZ`.""" + KZ + + """The `ISO 3166` country code of `LA`.""" + LA + + """The `ISO 3166` country code of `LB`.""" + LB + + """The `ISO 3166` country code of `LC`.""" + LC + + """The `ISO 3166` country code of `LI`.""" + LI + + """The `ISO 3166` country code of `LK`.""" + LK + + """The `ISO 3166` country code of `LR`.""" + LR + + """The `ISO 3166` country code of `LS`.""" + LS + + """The `ISO 3166` country code of `LT`.""" + LT + + """The `ISO 3166` country code of `LU`.""" + LU + + """The `ISO 3166` country code of `LV`.""" + LV + + """The `ISO 3166` country code of `LY`.""" + LY + + """The `ISO 3166` country code of `MA`.""" + MA + + """The `ISO 3166` country code of `MC`.""" + MC + + """The `ISO 3166` country code of `MD`.""" + MD + + """The `ISO 3166` country code of `ME`.""" + ME + + """The `ISO 3166` country code of `MF`.""" + MF + + """The `ISO 3166` country code of `MG`.""" + MG + + """The `ISO 3166` country code of `MH`.""" + MH + + """The `ISO 3166` country code of `MK`.""" + MK + + """The `ISO 3166` country code of `ML`.""" + ML + + """The `ISO 3166` country code of `MM`.""" + MM + + """The `ISO 3166` country code of `MN`.""" + MN + + """The `ISO 3166` country code of `MO`.""" + MO + + """The `ISO 3166` country code of `MP`.""" + MP + + """The `ISO 3166` country code of `MQ`.""" + MQ + + """The `ISO 3166` country code of `MR`.""" + MR + + """The `ISO 3166` country code of `MS`.""" + MS + + """The `ISO 3166` country code of `MT`.""" + MT + + """The `ISO 3166` country code of `MU`.""" + MU + + """The `ISO 3166` country code of `MV`.""" + MV + + """The `ISO 3166` country code of `MW`.""" + MW + + """The `ISO 3166` country code of `MX`.""" + MX + + """The `ISO 3166` country code of `MY`.""" + MY + + """The `ISO 3166` country code of `MZ`.""" + MZ + + """The `ISO 3166` country code of `NA`.""" + NA + + """The `ISO 3166` country code of `NC`.""" + NC + + """The `ISO 3166` country code of `NE`.""" + NE + + """The `ISO 3166` country code of `NF`.""" + NF + + """The `ISO 3166` country code of `NG`.""" + NG + + """The `ISO 3166` country code of `NI`.""" + NI + + """The `ISO 3166` country code of `NL`.""" + NL + + """The `ISO 3166` country code of `NO`.""" + NO + + """The `ISO 3166` country code of `NP`.""" + NP + + """The `ISO 3166` country code of `NR`.""" + NR + + """The `ISO 3166` country code of `NS`.""" + NS + + """The `ISO 3166` country code of `NU`.""" + NU + + """The `ISO 3166` country code of `NZ`.""" + NZ + + """The `ISO 3166` country code of `OM`.""" + OM + + """The `ISO 3166` country code of `PA`.""" + PA + + """The `ISO 3166` country code of `PE`.""" + PE + + """The `ISO 3166` country code of `PF`.""" + PF + + """The `ISO 3166` country code of `PG`.""" + PG + + """The `ISO 3166` country code of `PH`.""" + PH + + """The `ISO 3166` country code of `PK`.""" + PK + + """The `ISO 3166` country code of `PL`.""" + PL + + """The `ISO 3166` country code of `PM`.""" + PM + + """The `ISO 3166` country code of `PN`.""" + PN + + """The `ISO 3166` country code of `PR`.""" + PR + + """The `ISO 3166` country code of `PS`.""" + PS + + """The `ISO 3166` country code of `PT`.""" + PT + + """The `ISO 3166` country code of `PW`.""" + PW + + """The `ISO 3166` country code of `PY`.""" + PY + + """The `ISO 3166` country code of `QA`.""" + QA + + """The `ISO 3166` country code of `RE`.""" + RE + + """The `ISO 3166` country code of `RO`.""" + RO + + """The `ISO 3166` country code of `RS`.""" + RS + + """The `ISO 3166` country code of `RU`.""" + RU + + """The `ISO 3166` country code of `RW`.""" + RW + + """The `ISO 3166` country code of `SA`.""" + SA + + """The `ISO 3166` country code of `SB`.""" + SB + + """The `ISO 3166` country code of `SC`.""" + SC + + """The `ISO 3166` country code of `SD`.""" + SD + + """The `ISO 3166` country code of `SE`.""" + SE + + """The `ISO 3166` country code of `SG`.""" + SG + + """The `ISO 3166` country code of `SH`.""" + SH + + """The `ISO 3166` country code of `SI`.""" + SI + + """The `ISO 3166` country code of `SJ`.""" + SJ + + """The `ISO 3166` country code of `SK`.""" + SK + + """The `ISO 3166` country code of `SL`.""" + SL + + """The `ISO 3166` country code of `SM`.""" + SM + + """The `ISO 3166` country code of `SN`.""" + SN + + """The `ISO 3166` country code of `SO`.""" + SO + + """The `ISO 3166` country code of `SR`.""" + SR + + """The `ISO 3166` country code of `SS`.""" + SS + + """The `ISO 3166` country code of `ST`.""" + ST + + """The `ISO 3166` country code of `SV`.""" + SV + + """The `ISO 3166` country code of `SX`.""" + SX + + """The `ISO 3166` country code of `SY`.""" + SY + + """The `ISO 3166` country code of `SZ`.""" + SZ + + """The `ISO 3166` country code of `TA`.""" + TA + + """The `ISO 3166` country code of `TC`.""" + TC + + """The `ISO 3166` country code of `TD`.""" + TD + + """The `ISO 3166` country code of `TF`.""" + TF + + """The `ISO 3166` country code of `TG`.""" + TG + + """The `ISO 3166` country code of `TH`.""" + TH + + """The `ISO 3166` country code of `TJ`.""" + TJ + + """The `ISO 3166` country code of `TK`.""" + TK + + """The `ISO 3166` country code of `TL`.""" + TL + + """The `ISO 3166` country code of `TM`.""" + TM + + """The `ISO 3166` country code of `TN`.""" + TN + + """The `ISO 3166` country code of `TO`.""" + TO + + """The `ISO 3166` country code of `TR`.""" + TR + + """The `ISO 3166` country code of `TT`.""" + TT + + """The `ISO 3166` country code of `TV`.""" + TV + + """The `ISO 3166` country code of `TW`.""" + TW + + """The `ISO 3166` country code of `TZ`.""" + TZ + + """The `ISO 3166` country code of `UA`.""" + UA + + """The `ISO 3166` country code of `UG`.""" + UG + + """The `ISO 3166` country code of `UM`.""" + UM + + """The `ISO 3166` country code of `US`.""" + US + + """The `ISO 3166` country code of `UY`.""" + UY + + """The `ISO 3166` country code of `UZ`.""" + UZ + + """The `ISO 3166` country code of `VA`.""" + VA + + """The `ISO 3166` country code of `VC`.""" + VC + + """The `ISO 3166` country code of `VE`.""" + VE + + """The `ISO 3166` country code of `VG`.""" + VG + + """The `ISO 3166` country code of `VI`.""" + VI + + """The `ISO 3166` country code of `VN`.""" + VN + + """The `ISO 3166` country code of `VU`.""" + VU + + """The `ISO 3166` country code of `WF`.""" + WF + + """The `ISO 3166` country code of `WS`.""" + WS + + """The `ISO 3166` country code of `XK`.""" + XK + + """The `ISO 3166` country code of `YE`.""" + YE + + """The `ISO 3166` country code of `YT`.""" + YT + + """The `ISO 3166` country code of `ZA`.""" + ZA + + """The `ISO 3166` country code of `ZM`.""" + ZM + + """The `ISO 3166` country code of `ZW`.""" + ZW + + """The `ISO 3166` country code of `XX`.""" + XX +} + +"""Return type for `privacyFeaturesDisable` mutation.""" +type PrivacyFeaturesDisablePayload { + """The privacy features that were disabled.""" + featuresDisabled: [PrivacyFeaturesEnum!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PrivacyFeaturesDisableUserError!]! +} + +"""An error that occurs during the execution of `PrivacyFeaturesDisable`.""" +type PrivacyFeaturesDisableUserError implements DisplayableError { + """The error code.""" + code: PrivacyFeaturesDisableUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PrivacyFeaturesDisableUserError`. +""" +enum PrivacyFeaturesDisableUserErrorCode { + """Failed to disable privacy features.""" + FAILED +} + +"""The input fields for a shop's privacy settings.""" +enum PrivacyFeaturesEnum { + """The cookie banner feature.""" + COOKIE_BANNER + + """The data sale opt out page feature.""" + DATA_SALE_OPT_OUT_PAGE + + """The privacy policy feature.""" + PRIVACY_POLICY +} + +"""A shop's privacy policy settings.""" +type PrivacyPolicy { + """Whether the policy is auto managed.""" + autoManaged: Boolean! + + """Policy template supported locales.""" + supportedLocales: [String!]! +} + +"""A shop's privacy settings.""" +type PrivacySettings { + """Banner customizations for the 'cookie banner'.""" + banner: CookieBanner + + """A shop's data sale opt out page (e.g. CCPA).""" + dataSaleOptOutPage: DataSaleOptOutPage + + """A shop's privacy policy settings.""" + privacyPolicy: PrivacyPolicy +} + +""" +The `Product` object lets you manage products in a merchant’s store. + +Products are the goods and services that merchants offer to customers. They can +include various details such as title, description, price, images, and options +such as size or color. +You can use [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) +to create or update different versions of the same product. +You can also add or update product [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/media). +Products can be organized by grouping them into a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection). + +Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components), +including limitations and considerations. +""" +type Product implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node & OnlineStorePreviewable & Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + bodyHtml: String @deprecated(reason: "Use `descriptionHtml` instead.") + + """ + A list of [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) + that are associated with a product in a bundle. + """ + bundleComponents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductBundleComponentConnection! + + """ + The category of a product + from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). + """ + category: TaxonomyCategory + + """ + A list of [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + that include the product. + """ + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CollectionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CollectionConnection! + + """ + A special product type that combines separate products from a store into a single product listing. + [Combined listings](https://shopify.dev/apps/build/product-merchandising/combined-listings) are connected + by a shared option, such as color, model, or dimension. + """ + combinedListing: CombinedListing + + """ + The [role of the product](https://shopify.dev/docs/apps/build/product-merchandising/combined-listings/build-for-combined-listings) + in a combined listing. + + If `null`, then the product isn't part of any combined listing. + """ + combinedListingRole: CombinedListingsRole + + """ + The [compare-at price range](https://help.shopify.com/manual/products/details/product-pricing/sale-pricing) + of the product in the shop's default currency. + """ + compareAtPriceRange: ProductCompareAtPriceRange + + """ + The pricing that applies to a customer in a specific context. For example, a + price might vary depending on the customer's location. Only active markets are + considered in the price resolution. + """ + contextualPricing( + """The context used to generate contextual pricing for the variant.""" + context: ContextualPricingContext! + ): ProductContextualPricing! + + """The date and time when the product was created.""" + createdAt: DateTime! + + """The custom product type specified by the merchant.""" + customProductType: String @deprecated(reason: "Use `productType` instead.") + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + A single-line description of the product, + with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed. + """ + description( + """Truncates a string after the given length.""" + truncateAt: Int + ): String! + + """ + The description of the product, with + HTML tags. For example, the description might include + bold `` and italic `` text. + """ + descriptionHtml: HTML! + + """ + Stripped description of the product, single line with HTML tags removed. + Truncated to 60 characters. + """ + descriptionPlainSummary: String! @deprecated(reason: "Use `description` instead.") + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductImageSortKeys = POSITION + ): ImageConnection! @deprecated(reason: "Use `media` instead.") + + """ + Whether the product + is in a specified + [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection). + """ + inCollection( + """ + The ID of the collection to check. For example, `id: "gid://shopify/Collection/123"`. + """ + id: ID! + ): Boolean! + + """Whether the product is a gift card.""" + isGiftCard: Boolean! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """ + The [media](https://shopify.dev/docs/apps/build/online-store/product-media) + associated with the product. Valid media are images, 3D models, videos. + """ + media( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductMediaSortKeys = POSITION + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): MediaConnection! + + """ + The total count of [media](https://shopify.dev/docs/apps/build/online-store/product-media) + that's associated with a product. + """ + mediaCount: Count + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store. + """ + onlineStorePreviewUrl: URL + + """ + The product's URL on the online store. + If `null`, then the product isn't published to the online store sales channel. + """ + onlineStoreUrl: URL + + """ + A list of product options. The limit is defined by the + [shop's resource limits for product options](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) + (`Shop.resourceLimits.maxProductOptions`). + """ + options( + """Truncate the array result to this size.""" + first: Int + ): [ProductOption!]! + + """The price range of the product.""" + priceRange: ProductPriceRange! @deprecated(reason: "Use `priceRangeV2` instead.") + + """ + The minimum and maximum prices of a product, expressed in decimal numbers. + For example, if the product is priced between $10.00 and $50.00, + then the price range is $10.00 - $50.00. + """ + priceRangeV2: ProductPriceRangeV2! + + """The product category specified by the merchant.""" + productCategory: ProductCategory @deprecated(reason: "Use `category` instead.") + + """ + A list of products that contain at least one variant associated with + at least one of the current products' variants via group relationship. + """ + productComponents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductComponentTypeConnection! + + """ + A count of unique products that contain at least one variant associated with + at least one of the current products' variants via group relationship. + """ + productComponentsCount: Count + + """ + A list of products that has a variant that contains any of this product's variants as a component. + """ + productParents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 + ): ProductConnection! + + """A list of the channels where the product is published.""" + productPublications( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String! + + """ + The 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( + """ + Return only the publications that are published. If false, then return all publications. + """ + onlyPublished: Boolean = true + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") + + """The date and time when the product was published to the online store.""" + publishedAt: DateTime + + """ + Whether the product is published for a customer only in a specified context. + For example, a product might be published for a customer only in a specific location. + """ + publishedInContext( + """The context used to determine publication status.""" + context: ContextualPublicationContext! + ): Boolean! + + """Whether the resource is published to a specific channel.""" + publishedOnChannel( + """The ID of the channel to check.""" + channelId: ID! + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") + + """ + Whether the resource is published to a + [channel](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + For example, the resource might be published to the online store channel. + """ + publishedOnCurrentChannel: Boolean! @deprecated(reason: "Use `publishedOnCurrentPublication` instead.") + + """ + Whether the resource is published to the app's + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + For example, the resource might be published to the app's online store channel. + """ + publishedOnCurrentPublication: Boolean! + + """ + 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( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled to be published. + """ + onlyPublished: Boolean = true + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The 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( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled or staged to be published. + """ + onlyPublished: Boolean = true + + """Filter publications by catalog type.""" + catalogType: CatalogType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationV2Connection! + + """ + Whether the merchant can make changes to the product when they + [edit the order](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders) + associated with the product. For example, a merchant might be restricted from changing product details when they + edit an order. + """ + restrictedForResource( + """The resource Id of the order with edits applied but not saved.""" + calculatedOrderId: ID! + ): RestrictedForResource + + """ + A count of [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product. + """ + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product either directly, or through the product's variants. + """ + sellingPlanGroups( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SellingPlanGroupConnection! + + """ + A count of [selling plan groups](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans/build-a-selling-plan) + that are associated with the product. + """ + sellingPlanGroupsCount: Count + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEO! + + """The standardized product type in the Shopify product taxonomy.""" + standardizedProductType: StandardizedProductType @deprecated(reason: "Use `productCategory` instead.") + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus! + + """ + The Storefront GraphQL API ID of the `Product`. + + The Storefront GraphQL API will no longer return Base64 encoded IDs to match + the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` + field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + A comma-separated list of searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites + any existing tags that were previously added to the product. To add new tags without overwriting + existing tags, use the [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!]! + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view the product in a store. + """ + templateSuffix: String + + """ + The name for the product that displays to customers. The title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. + """ + title: String! + + """The quantity of inventory that's in stock.""" + totalInventory: Int! + + """ + The number of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + that are associated with the product. + """ + totalVariants: Int! @deprecated(reason: "Use `variantsCount` instead.") + + """ + Whether [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + has been enabled for the product. + """ + tracksInventory: Boolean! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The list of channels that the resource is not published to.""" + unpublishedChannels( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PublicationConnection! + + """ + The date and time when the product was last modified. + A product's `updatedAt` value can change for different reasons. For example, if an order + is placed for a product that has inventory tracking set up, then the inventory adjustment + is counted as an update. + """ + updatedAt: DateTime! + + """ + A list of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) associated with the product. + If querying a single product at the root, you can fetch up to 2048 variants. + """ + variants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductVariantSortKeys = POSITION + ): ProductVariantConnection! + + """ + The number of [variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + that are associated with the product. + """ + variantsCount: Count + + """The name of the product's vendor.""" + vendor: String! +} + +"""The product's component information.""" +type ProductBundleComponent { + """The product that's related as a component.""" + componentProduct: Product! + + """The list of products' variants that are components.""" + componentVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """The number of component variants for the product component.""" + componentVariantsCount: Count + + """ + The options in the parent and the component options they're connected to, along with the chosen option values + that appear in the bundle. + """ + optionSelections: [ProductBundleComponentOptionSelection!]! + + """ + The quantity of the component product set for this bundle line. + It will be null if there's a quantityOption present. + """ + quantity: Int + + """ + The quantity as option of the component product. It will be null if there's a quantity set. + """ + quantityOption: ProductBundleComponentQuantityOption +} + +""" +An auto-generated type for paginating through multiple ProductBundleComponents. +""" +type ProductBundleComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductBundleComponentEdge!]! + + """ + A list of nodes that are contained in ProductBundleComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductBundleComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductBundleComponent and a cursor during pagination. +""" +type ProductBundleComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductBundleComponentEdge.""" + node: ProductBundleComponent! +} + +""" +The input fields for a single component related to a componentized product. +""" +input ProductBundleComponentInput { + """ + The quantity of the component product to add to the bundle product. This field can't exceed 2000. + """ + quantity: Int + + """The ID of the component product to add to the bundle product.""" + productId: ID! + + """ + The options to use in the component product, and the values for the option. + """ + optionSelections: [ProductBundleComponentOptionSelectionInput!]! + + """ + New option to be created on the bundle parent that enables the buyer to select different quantities for + this component (e.g. two-pack, three-pack). Can only be used if quantity isn't set. + """ + quantityOption: ProductBundleComponentQuantityOptionInput +} + +"""A relationship between a component option and a parent option.""" +type ProductBundleComponentOptionSelection { + """ + The option that existed on the component product prior to the fixed bundle creation. + """ + componentOption: ProductOption! + + """The option that was created on the parent product.""" + parentOption: ProductOption + + """ + The component option values that are actively selected for this relationship. + """ + values: [ProductBundleComponentOptionSelectionValue!]! +} + +"""The input fields for a single option related to a component product.""" +input ProductBundleComponentOptionSelectionInput { + """The ID of the option present on the component product.""" + componentOptionId: ID! + + """The name to create for this option on the parent product.""" + name: String! + + """Array of selected option values.""" + values: [String!]! +} + +"""The status of a component option value related to a bundle.""" +enum ProductBundleComponentOptionSelectionStatus { + """The component option value is selected as sellable in the bundle.""" + SELECTED + + """The component option value is not selected as sellable in the bundle.""" + DESELECTED + + """ + The component option value was not initially selected, but is now available for the bundle. + """ + NEW + + """ + The component option value was selected, is no longer available for the bundle. + """ + UNAVAILABLE +} + +"""A component option value related to a bundle line.""" +type ProductBundleComponentOptionSelectionValue { + """Selection status of the option.""" + selectionStatus: ProductBundleComponentOptionSelectionStatus! + + """The value of the option.""" + value: String! +} + +"""A quantity option related to a bundle.""" +type ProductBundleComponentQuantityOption { + """The name of the option value.""" + name: String! + + """The option that was created on the parent product.""" + parentOption: ProductOption + + """The quantity values of the option.""" + values: [ProductBundleComponentQuantityOptionValue!]! +} + +""" +Input for the quantity option related to a component product. This will become a +new option on the parent bundle product that doesn't have a corresponding option +on the component. +""" +input ProductBundleComponentQuantityOptionInput { + """The option name to create on the parent product.""" + name: String! + + """Array of option values.""" + values: [ProductBundleComponentQuantityOptionValueInput!]! +} + +"""A quantity option value related to a componentized product.""" +type ProductBundleComponentQuantityOptionValue { + """The name of the option value.""" + name: String! + + """The quantity of the option value.""" + quantity: Int! +} + +""" +The input fields for a single quantity option value related to a component product. +""" +input ProductBundleComponentQuantityOptionValueInput { + """The name associated with the option, e.g. one-pack, two-pack.""" + name: String! + + """ + How many of the variant will be included for the option value (e.g. two-pack has quantity 2). + """ + quantity: Int! +} + +"""The input fields for creating a componentized product.""" +input ProductBundleCreateInput { + """The title of the product to create.""" + title: String! + + """The component products to bundle with the bundle product.""" + components: [ProductBundleComponentInput!]! +} + +"""Return type for `productBundleCreate` mutation.""" +type ProductBundleCreatePayload { + """ + The asynchronous ProductBundleOperation creating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Defines errors encountered while managing a product bundle.""" +type ProductBundleMutationUserError implements DisplayableError { + """The error code.""" + code: ProductBundleMutationUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductBundleMutationUserError`. +""" +enum ProductBundleMutationUserErrorCode { + """Something went wrong, please try again.""" + GENERIC_ERROR + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Input is not valid.""" + INVALID_INPUT + + """Error processing request in the background job.""" + JOB_ERROR +} + +""" +An entity that represents details of an asynchronous +[ProductBundleCreate](https://shopify.dev/api/admin-graphql/current/mutations/productBundleCreate) or +[ProductBundleUpdate](https://shopify.dev/api/admin-graphql/current/mutations/productBundleUpdate) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned when the bundle was created or updated, this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductBundleOperation implements Node & ProductOperation { + """A globally-unique ID.""" + id: ID! + + """The product on which the operation is being performed.""" + product: Product + + """The status of this operation.""" + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductBundleMutationUserError!]! +} + +"""The input fields for updating a componentized product.""" +input ProductBundleUpdateInput { + """The ID of the componentized product to update.""" + productId: ID! + + """The title to rename the componentized product to, if provided.""" + title: String + + """ + The components to update existing ones. If none provided, no changes occur. + Note: This replaces, not adds to, current components. + """ + components: [ProductBundleComponentInput!] +} + +"""Return type for `productBundleUpdate` mutation.""" +type ProductBundleUpdatePayload { + """ + The asynchronous ProductBundleOperation updating the product bundle or componentized product. + """ + productBundleOperation: ProductBundleOperation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The details of a specific product category within 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 +} + +"""Return type for `productChangeStatus` mutation.""" +type ProductChangeStatusPayload { + """The product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductChangeStatusUserError!]! +} + +"""An error that occurs during the execution of `ProductChangeStatus`.""" +type ProductChangeStatusUserError implements DisplayableError { + """The error code.""" + code: ProductChangeStatusUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductChangeStatusUserError`. +""" +enum ProductChangeStatusUserErrorCode { + """Product could not be found.""" + PRODUCT_NOT_FOUND + + """ + Cannot be unarchived because combined listings are not compatible with this store. + """ + COMBINED_LISTINGS_NOT_COMPATIBLE_WITH_SHOP +} + +""" +The input fields to claim ownership for Product features such as Bundles. +""" +input ProductClaimOwnershipInput { + """ + Claiming ownership of bundles lets the app render a custom UI for the bundles' card on the + products details page in the Shopify admin. + + Bundle ownership can only be claimed when creating the product. If you create `ProductVariantComponents` + in any of its product variants, then the bundle ownership is automatically assigned to the app making the call. + + [Learn more](https://shopify.dev/docs/apps/selling-strategies/bundles/product-config). + """ + bundles: Boolean +} + +"""The set of valid sort keys for products belonging to a collection.""" +enum ProductCollectionSortKeys { + """Sort by best selling.""" + BEST_SELLING + + """Sort by collection default order.""" + COLLECTION_DEFAULT + + """Sort by creation time.""" + CREATED + + """Sort by id.""" + ID + + """Sort by manual order.""" + MANUAL + + """Sort by price.""" + PRICE + + """Sort by relevance.""" + RELEVANCE + + """Sort by title.""" + TITLE +} + +"""The compare-at price range of the product.""" +type ProductCompareAtPriceRange { + """The highest variant's compare-at price.""" + maxVariantCompareAtPrice: MoneyV2! + + """The lowest variant's compare-at price.""" + minVariantCompareAtPrice: MoneyV2! +} + +"""The product component information.""" +type ProductComponentType { + """The list of products' variants that are components.""" + componentVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """The number of component variants for the product component.""" + componentVariantsCount: Count + + """The list of products' variants that are not components.""" + nonComponentVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """The number of non_components variants for the product component.""" + nonComponentVariantsCount: Count + + """The product that's a component.""" + product: Product! +} + +""" +An auto-generated type for paginating through multiple ProductComponentTypes. +""" +type ProductComponentTypeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductComponentTypeEdge!]! + + """ + A list of nodes that are contained in ProductComponentTypeEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductComponentType!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductComponentType and a cursor during pagination. +""" +type ProductComponentTypeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductComponentTypeEdge.""" + node: ProductComponentType! +} + +"""An auto-generated type for paginating through multiple Products.""" +type ProductConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductEdge!]! + + """ + A list of nodes that are contained in ProductEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Product!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product 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! +} + +"""The input fields required to create a product.""" +input ProductCreateInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A + handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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 searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is + explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """The name of the product's vendor.""" + vendor: String + + """Whether the product is a gift card.""" + giftCard: Boolean + + """A list of collection IDs to associate with the product.""" + collectionsToJoin: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + """ + combinedListingRole: CombinedListingsRole + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + A list of product options and option values. Maximum product options: three. + There's no limit on the number of option values. + """ + productOptions: [OptionCreateInput!] + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), + then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput +} + +"""Return type for `productCreateMedia` mutation.""" +type ProductCreateMediaPayload { + """The newly created media.""" + media: [Media!] + + """The list of errors that occurred from executing the mutation.""" + mediaUserErrors: [MediaUserError!]! + + """The product associated with the media.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +"""Return type for `productCreate` mutation.""" +type ProductCreatePayload { + """The product object.""" + product: Product + + """The shop associated with the product.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for specifying the product to delete.""" +input ProductDeleteInput { + """The ID of the product.""" + id: ID! +} + +"""Return type for `productDeleteMedia` mutation.""" +type ProductDeleteMediaPayload { + """List of media IDs which were deleted.""" + deletedMediaIds: [ID!] + + """List of product image IDs which were deleted.""" + deletedProductImageIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + mediaUserErrors: [MediaUserError!]! + + """The product associated with the deleted media.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +An entity that represents details of an asynchronous +[ProductDelete](https://shopify.dev/api/admin-graphql/current/mutations/productDelete) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned when the product was deleted, this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `deletedProductId` field provides the ID of the deleted product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDeleteOperation implements Node & ProductOperation { + """The ID of the deleted product.""" + deletedProductId: ID + + """A globally-unique ID.""" + id: ID! + + """The product on which the operation is being performed.""" + product: Product + + """The status of this operation.""" + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +"""Return type for `productDelete` mutation.""" +type ProductDeletePayload { + """The ID of the deleted product.""" + deletedProductId: ID + + """The product delete operation, returned when run in asynchronous mode.""" + productDeleteOperation: ProductDeleteOperation + + """The shop associated with the product.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Represents a product duplication job.""" +type ProductDuplicateJob { + """This indicates if the job is still queued or has been run.""" + done: Boolean! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! +} + +""" +An entity that represents details of an asynchronous +[ProductDuplicate](https://shopify.dev/api/admin-graphql/current/mutations/productDuplicate) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was duplicated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the original product. + +The `newProduct` field provides the details of the new duplicate of the product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductDuplicateOperation implements Node & ProductOperation { + """A globally-unique ID.""" + id: ID! + + """The newly created duplicate of the original product.""" + newProduct: Product + + """The product on which the operation is being performed.""" + product: Product + + """The status of this operation.""" + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [UserError!]! +} + +"""Return type for `productDuplicate` mutation.""" +type ProductDuplicatePayload { + """The asynchronous job that duplicates the product images.""" + imageJob: Job + + """The duplicated product.""" + newProduct: Product + + """ + The product duplicate operation, returned when run in asynchronous mode. + """ + productDuplicateOperation: ProductDuplicateOperation + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. +""" +type ProductEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductEdge.""" + node: Product! +} + +"""A product feed.""" +type ProductFeed implements Node { + """The country of the product feed.""" + country: CountryCode + + """A globally-unique ID.""" + id: ID! + + """The language of the product feed.""" + language: LanguageCode + + """The status of the product feed.""" + status: ProductFeedStatus! +} + +"""An auto-generated type for paginating through multiple ProductFeeds.""" +type ProductFeedConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductFeedEdge!]! + + """ + A list of nodes that are contained in ProductFeedEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductFeed!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `productFeedCreate` mutation.""" +type ProductFeedCreatePayload { + """The newly created product feed.""" + productFeed: ProductFeed + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductFeedCreateUserError!]! +} + +"""An error that occurs during the execution of `ProductFeedCreate`.""" +type ProductFeedCreateUserError implements DisplayableError { + """The error code.""" + code: ProductFeedCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedCreateUserError`. +""" +enum ProductFeedCreateUserErrorCode { + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN +} + +"""Return type for `productFeedDelete` mutation.""" +type ProductFeedDeletePayload { + """The ID of the product feed that was deleted.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductFeedDeleteUserError!]! +} + +"""An error that occurs during the execution of `ProductFeedDelete`.""" +type ProductFeedDeleteUserError implements DisplayableError { + """The error code.""" + code: ProductFeedDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductFeedDeleteUserError`. +""" +enum ProductFeedDeleteUserErrorCode { + """The input value is invalid.""" + INVALID +} + +""" +An auto-generated type which holds one ProductFeed and a cursor during pagination. +""" +type ProductFeedEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductFeedEdge.""" + node: ProductFeed! +} + +"""The input fields required to create a product feed.""" +input ProductFeedInput { + """The language of the product feed.""" + language: LanguageCode! + + """The country of the product feed.""" + country: CountryCode! +} + +"""The valid values for the status of product feed.""" +enum ProductFeedStatus { + """The product feed is active.""" + ACTIVE + + """The product feed is inactive.""" + INACTIVE +} + +"""Return type for `productFullSync` mutation.""" +type ProductFullSyncPayload { + """The ID for the full sync operation.""" + id: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductFullSyncUserError!]! +} + +"""An error that occurs during the execution of `ProductFullSync`.""" +type ProductFullSyncUserError implements DisplayableError { + """The error code.""" + code: ProductFullSyncUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductFullSyncUserError`. +""" +enum ProductFullSyncUserErrorCode { + """The input value is invalid.""" + INVALID +} + +"""The input fields for identifying a product.""" +input ProductIdentifierInput { + """The ID of the product.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product. + """ + customId: UniqueMetafieldValueInput + + """The handle of the product.""" + handle: String +} + +"""The set of valid sort keys for the ProductImage query.""" +enum ProductImageSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `position` value.""" + POSITION +} + +"""The input fields for creating or updating a product.""" +input ProductInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A + handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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 searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is + explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """The name of the product's vendor.""" + vendor: String + + """Whether the product is a gift card.""" + giftCard: Boolean + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """A list of collection IDs to associate with the product.""" + collectionsToJoin: [ID!] + + """The collection IDs to disassociate from the product.""" + collectionsToLeave: [ID!] + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + You can specify this field only when you create a product. + """ + combinedListingRole: CombinedListingsRole + + """ + The product's ID. + + If you're creating a product, then you don't need to pass the `id` as input to the + [`productCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate) mutation. + If you're updating a product, then you do need to pass the `id` as input to the + [`productUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productUpdate) mutation + to identify which product you want to update. + """ + id: ID + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + A list of product options and option values. Maximum product options: three. + There's no limit on the number of option values. + This input is supported only with the [`productCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/productCreate) + mutation. + """ + productOptions: [OptionCreateInput!] + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), + then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput +} + +"""Return type for `productJoinSellingPlanGroups` mutation.""" +type ProductJoinSellingPlanGroupsPayload { + """The product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""Return type for `productLeaveSellingPlanGroups` mutation.""" +type ProductLeaveSellingPlanGroupsPayload { + """The product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""The set of valid sort keys for the ProductMedia query.""" +enum ProductMediaSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `position` value.""" + POSITION +} + +""" +An 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 has been created.""" + CREATED + + """Operation is currently running.""" + ACTIVE + + """Operation is complete.""" + COMPLETE +} + +""" +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 variant strategies available for use in the `productOptionsCreate` mutation. +""" +enum ProductOptionCreateVariantStrategy { + """ + No additional variants are created in response to the added options. Existing variants are updated with the + first option value of each option added. + """ + LEAVE_AS_IS + + """ + Existing variants are updated with the first option value of each added option. New variants are + created for each combination of existing variant option values and new option values. + """ + CREATE +} + +""" +The set of strategies available for use on the `productOptionDelete` mutation. +""" +enum ProductOptionDeleteStrategy { + """ + The default strategy, the specified `Option` may only have one corresponding `value`. + """ + DEFAULT + + """ + An `Option` with multiple `values` can be deleted. Remaining variants will be + deleted, highest `position` first, in the event of duplicates being detected. + """ + POSITION + + """ + An `Option` with multiple `values` can be deleted, but the operation only succeeds if no product variants get deleted. + """ + NON_DESTRUCTIVE +} + +"""Return type for `productOptionsCreate` mutation.""" +type ProductOptionsCreatePayload { + """The updated product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductOptionsCreateUserError!]! +} + +"""Error codes for failed `ProductOptionsCreate` mutation.""" +type ProductOptionsCreateUserError implements DisplayableError { + """The error code.""" + code: ProductOptionsCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsCreateUserError`. +""" +enum ProductOptionsCreateUserErrorCode { + """Option already exists.""" + OPTION_ALREADY_EXISTS + + """Options count is over the allowed limit.""" + OPTIONS_OVER_LIMIT + + """Option values count is over the allowed limit.""" + OPTION_VALUES_OVER_LIMIT + + """The name provided is not valid.""" + INVALID_NAME + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Cannot create new options without values for all existing variants.""" + NEW_OPTION_WITHOUT_VALUE_FOR_EXISTING_VARIANTS + + """Duplicated option name.""" + DUPLICATED_OPTION_NAME + + """Duplicated option value.""" + DUPLICATED_OPTION_VALUE + + """Each option must have a name specified.""" + OPTION_NAME_MISSING + + """Each option must have at least one option value specified.""" + OPTION_VALUES_MISSING + + """Option value name is too long.""" + OPTION_VALUE_NAME_TOO_LONG + + """Option name is too long.""" + OPTION_NAME_TOO_LONG + + """ + Position must be between 1 and the maximum number of options per product. + """ + POSITION_OUT_OF_BOUNDS + + """If specified, position field must be present in all option inputs.""" + OPTION_POSITION_MISSING + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """No valid metafield definition found for linked option.""" + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """Invalid metafield value for linked option.""" + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """Missing metafield values for linked option.""" + MISSING_METAFIELD_VALUES_FOR_LINKED_OPTION + + """Cannot combine linked metafield and option values.""" + CANNOT_COMBINE_LINKED_METAFIELD_AND_OPTION_VALUES + + """Cannot link multiple options to the same metafield.""" + DUPLICATE_LINKED_OPTION + + """An option linked to the provided metafield already exists.""" + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """Linked options are currently not supported for this shop.""" + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """At least one of the product variants has invalid SKUs.""" + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot specify 'linkedMetafieldValue' for an option that is not linked to a metafield. + """ + LINKED_METAFIELD_VALUE_WITHOUT_LINKED_OPTION + + """ + The number of option values created with the CREATE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED +} + +"""Return type for `productOptionsDelete` mutation.""" +type ProductOptionsDeletePayload { + """IDs of the options deleted.""" + deletedOptionsIds: [ID!] + + """The updated product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductOptionsDeleteUserError!]! +} + +"""Error codes for failed `ProductOptionsDelete` mutation.""" +type ProductOptionsDeleteUserError implements DisplayableError { + """The error code.""" + code: ProductOptionsDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsDeleteUserError`. +""" +enum ProductOptionsDeleteUserErrorCode { + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Option does not exist.""" + OPTION_DOES_NOT_EXIST + + """Options do not belong to the same product.""" + OPTIONS_DO_NOT_BELONG_TO_THE_SAME_PRODUCT + + """Can't delete option with multiple values.""" + CANNOT_DELETE_OPTION_WITH_MULTIPLE_VALUES + + """Cannot delete options without deleting variants.""" + CANNOT_USE_NON_DESTRUCTIVE_STRATEGY + + """At least one of the product variants has invalid SKUs.""" + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot perform option deletion because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION +} + +"""Return type for `productOptionsReorder` mutation.""" +type ProductOptionsReorderPayload { + """The updated product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductOptionsReorderUserError!]! +} + +"""Error codes for failed `ProductOptionsReorder` mutation.""" +type ProductOptionsReorderUserError implements DisplayableError { + """The error code.""" + code: ProductOptionsReorderUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionsReorderUserError`. +""" +enum ProductOptionsReorderUserErrorCode { + """Option name does not exist.""" + OPTION_NAME_DOES_NOT_EXIST + + """Option value does not exist.""" + OPTION_VALUE_DOES_NOT_EXIST + + """Option id does not exist.""" + OPTION_ID_DOES_NOT_EXIST + + """Option value id does not exist.""" + OPTION_VALUE_ID_DOES_NOT_EXIST + + """Duplicated option name.""" + DUPLICATED_OPTION_NAME + + """Duplicated option value.""" + DUPLICATED_OPTION_VALUE + + """Missing option name.""" + MISSING_OPTION_NAME + + """Missing option value.""" + MISSING_OPTION_VALUE + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """On reorder, this key cannot be used.""" + NO_KEY_ON_REORDER + + """ + Cannot specify different options or option values using mixed id and name reference key. + """ + MIXING_ID_AND_NAME_KEYS_IS_NOT_ALLOWED + + """At least one of the product variants has invalid SKUs.""" + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU +} + +"""Return type for `productOptionUpdate` mutation.""" +type ProductOptionUpdatePayload { + """The product with which the option being updated is associated.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductOptionUpdateUserError!]! +} + +"""Error codes for failed `ProductOptionUpdate` mutation.""" +type ProductOptionUpdateUserError implements DisplayableError { + """The error code.""" + code: ProductOptionUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductOptionUpdateUserError`. +""" +enum ProductOptionUpdateUserErrorCode { + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Option does not exist.""" + OPTION_DOES_NOT_EXIST + + """Option already exists.""" + OPTION_ALREADY_EXISTS + + """The option position provided is not valid.""" + INVALID_POSITION + + """The name provided is not valid.""" + INVALID_NAME + + """Option values count is over the allowed limit.""" + OPTION_VALUES_OVER_LIMIT + + """Option value does not exist.""" + OPTION_VALUE_DOES_NOT_EXIST + + """Option value already exists.""" + OPTION_VALUE_ALREADY_EXISTS + + """Option value with variants linked cannot be deleted.""" + OPTION_VALUE_HAS_VARIANTS + + """Deleting all option values of an option is not allowed.""" + CANNOT_DELETE_ALL_OPTION_VALUES_IN_OPTION + + """ + An option cannot be left only with option values that are not linked to any variant. + """ + CANNOT_LEAVE_OPTIONS_WITHOUT_VARIANTS + + """On create, this key cannot be used.""" + NO_KEY_ON_CREATE + + """A key is missing in the input.""" + KEY_MISSING_IN_INPUT + + """Duplicated option value.""" + DUPLICATED_OPTION_VALUE + + """Option name is too long.""" + OPTION_NAME_TOO_LONG + + """Option value name is too long.""" + OPTION_VALUE_NAME_TOO_LONG + + """Performing conflicting actions on an option value.""" + OPTION_VALUE_CONFLICTING_OPERATION + + """The number of variants will be above the limit after this operation.""" + CANNOT_CREATE_VARIANTS_ABOVE_LIMIT + + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """Invalid metafield value for linked option.""" + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """Cannot link multiple options to the same metafield.""" + DUPLICATE_LINKED_OPTION + + """An option linked to the provided metafield already exists.""" + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """ + Updating the linked_metafield of an option requires a linked_metafield_value for each option value. + """ + LINKED_OPTION_UPDATE_MISSING_VALUES + + """Linked options are currently not supported for this shop.""" + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """No valid metafield definition found for linked option.""" + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """At least one of the product variants has invalid SKUs.""" + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Cannot update the option because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION + + """ + The number of option values created with the MANAGE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED +} + +""" +The set of variant strategies available for use in the `productOptionUpdate` mutation. +""" +enum ProductOptionUpdateVariantStrategy { + """ + Variants are not created nor deleted in response to option values to add or delete. + In cases where deleting a variant would be necessary to complete the operation, an error will be returned. + """ + LEAVE_AS_IS + + """ + Variants are created and deleted according to the option values to add and to delete. + + If an option value is added, a new variant will be added for each existing option combination + available on the product. For example, if the existing options are `Size` and `Color`, with + values `S`/`XL` and `Red`/`Blue`, adding a new option value `Green` for the option `Color` will create + variants with the option value combinations `S`/`Green` and `XL`/`Green`. + + If an option value is deleted, all variants referencing that option value will be deleted. + """ + MANAGE +} + +""" +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 +} + +"""The price range of the product.""" +type ProductPriceRange { + """The highest variant's price.""" + maxVariantPrice: MoneyV2! + + """The lowest variant's price.""" + minVariantPrice: MoneyV2! +} + +"""The price range of the product.""" +type ProductPriceRangeV2 { + """The highest variant's price.""" + maxVariantPrice: MoneyV2! + + """The lowest variant's price.""" + minVariantPrice: MoneyV2! +} + +"""Represents the channels where a product is published.""" +type ProductPublication { + """The channel where the product was or is published.""" + channel: Channel! + + """Whether the publication is published or not.""" + isPublished: Boolean! + + """The product that was or is going to be published on the channel.""" + product: Product! + + """ + The date that the product was or is going to be published on the channel. + """ + publishDate: DateTime +} + +""" +An auto-generated type for paginating through multiple ProductPublications. +""" +type ProductPublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductPublicationEdge!]! + + """ + A list of nodes that are contained in ProductPublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductPublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductPublication and a cursor during pagination. +""" +type ProductPublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductPublicationEdge.""" + node: ProductPublication! +} + +""" +The input fields for specifying a publication to which a product will be published. +""" +input ProductPublicationInput { + """ID of the publication.""" + publicationId: ID + + """The date and time that the product was (or will be) published.""" + publishDate: DateTime +} + +""" +The input fields for specifying a product to publish and the channels to publish it to. +""" +input ProductPublishInput { + """The product to create or update publications for.""" + id: ID! + + """The publication that the product is published to.""" + productPublications: [ProductPublicationInput!]! +} + +"""Return type for `productPublish` mutation.""" +type ProductPublishPayload { + """The product that has been published.""" + product: Product + + """The channels where the product is published.""" + productPublications: [ProductPublication!] @deprecated(reason: "Use Product.publications instead.") + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `productReorderMedia` mutation.""" +type ProductReorderMediaPayload { + """The asynchronous job which reorders the media.""" + job: Job + + """The list of errors that occurred from executing the mutation.""" + mediaUserErrors: [MediaUserError!]! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +""" +Reports the status of product for a Sales Channel or Storefront API. +This might include why a product is not available in a Sales Channel +and how a merchant might fix this. +""" +type ProductResourceFeedback { + """ + The time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """The feedback messages presented to the merchant.""" + messages: [String!]! + + """The ID of the product associated with the feedback.""" + productId: ID! + + """The timestamp of the product associated with the feedback.""" + productUpdatedAt: DateTime! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +"""The input fields used to create a product feedback.""" +input ProductResourceFeedbackInput { + """The ID of the product that the feedback was created on.""" + productId: ID! + + """Whether the merchant needs to take action on the product.""" + state: ResourceFeedbackState! + + """ + The date and time when the payload is constructed. + Used to help determine whether incoming feedback is outdated compared to + feedback already received, and if it should be ignored upon arrival. + """ + feedbackGeneratedAt: DateTime! + + """The timestamp of the product associated with the feedback.""" + productUpdatedAt: DateTime! + + """ + A concise set of copy strings to be displayed to merchants. Used to guide + merchants in resolving problems that your app encounters when trying to make + use of their products. + You can specify up to ten messages. Each message is limited to 100 characters. + """ + messages: [String!] +} + +"""A sale associated with a product.""" +type ProductSale implements Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """The unique ID for the sale.""" + id: ID! + + """The line item for the associated sale.""" + lineItem: LineItem! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""The input fields required to identify a resource.""" +input ProductSetIdentifiers { + """ID of product to update.""" + id: ID + + """Handle of product to upsert.""" + handle: String + + """Custom ID of product to upsert.""" + customId: UniqueMetafieldValueInput +} + +""" +The input fields required to create or update a product via ProductSet mutation. +""" +input ProductSetInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A + handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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 searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is + explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """The name of the product's vendor.""" + vendor: String + + """Whether the product is a gift card.""" + giftCard: Boolean + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """The IDs of collections that this product will be a member of.""" + collections: [ID!] + + """ + The metafields to associate with this product. + + Complexity cost: 0.4 per metafield. + """ + metafields: [MetafieldInput!] + + """ + A list of variants associated with the product. + + Complexity cost: 0.2 per variant. + """ + variants: [ProductVariantSetInput!] + + """ + The files to associate with the product. + + Complexity cost: 1.9 per file. + """ + files: [FileSetInput!] + + """The status of the product.""" + status: ProductStatus + + """ + 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 + + """ + List of custom product options and option values (maximum of 3 per product). + """ + productOptions: [OptionSetInput!] + + """ + The input field to enable an app to provide additional product features. + For example, you can specify + [`bundles: true`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductClaimOwnershipInput#field-bundles) + in the `claimOwnership` field to let an app add a + [product configuration extension](https://shopify.dev/docs/apps/build/product-merchandising/bundles/product-configuration-extension/add-merchant-config-ui). + """ + claimOwnership: ProductClaimOwnershipInput + + """ + The role of the product in a product grouping. It can only be set during creation. + """ + combinedListingRole: CombinedListingsRole +} + +""" +The input fields required to set inventory quantities using `productSet` mutation. +""" +input ProductSetInventoryInput { + """The ID of the location of the inventory quantity being set.""" + locationId: ID! + + """ + The name of the inventory quantity being set. Must be one of `available` or `on_hand`. + """ + name: String! + + """The values to which each quantities will be set.""" + quantity: Int! +} + +""" +An entity that represents details of an asynchronous +[ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + +By querying this entity with the +[productOperation](https://shopify.dev/api/admin-graphql/current/queries/productOperation) query +using the ID that was returned +[when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously), +this can be used to check the status of an operation. + +The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + +The `product` field provides the details of the created or updated product. + +The `userErrors` field provides mutation errors that occurred during the operation. +""" +type ProductSetOperation implements Node & ProductOperation { + """A globally-unique ID.""" + id: ID! + + """The product on which the operation is being performed.""" + product: Product + + """The status of this operation.""" + status: ProductOperationStatus! + + """ + Returns mutation errors occurred during background mutation processing. + """ + userErrors: [ProductSetUserError!]! +} + +"""Return type for `productSet` mutation.""" +type ProductSetPayload { + """The product object.""" + product: Product + + """The product set operation, returned when run in asynchronous mode.""" + productSetOperation: ProductSetOperation + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductSetUserError!]! +} + +"""Defines errors for ProductSet mutation.""" +type ProductSetUserError implements DisplayableError { + """The error code.""" + code: ProductSetUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `ProductSetUserError`.""" +enum ProductSetUserErrorCode { + """The id field is not allowed if identifier is provided.""" + ID_NOT_ALLOWED + + """The input field corresponding to the identifier is required.""" + MISSING_FIELD_REQUIRED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """Resource matching the identifier was not found.""" + NOT_FOUND + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH + + """Something went wrong, please try again.""" + GENERIC_ERROR + + """Metafield is not valid.""" + INVALID_METAFIELD + + """Product variant is not valid.""" + INVALID_VARIANT + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Product variant does not exist.""" + PRODUCT_VARIANT_DOES_NOT_EXIST + + """Option does not exist.""" + OPTION_DOES_NOT_EXIST + + """Option value does not exist.""" + OPTION_VALUE_DOES_NOT_EXIST + + """Options over limit.""" + OPTIONS_OVER_LIMIT + + """Option values over limit.""" + OPTION_VALUES_OVER_LIMIT + + """Each option must have at least one option value specified.""" + OPTION_VALUES_MISSING + + """Duplicated option name.""" + DUPLICATED_OPTION_NAME + + """Duplicated option value.""" + DUPLICATED_OPTION_VALUE + + """Number of product variants exceeds shop limit.""" + VARIANTS_OVER_LIMIT + + """Must specify product options when updating variants.""" + PRODUCT_OPTIONS_INPUT_MISSING + + """Must specify variants when updating options.""" + VARIANTS_INPUT_MISSING + + """Gift card products can only be created after they have been activated.""" + GIFT_CARDS_NOT_ACTIVATED + + """The product gift_card attribute cannot be changed after creation.""" + GIFT_CARD_ATTRIBUTE_CANNOT_BE_CHANGED + + """Product is not valid.""" + INVALID_PRODUCT + + """Input is not valid.""" + INVALID_INPUT + + """Error processing request in the background job.""" + JOB_ERROR + + """The metafield violates a capability restriction.""" + CAPABILITY_VIOLATION + + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """Invalid metafield value for linked option.""" + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """Cannot link multiple options to the same metafield.""" + DUPLICATE_LINKED_OPTION + + """Duplicated metafield value for linked option.""" + DUPLICATED_METAFIELD_VALUE + + """Linked options are currently not supported for this shop.""" + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """No valid metafield definition found for linked option.""" + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """Duplicated value.""" + DUPLICATED_VALUE + + """Handle already in use. Please provide a new handle.""" + HANDLE_NOT_UNIQUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +"""The set of valid sort keys for the Product query.""" +enum ProductSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `inventory_total` value.""" + INVENTORY_TOTAL + + """Sort by the `product_type` value.""" + PRODUCT_TYPE + + """Sort by the `published_at` value.""" + PUBLISHED_AT + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT + + """Sort by the `vendor` value.""" + VENDOR +} + +"""The possible product statuses.""" +enum ProductStatus { + """ + The product is ready to sell and can be published to sales channels and apps. + Products with an active status aren't automatically published to sales + channels, such as the online store, or apps. By default, existing products are set to active. + """ + ACTIVE + + """ + The product is no longer being sold and isn't available to customers on sales channels and apps. + """ + ARCHIVED + + """ + The product isn't ready to sell and is unavailable to customers on sales + channels and apps. By default, duplicated and unarchived products are set to draft. + """ + DRAFT + + """ + The product is active but you need a direct link to view it. The product + doesn't show up in search, collections, or product recommendations. It will be + returned in Storefront API and Liquid only when referenced individually by + handle, id, or metafield reference.This status is only visible from 2025-10 + and up, is translated to active in older versions and can't be changed from + unlisted in older versions. + """ + UNLISTED +} + +""" +Represents a [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) node. +""" +type ProductTaxonomyNode implements Node { + """ + The full name of the product taxonomy node. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. + """ + fullName: String! + + """The ID of the product taxonomy node.""" + id: ID! + + """Whether the node is a leaf node.""" + isLeaf: Boolean! + + """Whether the node is a root node.""" + isRoot: Boolean! + + """The name of the product taxonomy node. For example, Dog Beds.""" + name: String! +} + +""" +The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. +""" +input ProductUnpublishInput { + """The ID of the product to create or update publications for.""" + id: ID! + + """The channels to unpublish the product from.""" + productPublications: [ProductPublicationInput!]! +} + +"""Return type for `productUnpublish` mutation.""" +type ProductUnpublishPayload { + """The product that has been unpublished.""" + product: Product + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for updating a product.""" +input ProductUpdateInput { + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + A unique, human-readable string that's used to identify the product in URLs. A + handle can contain letters, hyphens (`-`), and numbers, but no spaces. + If no handle is explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated (unless that handle + is already taken, in which case a suffix is added to make the handle unique). + """ + handle: String + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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 searchable keywords that are + associated with the product. For example, a merchant might apply the `sports` + and `summer` tags to products that are associated with sportwear for summer. + + Updating `tags` overwrites any existing tags that were previously added to the product. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a product in a store. + """ + templateSuffix: String + + """ + The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) + that's used when customers view a gift card in a store. + """ + giftCardTemplateSuffix: String + + """ + The name for the product that displays to customers. If no handle is + explicitly provided, then the title is used to construct the product's handle. + For example, if a product is titled "Black Sunglasses" and no handle is + provided, then the handle `black-sunglasses` is generated. + """ + title: String + + """The name of the product's vendor.""" + vendor: String + + """ + Whether a redirect is required after a new handle has been provided. + If `true`, then the old handle is redirected to the new one automatically. + """ + redirectNewHandle: Boolean + + """The product's ID.""" + id: ID + + """A list of collection IDs to associate with the product.""" + collectionsToJoin: [ID!] + + """The collection IDs to disassociate from the product.""" + collectionsToLeave: [ID!] + + """ + Whether to delete metafields whose constraints don't match the product's category. + Can only be used when updating the product's category. + """ + deleteConflictingConstrainedMetafields: Boolean = false + + """ + The [custom fields](https://shopify.dev/docs/apps/build/custom-data) to associate with the product + for the purposes of adding and storing additional information. + """ + metafields: [MetafieldInput!] + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + Whether the product can only be purchased with + a [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans). + Products that are sold on subscription (`requiresSellingPlan: true`) can be updated only for online stores. + If you update a product to be subscription-only (`requiresSellingPlan:false`), + then the product is unpublished from all channels except the online store. + """ + requiresSellingPlan: Boolean +} + +"""Return type for `productUpdateMedia` mutation.""" +type ProductUpdateMediaPayload { + """The updated media object.""" + media: [Media!] + + """The list of errors that occurred from executing the mutation.""" + mediaUserErrors: [MediaUserError!]! + + """The product on which media was updated.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `mediaUserErrors` instead.") +} + +"""Return type for `productUpdate` mutation.""" +type ProductUpdatePayload { + """The updated product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The `ProductVariant` object represents a version of a +[product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) +that comes in more than one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), +such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, +blue t-shirt would be one product variant and a large, blue t-shirt would be another. + +Use the `ProductVariant` object to manage the full lifecycle and configuration of a product's variants. Common +use cases for using the `ProductVariant` object include: + +- Tracking inventory for each variant +- Setting unique prices for each variant +- Assigning barcodes and SKUs to connect variants to fulfillment services +- Attaching variant-specific images and media +- Setting delivery and tax requirements +- Supporting product bundles, subscriptions, and selling plans + +A `ProductVariant` is associated with a parent +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) object. +`ProductVariant` serves as the central link between a product's merchandising configuration, inventory, +pricing, fulfillment, and sales channels within the GraphQL Admin API schema. Each variant +can reference other GraphQL types such as: + +- [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem): Used for inventory tracking +- [`Image`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Image): Used for variant-specific images +- [`SellingPlanGroup`](https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup): Used for subscriptions and selling plans + +Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). +""" +type ProductVariant implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & LegacyInteroperability & Navigable & Node { + """Whether the product variant is available for sale.""" + availableForSale: Boolean! + + """The value of the barcode associated with the product.""" + barcode: String + + """The compare-at price of the variant in the default shop currency.""" + compareAtPrice: Money + + """ + The pricing that applies for a customer in a given context. As of API version + 2025-04, only active markets are considered in the price resolution. + """ + contextualPricing( + """The context used to generate contextual pricing for the variant.""" + context: ContextualPricingContext! + ): ProductVariantContextualPricing! + + """The date and time when the variant was created.""" + createdAt: DateTime! + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The [delivery profile](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile) for the variant. + """ + deliveryProfile: DeliveryProfile + + """ + Display name of the variant, based on product's title + variant's title. + """ + displayName: String! + + """The paginated list of events associated with the host subject.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): EventConnection! + + """A globally-unique ID.""" + id: ID! + + """The featured image for the variant.""" + image: Image @deprecated(reason: "Use `media` instead.") + + """The inventory item, which is used to query for inventory information.""" + inventoryItem: InventoryItem! + + """ + Whether customers are allowed to place an order for the product variant when it's out of stock. + """ + inventoryPolicy: ProductVariantInventoryPolicy! + + """The total sellable quantity of the variant.""" + inventoryQuantity: Int + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The media associated with the product variant.""" + media( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MediaConnection! + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! + + """ + List of prices and compare-at prices in the presentment currencies for this shop. + """ + presentmentPrices( + """The presentment currencies prices should return in.""" + presentmentCurrencies: [CurrencyCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantPricePairConnection! @deprecated(reason: "Use `contextualPricing` instead.") + + """The price of the product variant in the default shop currency.""" + price: Money! + + """The product that this variant belongs to.""" + product: Product! + + """ + A list of products that have product variants that contain this variant as a product component. + """ + productParents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 + ): ProductConnection! + + """A list of the product variant components.""" + productVariantComponents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantComponentConnection! + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be omitted + from channels that don't support bundles. + """ + requiresComponents: Boolean! + + """List of product options applied to the variant.""" + selectedOptions: [SelectedOption!]! + + """ + The total sellable quantity of the variant for online channels. + This doesn't represent the total available inventory or capture + [limitations based on customer location](https://help.shopify.com/manual/markets/inventory_and_fulfillment). + """ + sellableOnlineQuantity: Int! + + """Count of selling plan groups associated with the product variant.""" + sellingPlanGroupCount: Int! @deprecated(reason: "Use `sellingPlanGroupsCount` instead.") + + """ + A list of all selling plan groups defined in the current shop associated with the product variant. + """ + sellingPlanGroups( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SellingPlanGroupConnection! + + """Count of selling plan groups associated with the product variant.""" + sellingPlanGroupsCount: Count + + """Whether to show the unit price for this product variant.""" + showUnitPrice: Boolean! + + """ + A case-sensitive identifier for the product variant in the shop. + Required in order to connect to a fulfillment service. + """ + sku: String + + """ + The Storefront GraphQL API ID of the `ProductVariant`. + + The Storefront GraphQL API will no longer return Base64 encoded IDs to match + the behavior of the Admin GraphQL API. Therefore, you can safely use the `id` + field's value instead. + """ + storefrontId: StorefrontID! @deprecated(reason: "Use `id` instead.") + + """ + Avalara tax code for the product variant. Applies only to the stores that have the Avalara AvaTax app installed. + """ + taxCode: String @deprecated(reason: "This field should no longer be used in new integrations. This field will not be available in future API versions.") + + """Whether a tax is charged when the product variant is sold.""" + taxable: Boolean! + + """The title of the product variant.""" + title: String! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The unit price value for the variant based on the variant measurement.""" + unitPrice: MoneyV2 + + """The unit price measurement for the variant.""" + unitPriceMeasurement: UnitPriceMeasurement + + """ + The date and time (ISO 8601 format) when the product variant was last modified. + """ + updatedAt: DateTime! +} + +"""The input fields required to append media to a single variant.""" +input ProductVariantAppendMediaInput { + """Specifies the variant to which media will be appended.""" + variantId: ID! + + """Specifies the media to append to the variant.""" + mediaIds: [ID!]! +} + +"""Return type for `productVariantAppendMedia` mutation.""" +type ProductVariantAppendMediaPayload { + """The product associated with the variants and media.""" + product: Product + + """The product variants that were updated.""" + productVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MediaUserError!]! +} + +""" +A product variant component that is included within a bundle. + +These are the individual product variants that make up a bundle product, +where each component has a specific required quantity. +""" +type ProductVariantComponent implements Node { + """A globally-unique ID.""" + id: ID! + + """The product variant associated with the component.""" + productVariant: ProductVariant! + + """The required quantity of the component.""" + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ProductVariantComponents. +""" +type ProductVariantComponentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantComponentEdge!]! + + """ + A list of nodes that are contained in ProductVariantComponentEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantComponent!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantComponent and a cursor during pagination. +""" +type ProductVariantComponentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductVariantComponentEdge.""" + node: ProductVariantComponent! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. +""" +type ProductVariantConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantEdge!]! + + """ + A list of nodes that are contained in ProductVariantEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ProductVariant!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +The price of a product variant in a specific country. +Prices vary between countries. +""" +type ProductVariantContextualPricing { + """The final compare-at price after all adjustments are applied.""" + compareAtPrice: MoneyV2 + + """The final price after all adjustments are applied.""" + price: MoneyV2! + + """A list of quantity breaks for the product variant.""" + quantityPriceBreaks( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: QuantityPriceBreakSortKeys = MINIMUM_QUANTITY + ): QuantityPriceBreakConnection! + + """The quantity rule applied for a given context.""" + quantityRule: QuantityRule! + + """ + The unit price value for the given context based on the variant measurement. + """ + unitPrice: MoneyV2 +} + +"""The input fields required to detach media from a single variant.""" +input ProductVariantDetachMediaInput { + """Specifies the variant from which media will be detached.""" + variantId: ID! + + """Specifies the media to detach from the variant.""" + mediaIds: [ID!]! +} + +"""Return type for `productVariantDetachMedia` mutation.""" +type ProductVariantDetachMediaPayload { + """The product associated with the variants and media.""" + product: Product + + """The product variants that were updated.""" + productVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [MediaUserError!]! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. +""" +type ProductVariantEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductVariantEdge.""" + node: ProductVariant! +} + +"""The input fields for the bundle components for core.""" +input ProductVariantGroupRelationshipInput { + """The ID of the product variant that's a component of the bundle.""" + id: ID! + + """ + The number of units of the product variant required to construct one unit of the bundle. + """ + quantity: Int! +} + +"""The input fields for identifying a product variant.""" +input ProductVariantIdentifierInput { + """The ID of the product variant.""" + id: ID + + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product variant. + """ + customId: UniqueMetafieldValueInput +} + +""" +The valid values for the inventory policy of a product variant once it is out of stock. +""" +enum ProductVariantInventoryPolicy { + """Customers can't buy this product variant after it's out of stock.""" + DENY + + """Customers can buy this product variant after it's out of stock.""" + CONTINUE +} + +"""Return type for `productVariantJoinSellingPlanGroups` mutation.""" +type ProductVariantJoinSellingPlanGroupsPayload { + """The product variant object.""" + productVariant: ProductVariant + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""Return type for `productVariantLeaveSellingPlanGroups` mutation.""" +type ProductVariantLeaveSellingPlanGroupsPayload { + """The product variant object.""" + productVariant: ProductVariant + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""The input fields representing a product variant position.""" +input ProductVariantPositionInput { + """Specifies the ID of the product variant to update.""" + id: ID! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int! +} + +"""The compare-at price and price of a variant sharing a currency.""" +type ProductVariantPricePair { + """The compare-at price of the variant with associated currency.""" + compareAtPrice: MoneyV2 + + """The price of the variant with associated currency.""" + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductVariantPricePairs. +""" +type ProductVariantPricePairConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductVariantPricePairEdge!]! + + """ + A list of nodes that are contained in ProductVariantPricePairEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ProductVariantPricePair!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. +""" +type ProductVariantPricePairEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ProductVariantPricePairEdge.""" + node: ProductVariantPricePair! +} + +"""Return type for `productVariantRelationshipBulkUpdate` mutation.""" +type ProductVariantRelationshipBulkUpdatePayload { + """ + The product variants with successfully updated product variant relationships. + """ + parentProductVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductVariantRelationshipBulkUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ProductVariantRelationshipBulkUpdate`. +""" +type ProductVariantRelationshipBulkUpdateUserError implements DisplayableError { + """The error code.""" + code: ProductVariantRelationshipBulkUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantRelationshipBulkUpdateUserError`. +""" +enum ProductVariantRelationshipBulkUpdateUserErrorCode { + """A parent product variant ID or product ID must be provided.""" + PARENT_REQUIRED + + """Unable to create parent product variant.""" + FAILED_TO_CREATE + + """The product variants were not found.""" + PRODUCT_VARIANTS_NOT_FOUND + + """A parent product variant cannot contain itself as a component.""" + CIRCULAR_REFERENCE + + """Nested parent product variants aren't supported.""" + NESTED_PARENT_PRODUCT_VARIANT + + """Product variant relationships must have a quantity greater than 0.""" + INVALID_QUANTITY + + """ + A parent product variant must not contain duplicate product variant relationships. + """ + DUPLICATE_PRODUCT_VARIANT_RELATIONSHIP + + """ + Exceeded the maximum allowable product variant relationships in a parent product variant. + """ + EXCEEDED_PRODUCT_VARIANT_RELATIONSHIP_LIMIT + + """ + A Core type relationship cannot be added to a composite product variant with SFN type relationships. + """ + PRODUCT_VARIANT_RELATIONSHIP_TYPE_CONFLICT + + """Unexpected error.""" + UNEXPECTED_ERROR + + """Unable to remove product variant relationships.""" + FAILED_TO_REMOVE + + """ + The product variant relationships to remove must be specified if all the + parent product variant's components aren't being removed. + """ + MUST_SPECIFY_COMPONENTS + + """Unable to update product variant relationships.""" + FAILED_TO_UPDATE + + """Unable to update parent product variant price.""" + FAILED_TO_UPDATE_PARENT_PRODUCT_VARIANT_PRICE + + """ + A price must be provided for a parent product variant if the price calculation is set to fixed. + """ + UPDATE_PARENT_VARIANT_PRICE_REQUIRED + + """ + Some of the provided product variants are not components of the specified parent product variant. + """ + PRODUCT_VARIANTS_NOT_COMPONENTS + + """ + The products for these product variants are already owned by another App. + """ + PRODUCT_EXPANDER_APP_OWNERSHIP_ALREADY_EXISTS + + """Multipack bundles are not supported.""" + UNSUPPORTED_MULTIPACK_RELATIONSHIP + + """Gift cards cannot be parent product variants.""" + PARENT_PRODUCT_VARIANT_CANNOT_BE_GIFT_CARD + + """Parent product variants cannot require a selling plan.""" + PARENT_PRODUCT_VARIANT_CANNOT_REQUIRE_SELLING_PLAN + + """Combined listing cannot be parent product variants.""" + PARENT_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING + + """Combined listing cannot be child product variants.""" + CHILD_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING +} + +"""The input fields for updating a composite product variant.""" +input ProductVariantRelationshipUpdateInput { + """ + The product variant ID representing that which contains the relationships with other variants. + """ + parentProductVariantId: ID + + """ + A product ID which contains product variants that have relationships with other variants. + """ + parentProductId: ID + + """ + The product variants and associated quantitites to add to the product variant. + """ + productVariantRelationshipsToCreate: [ProductVariantGroupRelationshipInput!] = null + + """ + The product variants and associated quantitites to update in specified product variant. + """ + productVariantRelationshipsToUpdate: [ProductVariantGroupRelationshipInput!] = null + + """ + The bundle component product variants to be removed from the product variant. + """ + productVariantRelationshipsToRemove: [ID!] = null + + """ + Whether to remove all components from the product variant. The default value is `false`. + """ + removeAllProductVariantRelationships: Boolean = false + + """Method in which to update the price of the parent product variant.""" + priceInput: PriceInput = null +} + +"""Return type for `productVariantsBulkCreate` mutation.""" +type ProductVariantsBulkCreatePayload { + """The updated product object.""" + product: Product + + """The newly created variants.""" + productVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductVariantsBulkCreateUserError!]! +} + +""" +The set of strategies available for use on the `productVariantsBulkCreate` mutation. +""" +enum ProductVariantsBulkCreateStrategy { + """ + The default strategy. Deletes the standalone default ("Default Title") variant + when it's the only variant on the product. Preserves the standalone custom variant. + """ + DEFAULT + + """ + Deletes the existing standalone variant when the product has only a single default ("Default Title") or custom variant. + """ + REMOVE_STANDALONE_VARIANT + + """ + Preserves the existing standalone variant when the product has only a single + default ("Default Title") or a single custom variant. + """ + PRESERVE_STANDALONE_VARIANT +} + +"""Error codes for failed product variant bulk create mutations.""" +type ProductVariantsBulkCreateUserError implements DisplayableError { + """The error code.""" + code: ProductVariantsBulkCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkCreateUserError`. +""" +enum ProductVariantsBulkCreateUserErrorCode { + """Input is invalid.""" + INVALID_INPUT + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """On create, this key cannot be used.""" + NO_KEY_ON_CREATE + + """Variant already exists.""" + VARIANT_ALREADY_EXISTS + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Variant price must be greater than or equal to zero.""" + GREATER_THAN_OR_EQUAL_TO + + """Variant options are not enough.""" + NEED_TO_ADD_OPTION_VALUES + + """Variant options are more than the product options.""" + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """Inventory locations cannot exceed the allowed resource limit or 10.""" + TOO_MANY_INVENTORY_LOCATIONS + + """You reached the limit of available SKUs in your current plan.""" + SUBSCRIPTION_VIOLATION + + """Variant options already exist. Please change the variant option(s).""" + VARIANT_ALREADY_EXISTS_CHANGE_OPTION_VALUE + + """Quantity could not be set. The location was not found.""" + TRACKED_VARIANT_LOCATION_NOT_FOUND + + """Input must be for this product.""" + MUST_BE_FOR_THIS_PRODUCT + + """Input is not defined for this shop.""" + NOT_DEFINED_FOR_SHOP + + """Invalid input detected.""" + INVALID + + """Price cannot take a negative value.""" + NEGATIVE_PRICE_VALUE + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """Cannot set name for an option value linked to a metafield.""" + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +"""Return type for `productVariantsBulkDelete` mutation.""" +type ProductVariantsBulkDeletePayload { + """The updated product object.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductVariantsBulkDeleteUserError!]! +} + +"""Error codes for failed bulk variant delete mutations.""" +type ProductVariantsBulkDeleteUserError implements DisplayableError { + """The error code.""" + code: ProductVariantsBulkDeleteUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkDeleteUserError`. +""" +enum ProductVariantsBulkDeleteUserErrorCode { + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """Cannot delete default variant.""" + CANNOT_DELETE_LAST_VARIANT + + """The variant does not exist.""" + AT_LEAST_ONE_VARIANT_DOES_NOT_BELONG_TO_THE_PRODUCT + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION +} + +""" +The input fields for specifying a product variant to create as part of a variant bulk mutation. +""" +input ProductVariantsBulkInput { + """The value of the barcode associated with the product variant.""" + barcode: String + + """The compare-at price of the variant.""" + compareAtPrice: Money + + """Specifies the product variant to update or delete.""" + id: ID + + """The URL of the media to associate with the variant.""" + mediaSrc: [String!] + + """ + Whether customers are allowed to place an order for the variant when it's out of stock. Defaults to `DENY`. + """ + inventoryPolicy: ProductVariantInventoryPolicy + + """ + The inventory quantities at each location where the variant is stocked. The number of elements + in the array of inventory quantities can't exceed the amount specified for the plan. + Supported as input with the `productVariantsBulkCreate` mutation only. + """ + inventoryQuantities: [InventoryLevelInput!] + + """The inventory item associated with the variant, used for unit cost.""" + inventoryItem: InventoryItemInput + + """The ID of the media that's associated with the variant.""" + mediaId: ID + + """The additional customizable information about the product variant.""" + metafields: [MetafieldInput!] + + """ + The custom properties that a shop owner uses to define product variants. + """ + optionValues: [VariantOptionValueInput!] + + """The price of the variant.""" + price: Money + + """Whether the variant is taxable.""" + taxable: Boolean + + """The tax code associated with the variant.""" + taxCode: String + + """The unit price measurement for the product variant.""" + unitPriceMeasurement: UnitPriceMeasurementInput + + """Whether the unit price should be shown for this product variant.""" + showUnitPrice: Boolean + + """ + Whether a product variant requires components. The default value is `false`. + If `true`, then the product variant can only be purchased as a parent bundle with components and it will be + omitted from channels that don't support bundles. + """ + requiresComponents: Boolean +} + +"""Return type for `productVariantsBulkReorder` mutation.""" +type ProductVariantsBulkReorderPayload { + """The updated product.""" + product: Product + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductVariantsBulkReorderUserError!]! +} + +"""Error codes for failed bulk product variants reorder operation.""" +type ProductVariantsBulkReorderUserError implements DisplayableError { + """The error code.""" + code: ProductVariantsBulkReorderUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkReorderUserError`. +""" +enum ProductVariantsBulkReorderUserErrorCode { + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product variant does not exist.""" + MISSING_VARIANT + + """Product variant position cannot be zero or negative number.""" + INVALID_POSITION + + """Product variant IDs must be unique.""" + DUPLICATED_VARIANT_ID + + """Something went wrong, please try again.""" + GENERIC_ERROR +} + +"""Return type for `productVariantsBulkUpdate` mutation.""" +type ProductVariantsBulkUpdatePayload { + """The updated product object.""" + product: Product + + """The updated variants.""" + productVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ProductVariantsBulkUpdateUserError!]! +} + +"""Error codes for failed variant bulk update mutations.""" +type ProductVariantsBulkUpdateUserError implements DisplayableError { + """The error code.""" + code: ProductVariantsBulkUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ProductVariantsBulkUpdateUserError`. +""" +enum ProductVariantsBulkUpdateUserErrorCode { + """Input is invalid.""" + INVALID_INPUT + + """Mutually exclusive input fields provided.""" + CANNOT_SPECIFY_BOTH + + """Mandatory field input field missing.""" + MUST_SPECIFY_ONE_OF_PAIR + + """Option value name is too long.""" + OPTION_VALUE_NAME_TOO_LONG + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Product variant is missing ID attribute.""" + PRODUCT_VARIANT_ID_MISSING + + """Product variant does not exist.""" + PRODUCT_VARIANT_DOES_NOT_EXIST + + """Option does not exist.""" + OPTION_DOES_NOT_EXIST + + """Option value does not exist.""" + OPTION_VALUE_DOES_NOT_EXIST + + """Input must be for this product.""" + MUST_BE_FOR_THIS_PRODUCT + + """Input is not defined for this shop.""" + NOT_DEFINED_FOR_SHOP + + """Product is suspended.""" + PRODUCT_SUSPENDED + + """ + Inventory quantities can only be provided during create. To update inventory + for existing variants, use inventoryAdjustQuantities. + """ + NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE + + """The variant already exists.""" + VARIANT_ALREADY_EXISTS + + """The price of the variant must be greater than or equal to zero.""" + GREATER_THAN_OR_EQUAL_TO + + """Variant options are not enough.""" + NEED_TO_ADD_OPTION_VALUES + + """Variant options are more than the product options.""" + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """You reached the limit of available SKUs in your current plan.""" + SUBSCRIPTION_VIOLATION + + """Inventory quantities cannot be provided during update.""" + NO_INVENTORY_QUANTITES_DURING_UPDATE + + """Price cannot take a negative value.""" + NEGATIVE_PRICE_VALUE + + """The input value is blank.""" + BLANK + + """The input value is too short.""" + TOO_SHORT + + """The input value is too long.""" + TOO_LONG + + """Metafield value is invalid.""" + INVALID_VALUE + + """Cannot set name for an option value linked to a metafield.""" + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """Operation is not supported for a combined listing parent product.""" + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED +} + +"""The input fields for specifying a product variant to create or update.""" +input ProductVariantSetInput { + """ + 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 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 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 + + """ + Whether customers are allowed to place an order for the product variant when it's out of stock. Defaults to `DENY`. + """ + inventoryPolicy: ProductVariantInventoryPolicy + + """ + The inventory quantities at each location where the variant is stocked. + If you're updating an existing variant, then you can only update the + quantities at locations where the variant is already stocked. + + The total number of inventory quantities across all variants in the mutation can't exceed 50000. + """ + inventoryQuantities: [ProductSetInventoryInput!] + + """The inventory item associated with the variant, used for unit cost.""" + inventoryItem: InventoryItemInput + + """ + 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 + + """The SKU for the variant. Case-sensitive string.""" + sku: String + + """Whether the variant is taxable.""" + taxable: Boolean + + """The tax code associated with the variant.""" + taxCode: String + + """The unit price measurement for the product variant.""" + unitPriceMeasurement: UnitPriceMeasurementInput + + """Whether or not unit price should be shown for this product variant.""" + showUnitPrice: Boolean +} + +"""The set of valid sort keys for the ProductVariant query.""" +enum ProductVariantSortKeys { + """Sort by the `full_title` value.""" + FULL_TITLE + + """Sort by the `id` value.""" + ID + + """ + Sort by available inventory quantity in the location specified by the `query:"location_id:"` argument. + Don't use this sort key when no `location_id` in query is specified. + """ + INVENTORY_LEVELS_AVAILABLE + + """Sort by the `inventory_management` value.""" + INVENTORY_MANAGEMENT + + """Sort by the `inventory_policy` value.""" + INVENTORY_POLICY + + """Sort by the `inventory_quantity` value.""" + INVENTORY_QUANTITY + + """Sort by the `name` value.""" + NAME + + """Sort by the `popular` value.""" + POPULAR + + """Sort by the `position` value.""" + POSITION + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE + + """Sort by the `sku` value.""" + SKU + + """Sort by the `title` value.""" + TITLE +} + +"""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 +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """The list of collections published to the publication.""" + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! + + """Whether the collection is available to the publication.""" + hasCollection( + """Collection ID to check.""" + id: ID! + ): Boolean! + + """A globally-unique ID.""" + id: ID! + + """ + The list of products included, but not necessarily published, in the publication. + """ + includedProducts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 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 + ): ProductConnection! + + """ + The count of products included in the publication. Limited to a maximum of 10000 by default. + """ + includedProductsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Name of the publication.""" + name: String! @deprecated(reason: "Use [Catalog.title](https://shopify.dev/api/admin-graphql/unstable/interfaces/Catalog#field-catalog-title) instead.") + + """A background operation associated with this publication.""" + operation: PublicationOperation + + """ + The product publications for the list of products published to the publication. + """ + productPublicationsV3( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """The list of products published to the publication.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 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 + ): ProductConnection! + + """Whether the publication supports future publishing.""" + supportsFuturePublishing: Boolean! +} + +"""An auto-generated type for paginating through multiple Publications.""" +type PublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PublicationEdge!]! + + """ + A list of nodes that are contained in PublicationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [Publication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields for creating a publication.""" +input PublicationCreateInput { + """The ID of the catalog.""" + catalogId: ID + + """ + Whether to create an empty publication or prepopulate it with all products. + """ + defaultState: PublicationCreateInputPublicationDefaultState = EMPTY + + """ + Whether to automatically add newly created products to this publication. + """ + autoPublish: Boolean = false +} + +""" +The input fields for the possible values for the default state of a publication. +""" +enum PublicationCreateInputPublicationDefaultState { + """The publication is empty.""" + EMPTY + + """The publication is populated with all products.""" + ALL_PRODUCTS +} + +"""Return type for `publicationCreate` mutation.""" +type PublicationCreatePayload { + """The publication that's been created.""" + publication: Publication + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PublicationUserError!]! +} + +"""Return type for `publicationDelete` mutation.""" +type PublicationDeletePayload { + """The ID of the publication that was deleted.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PublicationUserError!]! +} + +""" +An auto-generated type which holds one Publication and a cursor during pagination. +""" +type PublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of PublicationEdge.""" + node: Publication! +} + +"""The input fields required to publish a resource.""" +input PublicationInput { + """ID of the publication.""" + publicationId: ID + + """ + The date and time that the resource was published. Setting this to a date in + the future will schedule the resource to be published. Only online store + channels support future publishing. This field has no effect if you include it + in the `publishableUnpublish` mutation. + """ + publishDate: DateTime +} + +"""The possible types of publication operations.""" +union PublicationOperation = AddAllProductsOperation | CatalogCsvOperation | PublicationResourceOperation + +"""A bulk update operation on a publication.""" +type PublicationResourceOperation implements Node & ResourceOperation { + """A globally-unique ID.""" + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """Represents a rows objects within this background operation.""" + rowCount: RowCount + + """The status of this operation.""" + status: ResourceOperationStatus! +} + +"""The input fields for updating a publication.""" +input PublicationUpdateInput { + """ + A list of publishable IDs to add. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToAdd: [ID!] = [] + + """ + A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToRemove: [ID!] = [] + + """ + Whether new products should be automatically published to the publication. + """ + autoPublish: Boolean +} + +"""Return type for `publicationUpdate` mutation.""" +type PublicationUpdatePayload { + """The publication that's been updated.""" + publication: Publication + + """The list of errors that occurred from executing the mutation.""" + userErrors: [PublicationUserError!]! +} + +"""Defines errors encountered while managing a publication.""" +type PublicationUserError implements DisplayableError { + """The error code.""" + code: PublicationUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `PublicationUserError`.""" +enum PublicationUserErrorCode { + """Can't perform this action on a publication.""" + UNSUPPORTED_PUBLICATION_ACTION + + """Publication not found.""" + PUBLICATION_NOT_FOUND + + """The publication is currently being modified. Please try again later.""" + PUBLICATION_LOCKED + + """A catalog publication can only contain products.""" + UNSUPPORTED_PUBLISHABLE_TYPE + + """Publishable ID not found.""" + INVALID_PUBLISHABLE_ID + + """Market does not exist.""" + MARKET_NOT_FOUND + + """Catalog does not exist.""" + CATALOG_NOT_FOUND + + """Can't modify a publication that belongs to an app catalog.""" + CANNOT_MODIFY_APP_CATALOG_PUBLICATION + + """Can't modify a publication that belongs to a market catalog.""" + CANNOT_MODIFY_MARKET_CATALOG_PUBLICATION + + """Cannot modify a catalog for an app.""" + CANNOT_MODIFY_APP_CATALOG + + """Cannot modify a catalog for a market.""" + CANNOT_MODIFY_MARKET_CATALOG + + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is blank.""" + BLANK + + """ + A product publication cannot be created because the catalog type associated + with this publication does not permit publications of this product type. + """ + PRODUCT_TYPE_INCOMPATIBLE_WITH_CATALOG_TYPE + + """The limit for simultaneous publication updates has been exceeded.""" + PUBLICATION_UPDATE_LIMIT_EXCEEDED +} + +""" +Represents a resource that can be published to a channel. +A publishable resource can be either a Product or Collection. +""" +interface Publishable { + """ + The number of + [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that a resource is published to, without + [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback). + """ + availablePublicationsCount: Count + + """ + The 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( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled to be published. + """ + onlyPublished: Boolean = true + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The 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( + """ + Whether to return only the resources that are currently published. If false, + then also returns the resources that are scheduled or staged to be published. + """ + onlyPublished: Boolean = true + + """Filter publications by catalog type.""" + catalogType: CatalogType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ResourcePublicationV2Connection! + + """The list of channels that the resource is not published to.""" + unpublishedChannels( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PublicationConnection! +} + +"""Return type for `publishablePublish` mutation.""" +type PublishablePublishPayload { + """Resource that has been published.""" + publishable: Publishable + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `publishablePublishToCurrentChannel` mutation.""" +type PublishablePublishToCurrentChannelPayload { + """Resource that has been published.""" + publishable: Publishable + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `publishableUnpublish` mutation.""" +type PublishableUnpublishPayload { + """Resource that has been unpublished.""" + publishable: Publishable + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `publishableUnpublishToCurrentChannel` mutation.""" +type PublishableUnpublishToCurrentChannelPayload { + """Resource that has been unpublished.""" + publishable: Publishable + + """The user's shop.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `pubSubServerPixelUpdate` mutation.""" +type PubSubServerPixelUpdatePayload { + """The server pixel as configured by the mutation.""" + serverPixel: ServerPixel + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ErrorsServerPixelUserError!]! +} + +"""Return type for `pubSubWebhookSubscriptionCreate` mutation.""" +type PubSubWebhookSubscriptionCreatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [PubSubWebhookSubscriptionCreateUserError!]! + + """The webhook subscription that was created.""" + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionCreate`. +""" +type PubSubWebhookSubscriptionCreateUserError implements DisplayableError { + """The error code.""" + code: PubSubWebhookSubscriptionCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionCreateUserError`. +""" +enum PubSubWebhookSubscriptionCreateUserErrorCode { + """Invalid parameters provided.""" + INVALID_PARAMETERS + + """Address for this topic has already been taken.""" + TAKEN +} + +"""The input fields for a PubSub webhook subscription.""" +input PubSubWebhookSubscriptionInput { + """The format in which the webhook subscription should send the data.""" + format: WebhookSubscriptionFormat + + """ + The list of fields to be included in the webhook subscription. Only the fields + specified will be included in the webhook payload. If null, then all fields + will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). + """ + includeFields: [String!] + + """ + A constraint specified using search syntax that ensures only webhooks that + match the specified filter are emitted. See our [guide on + filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. + """ + filter: String + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!] + + """ + A list of identifiers specifying metafields to include in the webhook payload. + """ + metafields: [HasMetafieldsMetafieldIdentifierInput!] + + """The Pub/Sub project ID.""" + pubSubProject: String! + + """The Pub/Sub topic ID.""" + pubSubTopic: String! +} + +"""Return type for `pubSubWebhookSubscriptionUpdate` mutation.""" +type PubSubWebhookSubscriptionUpdatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [PubSubWebhookSubscriptionUpdateUserError!]! + + """The webhook subscription that was updated.""" + webhookSubscription: WebhookSubscription +} + +""" +An error that occurs during the execution of `PubSubWebhookSubscriptionUpdate`. +""" +type PubSubWebhookSubscriptionUpdateUserError implements DisplayableError { + """The error code.""" + code: PubSubWebhookSubscriptionUpdateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `PubSubWebhookSubscriptionUpdateUserError`. +""" +enum PubSubWebhookSubscriptionUpdateUserErrorCode { + """Invalid parameters provided.""" + INVALID_PARAMETERS + + """Address for this topic has already been taken.""" + TAKEN +} + +""" +Represents information about the purchasing company for the order or draft order. +""" +type PurchasingCompany { + """The company associated to the order or draft order.""" + company: Company! + + """The company contact associated to the order or draft order.""" + contact: CompanyContact + + """The company location associated to the order or draft order.""" + location: CompanyLocation! +} + +""" +The input fields for a purchasing company, which is a combination of company, company contact, and company location. +""" +input PurchasingCompanyInput { + """ID of the company.""" + companyId: ID! + + """ID of the company contact.""" + companyContactId: ID! + + """ID of the company location.""" + companyLocationId: ID! +} + +""" +Represents information about the purchasing entity for the order or draft order. +""" +union PurchasingEntity = Customer | PurchasingCompany + +""" +The input fields for a purchasing entity. Can either be a customer or a purchasing company. +""" +input PurchasingEntityInput { + """Represents a customer. Null if there's a purchasing company.""" + customerId: ID + + """Represents a purchasing company. Null if there's a customer.""" + purchasingCompany: PurchasingCompanyInput +} + +""" +Quantity price breaks lets you offer different rates that are based on the +amount of a specific variant being ordered. +""" +type QuantityPriceBreak implements Node { + """A globally-unique ID.""" + id: ID! + + """Minimum quantity required to reach new quantity break price.""" + minimumQuantity: Int! + + """The price of variant after reaching the minimum quanity.""" + price: MoneyV2! + + """The price list associated with this quantity break.""" + priceList: PriceList! + + """The product variant associated with this quantity break.""" + variant: ProductVariant! +} + +""" +An auto-generated type for paginating through multiple QuantityPriceBreaks. +""" +type QuantityPriceBreakConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityPriceBreakEdge!]! + + """ + A list of nodes that are contained in QuantityPriceBreakEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityPriceBreak!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination. +""" +type QuantityPriceBreakEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of QuantityPriceBreakEdge.""" + node: QuantityPriceBreak! +} + +""" +The input fields and values to use when creating quantity price breaks. +""" +input QuantityPriceBreakInput { + """The product variant ID associated with the quantity break.""" + variantId: ID! + + """ + The price of the product variant when its quantity meets the break's minimum quantity. + """ + price: MoneyInput! + + """The minimum required quantity for a variant to qualify for this price.""" + minimumQuantity: Int! +} + +"""The set of valid sort keys for the QuantityPriceBreak query.""" +enum QuantityPriceBreakSortKeys { + """Sort by the `id` value.""" + ID + + """Sort by the `minimum_quantity` value.""" + MINIMUM_QUANTITY +} + +"""The input fields used to update quantity pricing.""" +input QuantityPricingByVariantUpdateInput { + """A list of quantity price breaks to add.""" + quantityPriceBreaksToAdd: [QuantityPriceBreakInput!]! + + """ + A list of quantity price break IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDelete: [ID!]! + + """ + A list of product variant IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDeleteByVariantId: [ID!] + + """A list of quantity rules to add.""" + quantityRulesToAdd: [QuantityRuleInput!]! + + """A list of variant IDs that identify which quantity rules to remove.""" + quantityRulesToDeleteByVariantId: [ID!]! + + """A list of fixed prices to add.""" + pricesToAdd: [PriceListPriceInput!]! + + """A list of variant IDs that identify which fixed prices to remove.""" + pricesToDeleteByVariantId: [ID!]! +} + +"""Return type for `quantityPricingByVariantUpdate` mutation.""" +type QuantityPricingByVariantUpdatePayload { + """ + The variants for which quantity pricing was created successfully in the price list. + """ + productVariants: [ProductVariant!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [QuantityPricingByVariantUserError!]! +} + +"""Error codes for failed volume pricing operations.""" +type QuantityPricingByVariantUserError implements DisplayableError { + """The error code.""" + code: QuantityPricingByVariantUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `QuantityPricingByVariantUserError`. +""" +enum QuantityPricingByVariantUserErrorCode { + """The input value is blank.""" + BLANK + + """Price List does not exist.""" + PRICE_LIST_NOT_FOUND + + """ + Something went wrong when trying to update quantity pricing. Please try again later. + """ + GENERIC_ERROR + + """Invalid quantity price break.""" + QUANTITY_PRICE_BREAK_ADD_INVALID + + """Quantity price break's fixed price not found.""" + QUANTITY_PRICE_BREAK_ADD_PRICE_LIST_PRICE_NOT_FOUND + + """Exceeded the allowed number of quantity price breaks per variant.""" + QUANTITY_PRICE_BREAK_ADD_LIMIT_EXCEEDED + + """Price list and quantity price break currency mismatch.""" + QUANTITY_PRICE_BREAK_ADD_CURRENCY_MISMATCH + + """Failed to save quantity price break.""" + QUANTITY_PRICE_BREAK_ADD_FAILED_TO_SAVE + + """Quantity price break miniumum is less than the quantity rule minimum.""" + QUANTITY_PRICE_BREAK_ADD_MIN_LOWER_THAN_QUANTITY_RULES_MIN + + """ + Quantity price break miniumum is higher than the quantity rule maximum. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_HIGHER_THAN_QUANTITY_RULES_MAX + + """ + Quantity price break miniumum is not multiple of the quantity rule increment. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_NOT_A_MULTIPLE_OF_QUANTITY_RULES_INCREMENT + + """Quantity price break variant not found.""" + QUANTITY_PRICE_BREAK_ADD_VARIANT_NOT_FOUND + + """ + Quantity price breaks to add inputs must be unique by variant id and minimum quantity. + """ + QUANTITY_PRICE_BREAK_ADD_DUPLICATE_INPUT_FOR_VARIANT_AND_MIN + + """Quantity price break not found.""" + QUANTITY_PRICE_BREAK_DELETE_NOT_FOUND + + """Failed to delete quantity price break.""" + QUANTITY_PRICE_BREAK_DELETE_FAILED + + """Quantity rule variant not found.""" + QUANTITY_RULE_ADD_VARIANT_NOT_FOUND + + """Quantity rule minimum is higher than the quantity price break minimum.""" + QUANTITY_RULE_ADD_MIN_HIGHER_THAN_QUANTITY_PRICE_BREAK_MIN + + """Quantity rule maximum is less than the quantity price break minimum.""" + QUANTITY_RULE_ADD_MAX_LOWER_THAN_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule increment must be a multiple of the quantity price break minimum. + """ + QUANTITY_RULE_ADD_INCREMENT_NOT_A_MULTIPLE_OF_QUANTITY_PRICE_BREAK_MIN + + """Quantity rule catalog context not supported.""" + QUANTITY_RULE_ADD_CATALOG_CONTEXT_NOT_SUPPORTED + + """Quantity rule increment is greater than minimum.""" + QUANTITY_RULE_ADD_INCREMENT_IS_GREATER_THAN_MINIMUM + + """Quantity rule minimum is not a multiple of increment.""" + QUANTITY_RULE_ADD_MINIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """Quantity rule maximum is not a multiple of increment.""" + QUANTITY_RULE_ADD_MAXIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """Quantity rule minimum is greater than maximum.""" + QUANTITY_RULE_ADD_MINIMUM_GREATER_THAN_MAXIMUM + + """Quantity rule increment is less than one.""" + QUANTITY_RULE_ADD_INCREMENT_IS_LESS_THAN_ONE + + """Quantity rule minimum is less than one.""" + QUANTITY_RULE_ADD_MINIMUM_IS_LESS_THAN_ONE + + """Quantity rule maximum is less than one.""" + QUANTITY_RULE_ADD_MAXIMUM_IS_LESS_THAN_ONE + + """Quantity rules to add inputs must be unique by variant id.""" + QUANTITY_RULE_ADD_DUPLICATE_INPUT_FOR_VARIANT + + """Quantity rule not found.""" + QUANTITY_RULE_DELETE_RULE_NOT_FOUND + + """Quantity rule variant not found.""" + QUANTITY_RULE_DELETE_VARIANT_NOT_FOUND + + """Price list and fixed price currency mismatch.""" + PRICE_ADD_CURRENCY_MISMATCH + + """Fixed price's variant not found.""" + PRICE_ADD_VARIANT_NOT_FOUND + + """Prices to add inputs must be unique by variant id.""" + PRICE_ADD_DUPLICATE_INPUT_FOR_VARIANT + + """Price is not fixed.""" + PRICE_DELETE_PRICE_NOT_FIXED + + """Fixed price's variant not found.""" + PRICE_DELETE_VARIANT_NOT_FOUND + + """Variant to delete by is not found.""" + QUANTITY_PRICE_BREAK_DELETE_BY_VARIANT_ID_VARIANT_NOT_FOUND +} + +"""The quantity rule for the product variant in a given context.""" +type QuantityRule { + """ + The value that specifies the quantity increment between minimum and maximum of the rule. + Only quantities divisible by this value will be considered valid. + + The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum + must be divisible by this value. + """ + increment: Int! + + """ + Whether the quantity rule fields match one increment, one minimum and no maximum. + """ + isDefault: Boolean! + + """ + An optional value that defines the highest allowed quantity purchased by the customer. + If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment. + """ + maximum: Int + + """ + The value that defines the lowest allowed quantity purchased by the customer. + The minimum must be a multiple of the quantity rule's increment. + """ + minimum: Int! + + """Whether the values of the quantity rule were explicitly set.""" + originType: QuantityRuleOriginType! + + """The product variant for which the quantity rule is applied.""" + productVariant: ProductVariant! +} + +"""An auto-generated type for paginating through multiple QuantityRules.""" +type QuantityRuleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [QuantityRuleEdge!]! + + """ + A list of nodes that are contained in QuantityRuleEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [QuantityRule!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one QuantityRule and a cursor during pagination. +""" +type QuantityRuleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of QuantityRuleEdge.""" + node: QuantityRule! +} + +""" +The input fields for the per-order quantity rule to be applied on the product variant. +""" +input QuantityRuleInput { + """The quantity increment.""" + increment: Int! + + """The maximum quantity.""" + maximum: Int = null + + """The minimum quantity.""" + minimum: Int! + + """Product variant on which to apply the quantity rule.""" + variantId: ID! +} + +"""The origin of quantity rule on a price list.""" +enum QuantityRuleOriginType { + """Quantity rule is explicitly defined.""" + FIXED + + """Quantity rule falls back to the relative rule.""" + RELATIVE +} + +"""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!]! +} + +"""An error for a failed quantity rule operation.""" +type QuantityRuleUserError implements DisplayableError { + """The error code.""" + code: QuantityRuleUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Possible error codes that can be returned by `QuantityRuleUserError`.""" +enum QuantityRuleUserErrorCode { + """The input value is blank.""" + BLANK + + """Product variant ID does not exist.""" + PRODUCT_VARIANT_DOES_NOT_EXIST + + """Price list does not exist.""" + PRICE_LIST_DOES_NOT_EXIST + + """ + Quantity rule for variant associated with the price list provided does not exist. + """ + VARIANT_QUANTITY_RULE_DOES_NOT_EXIST + + """Minimum must be lower than or equal to the maximum.""" + MINIMUM_IS_GREATER_THAN_MAXIMUM + + """ + Minimum must be less than or equal to all quantity price break minimums + associated with this variant in the specified price list. + """ + MINIMUM_IS_HIGHER_THAN_QUANTITY_PRICE_BREAK_MINIMUM + + """ + Maximum must be greater than or equal to all quantity price break minimums + associated with this variant in the specified price list. + """ + MAXIMUM_IS_LOWER_THAN_QUANTITY_PRICE_BREAK_MINIMUM + + """ + Increment must be a multiple of all quantity price break minimums associated + with this variant in the specified price list. + """ + INCREMENT_NOT_A_MULTIPLE_OF_QUANTITY_PRICE_BREAK_MINIMUM + + """Increment must be lower than or equal to the minimum.""" + INCREMENT_IS_GREATER_THAN_MINIMUM + + """Value must be greater than or equal to 1.""" + GREATER_THAN_OR_EQUAL_TO + + """The maximum must be a multiple of the increment.""" + MAXIMUM_NOT_MULTIPLE_OF_INCREMENT + + """The minimum must be a multiple of the increment.""" + MINIMUM_NOT_MULTIPLE_OF_INCREMENT + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """Quantity rule inputs must be unique by variant id.""" + DUPLICATE_INPUT_FOR_VARIANT + + """ + Something went wrong when trying to save the quantity rule. Please try again later. + """ + GENERIC_ERROR +} + +""" +The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start. +""" +type QueryRoot { + """ + List of abandoned checkouts. Includes checkouts that were recovered after being abandoned. + """ + abandonedCheckouts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AbandonedCheckoutSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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 + ): AbandonedCheckoutConnection! + + """ + Returns the count of abandoned checkouts for the given shop. Limited to a maximum of 10000 by default. + """ + abandonedCheckoutsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a `Abandonment` resource by ID.""" + abandonment( + """The ID of the `Abandonment` to return.""" + id: ID! + ): Abandonment + + """Returns an Abandonment by the Abandoned Checkout ID.""" + abandonmentByAbandonedCheckoutId( + """The ID of the Abandoned Checkout ID to query by.""" + abandonedCheckoutId: ID! + ): Abandonment + + """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!]! + + """A list of app discount types installed by apps.""" + appDiscountTypesNodes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): AppDiscountTypeConnection! + + """ + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AppInstallationSortKeys = INSTALLED_AT + + """The category of app installations to fetch.""" + category: AppInstallationCategory + + """The privacy level of app installations to fetch.""" + privacy: AppInstallationPrivacy = PUBLIC + ): AppInstallationConnection! + + """Returns a `Article` resource by ID.""" + article( + """The ID of the `Article` to return.""" + id: ID! + ): Article + + """List of article authors for the shop.""" + articleAuthors( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ArticleAuthorConnection! + + """List of all article tags.""" + articleTags( + """Type of sort order.""" + sort: ArticleTagSort = ALPHABETICAL + + """The maximum number of tags to return.""" + limit: Int! + ): [String!]! + + """List of the shop's articles.""" + articles( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ArticleSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | 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 + ): ArticleConnection! + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have the `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve the fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders( + """ + The assigment status of the fulfillment orders that should be returned. + If `assignmentStatus` argument is not provided, then + the query will return all assigned fulfillment orders, + except those that have the `CLOSED` status. + """ + assignmentStatus: FulfillmentOrderAssignmentStatus + + """ + Returns fulfillment orders only for certain locations, specified by a list of location IDs. + """ + locationIds: [ID!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! + + """Returns a `DiscountAutomatic` resource by ID.""" + automaticDiscount( + """The ID of the `DiscountAutomatic` to return.""" + id: ID! + ): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") + + """Returns a `DiscountAutomaticNode` resource by ID.""" + automaticDiscountNode( + """The ID of the `DiscountAutomaticNode` to return.""" + id: ID! + ): DiscountAutomaticNode + + """ + Returns a list of [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscountNodes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AutomaticDiscountSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): DiscountAutomaticNodeConnection! + + """List of the shop's automatic discount saved searches.""" + automaticDiscountSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """List of automatic discounts.""" + automaticDiscounts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: AutomaticDiscountSortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): DiscountAutomaticConnection! @deprecated(reason: "Use `automaticDiscountNodes` instead.") + + """The regions that can be used as the backup region of the shop.""" + availableBackupRegions: [MarketRegion!]! + + """ + Returns a list of activated carrier services and associated shop locations that support them. + """ + availableCarrierServices: [DeliveryCarrierServiceAndLocations!]! + + """A list of available locales.""" + 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 + + """List of the shop's blogs.""" + blogs( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: BlogSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): BlogConnection! + + """Count of blogs. Limited to a maximum of 10000 by default.""" + blogsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a list of Business Entities associated with the shop.""" + 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 + + """Retrieve a list of CarrierServices.""" + carrierServices( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CarrierServiceSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): DeliveryCarrierServiceConnection! + + """ + Retrieves all cart transform functions currently deployed by your app within + the merchant's store. This query provides comprehensive access to your active + cart modification logic, enabling management and monitoring of bundling and + merchandising features. + + The query returns paginated results with full cart transform details, + including function IDs, configuration settings, and operational status. + + Cart Transform ownership is scoped to your API client, ensuring you only see + and manage functions deployed by your specific app. This isolation prevents + conflicts between different apps while maintaining security boundaries for + sensitive merchandising logic. + + Learn more about [managing cart transforms](https://shopify.dev/docs/api/functions/latest/cart-transform). + """ + cartTransforms( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CartTransformConnection! + + """Returns a `CashTrackingSession` resource by ID.""" + cashTrackingSession( + """The ID of the `CashTrackingSession` to return.""" + id: ID! + ): CashTrackingSession + + """ + Returns a shop's cash tracking sessions for locations with a POS Pro subscription. + + Tip: To query for cash tracking sessions in bulk, you can + [perform a bulk operation](https://shopify.dev/docs/api/usage/bulk-operations/queries). + """ + cashTrackingSessions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CashTrackingSessionsSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 type of the catalogs to be returned.""" + type: CatalogType = null + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CatalogSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CatalogConnection! + + """ + The count of catalogs belonging to the shop. Limited to a maximum of 10000 by default. + """ + catalogsCount( + """The type of the catalogs to be returned.""" + type: CatalogType = null + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CheckoutProfileSortKeys = UPDATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CodeDiscountSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): DiscountCodeNodeConnection! + + """List of the shop's code discount saved searches.""" + codeDiscountSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """ + Retrieves a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) by its ID. + A collection represents a grouping of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + that merchants can display and sell as a group in their [online + store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + + Use the `collection` query when you need to: + + - Manage collection publishing across sales channels + - Access collection metadata and SEO information + - Work with collection rules and product relationships + + A collection can be either a custom ([manual](https://help.shopify.com/manual/products/collections/manual-shopify-collection)) + collection where products are manually added, or a smart ([automated](https://help.shopify.com/manual/products/collections/automated-collections)) + collection where products are automatically included based on defined rules. + Each collection has associated metadata including + title, description, handle, image, and [metafields](https://shopify.dev/docs/apps/build/custom-data/metafields). + """ + collection( + """The ID of the `Collection` to return.""" + id: ID! + ): Collection + + """ + Retrieves a collection by its unique handle identifier. Handles provide a + URL-friendly way to reference collections and are commonly used in storefront + URLs and navigation. + + For example, a collection with the title "Summer Sale" might have the handle + `summer-sale`, allowing you to fetch it directly without knowing the internal ID. + + Use `CollectionByHandle` to: + - Fetch collections for storefront display and navigation + - Build collection-based URLs and routing systems + - Validate collection existence before displaying content + + Handles are automatically generated from collection titles but can be + customized by merchants for SEO and branding purposes. + + Learn more about [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). + """ + collectionByHandle( + """The handle of the collection.""" + handle: String! + ): Collection @deprecated(reason: "Use `collectionByIdentifier` instead.") + + """Return a collection by an identifier.""" + collectionByIdentifier( + """The identifier of the collection.""" + identifier: CollectionIdentifierInput! + ): Collection + + """Lists all rules that can be used to create smart collections.""" + collectionRulesConditions: [CollectionRuleConditions!]! + + """Returns a list of the shop's collection saved searches.""" + collectionSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """ + Retrieves a list of [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) + in a store. Collections are groups of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + that merchants can organize for display in their [online store](https://shopify.dev/docs/apps/build/online-store) and + other [sales channels](https://shopify.dev/docs/apps/build/sales-channels). + For example, an athletics store might create different collections for running attire, shoes, and accessories. + + Use the `collections` query when you need to: + + - Build a browsing interface for a store's product groupings. + - Create collection searching, sorting, and filtering experiences (for example, by title, type, or published status). + - Sync collection data with external systems. + - 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CollectionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): CollectionConnection! + + """Count of collections. Limited to a maximum of 10000 by default.""" + collectionsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a `Comment` resource by ID.""" + comment( + """The ID of the `Comment` to return.""" + id: ID! + ): Comment + + """List of the shop's comments.""" + comments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CommentSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CommentConnection! + + """Returns the list of companies in the shop.""" + companies( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanySortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 + + """Returns the list of company locations in the shop.""" + companyLocations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CompanyLocationSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CompanyLocationConnection! + + """Returns the customer privacy consent policies of a shop.""" + consentPolicy( + """Return the policy with the provided ID.""" + id: ID + + """Return policies with the provided country code.""" + countryCode: PrivacyCountryCode + + """Return policies with the provided region code.""" + regionCode: String + + """Return policies where consent is required or not.""" + consentRequired: Boolean + + """Return policies where data sale opt out is required or not.""" + dataSaleOptOutRequired: Boolean + ): [ConsentPolicy!]! + + """ + List of countries and regions for which consent policies can be created or updated. + """ + consentPolicyRegions: [ConsentPolicyRegion!]! + + """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.") + + """The staff member making the API request.""" + currentStaffMember: StaffMember + + """Returns a `Customer` resource by ID.""" + customer( + """The ID of the `Customer` to return.""" + id: ID! + ): Customer + + """Returns a `CustomerAccountPage` resource by ID.""" + customerAccountPage( + """The ID of the `CustomerAccountPage` to return.""" + id: ID! + ): CustomerAccountPage + + """List of the shop's customer account pages.""" + customerAccountPages( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CustomerAccountPageConnection + + """Return a customer by an identifier.""" + customerByIdentifier( + """The identifier of the customer.""" + identifier: CustomerIdentifierInput! + ): Customer + + """Returns the status of a customer merge request job.""" + customerMergeJobStatus( + """The ID of the job performing the customer merge request.""" + jobId: ID! + ): CustomerMergeRequest + + """Returns a preview of a customer merge request.""" + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CustomerSavedSearchSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): SavedSearchConnection! + + """ + The list of members, such as customers, that's associated with an individual segment. + The maximum page size is 1000. + """ + customerSegmentMembers( + """The ID of the segment.""" + segmentId: ID + + """ + The query that's used to filter the members. The query is composed of a + combination of conditions on facts about customers such as + `email_subscription_status = 'SUBSCRIBED'` with [this + syntax](https://shopify.dev/api/shopifyql/segment-query-language-reference). + """ + query: String + + """The ID of the segment members query.""" + queryId: ID + + """ + The timezone that's used to interpret relative date arguments. The timezone + defaults to UTC if the timezone isn't provided. + """ + timezone: String + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """ + Sort the list by a given key. Valid values: + • `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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): CustomerSegmentMemberConnection! + + """Returns a `CustomerSegmentMembersQuery` resource by ID.""" + customerSegmentMembersQuery( + """The ID of the `CustomerSegmentMembersQuery` to return.""" + id: ID! + ): CustomerSegmentMembersQuery + + """Whether a member, which is a customer, belongs to a segment.""" + customerSegmentMembership( + """The segments to evaluate for the given customer.""" + segmentIds: [ID!]! + + """The ID of the customer that has the membership.""" + customerId: ID! + ): SegmentMembershipResponse! + + """ + Returns a list of + [customers](https://shopify.dev/api/admin-graphql/latest/objects/Customer) in + your Shopify store, including key information such as name, email, location, + and purchase history. + Use this query to segment your audience, personalize marketing campaigns, or + analyze customer behavior by applying filters based on location, order + history, marketing preferences and tags. + The `customers` query supports + [pagination](https://shopify.dev/api/usage/pagination-graphql) and [sorting](https://shopify.dev/api/admin-graphql/latest/enums/CustomerSortKeys). + """ + customers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CustomerSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): CustomerConnection! + + """The number of customers. Limited to a maximum of 10000 by default.""" + 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """The paginated list of deletion events.""" + deletionEvents( + """List of subject types to filter by.""" + subjectTypes: [DeletionEventSubjectType!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DeletionEventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): DeletionEventConnection! @deprecated(reason: "Use `events` instead.") + + """The delivery customization.""" + deliveryCustomization( + """The ID of the delivery customization.""" + id: ID! + ): DeliveryCustomization + + """The delivery customizations.""" + deliveryCustomizations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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( + """ + If `true`, returns only delivery profiles that were created by the merchant. + """ + merchantOwnedOnly: Boolean + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DeliveryProfileConnection! + + """Returns delivery promise participants.""" + deliveryPromiseParticipants( + """The product variant ID to filter by.""" + ownerIds: [ID!] + + """The branded promise handle to filter by.""" + brandedPromiseHandle: String! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DeliveryPromiseParticipantConnection + + """Lookup a delivery promise provider.""" + deliveryPromiseProvider( + """The ID of the location associated with the delivery promise provider.""" + locationId: ID! + ): DeliveryPromiseProvider + + """Represents the delivery promise settings for a shop.""" + deliveryPromiseSettings: DeliveryPromiseSetting! + + """Returns the shop-wide shipping settings.""" + deliverySettings: DeliverySetting + + """ + The total number of discount codes for the shop. Limited to a maximum of 10000 by default. + """ + discountCodesCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a `DiscountNode` resource by ID.""" + discountNode( + """The ID of the `DiscountNode` to return.""" + id: ID! + ): DiscountNode + + """Returns a list of discounts.""" + discountNodes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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. | - `order_discounts`
- `product_discounts`
- + `shipping_discounts` | | - `combines_with:product_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). | - + `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` | + | 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). | - + `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` | + | 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 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 + ): DiscountNodeConnection! + + """ + The total number of discounts for the shop. Limited to a maximum of 10000 by default. + """ + discountNodesCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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. | - `order_discounts`
- `product_discounts`
- + `shipping_discounts` | | - `combines_with:product_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). | - + `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` | + | 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). | - + `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` | + | 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a `DiscountRedeemCodeBulkCreation` resource by ID.""" + discountRedeemCodeBulkCreation( + """The ID of the `DiscountRedeemCodeBulkCreation` to return.""" + id: ID! + ): DiscountRedeemCodeBulkCreation + + """List of the shop's redeemed discount code saved searches.""" + discountRedeemCodeSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DiscountCodeSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 + + """Returns a list of available delivery options for a draft order.""" + draftOrderAvailableDeliveryOptions( + """The fields for the draft order.""" + input: DraftOrderAvailableDeliveryOptionsInput! + + """The search term for the delivery options.""" + search: String + + """The offset for the local pickup options.""" + localPickupFrom: Int + + """The number of local pickup options required.""" + localPickupCount: Int + + """ + Unique token used to trace execution and help optimize the calculation. + """ + sessionToken: String + ): DraftOrderAvailableDeliveryOptions! + + """List of the shop's draft order saved searches.""" + draftOrderSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """Returns a `DraftOrderTag` resource by ID.""" + draftOrderTag( + """The ID of the `DraftOrderTag` to return.""" + id: ID! + ): DraftOrderTag + + """List of saved draft orders.""" + draftOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): DraftOrderConnection! + + """ + Returns the number of draft orders that match the query. Limited to a maximum of 10000 by default. + """ + draftOrdersCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Get a single event by its id.""" + event( + """The ID of the event.""" + id: ID! + ): Event + + """The paginated list of events associated with the store.""" + events( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: EventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 happened. | + | | - `created_at:>2020-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 + ): 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 happened. | + | | - `created_at:>2020-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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """ + Retrieves a paginated list of files that have been uploaded to a Shopify store. Files represent digital assets + that merchants can upload to their store for various purposes including product images, marketing materials, + documents, and brand assets. + + Use the `files` query to retrieve information associated with the following workflows: + + - [Managing product media and images](https://shopify.dev/docs/apps/build/online-store/product-media) + - [Theme development and asset management](https://shopify.dev/docs/storefronts/themes/store/success/brand-assets) + - Brand asset management and [checkout branding](https://shopify.dev/docs/apps/build/checkout/styling/add-favicon) + + Files can include multiple [content types](https://shopify.dev/docs/api/admin-graphql/latest/enums/FileContentType), + such as images, videos, 3D models, and generic files. Each file has + properties like dimensions, file size, alt text for accessibility, and upload status. Files can be filtered + by [media type](https://shopify.dev/docs/api/admin-graphql/latest/enums/MediaContentType) and can be associated with + [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), + [themes](https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStoreTheme), + and other store resources. + """ + files( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FileSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 + + """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( + """Whether to include closed fulfillment orders.""" + includeClosed: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 + + """The configuration for the shop's gift cards.""" + giftCardConfiguration: GiftCardConfiguration! + + """Returns a list of gift cards.""" + giftCards( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: GiftCardSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 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 + ): 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + Returns an + [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) + object by ID. + """ + inventoryItem( + """The ID of the `InventoryItem` to return.""" + id: ID! + ): InventoryItem + + """Returns a list of inventory items.""" + inventoryItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 an inventory shipment by ID.""" + inventoryShipment( + """The ID of the inventory shipment.""" + id: ID! + ): InventoryShipment + + """Returns an inventory transfer by ID.""" + inventoryTransfer( + """The ID of the inventory transfer.""" + id: ID! + ): InventoryTransfer + + """Returns a paginated list of transfers.""" + inventoryTransfers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: TransferSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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 + + """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 + + """Return a location by an identifier.""" + locationByIdentifier( + """The identifier of the location.""" + identifier: LocationIdentifierInput! + ): Location + + """Returns a list of active inventory locations.""" + locations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: LocationSortKeys = NAME + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """Whether to include the legacy locations of fulfillment services.""" + includeLegacy: Boolean = false + + """Whether to include the locations that are deactivated.""" + includeInactive: Boolean = false + ): LocationConnection! + + """ + Returns a list of all origin locations available for a delivery profile. + """ + locationsAvailableForDeliveryProfiles: [Location!] @deprecated(reason: "Use `locationsAvailableForDeliveryProfilesConnection` instead.") + + """ + Returns a list of all origin locations available for a delivery profile. + """ + locationsAvailableForDeliveryProfilesConnection( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): LocationConnection! + + """ + Returns the count of locations for the given shop. Limited to a maximum of 10000 by default. + """ + locationsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a list of fulfillment orders that are on hold.""" + manualHoldsFulfillmentOrders( + """ + The query conditions used to filter fulfillment orders. Only fulfillment + orders corresponding to orders matching the query will be counted. + 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 + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentOrderConnection! + + """Returns a `Market` resource by ID.""" + market( + """The ID of the `Market` to return.""" + id: ID! + ): Market + + """ + Returns the applicable market for a customer based on where they are in the world. + """ + marketByGeography( + """The code for the country where the customer is.""" + countryCode: CountryCode! + ): Market @deprecated(reason: "This `market_by_geography` field will be removed in a future version of the API.") + + """A resource that can have localized values for different markets.""" + marketLocalizableResource( + """Find a market localizable resource by ID.""" + resourceId: ID! + ): MarketLocalizableResource + + """Resources that can have localized values for different markets.""" + marketLocalizableResources( + """Return only resources of a type.""" + resourceType: MarketLocalizableResourceType! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketLocalizableResourceConnection! + + """Resources that can have localized values for different markets.""" + marketLocalizableResourcesByIds( + """Return only resources for given IDs.""" + resourceIds: [ID!]! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketLocalizableResourceConnection! + + """A list of marketing activities associated with the marketing app.""" + marketingActivities( + """The list of marketing activity IDs to filter by.""" + marketingActivityIds: [ID!] = [] + + """ + The list of remote IDs associated with marketing activities to filter by. + """ + remoteIds: [String!] = [] + + """The UTM parameters associated with marketing activities to filter by.""" + utm: UTMInput + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MarketingActivitySortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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 + ): MarketingActivityConnection! + + """Returns a `MarketingActivity` resource by ID.""" + marketingActivity( + """The ID of the `MarketingActivity` to return.""" + id: ID! + ): MarketingActivity + + """Returns a `MarketingEvent` resource by ID.""" + marketingEvent( + """The ID of the `MarketingEvent` to return.""" + id: ID! + ): MarketingEvent + + """A list of marketing events associated with the marketing app.""" + marketingEvents( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MarketingEventSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): MarketingEventConnection! + + """The markets configured for the shop.""" + markets( + """Filters markets by type.""" + type: MarketType = null + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MarketsSortKeys = NAME + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 + + """The shop's menus.""" + menus( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MenuSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MenuConnection! + + """Returns a metafield definition by identifier.""" + metafieldDefinition( + """The identifier of the MetafieldDefinition to return.""" + identifier: MetafieldDefinitionIdentifierInput + ): 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( + """Filter metafield definition by key.""" + key: String + + """Filter metafield definition by namespace.""" + namespace: String + + """Filter the metafield definition by the specific owner type.""" + ownerType: MetafieldOwnerType! + + """Filter the metafield definition by the pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + Filter metafield definitions based on whether they apply to a given resource subtype. + """ + constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier + + """Filter metafield definitions based on whether they are constrained.""" + constraintStatus: MetafieldDefinitionConstraintStatus + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetaobjectDefinitionConnection! + + """All metaobjects for the shop.""" + metaobjects( + """The type of the metaobjects to query.""" + type: String! + + """ + The key of a field to sort with. Supports "id", "type", "updated_at", and "display_name". + """ + sortKey: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): MetaobjectConnection! + + """Return a mobile platform application by its ID.""" + mobilePlatformApplication( + """ID of the mobile platform app.""" + id: ID! + ): MobilePlatformApplication + + """List the mobile platform applications.""" + mobilePlatformApplications( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MobilePlatformApplicationConnection! + + """ + Returns a specific node (any object that implements the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) by ID, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + This field is commonly used for refetching an object. + """ + node( + """The ID of the `Node` to return.""" + id: ID! + ): Node + + """ + Returns the list of nodes (any objects that implement the + [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) + interface) with the given IDs, in accordance with the + [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). + """ + nodes( + """The IDs of the Nodes to return.""" + ids: [ID!]! + ): [Node]! + + """The shop's online store channel.""" + onlineStore: OnlineStore! + + """ + The `order` query retrieves an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/order) by + its ID. This query provides access to comprehensive order information such as + customer details, line items, financial data, and fulfillment status. + + Use the `order` query to retrieve information associated with the following processes: + + - [Order management and fulfillment](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps) + - [Financial reporting](https://help.shopify.com/manual/finance) + - [Customer purchase history](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/customers-reports) + and [transaction analysis](https://shopify.dev/docs/apps/launch/billing/view-charges-earnings#transaction-data-through-the-graphql-admin-api) + - [Shipping](https://shopify.dev/docs/apps/build/checkout/delivery-shipping) and [inventory management](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps) + + You can only retrieve the last 60 days worth of orders from a store by + default. If you want to access older orders, then you need to [request access to all + orders](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions). + + For large order datasets, consider using [bulk operations](https://shopify.dev/docs/api/usage/bulk-operations/queries). + Bulk operations handle pagination automatically and allow you to retrieve data + asynchronously without being constrained by API rate limits. + Learn more about [creating orders](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate) + and [building order management + apps](https://shopify.dev/docs/apps/build/orders-fulfillment). + """ + order( + """The ID of the `Order` to return.""" + id: ID! + ): Order + + """Return an order by an identifier.""" + orderByIdentifier( + """The identifier of the order.""" + identifier: OrderIdentifierInput! + ): Order + + """Returns a `OrderEditSession` resource by ID.""" + orderEditSession( + """The ID of the `OrderEditSession` to return.""" + id: ID! + ): OrderEditSession + + """ + Returns a payment status by payment reference ID. Used to check the status of a deferred payment. + """ + orderPaymentStatus( + """Unique identifier returned by orderCreatePayment.""" + paymentReferenceId: String! + + """ID of the order for which the payment was initiated.""" + orderId: ID! + ): OrderPaymentStatus + + """List of the shop's order saved searches.""" + orderSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """ + Returns a list of + [orders](https://shopify.dev/api/admin-graphql/latest/objects/Order) placed in + the store, including data such as order status, customer, and line item details. + Use the `orders` query to build reports, analyze sales performance, or + automate fulfillment workflows. The `orders` query supports + [pagination](https://shopify.dev/docs/api/usage/pagination-graphql), + [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/orders#arguments-query). + """ + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = PROCESSED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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 + ): OrderConnection! + + """ + Returns the count of orders for the given shop. Limited to a maximum of 10000 by default. + """ + ordersCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Returns a `Page` resource by ID.""" + page( + """The ID of the `Page` to return.""" + id: ID! + ): Page + + """List of the shop's pages.""" + pages( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PageSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): PageConnection! + + """Count of pages. Limited to a maximum of 10000 by default.""" + pagesCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """The payment customization.""" + paymentCustomization( + """The ID of the payment customization.""" + id: ID! + ): PaymentCustomization + + """The payment customizations.""" + paymentCustomizations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 price list resource by ID.""" + priceList( + """The ID of the `PriceList` to return.""" + id: ID! + ): PriceList + + """All price lists for a shop.""" + priceLists( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PriceListSortKeys = ID + ): PriceListConnection! + + """The primary market of the shop.""" + primaryMarket: Market! @deprecated(reason: "Use `backupRegion` instead.") + + """Privacy related settings for a shop.""" + privacySettings: PrivacySettings! + + """ + Retrieves a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) by its ID. + A product is an item that a merchant can sell in their store. + + Use the `product` query when you need to: + + - Access essential product data (for example, title, description, price, images, SEO metadata, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants and product options. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + product( + """The ID of the `Product` to return.""" + id: ID! + ): Product + + """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.") + + """Return a product by an identifier.""" + productByIdentifier( + """The identifier of the product.""" + identifier: ProductIdentifierInput! + ): Product + + """Returns the product duplicate job.""" + productDuplicateJob( + """An ID of a product duplicate job to fetch.""" + id: ID! + ): ProductDuplicateJob! + + """Returns a ProductFeed resource by ID.""" + productFeed( + """The ID of the ProductFeed to return.""" + id: ID! + ): ProductFeed + + """The product feeds for the shop.""" + productFeeds( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductFeedConnection! + + """ + Returns a ProductOperation resource by ID. + + This can be used to query the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), using + the ID that was returned + [when the product was created or updated](https://shopify.dev/api/admin/migrate/new-product-model/sync-data#create-a-product-with-variants-and-options-asynchronously) + by the + [ProductSet](https://shopify.dev/api/admin-graphql/current/mutations/productSet) mutation. + + The `status` field indicates whether the operation is `CREATED`, `ACTIVE`, or `COMPLETE`. + + The `product` field provides the details of the created or updated product. + + For the + [ProductSetOperation](https://shopify.dev/api/admin-graphql/current/objects/ProductSetOperation), the + `userErrors` field provides mutation errors that occurred during the operation. + """ + productOperation( + """The ID of the `ProductOperation` to return.""" + id: ID! + ): ProductOperation + + """ + Retrieves product resource feedback for the currently authenticated app, + providing insights into product data quality, completeness, and optimization + opportunities. This feedback helps apps guide merchants toward better product + listings and improved store performance. + + For example, an SEO app might receive feedback indicating that certain + products lack meta descriptions or have suboptimal titles, enabling the app to + provide specific recommendations for improving search visibility and + conversion rates. + + Use `ProductResourceFeedback` to: + - Display product optimization recommendations to merchants + - Identify data quality issues across product catalogs + - Build product improvement workflows and guided experiences + - Track progress on product listing completeness and quality + - Implement automated product auditing and scoring systems + - Generate reports on catalog health and optimization opportunities + - Provide contextual suggestions within product editing interfaces + + The feedback system evaluates products against various criteria including SEO + best practices, required fields, media quality, and sales channel + requirements. Each feedback item includes specific details about the issue, + suggested improvements, and priority levels. + + Feedback is app-specific and reflects the particular focus of your application + - marketing apps receive different insights than inventory management apps. + The system continuously updates as merchants make changes, providing real-time + guidance for product optimization. + + This resource is particularly valuable for apps that help merchants improve + their product listings, optimize for search engines, or enhance their overall + catalog quality. The feedback enables proactive suggestions rather than + reactive problem-solving. + + Learn more about [product optimization](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + """ + productResourceFeedback( + """The product associated with the resource feedback.""" + id: ID! + ): ProductResourceFeedback + + """Returns a list of the shop's product saved searches.""" + productSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """ + A list of tags that have been added to products. + The maximum page size is 5000. + """ + productTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StringConnection + + """ + The list of types added to products. + The maximum page size is 1000. + """ + productTypes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StringConnection + + """ + Retrieves a [product variant](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) by its ID. + + A product variant is a specific version of a + [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariant` query when you need to: + + - Access essential product variant data (for example, title, price, image, and metafields). + - Build product detail pages and manage inventory. + - Handle international sales with localized pricing and content. + - Manage product variants that are part of a bundle or selling plan. + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariant( + """The ID of the `ProductVariant` to return.""" + id: ID! + ): ProductVariant + + """Return a product variant by an identifier.""" + productVariantByIdentifier( + """The identifier of the product variant.""" + identifier: ProductVariantIdentifierInput! + ): ProductVariant + + """ + Retrieves a list of [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariant) + associated with a [product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product). + + A product variant is a specific version of a product that comes in more than + one [option](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption), + such as size or color. For example, if a merchant sells t-shirts with options for size and color, + then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another. + + Use the `productVariants` query when you need to: + + - Search for product variants by attributes such as SKU, barcode, or inventory quantity. + - Filter product variants by attributes, such as whether they're gift cards or have custom metafields. + - Fetch product variants for bulk operations, such as updating prices or inventory. + - Preload data for product variants, such as inventory items, selected options, or associated products. + + The `productVariants` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + to handle large product catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/productVariants#arguments-savedSearchId) + for frequently used product variant queries. + + The `productVariants` query returns product variants with their associated metadata, including: + + - Basic product variant information (for example, title, SKU, barcode, price, and inventory) + - Media attachments (for example, images and videos) + - Associated products, selling plans, bundles, and metafields + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + productVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductVariantSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): ProductVariantConnection! + + """Count of product variants. Limited to a maximum of 10000 by default.""" + productVariantsCount( + """No supported search fields.""" + query: String + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + The list of vendors added to products. + The maximum page size is 1000. + """ + productVendors( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StringConnection + + """ + Retrieves a list of [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) + in a store. Products are the items that merchants can sell in their store. + + Use the `products` query when you need to: + + - Build a browsing interface for a product catalog. + - Create product + [searching](https://shopify.dev/docs/api/usage/search-syntax), [sorting](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-sortKey), and [filtering](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-query) experiences. + - Implement product recommendations. + - Sync product data with external systems. + + The `products` query supports [pagination](https://shopify.dev/docs/api/usage/pagination-graphql) + to handle large product catalogs and [saved searches](https://shopify.dev/docs/api/admin-graphql/latest/queries/products#arguments-savedSearchId) + for frequently used product queries. + + The `products` query returns products with their associated metadata, including: + + - Basic product information (for example, title, description, vendor, and type) + - Product options and product variants, with their prices and inventory + - Media attachments (for example, images and videos) + - SEO metadata + - Product categories and tags + - Product availability and publishing statuses + + Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components). + """ + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 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 + ): ProductConnection! + + """Count of products. 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` | + | 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 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` | + | 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 | 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'` | + | 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + The list of publicly-accessible Admin API versions, including supported + versions, the release candidate, and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """Lookup a publication by ID.""" + publication( + """The ID of the Publication to return.""" + id: ID! + ): Publication + + """List of publications.""" + publications( + """Filter publications by catalog type.""" + catalogType: CatalogType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): PublicationConnection! + + """Count of publications. Limited to a maximum of 10000 by default.""" + publicationsCount( + """Filter publications by catalog type.""" + catalogType: CatalogType + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """ + Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. + """ + publishedProductsCount( + """The ID of the publication that the products are published to.""" + publicationId: ID! + + """The maximum number of products to count.""" + limit: Int = 10000 + ): Count + + """ + Retrieves a [refund](https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund) by its ID. + A refund represents a financial record of money returned to a customer from an order. + It provides a comprehensive view of all refunded amounts, transactions, and restocking + instructions associated with returning products or correcting order issues. + + Use the `refund` query to retrieve information associated with the following workflows: + + - Displaying refund details in order management interfaces + - Building customer service tools for reviewing refund history + - Creating reports on refunded amounts and reasons + - Auditing refund transactions and payment gateway records + - Tracking inventory impacts from refunded items + + A refund is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and includes [refund line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem) + that specify which items were refunded. Each refund processes through + [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) + that handle the actual money transfer back to the customer. + """ + refund( + """The ID of the Refund to return.""" + id: ID! + ): Refund + + """ + Retrieves a return by its ID. A return represents the intent of a buyer to ship one or more items from an + order back to a merchant or a third-party fulfillment location. + + Use the `return` query to retrieve information associated with the following workflows: + + - [Managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) + - [Processing exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges) + - [Tracking reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders) + + A return is associated with an + [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) + and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). + Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), + which indicates the state of the return. + """ + return( + """ + The [globally-unique ID](https://shopify.dev/docs/api/usage/gids) + 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( + """Order ID that will scope all returnable fulfillments.""" + orderId: ID! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReturnableFulfillmentConnection! + + """Lookup a reverse delivery by ID.""" + reverseDelivery( + """The ID of the ReverseDelivery to return.""" + id: ID! + ): ReverseDelivery + + """Lookup a reverse fulfillment order by ID.""" + reverseFulfillmentOrder( + """The ID of the reverse fulfillment order to return.""" + id: ID! + ): ReverseFulfillmentOrder + + """ +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

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

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + + A list of script tags. + """ + scriptTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + + """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( + """Returns the elements of a list by keyword or term.""" + search: String! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + ): SegmentFilterConnection! + + """A list of filters.""" + segmentFilters( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): SegmentFilterConnection! + + """A list of a shop's segment migrations.""" + segmentMigrations( + """Search a segment migration by its saved search ID.""" + savedSearchId: ID + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): SegmentMigrationConnection! + + """ + The list of suggested values corresponding to a particular filter for a + segment. A segment is a group of members, such as customers, that meet + specific criteria. + """ + segmentValueSuggestions( + """Returns the elements of a list by keyword or term.""" + search: String! + + """Returns the elements of a list by filter handle.""" + filterQueryName: String + + """Returns the elements of a list by filter parameter name.""" + functionParameterQueryName: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): SegmentValueConnection! + + """A list of a shop's segments.""" + segments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: SegmentSortKeys = CREATION_DATE + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 + + """List Selling Plan Groups.""" + sellingPlanGroups( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SellingPlanGroupSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ShopPayPaymentRequestReceiptsSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 the Shopify Functions owned by the querying API client installed on the shop. + """ + shopifyFunctions( + """Filter the functions by the API type.""" + apiType: String + + """ + Filter the functions by whether or not the function uses the creation UI in the Admin. + """ + useCreationUi: Boolean + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ShopifyFunctionConnection! + + """Shopify Payments account information, including balances and payouts.""" + shopifyPaymentsAccount: ShopifyPaymentsAccount + + """Returns the results of a ShopifyQL query.""" + shopifyqlQuery( + """A ShopifyQL query.""" + query: String! + ): ShopifyqlQueryResponse + + """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 + + """The shop staff members.""" + staffMembers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: StaffMembersSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): StaffMemberConnection + + """ + 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( + """ + Filter standard metafield definitions based on whether they apply to a given resource subtype. + """ + constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier + + """ + Filter standard metafield definitions based on whether they are constrained. + """ + constraintStatus: MetafieldDefinitionConstraintStatus + + """ + Filter standard metafield definitions that have already been activated. + """ + excludeActivated: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StandardMetafieldDefinitionTemplateConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SubscriptionBillingAttemptsSortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): SubscriptionBillingAttemptConnection! + + """ + Returns a subscription billing cycle found either by cycle index or date. + """ + subscriptionBillingCycle( + """Input object used to select and use billing cycles.""" + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycle + + """ + Retrieves the results of the asynchronous job for the subscription billing + cycle bulk action based on the specified job ID. + This query can be used to obtain the billing cycles that match the criteria + defined in the subscriptionBillingCycleBulkSearch and + subscriptionBillingCycleBulkCharge mutations. + """ + subscriptionBillingCycleBulkResults( + """The ID of the billing cycle bulk operation job.""" + jobId: ID! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionBillingCycleConnection! + + """Returns subscription billing cycles for a contract ID.""" + subscriptionBillingCycles( + """The ID of the subscription contract to retrieve billing cycles for.""" + contractId: ID! + + """Select subscription billing cycles within a date range.""" + billingCyclesDateRangeSelector: SubscriptionBillingCyclesDateRangeSelector + + """Select subscription billing cycles within an index range.""" + billingCyclesIndexRangeSelector: SubscriptionBillingCyclesIndexRangeSelector + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX + ): SubscriptionBillingCycleConnection! + + """Returns a Subscription Contract resource by ID.""" + subscriptionContract( + """The ID of the Subscription Contract to return.""" + id: ID! + ): SubscriptionContract + + """List Subscription Contracts.""" + subscriptionContracts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SubscriptionContractsSortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): TenderTransactionConnection! + + """Returns a particular theme for the shop.""" + theme( + """The ID of the theme.""" + id: ID! + ): OnlineStoreTheme + + """Returns a paginated list of themes for the shop.""" + themes( + """The theme roles to filter by.""" + roles: [ThemeRole!] + + """ + The theme names to filter by. Use '*' to match zero or more characters. + """ + names: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OnlineStoreThemeConnection + + """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( + """Return only resources of a type.""" + resourceType: TranslatableResourceType! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): TranslatableResourceConnection! + + """Resources that can have localized values for different languages.""" + translatableResourcesByIds( + """Return only resources for given IDs.""" + resourceIds: [ID!]! + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): TranslatableResourceConnection! + + """Returns a `UrlRedirect` resource by ID.""" + urlRedirect( + """The ID of the `UrlRedirect` to return.""" + id: ID! + ): UrlRedirect + + """Returns a `UrlRedirectImport` resource by ID.""" + urlRedirectImport( + """The ID of the `UrlRedirectImport` to return.""" + id: ID! + ): UrlRedirectImport + + """A list of the shop's URL redirect saved searches.""" + urlRedirectSavedSearches( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SavedSearchConnection! + + """A list of redirects for a shop.""" + urlRedirects( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: UrlRedirectSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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 + ): UrlRedirectConnection! + + """Count of redirects. Limited to a maximum of 10000 by default.""" + urlRedirectsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count + + """Validation available on the shop.""" + validation( + """The ID of the validation.""" + id: ID! + ): Validation + + """Validations available on the shop.""" + validations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ValidationSortKeys = ID + ): ValidationConnection! + + """ + Returns a + [web pixel](https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels) + by ID. + """ + webPixel( + """The ID of the `WebPixel` object to return.""" + id: ID + ): WebPixel + + """The web presences for the shop.""" + webPresences( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketWebPresenceConnection + + """ + Returns a webhook subscription by ID. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + """ + webhookSubscription( + """The ID of the `WebhookSubscription` to return.""" + id: ID! + ): WebhookSubscription + + """ + Retrieves a paginated list of 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: WebhookSubscriptionSortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + + """ + URI to filter by. Supports an HTTPS URL, a Google Pub/Sub URI + (pubsub://{project-id}:{topic-id}) or an Amazon EventBridge event source ARN. + """ + uri: String + + """Response format to filter by.""" + format: WebhookSubscriptionFormat + + """List of webhook subscription topics to filter by.""" + topics: [WebhookSubscriptionTopic!] + ): WebhookSubscriptionConnection! + + """ + The count of webhook subscriptions. + + Building an app? If you only use app-specific webhooks, you won't need this. + App-specific webhook subscriptions specified in your `shopify.app.toml` may be + easier. They are automatically kept up to date by Shopify & require less + maintenance. Please read [About managing webhook + subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe). + Limited to a maximum of 10000 by default. + """ + webhookSubscriptionsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count +} + +""" +The `Refund` object represents a financial record of money returned to a customer from an order. +It provides a comprehensive view of all refunded amounts, transactions, and restocking instructions +associated with returning products or correcting order issues. + +The `Refund` object provides information to: + +- Process customer returns and issue payments back to customers +- Handle partial or full refunds for line items with optional inventory restocking +- Refund shipping costs, duties, and additional fees +- Issue store credit refunds as an alternative to original payment method returns +- Track and reconcile all financial transactions related to refunds + +Each `Refund` object maintains detailed records of what was refunded, how much was refunded, +which payment transactions were involved, and any inventory restocking that occurred. The refund +can include multiple components such as product line items, shipping charges, taxes, duties, and +additional fees, all calculated with proper currency handling for international orders. + +Refunds are always associated with an [order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +and can optionally be linked to a [return](https://shopify.dev/docs/api/admin-graphql/latest/objects/Return) +if the refund was initiated through the returns process. The refund tracks both the presentment currency +(what the customer sees) and the shop currency for accurate financial reporting. + +> Note: +> The existence of a `Refund` object doesn't guarantee that the money has been returned to the customer. +> The actual financial processing happens through associated +> [`OrderTransaction`](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) +> objects, which can be in various states, such as pending, processing, success, or failure. +> To determine if money has actually been refunded, check the +> [status](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.status) +> of the associated transactions. + +Learn more about +[managing returns](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management), +[refunding duties](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/view-and-refund-duties), and +[processing refunds](https://shopify.dev/docs/api/admin-graphql/latest/mutations/refundCreate). +""" +type Refund implements LegacyInteroperability & Node { + """The date and time when the refund was created.""" + createdAt: DateTime + + """A list of the refunded duties as part of this refund.""" + duties: [RefundDuty!] + + """A globally-unique ID.""" + id: ID! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The optional note associated with the refund.""" + note: String + + """The order associated with the refund.""" + order: Order! + + """The order adjustments that are attached with the refund.""" + orderAdjustments( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderAdjustmentConnection! + + """The `RefundLineItem` resources attached to the refund.""" + refundLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): RefundLineItemConnection! + + """The `RefundShippingLine` resources attached to the refund.""" + refundShippingLines( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): RefundShippingLineConnection! + + """The return associated with the refund.""" + return: Return + + """The staff member who created the refund.""" + staffMember: StaffMember + + """The total amount across all transactions for the refund.""" + totalRefunded: MoneyV2! @deprecated(reason: "Use `totalRefundedSet` instead.") + + """ + The total amount across all transactions for the refund, in shop and presentment currencies. + """ + totalRefundedSet: MoneyBag! + + """The transactions associated with the refund.""" + transactions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderTransactionConnection! + + """The date and time when the refund was updated.""" + updatedAt: DateTime! +} + +""" +An agreement between the merchant and customer to refund all or a portion of the order. +""" +type RefundAgreement implements SalesAgreement { + """The application that created the agreement.""" + app: App + + """The date and time at which the agreement occured.""" + happenedAt: DateTime! + + """The unique ID for the agreement.""" + id: ID! + + """The reason the agremeent was created.""" + reason: OrderActionType! + + """The refund associated with the agreement.""" + refund: Refund! + + """The sales associated with the agreement.""" + sales( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SaleConnection! + + """The staff member associated with the agreement.""" + user: StaffMember +} + +"""An auto-generated type for paginating through multiple Refunds.""" +type RefundConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundEdge!]! + + """ + A list of nodes that are contained in RefundEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Refund!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `refundCreate` mutation.""" +type RefundCreatePayload { + """The order associated with the created refund.""" + order: Order + + """The created refund.""" + refund: Refund + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Represents a refunded duty.""" +type RefundDuty { + """The amount of a refunded duty in shop and presentment currencies.""" + amountSet: MoneyBag! + + """The duty associated with this refunded duty.""" + originalDuty: Duty +} + +"""The input fields required to reimburse duties on a refund.""" +input RefundDutyInput { + """The ID of the duty in the refund.""" + dutyId: ID! + + """The type of refund for this duty.""" + refundType: RefundDutyRefundType +} + +"""The type of refund to perform for a particular refund duty.""" +enum RefundDutyRefundType { + """ + The duty is proportionally refunded based on the quantity of the refunded line item. + """ + PROPORTIONAL + + """The duty is fully refunded.""" + FULL +} + +""" +An auto-generated type which holds one Refund and a cursor during pagination. +""" +type RefundEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of RefundEdge.""" + node: Refund! +} + +"""The input fields to create a refund.""" +input RefundInput { + """ + The currency that is used to refund the order. This must be the presentment + currency, which is the currency used by the customer. This is a required field + for orders where the currency and presentment currency differ. + """ + currency: CurrencyCode + + """The ID of the order that's being refunded.""" + orderId: ID! + + """An optional note that's attached to the refund.""" + note: String + + """Whether to send a refund notification to the customer.""" + notify: Boolean + + """The input fields that are required to reimburse shipping costs.""" + shipping: ShippingRefundInput + + """A list of line items to refund.""" + refundLineItems: [RefundLineItemInput!] + + """A list of duties to refund.""" + refundDuties: [RefundDutyInput!] + + """A list of transactions involved in the refund.""" + transactions: [OrderTransactionInput!] + + """A list of instructions to process the financial outcome of the refund.""" + refundMethods: [RefundMethodInput!] = [] + + """ + An optional reason for a discrepancy between calculated and actual refund amounts. + """ + discrepancyReason: OrderAdjustmentInputDiscrepancyReason + + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false +} + +"""A 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 quantity of the associated line item to be refunded.""" + quantity: Int! + + """The type of restock for this line item.""" + restockType: RefundLineItemRestockType + + """ + The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. + """ + locationId: ID +} + +"""The type of restock performed for a particular refund line item.""" +enum RefundLineItemRestockType { + """ + The refund line item was returned. Use this when restocking line items that were fulfilled. + """ + RETURN + + """ + The refund line item was canceled. Use this when restocking unfulfilled line items. + """ + CANCEL + + """ + Deprecated. The refund line item was restocked, without specifically + beingidentified as a return or cancelation. This value is not accepted when + creating new refunds. + """ + LEGACY_RESTOCK + + """Refund line item was not restocked.""" + NO_RESTOCK +} + +"""The different methods that a refund amount can be allocated to.""" +enum RefundMethodAllocation { + """The refund is to original payment methods.""" + ORIGINAL_PAYMENT_METHODS + + """The refund is to store credit.""" + STORE_CREDIT +} + +"""The input fields for processing the financial outcome of a refund.""" +input RefundMethodInput { + """The details of the refund to store credit.""" + storeCreditRefund: StoreCreditRefundInput +} + +""" +The financial transfer details for a return outcome that results in a refund. +""" +type RefundReturnOutcome { + """ + The total monetary value to be refunded in shop and presentment currencies. + """ + amount: MoneyBag! + + """A list of suggested refund methods.""" + suggestedRefundMethods: [SuggestedRefundMethod!]! + + """A list of suggested order transactions.""" + suggestedTransactions: [SuggestedOrderTransaction!]! +} + +"""The input fields for the shipping cost to refund.""" +input RefundShippingInput { + """ + The input fields required to refund shipping cost, in the presentment currency of the order. + This overrides the `fullRefund` argument. + This field defaults to 0.00 when not provided and when the `fullRefund` argument is false. + """ + shippingRefundAmount: MoneyInput + + """Whether to refund the full shipping amount.""" + fullRefund: Boolean = false +} + +"""A shipping line item that's included in a refund.""" +type RefundShippingLine implements Node { + """A globally-unique ID.""" + id: ID! + + """ + The `ShippingLine` resource associated to the refunded shipping line item. + """ + shippingLine: ShippingLine! + + """ + The subtotal amount of the refund shipping line in shop and presentment currencies. + """ + subtotalAmountSet: MoneyBag! + + """ + The tax amount of the refund shipping line in shop and presentment currencies. + """ + taxAmountSet: MoneyBag! +} + +""" +An auto-generated type for paginating through multiple RefundShippingLines. +""" +type RefundShippingLineConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [RefundShippingLineEdge!]! + + """ + A list of nodes that are contained in RefundShippingLineEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [RefundShippingLine!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one RefundShippingLine and a cursor during pagination. +""" +type RefundShippingLineEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of RefundShippingLineEdge.""" + node: RefundShippingLine! +} + +"""A condition checking the visitor's region.""" +type RegionsCondition { + """The application level for the condition.""" + applicationLevel: MarketConditionApplicationType + + """The regions that comprise the market.""" + regions( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MarketRegionConnection! +} + +"""The input fields for a remote Authorize.net customer payment profile.""" +input RemoteAuthorizeNetCustomerPaymentProfileInput { + """The customerProfileId value from the Authorize.net API.""" + customerProfileId: String! + + """ + The customerPaymentProfileId value from the Authorize.net API. Starting on 2025, + customer_payment_profile_id will become mandatory for all API versions. + """ + customerPaymentProfileId: String +} + +"""The input fields for a remote Braintree customer payment profile.""" +input RemoteBraintreePaymentMethodInput { + """The `customer_id` value from the Braintree API.""" + customerId: String! + + """ + The `payment_method_token` value from the Braintree API. Starting on 2025, + payment_method_token will become mandatory for all API versions. + """ + paymentMethodToken: String +} + +"""The input fields for a remote stripe payment method.""" +input RemoteStripePaymentMethodInput { + """The customer_id value from the Stripe API.""" + customerId: String! + + """ + The payment_method_id value from the Stripe API. Starting on 2025, + payment_method_id will become mandatory for all API versions. + """ + paymentMethodId: String +} + +"""Return type for `removeFromReturn` mutation.""" +type RemoveFromReturnPayload { + """The modified return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The resolved price inclusivity attributes.""" +type ResolvedPriceInclusivity { + """Whether duties are included in the price.""" + dutiesIncluded: Boolean! + + """Whether taxes are included in the price.""" + taxesIncluded: Boolean! +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +resource, with 1 or more actions to take. For example, you could use an alert to +indicate that you're not charging taxes on some product variants. +They can optionally have a specific icon and be dismissed by merchants. +""" +type ResourceAlert { + """ + Buttons in the alert that link to related information. + For example, _Edit variants_. + """ + actions: [ResourceAlertAction!]! + + """ + The secondary text in the alert that includes further information or instructions about how to solve a problem. + """ + content: HTML! + + """ + Unique identifier that appears when an alert is manually closed by the merchant. + Most alerts can't be manually closed. + """ + dismissibleHandle: String + + """An icon that's optionally displayed with the alert.""" + icon: ResourceAlertIcon + + """Indication of how important the alert is.""" + severity: ResourceAlertSeverity! + + """ + The primary text in the alert that includes information or describes the problem. + """ + title: String! +} + +"""An action associated to a resource alert, such as editing variants.""" +type ResourceAlertAction { + """Whether the action appears as a button or as a link.""" + primary: Boolean! + + """Resource for the action to show.""" + show: String + + """The text for the button in the alert. For example, _Edit variants_.""" + title: String! + + """The target URL that the button links to.""" + url: URL! +} + +"""The available icons for resource alerts.""" +enum ResourceAlertIcon { + """A checkmark inside a circle.""" + CHECKMARK_CIRCLE + + """A lowercase `i` inside a circle.""" + INFORMATION_CIRCLE +} + +"""The possible severity levels for a resource alert.""" +enum ResourceAlertSeverity { + """Indicates a neutral alert. For example, an accepted dispute.""" + DEFAULT + + """Indicates an informative alert. For example, an escalated dispute.""" + INFO + + """Indicates an informative alert. For example, a new dispute.""" + WARNING + + """Indicates a success alert. For example, a winning a dispute.""" + SUCCESS + + """Indicates a critical alert. For example, a blocked app.""" + CRITICAL + ERROR @deprecated(reason: "`ERROR` severity is being deprecated in favour of `WARNING` or `CRITICAL` instead.") +} + +""" +Represents feedback from apps about a resource, and the steps required to set up the apps on the shop. +""" +type ResourceFeedback { + """ + Feedback from an app about the steps a merchant needs to take to set up the app on their store. + """ + appFeedback: [AppFeedback!]! @deprecated(reason: "Use `details` instead.") + + """List of AppFeedback detailing issues regarding a resource.""" + details: [AppFeedback!]! + + """Summary of resource feedback pertaining to the resource.""" + summary: String! +} + +"""The input fields for a resource feedback object.""" +input ResourceFeedbackCreateInput { + """ + The date and time when the feedback was generated. Used to help determine whether + incoming feedback is outdated compared to existing feedback. + """ + feedbackGeneratedAt: DateTime! + + """ + If the feedback state is `requires_action`, then you can send a string message + that communicates the action to be taken by the merchant. + The string must be a single message up to 100 characters long and must end with a period. + You need to adhere to the message formatting rules or your requests will fail: + - `[Explanation of the problem]. [Suggested action].` + + **Examples:** + - `[Your app name]` isn't connected. Connect your account to use this sales channel. `[Learn more]` + - `[Your app name]` isn't configured. Agree to the terms and conditions to use this app. `[Learn more]` + Both `Your app name` and `Learn more` (a button which directs merchants to + your app) are automatically populated in the Shopify admin. + """ + messages: [String!] + + """The state of the feedback and whether it requires merchant action.""" + state: ResourceFeedbackState! +} + +"""The state of the resource feedback.""" +enum ResourceFeedbackState { + """No action required from merchant.""" + ACCEPTED + + """The merchant needs to resolve an issue with the resource.""" + REQUIRES_ACTION +} + +"""Represents a merchandising background operation interface.""" +interface ResourceOperation { + """A globally-unique ID.""" + id: ID! + + """ + The count of processed rows, summing imported, failed, and skipped rows. + """ + processedRowCount: Int + + """Represents a rows objects within this background operation.""" + rowCount: RowCount + + """The status of this operation.""" + status: ResourceOperationStatus! +} + +"""Represents the state of this catalog operation.""" +enum ResourceOperationStatus { + """Operation has been created.""" + CREATED + + """Operation is currently running.""" + ACTIVE + + """Operation is complete.""" + COMPLETE +} + +""" +A resource publication represents information about the publication of a resource. +An instance of `ResourcePublication`, unlike `ResourcePublicationV2`, can be neither published or scheduled to be published. + +See [ResourcePublicationV2](/api/admin-graphql/latest/objects/ResourcePublicationV2) for more context. +""" +type ResourcePublication { + """The channel the resource publication is published to.""" + channel: Channel! @deprecated(reason: "Use `publication` instead.") + + """ + Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. + If false, then the resource publication is neither published nor scheduled to be published. + """ + isPublished: Boolean! + + """The publication the resource publication is published to.""" + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + If the product isn't published, then this field returns an epoch timestamp. + """ + publishDate: DateTime! + + """The resource published to the publication.""" + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublications. +""" +type ResourcePublicationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationEdge!]! + + """ + A list of nodes that are contained in ResourcePublicationEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublication!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublication and a cursor during pagination. +""" +type ResourcePublicationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ResourcePublicationEdge.""" + node: ResourcePublication! +} + +""" +A resource publication represents information about the publication of a resource. +Unlike `ResourcePublication`, an instance of `ResourcePublicationV2` can't be +unpublished. It must either be published or scheduled to be published. + +See [ResourcePublication](/api/admin-graphql/latest/objects/ResourcePublication) for more context. +""" +type ResourcePublicationV2 { + """ + Whether the resource publication is published. If true, then the resource publication is published to the publication. + If false, then the resource publication is staged to be published to the publication. + """ + isPublished: Boolean! + + """The publication the resource publication is published to.""" + publication: Publication! + + """ + The date that the resource publication was or is going to be published to the publication. + """ + publishDate: DateTime + + """The resource published to the publication.""" + publishable: Publishable! +} + +""" +An auto-generated type for paginating through multiple ResourcePublicationV2s. +""" +type ResourcePublicationV2Connection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ResourcePublicationV2Edge!]! + + """ + A list of nodes that are contained in ResourcePublicationV2Edge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ResourcePublicationV2!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination. +""" +type ResourcePublicationV2Edge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ResourcePublicationV2Edge.""" + node: ResourcePublicationV2! +} + +""" +A restocking fee is a fee captured as part of a return to cover the costs of handling a return line item. +Typically, this would cover the costs of inspecting, repackaging, and restocking the item. +""" +type RestockingFee implements Fee { + """The amount of the restocking fee, in shop and presentment currencies.""" + amountSet: MoneyBag! + + """The unique ID for the Fee.""" + id: ID! + + """The value of the fee as a percentage.""" + percentage: Float! +} + +"""The input fields for a restocking fee.""" +input RestockingFeeInput { + """The value of the fee as a percentage.""" + percentage: Float! +} + +"""Information about product is restricted for a given resource.""" +type RestrictedForResource { + """Returns true when the product is restricted for the given resource.""" + restricted: Boolean! + + """Restriction reason for the given resource.""" + restrictedReason: String! +} + +""" +The `Return` object represents the intent of a buyer to ship one or more items from an order back to a merchant +or a third-party fulfillment location. A return is associated with an +[order](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) +and can include multiple return [line items](https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItem). +Each return has a [status](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps#return-statuses), +which indicates the state of the return. + +Use the `Return` object to capture the financial, logistical, +and business intent of a return. For example, you can identify eligible items for a return and issue customers +a refund for returned items on behalf of the merchant. + +Learn more about providing a +[return management workflow](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management) +for merchants. You can also manage [exchanges](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-exchanges), +[reverse fulfillment orders](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-fulfillment-orders), +and [reverse deliveries](https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/manage-reverse-deliveries) +on behalf of merchants. +""" +type Return implements Node { + """The date and time when the return was closed.""" + closedAt: DateTime + + """The date and time when the return was created.""" + createdAt: DateTime! + + """Additional information about the declined return.""" + decline: ReturnDecline + + """The exchange line items attached to the return.""" + exchangeLineItems( + """ + Include exchange line items that have been removed from the order by an + order edit, return, etc. Items that have been removed have a zero ([LineItem.currentQuantity](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LineItem#field-lineitem-currentquantity)). + """ + includeRemovedItems: Boolean = false + + """Filter exchange line items by processing status.""" + processingStatus: ReturnProcessingStatusFilterInput + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ExchangeLineItemConnection! + + """A globally-unique ID.""" + id: ID! + + """The name of the return.""" + name: String! + + """The order that the return belongs to.""" + order: Order! + + """The list of refunds associated with the return.""" + refunds( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): RefundConnection! + + """The date and time when the return was approved.""" + requestApprovedAt: DateTime + + """The return line items attached to the return.""" + returnLineItems( + """Filter return line items by processing status.""" + processingStatus: ReturnProcessingStatusFilterInput + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReturnLineItemTypeConnection! + + """The return shipping fees for the return.""" + returnShippingFees: [ReturnShippingFee!]! + + """The list of reverse fulfillment orders for the return.""" + reverseFulfillmentOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReverseFulfillmentOrderConnection! + + """The status of the return.""" + status: ReturnStatus! + + """A suggested financial outcome for the return.""" + suggestedFinancialOutcome( + """The line items from the return to include in the outcome.""" + returnLineItems: [SuggestedOutcomeReturnLineItemInput!]! + + """The exchange line items from the return to include in the outcome.""" + exchangeLineItems: [SuggestedOutcomeExchangeLineItemInput!]! + + """The shipping amount from the associated order to include as a refund.""" + refundShipping: RefundShippingInput + + """ID of the tip line item.""" + tipLineId: ID + + """The duties from the associated order to include as a refund.""" + refundDuties: [RefundDutyInput!] + + """ + Specifies which refund methods to allocate the suggested refund amount to. + """ + refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS + ): SuggestedReturnFinancialOutcome + + """A suggested refund for the return.""" + suggestedRefund( + """The line items from the return to include in the refund.""" + returnRefundLineItems: [ReturnRefundLineItemInput!]! + + """ + The shipping amount from the associated order to include in the refund. + """ + refundShipping: RefundShippingInput + + """The duties from to associated order to include in the refund.""" + refundDuties: [RefundDutyInput!] + ): SuggestedReturnRefund @deprecated(reason: "Use `suggestedFinancialOutcome` instead.") + + """The sum of all return line item quantities for the return.""" + totalQuantity: Int! +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReturnableFulfillmentLineItemConnection! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillments. +""" +type ReturnableFulfillmentConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReturnableFulfillment!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillment and a cursor during pagination. +""" +type ReturnableFulfillmentEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReturnableFulfillmentEdge.""" + node: ReturnableFulfillment! +} + +"""A returnable fulfillment line item.""" +type ReturnableFulfillmentLineItem { + """The fulfillment line item that can be returned.""" + fulfillmentLineItem: FulfillmentLineItem! + + """The quantity available to be returned.""" + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillmentLineItems. +""" +type ReturnableFulfillmentLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnableFulfillmentLineItemEdge!]! + + """ + A list of nodes that are contained in ReturnableFulfillmentLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReturnableFulfillmentLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReturnableFulfillmentLineItem and a cursor during pagination. +""" +type ReturnableFulfillmentLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReturnableFulfillmentLineItemEdge.""" + node: ReturnableFulfillmentLineItem! +} + +"""An agreement between the merchant and customer for a return.""" +type ReturnAgreement implements SalesAgreement { + """The application that created the agreement.""" + app: App + + """The date and time at which the agreement occured.""" + happenedAt: DateTime! + + """The unique ID for the agreement.""" + id: ID! + + """The reason the agremeent was created.""" + reason: OrderActionType! + + """The return associated with the agreement.""" + return: Return! + + """The sales associated with the agreement.""" + sales( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SaleConnection! + + """The staff member associated with the agreement.""" + user: StaffMember +} + +"""The input fields for approving a customer's return request.""" +input ReturnApproveRequestInput { + """The ID of the return that's being approved.""" + id: ID! + + """ + Notify the customer when a return request is approved. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false +} + +"""Return type for `returnApproveRequest` mutation.""" +type ReturnApproveRequestPayload { + """The approved return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""Return type for `returnCancel` mutation.""" +type ReturnCancelPayload { + """The canceled return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""Return type for `returnClose` mutation.""" +type ReturnClosePayload { + """The closed return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""An auto-generated type for paginating through multiple Returns.""" +type ReturnConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnEdge!]! + + """ + A list of nodes that are contained in ReturnEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Return!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `returnCreate` mutation.""" +type ReturnCreatePayload { + """The created return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +""" +Additional information about why a merchant declined the customer's return request. +""" +type ReturnDecline { + """ + The notification message sent to the customer about their declined return request. + Maximum length: 500 characters. + """ + note: String + + """The reason the customer's return request was declined.""" + reason: ReturnDeclineReason! +} + +"""The reason why the merchant declined a customer's return request.""" +enum ReturnDeclineReason { + """The return period has ended.""" + RETURN_PERIOD_ENDED + + """The return contains final sale items.""" + FINAL_SALE + + """The return is declined for another reason.""" + OTHER +} + +"""The input fields for declining a customer's return request.""" +input ReturnDeclineRequestInput { + """The ID of the return that's being declined.""" + id: ID! + + """The reason why the merchant declined the customer's return request.""" + declineReason: ReturnDeclineReason! + + """ + Notify the customer when a return request is declined. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false + + """ + The notification message that's sent to a customer about their declined return request. + Maximum length: 500 characters. + """ + declineNote: String +} + +"""Return type for `returnDeclineRequest` mutation.""" +type ReturnDeclineRequestPayload { + """The declined return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +""" +An auto-generated type which holds one Return and a cursor during pagination. +""" +type ReturnEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReturnEdge.""" + node: Return! +} + +"""Possible error codes that can be returned by `ReturnUserError`.""" +enum ReturnErrorCode { + """Unexpected internal error happened.""" + INTERNAL_ERROR + + """Too many arguments provided.""" + TOO_MANY_ARGUMENTS + + """The input value is blank.""" + BLANK + + """The input value should be equal to the value allowed.""" + EQUAL_TO + + """The input value should be greater than the minimum allowed value.""" + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is invalid.""" + INVALID + + """The input value should be less than the maximum value allowed.""" + LESS_THAN + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """The input value is not a number.""" + NOT_A_NUMBER + + """The input value needs to be blank.""" + PRESENT + + """The input value is already taken.""" + TAKEN + + """The input value is too big.""" + TOO_BIG + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is the wrong length.""" + WRONG_LENGTH + + """The requested resource already exists.""" + ALREADY_EXISTS + + """A requested resource could not be created.""" + CREATION_FAILED + + """A required feature is not enabled.""" + FEATURE_NOT_ENABLED + + """A resource was not in the correct state for the operation to succeed.""" + INVALID_STATE + + """The user does not have permission to perform the operation.""" + MISSING_PERMISSION + + """A requested notification could not be sent.""" + NOTIFICATION_FAILED + + """A requested item is not editable.""" + NOT_EDITABLE + + """A requested item could not be found.""" + NOT_FOUND +} + +"""The input fields for a return.""" +input ReturnInput { + """The new line items to be added to the order.""" + exchangeLineItems: [ExchangeLineItemInput!] + + """ + The UTC date and time when the return was first solicited by the customer. + """ + requestedAt: DateTime + + """The ID of the order to be returned.""" + orderId: ID! + + """The return line items list to be handled.""" + returnLineItems: [ReturnLineItemInput!]! + + """The return shipping fee to capture.""" + returnShippingFee: ReturnShippingFeeInput +} + +"""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 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! + + """ + Additional information about the reason for the return. Maximum length: 255 characters. + """ + returnReasonNote: String! + + """The total weight of the item.""" + totalWeight: Weight + + """The quantity that has't been processed.""" + unprocessedQuantity: Int! + + """ + The total line price after all discounts on the line item, including both line + item level discounts and code-based line item discounts, are applied. + """ + withCodeDiscountedTotalPriceSet: MoneyBag! +} + +"""The input fields for a return line item.""" +input ReturnLineItemInput { + """The quantity of the item to be returned.""" + quantity: Int! + + """The reason for the item to be returned.""" + returnReason: ReturnReason! + + """ + A note about the reason that the item is being returned. + Maximum length: 255 characters. + """ + returnReasonNote: String = "" + + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """The restocking fee to capture.""" + restockingFee: RestockingFeeInput +} + +"""The input fields for a removing a return line item from a return.""" +input ReturnLineItemRemoveFromReturnInput { + """The ID of the return line item to remove.""" + returnLineItemId: ID! + + """The quantity of the associated return line item to be removed.""" + quantity: Int! +} + +"""Return type for `returnLineItemRemoveFromReturn` mutation.""" +type ReturnLineItemRemoveFromReturnPayload { + """The modified return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""A return line item of any type.""" +interface ReturnLineItemType { + """ + 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! + + """ + 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 { + """Issue a refund for the return.""" + issueRefund: ReturnProcessRefundInput +} + +"""Filter line items based on processing status.""" +enum ReturnProcessingStatusFilterInput { + """Only include line items that have been processed.""" + PROCESSED + + """Only include line items that have some processable quantity.""" + PROCESSABLE +} + +"""The input fields for processing a return.""" +input ReturnProcessInput { + """The ID of the return to be processed.""" + returnId: ID! + + """The return line items list to be handled.""" + returnLineItems: [ReturnProcessReturnLineItemInput!] = [] + + """The exchange line items list to be handled.""" + exchangeLineItems: [ReturnProcessExchangeLineItemInput!] = [] + + """The refund duties list to be handled.""" + refundDuties: [RefundDutyInput!] = [] + + """The shipping cost to refund.""" + refundShipping: RefundShippingInput + + """ID of the tip line item.""" + tipLineId: ID + + """The note for the return.""" + note: String + + """Whether to notify the customer about the return.""" + notifyCustomer: Boolean = false + + """The financial transfer for the return.""" + financialTransfer: ReturnProcessFinancialTransferInput +} + +"""Return type for `returnProcess` mutation.""" +type ReturnProcessPayload { + """The processed return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The input fields for the refund for the return.""" +input ReturnProcessRefundInput { + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false + + """The order transactions for the refund.""" + orderTransactions: [ReturnRefundOrderTransactionInput!]! + + """A list of instructions to process the financial outcome of the refund.""" + refundMethods: [RefundMethodInput!] = [] +} + +"""The input fields for a return line item.""" +input ReturnProcessReturnLineItemInput { + """The ID of the return line item.""" + id: ID! + + """The quantity of the return line item.""" + quantity: Int! + + """The dispositions for the return line item.""" + dispositions: [ReverseFulfillmentOrderDisposeInput!] +} + +"""The reason for returning the return line item.""" +enum ReturnReason { + """ + The item is returned because the size was too small. Displays as **Size was too small**. + """ + SIZE_TOO_SMALL + + """ + The item is returned because the size was too large. Displays as **Size was too large**. + """ + SIZE_TOO_LARGE + + """ + The item is returned because the customer changed their mind. Displays as **Customer changed their mind**. + """ + UNWANTED + + """ + The item is returned because it was not as described. Displays as **Item not as described**. + """ + NOT_AS_DESCRIBED + + """ + The item is returned because the customer received the wrong one. Displays as **Received the wrong item**. + """ + WRONG_ITEM + + """ + The item is returned because it is damaged or defective. Displays as **Damaged or defective**. + """ + DEFECTIVE + + """ + The item is returned because the buyer did not like the style. Displays as **Style**. + """ + STYLE + + """ + The item is returned because the buyer did not like the color. Displays as **Color**. + """ + COLOR + + """ + The item is returned for another reason. For this value, a return reason note is also provided. Displays as **Other**. + """ + OTHER + + """ + The item is returned because of an unknown reason. Displays as **Unknown**. + """ + UNKNOWN +} + +"""The input fields to refund a return.""" +input ReturnRefundInput { + """The ID of the return.""" + returnId: ID! + + """A list of return line items to refund.""" + returnRefundLineItems: [ReturnRefundLineItemInput!]! + + """The shipping amount to refund.""" + refundShipping: RefundShippingInput + + """A list of duties to refund.""" + refundDuties: [RefundDutyInput!] + + """A list of transactions involved in refunding the return.""" + orderTransactions: [ReturnRefundOrderTransactionInput!] = [] + + """Whether to send a refund notification to the customer.""" + notifyCustomer: Boolean = false +} + +"""The input fields for a return refund line item.""" +input ReturnRefundLineItemInput { + """The ID of the return line item to be refunded.""" + returnLineItemId: ID! + + """The quantity of the return line item to be refunded.""" + quantity: Int! +} + +"""The input fields to create order transactions when refunding a return.""" +input ReturnRefundOrderTransactionInput { + """ + The amount of money for the transaction in the presentment currency of the order. + """ + transactionAmount: MoneyInput! + + """ + The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. + """ + parentId: ID! +} + +"""Return type for `returnRefund` mutation.""" +type ReturnRefundPayload { + """The created refund.""" + refund: Refund + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""Return type for `returnReopen` mutation.""" +type ReturnReopenPayload { + """The reopened return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The input fields for requesting a return.""" +input ReturnRequestInput { + """The ID of the order that's being returned.""" + orderId: ID! + + """The line items that are being handled in the return.""" + returnLineItems: [ReturnRequestLineItemInput!]! + + """The return shipping fee to capture.""" + returnShippingFee: ReturnShippingFeeInput +} + +"""The input fields for a return line item.""" +input ReturnRequestLineItemInput { + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! + + """The quantity of the item that's being returned.""" + quantity: Int! + + """The restocking fee to capture.""" + restockingFee: RestockingFeeInput + + """The reason why the line item is being returned.""" + returnReason: ReturnReason! + + """ + A note from the customer that describes the item to be returned. + For example, the note can communicate issues with the item to the merchant. + Maximum length: 300 characters. + """ + customerNote: String +} + +"""Return type for `returnRequest` mutation.""" +type ReturnRequestPayload { + """The requested return.""" + return: Return + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +""" +A return shipping fee is a fee captured as part of a return to cover the costs of shipping the return. +""" +type ReturnShippingFee implements Fee { + """ + The amount of the return shipping fee, in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """The unique ID for the Fee.""" + id: ID! +} + +"""The input fields for a return shipping fee.""" +input ReturnShippingFeeInput { + """ + The value of the fee as a fixed amount in the presentment currency of the order. + """ + amount: MoneyInput! +} + +"""The status of a return.""" +enum ReturnStatus { + """The return has been canceled.""" + CANCELED + + """The return has been completed.""" + CLOSED + + """The return is in progress.""" + OPEN + + """The return was requested.""" + REQUESTED + + """The return was declined.""" + DECLINED +} + +"""An error that occurs during the execution of a return mutation.""" +type ReturnUserError implements DisplayableError { + """The error code.""" + code: ReturnErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +A reverse delivery is a post-fulfillment object that represents a buyer sending a package to a merchant. +For example, a buyer requests a return, and a merchant sends the buyer a shipping label. +The reverse delivery contains the context of the items sent back, how they're being sent back +(for example, a shipping label), and the current state of the delivery (tracking information). +""" +type ReverseDelivery implements Node { + """The deliverable associated with the reverse delivery.""" + deliverable: ReverseDeliveryDeliverable + + """The ID of the reverse delivery.""" + id: ID! + + """The reverse delivery line items attached to the reverse delivery.""" + reverseDeliveryLineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReverseDeliveryLineItemConnection! + + """The `ReverseFulfillmentOrder` associated with the reverse delivery.""" + reverseFulfillmentOrder: ReverseFulfillmentOrder! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveries. +""" +type ReverseDeliveryConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ReverseDelivery!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `reverseDeliveryCreateWithShipping` mutation.""" +type ReverseDeliveryCreateWithShippingPayload { + """The created reverse delivery.""" + reverseDelivery: ReverseDelivery + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The delivery method and artifacts associated with a reverse delivery.""" +union ReverseDeliveryDeliverable = ReverseDeliveryShippingDeliverable + +""" +An auto-generated type which holds one ReverseDelivery and a cursor during pagination. +""" +type ReverseDeliveryEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReverseDeliveryEdge.""" + node: ReverseDelivery! +} + +"""The input fields for a reverse label.""" +input ReverseDeliveryLabelInput { + """ + The URL of the label file. If a label file was uploaded to be attached to the + delivery, then provide the temporary staged URL. + """ + fileUrl: URL! +} + +"""The return label file information for a reverse delivery.""" +type ReverseDeliveryLabelV2 { + """The date and time when the reverse delivery label was created.""" + createdAt: DateTime! + + """A public link that can be used to download the label image.""" + publicFileUrl: URL + + """The date and time when the reverse delivery label was updated.""" + updatedAt: DateTime! +} + +"""The details about a reverse delivery line item.""" +type ReverseDeliveryLineItem implements Node { + """The dispositions of the item.""" + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """A globally-unique ID.""" + id: ID! + + """The expected number of units.""" + quantity: Int! + + """The corresponding reverse fulfillment order line item.""" + reverseFulfillmentOrderLineItem: ReverseFulfillmentOrderLineItem! +} + +""" +An auto-generated type for paginating through multiple ReverseDeliveryLineItems. +""" +type ReverseDeliveryLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseDeliveryLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseDeliveryLineItemEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseDeliveryLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseDeliveryLineItem and a cursor during pagination. +""" +type ReverseDeliveryLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReverseDeliveryLineItemEdge.""" + node: ReverseDeliveryLineItem! +} + +"""The input fields for a reverse delivery line item.""" +input ReverseDeliveryLineItemInput { + """The ID of the related reverse fulfillment order line item.""" + reverseFulfillmentOrderLineItemId: ID! + + """The quantity of the item to be included in the delivery.""" + quantity: Int! +} + +""" +A reverse shipping deliverable that may include a label and tracking information. +""" +type ReverseDeliveryShippingDeliverable { + """The return label attached to the reverse delivery.""" + label: ReverseDeliveryLabelV2 + + """The information to track the reverse delivery.""" + tracking: ReverseDeliveryTrackingV2 +} + +"""Return type for `reverseDeliveryShippingUpdate` mutation.""" +type ReverseDeliveryShippingUpdatePayload { + """The updated reverse delivery.""" + reverseDelivery: ReverseDelivery + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The input fields for tracking information about a return delivery.""" +input ReverseDeliveryTrackingInput { + """The tracking number for the label.""" + number: String + + """ + The tracking URL for the carrier. If the carrier isn't supported by Shopify, + then provide the tracking URL of the delivery. + """ + url: URL +} + +"""Represents the information used to track a reverse delivery.""" +type ReverseDeliveryTrackingV2 { + """ + The provider of the tracking information, in a human-readable format for display purposes. + """ + carrierName: String + + """The identifier used by the courier to identify the shipment.""" + number: String + + """The URL to track a shipment.""" + url: URL +} + +""" +A group of one or more items in a return that will be processed at a fulfillment service. +There can be more than one reverse fulfillment order for a return at a given location. +""" +type ReverseFulfillmentOrder implements Node { + """A globally-unique ID.""" + id: ID! + + """ + The list of reverse fulfillment order line items for the reverse fulfillment order. + """ + lineItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReverseFulfillmentOrderLineItemConnection! + + """The order associated with the reverse fulfillment order.""" + order: Order + + """The list of reverse deliveries for the reverse fulfillment order.""" + reverseDeliveries( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ReverseDeliveryConnection! + + """The status of the reverse fulfillment order.""" + status: ReverseFulfillmentOrderStatus! + + """ + The current confirmation for the reverse fulfillment order from a third-party logistics service. + If no third-party service is involved, then this value is `nil`. + """ + thirdPartyConfirmation: ReverseFulfillmentOrderThirdPartyConfirmation +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrders. +""" +type ReverseFulfillmentOrderConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ReverseFulfillmentOrder!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""The input fields to dispose a reverse fulfillment order line item.""" +input ReverseFulfillmentOrderDisposeInput { + """The ID of the reverse fulfillment order line item.""" + reverseFulfillmentOrderLineItemId: ID! + + """The quantity of the reverse fulfillment order line item to dispose.""" + quantity: Int! + + """ + The ID of the location where the reverse fulfillment order line item is to be disposed. + This is required when the disposition type is RESTOCKED. + """ + locationId: ID + + """The final arrangement for the reverse fulfillment order line item.""" + dispositionType: ReverseFulfillmentOrderDispositionType! +} + +"""Return type for `reverseFulfillmentOrderDispose` mutation.""" +type ReverseFulfillmentOrderDisposePayload { + """The disposed reverse fulfillment order line items.""" + reverseFulfillmentOrderLineItems: [ReverseFulfillmentOrderLineItem!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ReturnUserError!]! +} + +"""The details of the arrangement of an item.""" +type ReverseFulfillmentOrderDisposition implements Node { + """The date and time when the disposition was created.""" + createdAt: DateTime! + + """A globally-unique ID.""" + id: ID! + + """The location where the disposition occurred.""" + location: Location + + """The number of disposed units.""" + quantity: Int! + + """The final arrangement of an item.""" + type: ReverseFulfillmentOrderDispositionType! +} + +"""The final arrangement of an item from a reverse fulfillment order.""" +enum ReverseFulfillmentOrderDispositionType { + """An item that was restocked.""" + RESTOCKED + + """ + An item that requires further processing before being restocked or discarded. + """ + PROCESSING_REQUIRED + + """An item that wasn't restocked.""" + NOT_RESTOCKED + + """An item that was expected but absent.""" + MISSING +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrder and a cursor during pagination. +""" +type ReverseFulfillmentOrderEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReverseFulfillmentOrderEdge.""" + node: ReverseFulfillmentOrder! +} + +"""The details about a reverse fulfillment order line item.""" +type ReverseFulfillmentOrderLineItem implements Node { + """The dispositions of the item.""" + dispositions: [ReverseFulfillmentOrderDisposition!]! + + """ + The corresponding fulfillment line item for a reverse fulfillment order line item. + """ + fulfillmentLineItem: FulfillmentLineItem + + """A globally-unique ID.""" + id: ID! + + """The total number of units to be processed.""" + totalQuantity: Int! +} + +""" +An auto-generated type for paginating through multiple ReverseFulfillmentOrderLineItems. +""" +type ReverseFulfillmentOrderLineItemConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReverseFulfillmentOrderLineItemEdge!]! + + """ + A list of nodes that are contained in ReverseFulfillmentOrderLineItemEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ReverseFulfillmentOrderLineItem!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrderLineItem and a cursor during pagination. +""" +type ReverseFulfillmentOrderLineItemEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ReverseFulfillmentOrderLineItemEdge.""" + node: ReverseFulfillmentOrderLineItem! +} + +"""The status of a reverse fulfillment order.""" +enum ReverseFulfillmentOrderStatus { + """The reverse fulfillment order has been canceled.""" + CANCELED + + """The reverse fulfillment order has been completed.""" + CLOSED + + """The reverse fulfillment order is in progress.""" + OPEN +} + +"""The third-party confirmation of a reverse fulfillment order.""" +type ReverseFulfillmentOrderThirdPartyConfirmation { + """The status of the reverse fulfillment order third-party confirmation.""" + status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! +} + +"""The status of a reverse fulfillment order third-party confirmation.""" +enum ReverseFulfillmentOrderThirdPartyConfirmationStatus { + """The reverse fulfillment order was accepted by the fulfillment service.""" + ACCEPTED + + """ + The reverse fulfillment order cancelation was accepted by the fulfillment service. + """ + CANCEL_ACCEPTED + + """ + The reverse fulfillment order cancelation was rejected by the fulfillment service. + """ + CANCEL_REJECTED + + """ + The reverse fulfillment order is awaiting acceptance by the fulfillment service. + """ + PENDING_ACCEPTANCE + + """ + The reverse fulfillment order is awaiting cancelation by the fulfillment service. + """ + PENDING_CANCELATION + + """The reverse fulfillment order was rejected by the fulfillment service.""" + REJECTED +} + +"""List of possible values for a RiskAssessment result.""" +enum RiskAssessmentResult { + """Indicates a high likelihood that the order is fraudulent.""" + HIGH + + """Indicates a medium likelihood that the order is fraudulent.""" + MEDIUM + + """Indicates a low likelihood that the order is fraudulent.""" + LOW + + """ + Indicates that the risk assessment will not provide a recommendation for the order. + """ + NONE + + """Indicates that the risk assessment is still pending.""" + PENDING +} + +""" +A risk fact belongs to a single risk assessment and serves to provide additional +context for an assessment. Risk facts are not necessarily tied to the result of +the recommendation. +""" +type RiskFact { + """A description of the fact.""" + description: String! + + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! +} + +"""List of possible values for a RiskFact sentiment.""" +enum RiskFactSentiment { + """A positive contributor that lowers the risk.""" + POSITIVE + + """A neutral contributor with regards to risk.""" + NEUTRAL + + """A negative contributor that increases the risk.""" + NEGATIVE +} + +"""A row count represents rows on background operation.""" +type RowCount { + """Estimated number of rows contained within this background operation.""" + count: Int! + + """Whether the operation exceeds max number of reportable rows.""" + exceedsMax: Boolean! +} + +""" +An individual sale record associated with a sales agreement. Every money value +in an order's sales data is represented in the currency's smallest unit. When +amounts are divided across multiple line items, such as taxes or order +discounts, the amounts might not divide evenly across all of the line items on +the order. To address this, the remaining currency units that couldn't be +divided evenly are allocated one at a time, starting with the first line item, +until they are all accounted for. In aggregate, the values sum up correctly. In +isolation, one line item might have a different tax or discount amount than +another line item of the same price, before taxes and discounts. This is because +the amount could not be divided evenly across the items. The allocation of +currency units across line items is immutable. After they are allocated, +currency units are never reallocated or redistributed among the line items. +""" +interface Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """The unique ID for the sale.""" + id: ID! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""The possible order action types for a sale.""" +enum SaleActionType { + """A purchase or charge.""" + ORDER + + """A removal or return.""" + RETURN + + """A change to the price, taxes, or discounts for a prior purchase.""" + UPDATE + + """ + An unknown order action. Represents new actions that may be added in future versions. + """ + UNKNOWN +} + +"""The additional fee details for a line item.""" +type SaleAdditionalFee implements Node { + """A globally-unique ID.""" + id: ID! + + """The name of the additional fee.""" + name: String! + + """The price of the additional fee.""" + price: MoneyBag! + + """A list of taxes charged on the additional fee.""" + taxLines: [TaxLine!]! +} + +"""An auto-generated type for paginating through multiple Sales.""" +type SaleConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SaleEdge!]! + + """ + A list of nodes that are contained in SaleEdge. You can fetch data about an + individual node, or you can follow the edges to fetch data about a collection + of related nodes. At each node, you specify the fields that you want to retrieve. + """ + nodes: [Sale!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Sale and a cursor during pagination. +""" +type SaleEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SaleEdge.""" + node: Sale! +} + +""" +The possible line types for a sale record. One of the possible order line types +for a sale is an adjustment. Sales adjustments occur when a refund is issued for +a line item that is either more or less than the total value of the line item. +Examples are restocking fees and goodwill payments. When this happens, Shopify +produces a sales agreement with sale records for each line item that is returned +or refunded and an additional sale record for the adjustment (for example, a +restocking fee). The sales records for the returned or refunded items represent +the reversal of the original line item sale value. The additional adjustment +sale record represents the difference between the original total value of all +line items that were refunded, and the actual amount refunded. +""" +enum SaleLineType { + """A product purchased, returned or exchanged.""" + PRODUCT + + """A tip added by the customer.""" + TIP + + """A gift card.""" + GIFT_CARD + + """A shipping cost.""" + SHIPPING + + """A duty charge.""" + DUTY + + """An additional fee.""" + ADDITIONAL_FEE + + """A fee charge.""" + FEE + + """ + An unknown sale line. Represents new types that may be added in future versions. + """ + UNKNOWN + + """A sale adjustment.""" + ADJUSTMENT +} + +""" +A contract between a merchant and a customer to do business. Shopify creates a +sales agreement whenever an order is placed, edited, or refunded. A sales +agreement has one or more sales records, which provide itemized details about +the initial agreement or subsequent changes made to the order. For example, when +a customer places an order, Shopify creates the order, generates a sales +agreement, and records a sale for each line item purchased in the order. A sale +record is specific to a type of order line. Order lines can represent different +things such as a purchased product, a tip added by a customer, shipping costs +collected at checkout, and more. +""" +interface SalesAgreement { + """The application that created the agreement.""" + app: App + + """The date and time at which the agreement occured.""" + happenedAt: DateTime! + + """The unique ID for the agreement.""" + id: ID! + + """The reason the agremeent was created.""" + reason: OrderActionType! + + """The sales associated with the agreement.""" + sales( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SaleConnection! + + """The staff member associated with the agreement.""" + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple SalesAgreements. +""" +type SalesAgreementConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SalesAgreementEdge!]! + + """ + A list of nodes that are contained in SalesAgreementEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SalesAgreement!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SalesAgreement and a cursor during pagination. +""" +type SalesAgreementEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SalesAgreementEdge.""" + node: SalesAgreement! +} + +"""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 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 { + """The type of resource this saved search is searching in.""" + resourceType: SearchResultType! + + """A descriptive name of the saved search.""" + name: String! + + """ + The query string of a saved search. This includes search terms and filters. + """ + query: String! +} + +"""Return type for `savedSearchCreate` mutation.""" +type SavedSearchCreatePayload { + """The saved search that was created.""" + savedSearch: SavedSearch + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields to delete a saved search.""" +input SavedSearchDeleteInput { + """ID of the saved search to delete.""" + id: ID! +} + +"""Return type for `savedSearchDelete` mutation.""" +type SavedSearchDeletePayload { + """The ID of the saved search that was deleted.""" + deletedSavedSearchId: ID + + """The shop of the saved search that was deleted.""" + shop: Shop! + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one SavedSearch and a cursor during pagination. +""" +type SavedSearchEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SavedSearchEdge.""" + node: SavedSearch! +} + +"""The input fields to update a saved search.""" +input SavedSearchUpdateInput { + """ID of the saved search to update.""" + id: ID! + + """A descriptive name of the saved search.""" + name: String + + """ + The query string of a saved search. This included search terms and filters. + """ + query: String +} + +"""Return type for `savedSearchUpdate` mutation.""" +type SavedSearchUpdatePayload { + """The saved search that was updated.""" + savedSearch: SavedSearch + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The set of valid sort keys for the ScheduledChange query.""" +enum ScheduledChangeSortKeys { + """Sort by the `expected_at` value.""" + EXPECTED_AT + + """Sort by the `id` value.""" + ID +} + +""" +Script discount applications capture the intentions of a discount that +was created by a Shopify Script for an order's line item or shipping line. + +Discount applications don't represent the actual final amount discounted on a +line (line item or shipping line). The actual amount discounted on a line is +represented by the [DiscountAllocation](https://shopify.dev/api/admin-graphql/latest/objects/discountallocation) object. +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is applied to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """The description of the application as defined by the Script.""" + description: String! @deprecated(reason: "Use `title` instead.") + + """ + An ordered index that can be used to identify the discount application and indicate the precedence + of the discount application for calculations. + """ + index: Int! + + """How the discount amount is distributed on the discounted lines.""" + targetSelection: DiscountApplicationTargetSelection! + + """Whether the discount is applied on line items or shipping lines.""" + targetType: DiscountApplicationTargetType! + + """The title of the application as defined by the Script.""" + title: String! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +

Theme app extensions

+

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

+ +

Script tag deprecation

+

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

+ + +A script tag represents remote JavaScript code that is loaded into the pages of +a shop's storefront or the **Order status** page of checkout. +""" +type ScriptTag implements LegacyInteroperability & Node { + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script will be served as is. + """ + cache: Boolean! + + """The date and time when the script tag was created.""" + createdAt: DateTime! + + """ + The page or pages on the online store that the script should be included. + """ + displayScope: ScriptTagDisplayScope! + + """A globally-unique ID.""" + id: ID! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The URL to the remote script.""" + src: URL! + + """The date and time when the script tag was last updated.""" + updatedAt: DateTime! +} + +"""An auto-generated type for paginating through multiple ScriptTags.""" +type ScriptTagConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ScriptTagEdge!]! + + """ + A list of nodes that are contained in ScriptTagEdge. You can fetch data about + an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ScriptTag!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `scriptTagCreate` mutation.""" +type ScriptTagCreatePayload { + """The script tag that was created.""" + scriptTag: ScriptTag + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `scriptTagDelete` mutation.""" +type ScriptTagDeletePayload { + """The ID of the deleted script tag.""" + deletedScriptTagId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +The page or pages on the online store where the script should be included. +""" +enum ScriptTagDisplayScope { + """ + Include the script on both the web storefront and the Order status page. + """ + ALL @deprecated(reason: "`ALL` is deprecated. Use `ONLINE_STORE` instead.\n") + + """Include the script only on the Order status page.""" + ORDER_STATUS @deprecated(reason: "`ORDER_STATUS` is deprecated and unavailable as a mutation input.\n") + + """Include the script only on the web storefront.""" + ONLINE_STORE +} + +""" +An auto-generated type which holds one ScriptTag and a cursor during pagination. +""" +type ScriptTagEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ScriptTagEdge.""" + node: ScriptTag! +} + +""" +The input fields for a script tag. This input object is used when creating or updating +a script tag to specify its URL, where it should be included, and how it will be cached. +""" +input ScriptTagInput { + """ + The URL of the remote script. For example: `https://example.com/path/to/script.js`. + """ + src: URL + + """ + The page or pages on the online store where the script should be included. + """ + displayScope: ScriptTagDisplayScope + + """ + Whether the Shopify CDN can cache and serve the script tag. + If `true`, then the script will be cached and served by the CDN. + The cache expires 15 minutes after the script tag is successfully returned. + If `false`, then the script is served as is. + The default value is `false`. + """ + cache: Boolean = false +} + +"""Return type for `scriptTagUpdate` mutation.""" +type ScriptTagUpdatePayload { + """The script tag that was updated.""" + scriptTag: ScriptTag + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""A filter in a search query represented by a key value pair.""" +type SearchFilter { + """The key of the search filter.""" + key: String! + + """The value of the search filter.""" + value: String! +} + +""" +A list of search filters along with their specific options in value and label pair for filtering. +""" +type SearchFilterOptions { + """A list of options that can be use to filter product availability.""" + productAvailability: [FilterOption!]! +} + +"""Represents an individual result returned from a search.""" +type SearchResult { + """Returns the search result description text.""" + description: String + + """Returns the Image resource presented to accompany a search result.""" + image: Image + + """Returns the resource represented by the search result.""" + reference: Node! + + """Returns the resource title.""" + title: String! + + """Returns the absolute URL to the resource in the search result.""" + url: URL! +} + +"""The connection type for SearchResult.""" +type SearchResultConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SearchResultEdge!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + resultsAfterCount: Int! @deprecated(reason: "The provided information is not accurate.") +} + +""" +An auto-generated type which holds one SearchResult and a cursor during pagination. +""" +type SearchResultEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SearchResultEdge.""" + node: SearchResult! +} + +"""Specifies the type of resources to be returned from a search.""" +enum SearchResultType { + CUSTOMER + DRAFT_ORDER + PRODUCT + COLLECTION + + """A file.""" + FILE + + """A page.""" + PAGE + + """A blog.""" + BLOG + + """An article.""" + ARTICLE + + """A URL redirect.""" + URL_REDIRECT + PRICE_RULE + + """A code discount redeem code.""" + DISCOUNT_REDEEM_CODE + ORDER + + """A balance transaction.""" + BALANCE_TRANSACTION +} + +"""A 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! + + """The parameter maximum value range.""" + maxRange: Float + + """The parameter minimum value range.""" + minRange: Float + + """Whether the parameter is optional.""" + optional: Boolean! + + """The type of the parameter.""" + parameterType: String! + + """The query name of the parameter.""" + queryName: String! +} + +"""The filters used in segment queries associated with a shop.""" +interface SegmentFilter { + """The localized name of the filter.""" + localizedName: String! + + """Whether a file can have multiple values for a single customer.""" + multiValue: Boolean! + + """The query name of the filter.""" + queryName: String! +} + +"""An auto-generated type for paginating through multiple SegmentFilters.""" +type SegmentFilterConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentFilterEdge!]! + + """ + A list of nodes that are contained in SegmentFilterEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentFilter!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentFilter and a cursor during pagination. +""" +type SegmentFilterEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SegmentFilterEdge.""" + node: SegmentFilter! +} + +""" +A filter with a double-precision, floating-point value that's been added to a segment query. +""" +type SegmentFloatFilter implements SegmentFilter { + """The localized name of the filter.""" + localizedName: String! + + """The maximum range a filter can have.""" + maxRange: Float + + """The minimum range a filter can have.""" + minRange: Float + + """Whether a file can have multiple values for a single customer.""" + multiValue: Boolean! + + """The query name of the filter.""" + queryName: String! +} + +"""A filter with an integer that's been added to a segment query.""" +type SegmentIntegerFilter implements SegmentFilter { + """The localized name of the filter.""" + localizedName: String! + + """The maximum range a filter can have.""" + maxRange: Float + + """The minimum range a filter can have.""" + minRange: Float + + """Whether a file can have multiple values for a single customer.""" + multiValue: Boolean! + + """The query name of the filter.""" + queryName: String! +} + +"""The response type for the `segmentMembership` object.""" +type SegmentMembership { + """ + A Boolean that indicates whether or not the customer in the query is a member + of the segment, which is identified using the `segmentId`. + """ + isMember: Boolean! + + """A `segmentId` that's used for testing membership.""" + segmentId: ID! +} + +""" +A list of maps that contain `segmentId` IDs and `isMember` Booleans. The maps represent segment memberships. +""" +type SegmentMembershipResponse { + """The membership status for the given list of segments.""" + memberships: [SegmentMembership!]! +} + +""" +A segment and its corresponding saved search. +For example, you can use `SegmentMigration` to retrieve the segment ID that corresponds to a saved search ID. +""" +type SegmentMigration { + """A globally-unique ID.""" + id: ID! + + """The ID of the saved search.""" + savedSearchId: ID! + + """The ID of the segment.""" + segmentId: ID +} + +""" +An auto-generated type for paginating through multiple SegmentMigrations. +""" +type SegmentMigrationConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentMigrationEdge!]! + + """ + A list of nodes that are contained in SegmentMigrationEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentMigration!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentMigration and a cursor during pagination. +""" +type SegmentMigrationEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SegmentMigrationEdge.""" + node: SegmentMigration! +} + +"""The set of valid sort keys for the Segment query.""" +enum SegmentSortKeys { + """Sort by the `creation_date` value.""" + CREATION_DATE + + """Sort by the `id` value.""" + ID + + """Sort by the `last_edit_date` value.""" + LAST_EDIT_DATE + + """ + Sort by relevance to the search terms when the `query` parameter is specified on the connection. + Don't use this sort key when no search query is specified. + """ + RELEVANCE +} + +"""The statistics of a given segment.""" +type SegmentStatistics { + """The statistics of a given attribute.""" + attributeStatistics( + """The attribute that statistics are retrieved for.""" + attributeName: String! + ): SegmentAttributeStatistics! +} + +"""A filter with a string that's been added to a segment query.""" +type SegmentStringFilter implements SegmentFilter { + """The localized name of the filter.""" + localizedName: String! + + """Whether a file can have multiple values for a single customer.""" + multiValue: Boolean! + + """The query name of the filter.""" + queryName: String! +} + +"""Return type for `segmentUpdate` mutation.""" +type SegmentUpdatePayload { + """The updated segment.""" + segment: Segment + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A list of suggested values associated with an individual segment. A +segment is a group of members, such as customers, that meet specific +criteria. +""" +type SegmentValue { + """ + The localized version of the value's name. This name is displayed to the merchant. + """ + localizedValue: String! + + """The name of the query associated with the suggestion.""" + queryName: String! +} + +"""An auto-generated type for paginating through multiple SegmentValues.""" +type SegmentValueConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SegmentValueEdge!]! + + """ + A list of nodes that are contained in SegmentValueEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SegmentValue!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one SegmentValue and a cursor during pagination. +""" +type SegmentValueEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SegmentValueEdge.""" + node: SegmentValue! +} + +""" +Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors. +""" +type SelectedOption { + """The product option’s name.""" + name: String! + + """The product option’s value object.""" + optionValue: ProductOptionValue! + + """The product option’s value.""" + value: String! +} + +""" +The input fields for the selected variant option of the combined listing. +""" +input SelectedVariantOptionInput { + """The name of the parent product's option.""" + name: String! + + """The selected option value of the parent product's option.""" + value: String! + + """The metaobject value of the linked metafield.""" + linkedMetafieldValue: String +} + +""" +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 container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + A customer-facing description of the selling plan. + + If your store supports multiple currencies, then don't include + country-specific pricing content, such as "Buy monthly, get 10$ CAD off". This + field won't be converted to reflect different currencies. + """ + name: String! + + """ + The values of all options available on the selling plan. Selling plans are + grouped together in Liquid when they're created by the same app, and have the + same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!]! + + """ + Relative position of the selling plan for display. A lower position will be displayed before a higher position. + """ + position: Int + + """Selling plan pricing details.""" + pricingPolicies: [SellingPlanPricingPolicy!]! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +""" +Specifies the date when delivery or fulfillment is completed by a merchant for a given time cycle. You can also +define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who +start their subscription inside the cutoff period. + +Some example scenarios where anchors can be useful to implement advanced delivery behavior: +- A merchant starts fulfillment on a specific date every month. +- A merchant wants to bill the 1st of every quarter. +- A customer expects their delivery every Tuesday. + +For more details, see [About Selling Plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors). +""" +type SellingPlanAnchor { + """ + The cutoff day for the anchor. Specifies a buffer period before the anchor date for orders to be included in a + delivery or fulfillment cycle. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + """ + cutoffDay: Int + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int! + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType! +} + +"""The input fields required to create or update a selling plan anchor.""" +input SellingPlanAnchorInput { + """Represents the anchor type, must be one of WEEKDAY, MONTHDAY, YEARDAY.""" + type: SellingPlanAnchorType + + """ + The day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` isn't WEEKDAY, then the value must be between 1-31. + """ + day: Int + + """ + The month of the anchor. If type is different than YEARDAY, then the value must + be `null` or between 1-12. + """ + month: Int + + """ + The cutoff day of the anchor. + + If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets + the days of the week according to ISO 8601, where 1 is Monday. + + If `type` is MONTHDAY, then the value must be between 1-31. + + If `type` is YEARDAY, then the value must be `null`. + + This field should only be set if the cutoff field for the delivery policy is `null`. + """ + cutoffDay: Int +} + +"""Represents the anchor type.""" +enum SellingPlanAnchorType { + """Which day of the week, between 1-7.""" + WEEKDAY + + """Which day of the month, between 1-31.""" + MONTHDAY + + """ + Which days of the month and year, month between 1-12, and day between 1-31. + """ + YEARDAY +} + +""" +Represents the billing frequency associated to the selling plan (for example, bill every week, or bill every +three months). The selling plan billing policy and associated records (selling plan groups, selling plans, pricing +policies, and delivery policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanBillingPolicy = SellingPlanFixedBillingPolicy | SellingPlanRecurringBillingPolicy + +""" +The input fields that are required to create or update a billing policy type. +""" +input SellingPlanBillingPolicyInput { + """The fixed billing policy details.""" + fixed: SellingPlanFixedBillingPolicyInput + + """The recurring billing policy details.""" + recurring: SellingPlanRecurringBillingPolicyInput +} + +""" +The category of the selling plan. For the `OTHER` category, + you must fill out our [request form](https://docs.google.com/forms/d/e/1FAIpQLSeU18Xmw0Q61V8wdH-dfGafFqIBfRchQKUO8WAF3yJTvgyyZQ/viewform), + where we'll review your request for a new purchase option. +""" +enum SellingPlanCategory { + """The selling plan is for anything not in one of the other categories.""" + OTHER + + """The selling plan is for pre-orders.""" + PRE_ORDER + + """The selling plan is for subscriptions.""" + SUBSCRIPTION + + """The selling plan is for try before you buy purchases.""" + TRY_BEFORE_YOU_BUY +} + +""" +The amount charged at checkout when the full amount isn't charged at checkout. +""" +type SellingPlanCheckoutCharge { + """The charge type for the checkout charge.""" + type: SellingPlanCheckoutChargeType! + + """The charge value for the checkout charge.""" + value: SellingPlanCheckoutChargeValue! +} + +""" +The input fields that are required to create or update a checkout charge. +""" +input SellingPlanCheckoutChargeInput { + """The checkout charge type defined by the policy.""" + type: SellingPlanCheckoutChargeType + + """The checkout charge value defined by the policy.""" + value: SellingPlanCheckoutChargeValueInput +} + +"""The percentage value of the price used for checkout charge.""" +type SellingPlanCheckoutChargePercentageValue { + """The percentage value of the price used for checkout charge.""" + percentage: Float! +} + +"""The checkout charge when the full amount isn't charged at checkout.""" +enum SellingPlanCheckoutChargeType { + """The checkout charge is a percentage of the product or variant price.""" + PERCENTAGE + + """The checkout charge is a fixed price amount.""" + PRICE +} + +"""The portion of the price to be charged at checkout.""" +union SellingPlanCheckoutChargeValue = MoneyV2 | SellingPlanCheckoutChargePercentageValue + +""" +The input fields required to create or update an checkout charge value. +""" +input SellingPlanCheckoutChargeValueInput { + """The percentage value.""" + percentage: Float + + """The fixed value for an checkout charge.""" + fixedValue: Decimal +} + +"""An auto-generated type for paginating through multiple SellingPlans.""" +type SellingPlanConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanEdge!]! + + """ + A list of nodes that are contained in SellingPlanEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlan!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver +every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, +pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. +We recommend backing up these records if you need to restore them later. +""" +union SellingPlanDeliveryPolicy = SellingPlanFixedDeliveryPolicy | SellingPlanRecurringDeliveryPolicy + +""" +The input fields that are required to create or update a delivery policy. +""" +input SellingPlanDeliveryPolicyInput { + """The fixed delivery policy details.""" + fixed: SellingPlanFixedDeliveryPolicyInput + + """The recurring delivery policy details.""" + recurring: SellingPlanRecurringDeliveryPolicyInput +} + +""" +An auto-generated type which holds one SellingPlan and a cursor during pagination. +""" +type SellingPlanEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SellingPlanEdge.""" + node: SellingPlan! +} + +""" +The fixed selling plan billing policy defines how much of the price of the product will be billed to customer +at checkout. If there is an outstanding balance, it determines when it will be paid. +""" +type SellingPlanFixedBillingPolicy { + """The checkout charge when the full amount isn't charged at checkout.""" + checkoutCharge: SellingPlanCheckoutCharge! + + """The exact time when to capture the full payment.""" + remainingBalanceChargeExactTime: DateTime + + """ + The period after remaining_balance_charge_trigger, before capturing the full payment. Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """When to capture payment for amount due.""" + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger! +} + +"""The input fields required to create or update a fixed billing policy.""" +input SellingPlanFixedBillingPolicyInput { + """When to capture the payment for the amount due.""" + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger + + """The date and time to capture the full payment.""" + remainingBalanceChargeExactTime: DateTime + + """ + The period after capturing the payment for the amount due + (`remainingBalanceChargeTrigger`), and before capturing the full payment. + Expressed as an ISO8601 duration. + """ + remainingBalanceChargeTimeAfterCheckout: String + + """The checkout charge policy for the selling plan.""" + checkoutCharge: SellingPlanCheckoutChargeInput +} + +"""Represents a fixed selling plan delivery policy.""" +type SellingPlanFixedDeliveryPolicy { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """A buffer period for orders to be included in next fulfillment anchor.""" + cutoff: Int + + """The date and time when the fulfillment should trigger.""" + fulfillmentExactTime: DateTime + + """ + What triggers the fulfillment. The value must be one of ANCHOR, ASAP, EXACT_TIME, or UNKNOWN. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger! + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanFixedDeliveryPolicyIntent! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior! +} + +"""The input fields required to create or update a fixed delivery policy.""" +input SellingPlanFixedDeliveryPolicyInput { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """What triggers the fulfillment.""" + fulfillmentTrigger: SellingPlanFulfillmentTrigger + + """The date and time when the fulfillment should trigger.""" + fulfillmentExactTime: DateTime + + """A buffer period for orders to be included in a cycle.""" + cutoff: Int + + """Whether the delivery policy is merchant or buyer-centric.""" + intent: SellingPlanFixedDeliveryPolicyIntent + + """The pre-anchor behavior.""" + preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior +} + +"""Possible intentions of a Delivery Policy.""" +enum SellingPlanFixedDeliveryPolicyIntent { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behavior of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanFixedDeliveryPolicyPreAnchorBehavior { + """ + Orders placed can be fulfilled / delivered immediately. Orders placed inside a + cutoff can be fulfilled / delivered at the next anchor. + """ + ASAP + + """ + Orders placed can be fulfilled / delivered at the next anchor date. + Orders placed inside a cutoff will skip the next anchor and can be fulfilled / + delivered at the following anchor. + """ + NEXT +} + +""" +Represents the pricing policy of a subscription or deferred purchase option selling plan. +The selling plan fixed pricing policy works with the billing and delivery policy +to determine the final price. Discounts are divided among fulfillments. +For example, a subscription with a $10 discount and two deliveries will have a $5 +discount applied to each delivery. +""" +type SellingPlanFixedPricingPolicy implements SellingPlanPricingPolicyBase { + """The price adjustment type.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """The price adjustment value.""" + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + The date and time when the fixed selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a fixed selling plan pricing policy. +""" +input SellingPlanFixedPricingPolicyInput { + """ID of the pricing policy.""" + id: ID + + """Price adjustment type defined by the policy.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType + + """Price adjustment value defined by the policy.""" + adjustmentValue: SellingPlanPricingPolicyValueInput +} + +"""Describes what triggers fulfillment.""" +enum SellingPlanFulfillmentTrigger { + """Use the anchor values to calculate fulfillment date.""" + ANCHOR + + """As soon as possible.""" + ASAP + + """At an exact time defined by the fulfillment_exact_time field.""" + EXACT_TIME + + """Unknown. Usually to be determined in the future.""" + UNKNOWN +} + +""" +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( + """Filters the product variants by a product ID.""" + productId: ID + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """A count of product variants associated to the selling plan group.""" + productVariantsCount( + """The ID of the product to scope the count to.""" + productId: ID + ): Count + + """Products associated to the selling plan group.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductConnection! + + """A count of products associated to the selling plan group.""" + productsCount: Count + + """Selling plans associated to the selling plan group.""" + sellingPlans( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SellingPlanConnection! + + """A summary of the policies associated to the selling plan group.""" + summary: String + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! +} + +"""Return type for `sellingPlanGroupAddProducts` mutation.""" +type SellingPlanGroupAddProductsPayload { + """The updated selling plan group.""" + sellingPlanGroup: SellingPlanGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""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!]! +} + +""" +An auto-generated type for paginating through multiple SellingPlanGroups. +""" +type SellingPlanGroupConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SellingPlanGroupEdge!]! + + """ + A list of nodes that are contained in SellingPlanGroupEdge. You can fetch data + about an individual node, or you can follow the edges to fetch data about a + collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [SellingPlanGroup!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +"""Return type for `sellingPlanGroupCreate` mutation.""" +type SellingPlanGroupCreatePayload { + """The created selling plan group object.""" + sellingPlanGroup: SellingPlanGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""Return type for `sellingPlanGroupDelete` mutation.""" +type SellingPlanGroupDeletePayload { + """The ID of the deleted selling plan group object.""" + deletedSellingPlanGroupId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +""" +An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. +""" +type SellingPlanGroupEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of SellingPlanGroupEdge.""" + node: SellingPlanGroup! +} + +"""The input fields required to create or update a selling plan group.""" +input SellingPlanGroupInput { + """Buyer facing label of the selling plan group.""" + name: String + + """ID for app, exposed in Liquid and product JSON.""" + appId: String + + """Merchant facing label of the selling plan group.""" + merchantCode: String + + """Merchant facing description of the selling plan group.""" + description: String + + """List of selling plans to create.""" + sellingPlansToCreate: [SellingPlanInput!] + + """List of selling plans to update.""" + sellingPlansToUpdate: [SellingPlanInput!] + + """List of selling plans ids to delete.""" + sellingPlansToDelete: [ID!] + + """ + The values of all options available on the selling plan group. Selling plans + are grouped together in Liquid when they're created by the same app, and have + the same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!] + + """ + Relative value for display purposes of the selling plan group. A lower position will be displayed before a higher one. + """ + position: Int +} + +"""Return type for `sellingPlanGroupRemoveProducts` mutation.""" +type SellingPlanGroupRemoveProductsPayload { + """The removed product ids.""" + removedProductIds: [ID!] + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""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!]! +} + +"""The input fields for resource association with a Selling Plan Group.""" +input SellingPlanGroupResourceInput { + """The IDs of the Variants to add to the Selling Plan Group.""" + productVariantIds: [ID!] + + """The IDs of the Products to add to the Selling Plan Group.""" + productIds: [ID!] +} + +"""The set of valid sort keys for the SellingPlanGroup query.""" +enum SellingPlanGroupSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID + + """Sort by the `name` value.""" + NAME + + """Sort by the `updated_at` value.""" + UPDATED_AT +} + +"""Return type for `sellingPlanGroupUpdate` mutation.""" +type SellingPlanGroupUpdatePayload { + """The IDs of the deleted Subscription Plans.""" + deletedSellingPlanIds: [ID!] + + """The updated Selling Plan Group.""" + sellingPlanGroup: SellingPlanGroup + + """The list of errors that occurred from executing the mutation.""" + userErrors: [SellingPlanGroupUserError!]! +} + +"""Represents a selling plan group custom error.""" +type SellingPlanGroupUserError implements DisplayableError { + """The error code.""" + code: SellingPlanGroupUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `SellingPlanGroupUserError`. +""" +enum SellingPlanGroupUserErrorCode { + """The input value is blank.""" + BLANK + + """The input value should be equal to the value allowed.""" + EQUAL_TO + + """The input value should be greater than the minimum allowed value.""" + GREATER_THAN + + """ + The input value should be greater than or equal to the minimum value allowed. + """ + GREATER_THAN_OR_EQUAL_TO + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is invalid.""" + INVALID + + """The input value should be less than the maximum value allowed.""" + LESS_THAN + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """The input value is not a number.""" + NOT_A_NUMBER + + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value needs to be blank.""" + PRESENT + + """The input value is already taken.""" + TAKEN + + """The input value is too big.""" + TOO_BIG + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is the wrong length.""" + WRONG_LENGTH + + """Exceeded the selling plan limit (31).""" + SELLING_PLAN_COUNT_UPPER_BOUND + + """Must include at least one selling plan.""" + SELLING_PLAN_COUNT_LOWER_BOUND + + """ + Selling plan's billing policy max cycles must be greater than min cycles. + """ + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES + + """Selling plan's billing and delivery policies anchors must be equal.""" + SELLING_PLAN_BILLING_AND_DELIVERY_POLICY_ANCHORS_MUST_BE_EQUAL + + """Selling plan's billing cycle must be a multiple of delivery cycle.""" + SELLING_PLAN_BILLING_CYCLE_MUST_BE_A_MULTIPLE_OF_DELIVERY_CYCLE + + """Selling plan's pricing policies must contain one fixed pricing policy.""" + SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY + + """ + Cannot define option2 on this selling plan as there's no label on the parent selling plan group. + """ + SELLING_PLAN_MISSING_OPTION2_LABEL_ON_PARENT_GROUP + + """ + Cannot define option3 on this selling plan as there's no label on the parent selling plan group. + """ + SELLING_PLAN_MISSING_OPTION3_LABEL_ON_PARENT_GROUP + + """Selling plan's option2 is required because option2 exists.""" + SELLING_PLAN_OPTION2_REQUIRED_AS_DEFINED_ON_PARENT_GROUP + + """Selling plan's option3 is required because option3 exists.""" + SELLING_PLAN_OPTION3_REQUIRED_AS_DEFINED_ON_PARENT_GROUP + + """Selling plans can't have more than 2 pricing policies.""" + SELLING_PLAN_PRICING_POLICIES_LIMIT + + """The selling plan list provided contains 1 or more invalid IDs.""" + RESOURCE_LIST_CONTAINS_INVALID_IDS + + """Product variant does not exist.""" + PRODUCT_VARIANT_DOES_NOT_EXIST + + """Product does not exist.""" + PRODUCT_DOES_NOT_EXIST + + """Selling plan group does not exist.""" + GROUP_DOES_NOT_EXIST + + """Selling plan group could not be deleted.""" + GROUP_COULD_NOT_BE_DELETED + + """Could not add the resource to the selling plan group.""" + ERROR_ADDING_RESOURCE_TO_GROUP + + """Missing delivery policy.""" + SELLING_PLAN_DELIVERY_POLICY_MISSING + + """Missing billing policy.""" + SELLING_PLAN_BILLING_POLICY_MISSING + + """Selling plan does not exist.""" + PLAN_DOES_NOT_EXIST + + """Selling plan ID must be specified to update.""" + PLAN_ID_MUST_BE_SPECIFIED_TO_UPDATE + + """Only one billing policy type can be defined.""" + ONLY_NEED_ONE_BILLING_POLICY_TYPE + + """Only one delivery policy type can be defined.""" + ONLY_NEED_ONE_DELIVERY_POLICY_TYPE + + """Only one pricing policy type can be defined.""" + ONLY_NEED_ONE_PRICING_POLICY_TYPE + + """Billing and delivery policy types must be the same.""" + BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME + + """Only one pricing policy adjustment value type can be defined.""" + ONLY_NEED_ONE_PRICING_POLICY_VALUE + + """Pricing policy's adjustment value and adjustment type must match.""" + PRICING_POLICY_ADJUSTMENT_VALUE_AND_TYPE_MUST_MATCH + + """Cannot have multiple selling plans with the same name.""" + SELLING_PLAN_DUPLICATE_NAME + + """Cannot have multiple selling plans with the same options.""" + SELLING_PLAN_DUPLICATE_OPTIONS + + """A fixed selling plan can have at most one pricing policy.""" + SELLING_PLAN_FIXED_PRICING_POLICIES_LIMIT + + """ + A fixed billing policy's remaining_balance_charge_exact_time can't be blank + when the remaining_balance_charge_trigger is EXACT_TIME. + """ + REMAINING_BALANCE_CHARGE_EXACT_TIME_REQUIRED + + """A fixed billing policy's checkout charge value and type must match.""" + CHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH + + """A fixed billing policy's checkout charge can have at most one value.""" + ONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE + + """ + A fixed billing policy's remaining_balance_charge_exact_time must not be + present when the remaining_balance_charge_trigger isn't EXACT_TIME. + """ + REMAINING_BALANCE_CHARGE_EXACT_TIME_NOT_ALLOWED + + """ + A fixed billing policy's remaining_balance_charge_time_after_checkout must be + present and greater than zero when the remaining_balance_charge_trigger is + TIME_AFTER_CHECKOUT. + """ + REMAINING_BALANCE_CHARGE_TIME_AFTER_CHECKOUT_MUST_BE_GREATER_THAN_ZERO + + """ + A fixed billing policy's remaining_balance_charge_trigger must be + NO_REMAINING_BALANCE when the checkout_charge_type is PERCENTAGE and + checkout_charge_value is 100. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_ON_FULL_CHECKOUT + + """ + A fixed billing policy's remaining_balance_charge_trigger can't be + NO_REMAINING_BALANCE when the checkout_charge_type is PERCENTAGE and + checkout_charge_value is less than 100. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PARTIAL_PERCENTAGE_CHECKOUT_CHARGE + + """ + A fixed billing policy's remaining_balance_charge_trigger can't be + NO_REMAINING_BALANCE when the checkout_charge_type is PRICE. + """ + REMAINING_BALANCE_CHARGE_TRIGGER_NO_REMAINING_BALANCE_ON_PRICE_CHECKOUT_CHARGE + + """ + A fixed billing policy's fulfillment_exact_time can't be blank when the fulfillment_trigger is EXACT_TIME. + """ + FULFILLMENT_EXACT_TIME_REQUIRED + + """ + A fixed billing policy's fulfillment_exact_time must not be present when the fulfillment_trigger isn't EXACT_TIME. + """ + FULFILLMENT_EXACT_TIME_NOT_ALLOWED + + """ + A fixed delivery policy's anchors must not be present when the fulfillment_trigger isn't ANCHOR. + """ + SELLING_PLAN_ANCHORS_NOT_ALLOWED + + """ + A fixed delivery policy's anchors must be present when the fulfillment_trigger is ANCHOR. + """ + SELLING_PLAN_ANCHORS_REQUIRED + + """A selling plan can't have both fixed and recurring billing policies.""" + ONLY_ONE_OF_FIXED_OR_RECURRING_BILLING + + """A selling plan can't have both fixed and recurring delivery policies.""" + ONLY_ONE_OF_FIXED_OR_RECURRING_DELIVERY + + """Billing policy's interval is too large.""" + BILLING_POLICY_INTERVAL_TOO_LARGE + + """Delivery policy's interval is too large.""" + DELIVERY_POLICY_INTERVAL_TOO_LARGE + + """The input submitted is invalid.""" + INVALID_INPUT +} + +"""The input fields to create or update a selling plan.""" +input SellingPlanInput { + """ID of the selling plan.""" + id: ID + + """Buyer facing string which describes the selling plan content.""" + name: String + + """Buyer facing string which describes the selling plan commitment.""" + description: String + + """Selling plan policy which describes the billing details.""" + billingPolicy: SellingPlanBillingPolicyInput + + """A selling plan policy which describes the delivery details.""" + deliveryPolicy: SellingPlanDeliveryPolicyInput + + """A selling plan policy which describes the inventory details.""" + inventoryPolicy: SellingPlanInventoryPolicyInput + + """Additional customizable information to associate with the SellingPlan.""" + metafields: [MetafieldInput!] + + """ + The pricing policies which describe the pricing details. Each selling plan + can only contain a maximum of 2 pricing policies. + """ + pricingPolicies: [SellingPlanPricingPolicyInput!] + + """ + The values of all options available on the selling plan. Selling plans are + grouped together in Liquid when they're created by the same app, and have the + same `selling_plan_group.name` and `selling_plan_group.options` values. + """ + options: [String!] + + """ + Relative value for display purposes of this plan. A lower position will be displayed before a higher one. + """ + position: Int + + """ + The category used to classify this selling plan for reporting purposes. + """ + category: SellingPlanCategory +} + +"""Represents valid selling plan interval.""" +enum SellingPlanInterval { + """Day interval.""" + DAY + + """Week interval.""" + WEEK + + """Month interval.""" + MONTH + + """Year interval.""" + YEAR +} + +"""The selling plan inventory policy.""" +type SellingPlanInventoryPolicy { + """When to reserve inventory for the order.""" + reserve: SellingPlanReserve! +} + +"""The input fields required to create or update an inventory policy.""" +input SellingPlanInventoryPolicyInput { + """ + When to reserve inventory for the order. The value must be ON_FULFILLMENT or ON_SALE. + """ + reserve: SellingPlanReserve +} + +""" +Represents the type of pricing associated to the selling plan (for example, a $10 or 20% discount that is set +for a limited period or that is fixed for the duration of the subscription). Selling plan pricing policies and +associated records (selling plan groups, selling plans, billing policy, and delivery policy) are deleted 48 +hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need +to restore them later. +""" +union SellingPlanPricingPolicy = SellingPlanFixedPricingPolicy | SellingPlanRecurringPricingPolicy + +"""Represents a selling plan pricing policy adjustment type.""" +enum SellingPlanPricingPolicyAdjustmentType { + """Percentage off adjustment.""" + PERCENTAGE + + """Fixed amount off adjustment.""" + FIXED_AMOUNT + + """Price of the policy.""" + PRICE +} + +"""Represents a selling plan pricing policy adjustment value type.""" +union SellingPlanPricingPolicyAdjustmentValue = MoneyV2 | SellingPlanPricingPolicyPercentageValue + +"""Represents selling plan pricing policy common fields.""" +interface SellingPlanPricingPolicyBase { + """The price adjustment type.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """The price adjustment value.""" + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! +} + +""" +The input fields required to create or update a selling plan pricing policy. +""" +input SellingPlanPricingPolicyInput { + """Recurring pricing policy details.""" + recurring: SellingPlanRecurringPricingPolicyInput + + """Fixed pricing policy details.""" + fixed: SellingPlanFixedPricingPolicyInput +} + +"""The percentage value of a selling plan pricing policy percentage type.""" +type SellingPlanPricingPolicyPercentageValue { + """The percentage value.""" + percentage: Float! +} + +""" +The input fields required to create or update a pricing policy adjustment value. +""" +input SellingPlanPricingPolicyValueInput { + """The percentage value.""" + percentage: Float + + """The fixed value for an fixed amount off or a new policy price.""" + fixedValue: Decimal +} + +"""Represents a recurring selling plan billing policy.""" +type SellingPlanRecurringBillingPolicy { + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """The date and time when the selling plan billing policy was created.""" + createdAt: DateTime! + + """The billing frequency, it can be either: day, week, month or year.""" + interval: SellingPlanInterval! + + """The number of intervals between billings.""" + intervalCount: Int! + + """Maximum number of billing iterations.""" + maxCycles: Int + + """Minimum number of billing iterations.""" + minCycles: Int +} + +""" +The input fields required to create or update a recurring billing policy. +""" +input SellingPlanRecurringBillingPolicyInput { + """The billing frequency, it can be either: day, week, month or year.""" + interval: SellingPlanInterval + + """The number of intervals between billings.""" + intervalCount: Int + + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """Minimum number of billing iterations.""" + minCycles: Int + + """Maximum number of billing iterations.""" + maxCycles: Int +} + +"""Represents a recurring selling plan delivery policy.""" +type SellingPlanRecurringDeliveryPolicy { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """The date and time when the selling plan delivery policy was created.""" + createdAt: DateTime! + + """ + Number of days which represent a buffer period for orders to be included in a cycle. + """ + cutoff: Int + + """ + Whether the delivery policy is merchant or buyer-centric. + Buyer-centric delivery policies state the time when the buyer will receive the goods. + Merchant-centric delivery policies state the time when the fulfillment should be started. + Currently, only merchant-centric delivery policies are supported. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent! + + """The delivery frequency, it can be either: day, week, month or year.""" + interval: SellingPlanInterval! + + """The number of intervals between deliveries.""" + intervalCount: Int! + + """ + The fulfillment or delivery behavior of the first fulfillment when the order + is placed before the anchor. The default value for this field is `ASAP`. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior! +} + +"""The input fields to create or update a recurring delivery policy.""" +input SellingPlanRecurringDeliveryPolicyInput { + """The delivery frequency, it can be either: day, week, month or year.""" + interval: SellingPlanInterval + + """The number of intervals between deliveries.""" + intervalCount: Int + + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """A buffer period for orders to be included in a cycle.""" + cutoff: Int + + """ + Intention of this delivery policy, it can be either: delivery or fulfillment. + """ + intent: SellingPlanRecurringDeliveryPolicyIntent + + """The pre-anchor behavior. It can be either: asap or next.""" + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior +} + +"""Whether the delivery policy is merchant or buyer-centric.""" +enum SellingPlanRecurringDeliveryPolicyIntent { + """ + A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. + """ + FULFILLMENT_BEGIN +} + +""" +The fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor. +""" +enum SellingPlanRecurringDeliveryPolicyPreAnchorBehavior { + """ + The orders placed can be fulfilled or delivered immediately. The orders placed + inside a cutoff can be fulfilled or delivered at the next anchor. + """ + ASAP + + """ + The orders placed can be fulfilled or delivered at the next anchor date. + The orders placed inside a cutoff will skip the next anchor and can be fulfilled or + delivered at the following anchor. + """ + NEXT +} + +""" +Represents a recurring selling plan pricing policy. It applies after the fixed +pricing policy. By using the afterCycle parameter, you can specify the cycle +when the recurring pricing policy comes into effect. Recurring pricing policies +are not available for deferred purchase options. +""" +type SellingPlanRecurringPricingPolicy implements SellingPlanPricingPolicyBase { + """The price adjustment type.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """The price adjustment value.""" + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """Cycle after which this pricing policy applies.""" + afterCycle: Int + + """ + The date and time when the recurring selling plan pricing policy was created. + """ + createdAt: DateTime! +} + +""" +The input fields required to create or update a recurring selling plan pricing policy. +""" +input SellingPlanRecurringPricingPolicyInput { + """ID of the pricing policy.""" + id: ID + + """Price adjustment type defined by the policy.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType + + """Price adjustment value defined by the policy.""" + adjustmentValue: SellingPlanPricingPolicyValueInput + + """Cycle after which the pricing policy applies.""" + afterCycle: Int! +} + +"""When to capture the payment for the remaining amount due.""" +enum SellingPlanRemainingBalanceChargeTrigger { + """When there's no remaining balance to be charged after checkout.""" + NO_REMAINING_BALANCE + + """ + At an exact time defined by the remaining_balance_charge_exact_time field. + """ + EXACT_TIME + + """ + After the duration defined by the remaining_balance_charge_time_after_checkout field. + """ + TIME_AFTER_CHECKOUT +} + +"""When 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 +} + +"""SEO information.""" +type SEO { + """SEO Description.""" + description: String + + """SEO Title.""" + title: String +} + +"""The input fields for SEO information.""" +input SEOInput { + """SEO title of the product.""" + title: String + + """SEO description of the product.""" + description: String +} + +""" +A server pixel stores configuration for streaming customer interactions to an EventBridge or PubSub endpoint. +""" +type ServerPixel implements Node { + """A globally-unique ID.""" + id: ID! + + """The current state of this server pixel.""" + status: ServerPixelStatus + + """Address of the EventBridge or PubSub endpoint.""" + webhookEndpointAddress: String +} + +"""Return type for `serverPixelCreate` mutation.""" +type ServerPixelCreatePayload { + """The new server pixel.""" + serverPixel: ServerPixel + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ErrorsServerPixelUserError!]! +} + +"""Return type for `serverPixelDelete` mutation.""" +type ServerPixelDeletePayload { + """The ID of the server pixel that was deleted, if one was deleted.""" + deletedServerPixelId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ErrorsServerPixelUserError!]! +} + +"""The current state of a server pixel.""" +enum ServerPixelStatus { + """ + This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. + """ + CONNECTED + + """ + This server pixel is disconnected and unconfigured: it does not stream events + to the endpoint and no endpoint address had been added to the server pixel. + """ + DISCONNECTED_UNCONFIGURED + + """ + This server pixel is disconnected: it does not stream events to the endpoint + and an endpoint address has been added to the server pixel. + """ + DISCONNECTED_CONFIGURED +} + +"""The set of valid sort keys for the ShipmentLineItem query.""" +enum ShipmentLineItemSortKeys { + """Sort by the `id` value.""" + ID +} + +""" +The [discount class](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) +that's used to control how discounts can be combined. +""" +enum ShippingDiscountClass { + """Combined as a shipping discount.""" + SHIPPING +} + +""" +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 + + """ + 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 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 with currency. If provided, `price` will be ignored. + """ + priceWithCurrency: MoneyInput + + """A unique identifier for the shipping rate.""" + shippingRateHandle: String + + """Title of the shipping rate.""" + title: String +} + +"""A sale associated with a shipping charge.""" +type ShippingLineSale implements Sale { + """The type of order action that the sale represents.""" + actionType: SaleActionType! + + """The unique ID for the sale.""" + id: ID! + + """The line type assocated with the sale.""" + lineType: SaleLineType! + + """The number of units either ordered or intended to be returned.""" + quantity: Int + + """ + The shipping line item for the associated sale. `shippingLine` is not available if the `SaleActionType` is a return. + """ + shippingLine: ShippingLine + + """All individual taxes associated with the sale.""" + taxes: [SaleTax!]! + + """The total sale amount after taxes and discounts.""" + totalAmount: MoneyBag! + + """The total discounts allocated to the sale after taxes.""" + totalDiscountAmountAfterTaxes: MoneyBag! + + """The total discounts allocated to the sale before taxes.""" + totalDiscountAmountBeforeTaxes: MoneyBag! + + """The total amount of taxes for the sale.""" + totalTaxAmount: MoneyBag! +} + +"""Return type for `shippingPackageDelete` mutation.""" +type ShippingPackageDeletePayload { + """The ID of the deleted shipping package.""" + deletedId: ID + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `shippingPackageMakeDefault` mutation.""" +type ShippingPackageMakeDefaultPayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Type of a shipping package.""" +enum ShippingPackageType { + """A shipping box.""" + BOX + + """A flat rate packaging supplied by a carrier.""" + FLAT_RATE + + """An envelope.""" + ENVELOPE + + """A soft-pack, bubble-wrap or vinyl envelope.""" + SOFT_PACK +} + +"""Return type for `shippingPackageUpdate` mutation.""" +type ShippingPackageUpdatePayload { + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +""" +A shipping 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 HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node { + """Account owner information.""" + accountOwner: StaffMember! + + """ + A list of the shop's active alert messages that appear in the Shopify admin. + """ + alerts: [ShopAlert!]! + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategories: [ProductCategory!]! @deprecated(reason: "Use `allProductCategoriesList` instead.") + + """ + A list of the shop's product categories. Limit: 1000 product categories. + """ + allProductCategoriesList: [TaxonomyCategory!]! + + """The token required to query the shop's reports or dashboards.""" + analyticsToken: String! @deprecated(reason: "Not supported anymore.") + + """ + The paginated list of fulfillment orders assigned to the shop locations owned by the app. + + Assigned fulfillment orders are fulfillment orders that are set to be fulfilled from locations + managed by + [fulfillment services](https://shopify.dev/api/admin-graphql/latest/objects/FulfillmentService) + that are registered by the app. + One app (api_client) can host multiple fulfillment services on a shop. + Each fulfillment service manages a dedicated location on a shop. + Assigned fulfillment orders can have associated + [fulfillment requests](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus), + or might currently not be requested to be fulfilled. + + The app must have `read_assigned_fulfillment_orders` + [access scope](https://shopify.dev/docs/api/usage/access-scopes) + to be able to retrieve fulfillment orders assigned to its locations. + + All assigned fulfillment orders (except those with the `CLOSED` status) will be returned by default. + Perform filtering with the `assignmentStatus` argument + to receive only fulfillment orders that have been requested to be fulfilled. + """ + assignedFulfillmentOrders( + """ + The assigment status of the fulfillment orders that should be returned. + If `assignmentStatus` argument is not provided, then + the query will return all assigned fulfillment orders, + except those that have the `CLOSED` status. + """ + assignmentStatus: FulfillmentOrderAssignmentStatus + + """ + Returns fulfillment orders only for certain locations, specified by a list of location IDs. + """ + locationIds: [ID!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + ): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.assignedFulfillmentOrders` instead. Details: https://shopify.dev/changelog/moving-the-shop-assignedfulfillmentorders-connection-to-queryroot") + + """The list of sales channels not currently installed on the shop.""" + availableChannelApps( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): AppConnection! + + """The shop's billing address information.""" + billingAddress: ShopAddress! + + """List of all channel definitions associated with a shop.""" + channelDefinitionsForInstalledChannels: [AvailableChannelDefinitionsByChannel!]! + + """List of the shop's active sales channels.""" + channels( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `QueryRoot.channels` instead.") + + """Specifies whether the shop supports checkouts via Checkout API.""" + checkoutApiSupported: Boolean! + + """List of the shop's collections.""" + collections( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CollectionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): CollectionConnection! @deprecated(reason: "Use `QueryRoot.collections` instead.") + + """ + The public-facing contact email address for the shop. + Customers will use this email to communicate with the shop owner. + """ + contactEmail: String! + + """Countries that have been defined in shipping zones for the shop.""" + countriesInShippingZones: CountriesInShippingZones! + + """The date and time when the shop was created.""" + createdAt: DateTime! + + """The three letter code for the currency that the shop sells in.""" + currencyCode: CurrencyCode! + + """How currencies are displayed on your store.""" + currencyFormats: CurrencyFormats! + + """ + The presentment currency settings for the shop excluding the shop's own currency. + """ + currencySettings( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CurrencySettingConnection! + + """ + Whether customer accounts are required, optional, or disabled for the shop. + """ + customerAccounts: ShopCustomerAccountsSetting! + + """Information about the shop's customer accounts.""" + customerAccountsV2: CustomerAccountsV2! + + """A list of tags that have been added to customer accounts.""" + customerTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! + + """Customer accounts associated to the shop.""" + customers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: CustomerSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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! + + """List of saved draft orders on the shop.""" + draftOrders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: DraftOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 entitlements for a shop.""" + entitlements: EntitlementsType! + + """The set of features enabled for the shop.""" + features: ShopFeatures! + + """ + The paginated list of merchant-managed and third-party fulfillment orders. + """ + fulfillmentOrders( + """Whether to include closed fulfillment orders.""" + includeClosed: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: FulfillmentOrderSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): FulfillmentOrderConnection! @deprecated(reason: "Use `QueryRoot.fulfillmentOrders` instead.") + + """List of the shop's installed fulfillment services.""" + fulfillmentServices: [FulfillmentService!]! + + """The shop's time zone as defined by the IANA.""" + ianaTimezone: String! + + """A globally-unique ID.""" + id: ID! + + """List of the shop's inventory items.""" + inventoryItems( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): InventoryItemConnection! @deprecated(reason: "Use `QueryRoot.inventoryItems` instead.") + + """ + The number of pendings orders on the shop. + Limited to a maximum of 10000. + """ + limitedPendingOrderCount: LimitedPendingOrderCount! @deprecated(reason: "Use `QueryRoot.pendingOrdersCount` instead.") + + """List of active locations of the shop.""" + locations( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: LocationSortKeys = NAME + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """Whether to include the legacy locations of fulfillment services.""" + includeLegacy: Boolean = false + + """Whether to include the locations that are deactivated.""" + includeInactive: Boolean = false + ): LocationConnection! @deprecated(reason: "Use `QueryRoot.locations` instead.") + + """ + Whether SMS marketing has been enabled on the shop's checkout configuration settings. + """ + marketingSmsConsentEnabledAtCheckout: Boolean! + + """The approval signals for a shop to support onboarding to channel apps.""" + merchantApprovalSignals: MerchantApprovalSignals + + """ + A [custom field](https://shopify.dev/docs/apps/build/custom-data), + including its `namespace` and `key`, that's associated with a Shopify resource + for the purposes of adding and storing additional information. + """ + metafield( + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The shop's .myshopify.com domain name.""" + myshopifyDomain: String! + + """The shop's name.""" + name: String! + + """The shop's settings related to navigation.""" + navigationSettings: [NavigationItem!]! + + """The prefix that appears before order numbers.""" + orderNumberFormatPrefix: String! + + """The suffix that appears after order numbers.""" + orderNumberFormatSuffix: String! + + """A list of tags that have been added to orders.""" + orderTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """Sort type.""" + sort: ShopTagSort = ALPHABETICAL + ): StringConnection! + + """A list of the shop's orders.""" + orders( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: OrderSortKeys = PROCESSED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductImageSortKeys = CREATED_AT + ): ImageConnection! @deprecated(reason: "Use `files` instead. See [filesQuery](https://shopify.dev/docs/api/admin-graphql/latest/queries/files) and its [query](https://shopify.dev/docs/api/admin-graphql/latest/queries/files#argument-query) argument for more information.") + + """A list of tags that have been added to products.""" + productTags( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTags` instead.") + + """The list of types added to products.""" + productTypes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTypes` instead.") + + """List of the shop's product variants.""" + productVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductVariantSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): ProductVariantConnection! @deprecated(reason: "Use `QueryRoot.productVariants` instead.") + + """The list of vendors added to products.""" + productVendors( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productVendors` instead.") + + """List of the shop's products.""" + products( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: ProductSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 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` | + | 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 | 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'` | + | 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 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 + ): ProductConnection! @deprecated(reason: "Use `QueryRoot.products`.") + + """The number of publications for the shop.""" + publicationCount: Int! @deprecated(reason: "Use `QueryRoot.publicationsCount` instead.") + + """ + The shop's limits for specific resources. For example, the maximum number + ofvariants allowed per product, or the maximum number of locations allowed. + """ + resourceLimits: ShopResourceLimits! + + """The URL of the rich text editor that can be used for mobile devices.""" + richTextEditorUrl: URL! + + """Fetches a list of admin search results by a specified query.""" + search( + """The search query to filter by.""" + query: String! + + """The search result types to filter by.""" + types: [SearchResultType!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + ): SearchResultConnection! + + """ + The list of search filter options for the shop. These can be used to filter productvisibility for the shop. + """ + searchFilters: SearchFilterOptions! + + """Whether the shop has outstanding setup steps.""" + setupRequired: Boolean! + + """The list of countries that the shop ships to.""" + shipsToCountries: [CountryCode!]! + + """The name of the shop owner.""" + shopOwnerName: String! + + """The list of all legal policies associated with a shop.""" + shopPolicies: [ShopPolicy!]! + + """The paginated list of the shop's staff members.""" + staffMembers( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StaffMemberConnection! @deprecated(reason: "Use `QueryRoot.staffMembers` instead.") + + """ + The storefront access token of a private application. These are scoped per-application. + """ + storefrontAccessTokens( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): StorefrontAccessTokenConnection! + + """The URL of the shop's storefront.""" + storefrontUrl: URL! @deprecated(reason: "Use `url` instead.") + + """Whether the shop charges taxes for shipping.""" + taxShipping: Boolean! + + """Whether applicable taxes are included in the shop's product prices.""" + taxesIncluded: Boolean! + + """The shop's time zone abbreviation.""" + timezoneAbbreviation: String! + + """The shop's time zone offset.""" + timezoneOffset: String! + + """The shop's time zone offset expressed as a number of minutes.""" + timezoneOffsetMinutes: Int! + + """ + Whether transactional SMS sent by Shopify have been disabled for a shop. + """ + transactionalSmsDisabled: Boolean! + + """The published translations associated with the resource.""" + translations( + """Filters translations locale.""" + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID + ): [Translation!]! + + """The shop's unit system for weights and measures.""" + unitSystem: UnitSystem! + + """The date and time when the shop was last updated.""" + updatedAt: DateTime! + + """The URL of the shop's online store.""" + url: URL! + + """The shop's primary unit of weight for products and shipping.""" + weightUnit: WeightUnit! +} + +"""An address for a shop.""" +type ShopAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String + + """The name of the city, district, village, or town.""" + city: String + + """The name of the company or organization.""" + company: String + + """Whether the address coordinates are valid.""" + coordinatesValidated: Boolean! + + """The name of the country.""" + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") + + """ + The two-letter code for the country of the address. + + For example, US. + """ + countryCodeV2: CountryCode + + """The first name.""" + firstName: String @deprecated(reason: "Always null in this context.") + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """Whether to include the company in the formatted address.""" + withCompany: Boolean = true + ): [String!]! + + """A comma-separated list of the values for city, province, and country.""" + formattedArea: String + + """A globally-unique ID.""" + id: ID! + + """The last name.""" + lastName: String @deprecated(reason: "Always null in this context.") + + """The latitude coordinate of the address.""" + latitude: Float + + """The longitude coordinate of the address.""" + longitude: Float + + """The full name, based on firstName and lastName.""" + name: String @deprecated(reason: "Always null in this context.") + + """ + A phone number associated with the address. + + Formatted using E.164 standard. For example, _+16135551111_. + """ + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """ + The alphanumeric code for the region. + + For example, ON. + """ + provinceCode: String + + """The zip or postal code of the address.""" + zip: String +} + +""" +An alert message that appears in the Shopify admin about a problem with a store +setting, with an action to take. For example, you could show an alert to ask the +merchant to enter their billing information to activate Shopify Plus. +""" +type ShopAlert { + """ + The text for the button in the alert that links to related information. For example, _Add credit card_. + """ + action: ShopAlertAction! + + """ + A description of the alert and further information, such as whether the merchant will be charged. + """ + description: String! +} + +"""An action associated to a shop alert, such as adding a credit card.""" +type ShopAlertAction { + """The text for the button in the alert. For example, _Add credit card_.""" + title: String! + + """The target URL that the button links to.""" + url: URL! +} + +"""Billing preferences for the shop.""" +type ShopBillingPreferences { + """The currency the shop uses to pay for apps and services.""" + currency: CurrencyCode! +} + +""" +Possible branding of a shop. +Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin. +""" +enum ShopBranding { + """Shop has Shopify Gold branding.""" + SHOPIFY_GOLD + + """Shop has Shopify Plus branding.""" + SHOPIFY_PLUS + + """Shop has Rogers branding.""" + ROGERS + + """Shop has Shopify branding.""" + SHOPIFY +} + +"""Represents the shop's customer account requirement preference.""" +enum ShopCustomerAccountsSetting { + REQUIRED + OPTIONAL + DISABLED +} + +""" +Represents the feature set available to the shop. +Most fields specify whether a feature is enabled for a shop, and some fields return information +related to specific features. +""" +type ShopFeatures { + """Whether a shop has access to Avalara AvaTax.""" + avalaraAvatax: Boolean! + + """ + The branding of the shop, which influences its look and feel in the Shopify admin. + """ + branding: ShopBranding! + + """Represents the Bundles feature configuration for the shop.""" + bundles: BundlesFeature! + + """Whether a shop's online store can have CAPTCHA protection.""" + captcha: Boolean! + + """ + Whether a shop's online store can have CAPTCHA protection for domains not managed by Shopify. + """ + captchaExternalDomains: Boolean! @deprecated(reason: "No longer required for external domains") + + """Represents the cart transform feature configuration for the shop.""" + cartTransform: CartTransformFeature! + + """Whether the delivery profiles functionality is enabled for this shop.""" + deliveryProfiles: Boolean! @deprecated(reason: "Delivery profiles are now 100% enabled across Shopify.") + + """ + Whether a shop has access to the Google Analytics dynamic remarketing feature. + """ + dynamicRemarketing: Boolean! + + """Whether a shop can be migrated to use Shopify subscriptions.""" + eligibleForSubscriptionMigration: Boolean! + + """Whether a shop is configured properly to sell subscriptions.""" + eligibleForSubscriptions: Boolean! + + """Whether a shop can create gift cards.""" + giftCards: Boolean! + + """ + Whether a shop displays Harmonized System codes on products. This is used for customs when shipping + internationally. + """ + harmonizedSystemCode: Boolean! + + """Whether a shop can enable international domains.""" + internationalDomains: Boolean! @deprecated(reason: "All shops have international domains through Shopify Markets.") + + """Whether a shop can enable international price overrides.""" + internationalPriceOverrides: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """Whether a shop can enable international price rules.""" + internationalPriceRules: Boolean! @deprecated(reason: "Use the `markets` field on `EntitlementsType`.\nEach market entitlement has a `catalogs` field that indicates\nwhether the shop's markets have access to catalogs and price overrides.\n") + + """ + Whether a shop has enabled a legacy subscription gateway to handle older subscriptions. + """ + legacySubscriptionGatewayEnabled: Boolean! + + """ + Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial + or don't have a storefront. + """ + liveView: Boolean! + + """Whether a shop has access to the onboarding visual.""" + onboardingVisual: Boolean! @deprecated(reason: "No longer supported.") + + """ + Whether a shop is configured to sell subscriptions with PayPal Express. + """ + paypalExpressSubscriptionGatewayStatus: PaypalExpressSubscriptionsGatewayStatus! + + """Whether a shop has access to all reporting features.""" + reports: Boolean! + + """Whether a shop has ever had subscription products.""" + sellsSubscriptions: Boolean! + + """Whether the shop has a Shopify Plus subscription.""" + shopifyPlus: Boolean! @deprecated(reason: "Use Shop.plan.shopifyPlus instead.") + + """ + Whether to show metrics in the Shopify admin. Metrics are hidden for new merchants until they become meaningful. + """ + showMetrics: Boolean! + + """Whether a shop has an online store.""" + storefront: Boolean! + + """Whether a shop is eligible for Unified Markets.""" + unifiedMarkets: Boolean! + + """Whether a shop is using Shopify Balance.""" + usingShopifyBalance: Boolean! +} + +"""A 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 { + """The name of the account opener.""" + accountOpenerName: String + + """Whether the Shopify Payments setup is completed.""" + activated: Boolean! + + """Current balances in all currencies for the account.""" + balance: [MoneyV2!]! + + """A list of balance transactions associated with the shop.""" + balanceTransactions( + """Determines if returned transactions contain transaction type transfer.""" + hideTransfers: Boolean = false + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: BalanceTransactionSortKeys = PROCESSED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): ShopifyPaymentsBalanceTransactionConnection! + + """All bank accounts configured for the Shopify Payments account.""" + bankAccounts( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ShopifyPaymentsBankAccountConnection! + + """ + The statement descriptor used for charges. + + The statement descriptor appears on a customer's credit card or bank statement when they make a purchase. + """ + chargeStatementDescriptor: String @deprecated(reason: "Use `chargeStatementDescriptors` instead.") + + """ + The statement descriptors used for charges. + + These descriptors appear on a customer's credit card or bank statement when they make a purchase. + """ + chargeStatementDescriptors: ShopifyPaymentsChargeStatementDescriptor + + """The Shopify Payments account country.""" + country: String! + + """The default payout currency for the Shopify Payments account.""" + defaultCurrency: CurrencyCode! + + """ + All disputes that originated from a transaction made with the Shopify Payments account. + """ + disputes( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): ShopifyPaymentsDisputeConnection! + + """A globally-unique ID.""" + id: ID! + + """Whether the Shopify Payments account can be onboarded.""" + onboardable: Boolean! + + """The payout schedule for the account.""" + payoutSchedule: ShopifyPaymentsPayoutSchedule! + + """ + The descriptor used for payouts. + + The descriptor appears on a merchant's bank statement when they receive a payout. + """ + payoutStatementDescriptor: String + + """ + All current and previous payouts made between the account and the bank account. + """ + payouts( + """Filter the direction of the payout.""" + transactionType: ShopifyPaymentsPayoutTransactionType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PayoutSortKeys = ISSUED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): 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.""" +type ShopifyPaymentsBalanceTransaction implements Node { + """ + The reason for the adjustment that's associated with the transaction. + If the source_type isn't an adjustment, the value will be null. + """ + adjustmentReason: String + + """The adjustment orders associated to the transaction.""" + adjustmentsOrders: [ShopifyPaymentsAdjustmentOrder!]! + + """The amount contributing to the balance transaction.""" + amount: MoneyV2! + + """The associated order for the balance transaction.""" + associatedOrder: ShopifyPaymentsAssociatedOrder + + """Payout assoicated with the transaction.""" + associatedPayout: ShopifyPaymentsBalanceTransactionAssociatedPayout! + + """The fee amount contributing to the balance transaction.""" + fee: MoneyV2! + + """A globally-unique ID.""" + id: ID! + + """The net amount contributing to the merchant's balance.""" + net: MoneyV2! + + """The ID of the resource leading to the transaction.""" + sourceId: BigInt + + """ + The id of the + [Order Transaction](https://shopify.dev/docs/admin-api/rest/reference/orders/transaction) + + that resulted in this balance transaction. + """ + sourceOrderTransactionId: BigInt + + """The source type of the balance transaction.""" + sourceType: ShopifyPaymentsSourceType + + """Wether the tranaction was created in test mode.""" + test: Boolean! + + """The date and time when the balance transaction was processed.""" + transactionDate: DateTime! + + """The type of transaction.""" + type: ShopifyPaymentsTransactionType! +} + +"""The payout associated with a balance transaction.""" +type ShopifyPaymentsBalanceTransactionAssociatedPayout { + """The ID of the payout associated with the balance transaction.""" + id: ID + + """The status of the payout associated with the balance transaction.""" + status: ShopifyPaymentsBalanceTransactionPayoutStatus +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBalanceTransactions. +""" +type ShopifyPaymentsBalanceTransactionConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBalanceTransactionEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBalanceTransactionEdge. + You can fetch data about an individual node, or you can follow the edges to + fetch data about a collection of related nodes. At each node, you specify the + fields that you want to retrieve. + """ + nodes: [ShopifyPaymentsBalanceTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBalanceTransaction and a cursor during pagination. +""" +type ShopifyPaymentsBalanceTransactionEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ShopifyPaymentsBalanceTransactionEdge.""" + node: ShopifyPaymentsBalanceTransaction! +} + +"""The payout status of the balance transaction.""" +enum ShopifyPaymentsBalanceTransactionPayoutStatus { + """ + The payout has been created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED + + """The payout has been submitted to the bank.""" + IN_TRANSIT @deprecated(reason: "Use `SCHEDULED` instead.") + + """The payout has been successfully deposited into the bank.""" + PAID + + """The payout has been declined by the bank.""" + FAILED + + """The payout has been canceled by Shopify.""" + CANCELED + + """The transaction has not been assigned a payout yet.""" + PENDING + + """The transaction requires action before it can be paid out.""" + ACTION_REQUIRED +} + +"""A bank account that can receive payouts.""" +type ShopifyPaymentsBankAccount implements Node { + """The last digits of the account number (the rest is redacted).""" + accountNumberLastDigits: String! + + """The name of the bank.""" + bankName: String + + """The country of the bank.""" + country: CountryCode! + + """The date that the bank account was created.""" + createdAt: DateTime! + + """The currency of the bank account.""" + currency: CurrencyCode! + + """A globally-unique ID.""" + id: ID! + + """ + All current and previous payouts made between the account and the bank account. + """ + payouts( + """Filter the direction of the payout.""" + transactionType: ShopifyPaymentsPayoutTransactionType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: PayoutSortKeys = ISSUED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + + """ + 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 + ): ShopifyPaymentsPayoutConnection! + + """The status of the bank account.""" + status: ShopifyPaymentsBankAccountStatus! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. +""" +type ShopifyPaymentsBankAccountConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsBankAccountEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsBankAccountEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsBankAccount!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination. +""" +type ShopifyPaymentsBankAccountEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ShopifyPaymentsBankAccountEdge.""" + node: ShopifyPaymentsBankAccount! +} + +"""The bank account status.""" +enum ShopifyPaymentsBankAccountStatus { + """A bank account that hasn't had any activity and that's not validated.""" + NEW + + """It was determined that the bank account exists.""" + VALIDATED + + """Bank account validation was successful.""" + VERIFIED + + """A payout to the bank account failed.""" + ERRORED +} + +"""The business type of a Shopify Payments account.""" +enum ShopifyPaymentsBusinessType { + """The business type is a corporation.""" + CORPORATION + + """The business type is a government.""" + GOVERNMENT + + """The business type is an incorporated partnership.""" + INCORPORATED_PARTNERSHIP + + """The business is an individual.""" + INDIVIDUAL + + """The business type is a Limited Liability Company.""" + LLC + + """The business type is a non profit.""" + NON_PROFIT + + """The business type is a non profit (incorporated).""" + NON_PROFIT_INCORPORATED + + """The business type is a non profit (unincorporated).""" + NON_PROFIT_UNINCORPORATED + + """The business type is a non profit (unincorporated_association).""" + NON_PROFIT_UNINCORPORATED_ASSOCIATION + + """The business type is a non profit (registered charity).""" + NON_PROFIT_REGISTERED_CHARITY + + """The business type is a partnership.""" + PARTNERSHIP + + """The business type is a private corporation.""" + PRIVATE_CORPORATION + + """The business type is a public company.""" + PUBLIC_COMPANY + + """The business type is a public corporation.""" + PUBLIC_CORPORATION + + """The business type is a sole proprietorship.""" + SOLE_PROP + + """The business type is an unincorporated partnership.""" + UNINCORPORATED_PARTNERSHIP + + """The business type is a private multi member LLC.""" + PRIVATE_MULTI_MEMBER_LLC + + """The business type is a private single member LLC.""" + PRIVATE_SINGLE_MEMBER_LLC + + """The business type is a private unincorporated association.""" + PRIVATE_UNINCORPORATED_ASSOCIATION + + """The business type is a private partnership.""" + PRIVATE_PARTNERSHIP + + """The business type is a public partnership.""" + PUBLIC_PARTNERSHIP + + """The business type is a free zone establishment.""" + FREE_ZONE_ESTABLISHMENT + + """The business type is a free zone LLC.""" + FREE_ZONE_LLC + + """The business type is a sole establishment.""" + SOLE_ESTABLISHMENT + + """ + The business type is not set. This is usually because onboarding is incomplete. + """ + NOT_SET +} + +"""The charge descriptors for a payments account.""" +interface ShopifyPaymentsChargeStatementDescriptor { + """The default charge statement descriptor.""" + default: String + + """The prefix of the statement descriptor.""" + prefix: String! +} + +"""The charge descriptors for a payments account.""" +type ShopifyPaymentsDefaultChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """The default charge statement descriptor.""" + default: String + + """The prefix of the statement descriptor.""" + prefix: String! +} + +""" +A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. +""" +type ShopifyPaymentsDispute implements LegacyInteroperability & Node { + """The total amount disputed by the cardholder.""" + amount: MoneyV2! + + """The evidence associated with the dispute.""" + disputeEvidence: ShopifyPaymentsDisputeEvidence! + + """The deadline for evidence submission.""" + evidenceDueBy: Date + + """ + The date when evidence was sent. Returns null if evidence hasn't yet been sent. + """ + evidenceSentOn: Date + + """ + The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. + """ + finalizedOn: Date + + """A globally-unique ID.""" + id: ID! + + """The date when this dispute was initiated.""" + initiatedAt: DateTime! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The order that contains the charge that's under dispute.""" + order: Order + + """The reason of the dispute.""" + reasonDetails: ShopifyPaymentsDisputeReasonDetails! + + """The current state of the dispute.""" + status: DisputeStatus! + + """ + Indicates if this dispute is still in the inquiry phase or has turned into a chargeback. + """ + type: DisputeType! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsDisputes. +""" +type ShopifyPaymentsDisputeConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsDisputeEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsDisputeEdge. You can + fetch data about an individual node, or you can follow the edges to fetch data + about a collection of related nodes. At each node, you specify the fields that + you want to retrieve. + """ + nodes: [ShopifyPaymentsDispute!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination. +""" +type ShopifyPaymentsDisputeEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ShopifyPaymentsDisputeEdge.""" + node: ShopifyPaymentsDispute! +} + +"""The evidence associated with the dispute.""" +type ShopifyPaymentsDisputeEvidence implements Node { + """The activity logs associated with the dispute evidence.""" + accessActivityLog: String + + """The billing address that's provided by the customer.""" + billingAddress: MailingAddress + + """ + The cancellation policy disclosure associated with the dispute evidence. + """ + cancellationPolicyDisclosure: String + + """The cancellation policy file associated with the dispute evidence.""" + cancellationPolicyFile: ShopifyPaymentsDisputeFileUpload + + """The cancellation rebuttal associated with the dispute evidence.""" + cancellationRebuttal: String + + """The customer communication file associated with the dispute evidence.""" + customerCommunicationFile: ShopifyPaymentsDisputeFileUpload + + """The customer's email address.""" + customerEmailAddress: String + + """The customer's first name.""" + customerFirstName: String + + """The customer's last name.""" + customerLastName: String + + """The customer purchase ip for this dispute evidence.""" + customerPurchaseIp: String + + """The dispute associated with the evidence.""" + dispute: ShopifyPaymentsDispute! + + """The file uploads associated with the dispute evidence.""" + disputeFileUploads: [ShopifyPaymentsDisputeFileUpload!]! + + """The fulfillments associated with the dispute evidence.""" + fulfillments: [ShopifyPaymentsDisputeFulfillment!]! + + """A globally-unique ID.""" + id: ID! + + """The product description for this dispute evidence.""" + productDescription: String + + """The refund policy disclosure associated with the dispute evidence.""" + refundPolicyDisclosure: String + + """The refund policy file associated with the dispute evidence.""" + refundPolicyFile: ShopifyPaymentsDisputeFileUpload + + """The refund refusal explanation associated with dispute evidence.""" + refundRefusalExplanation: String + + """The service documentation file associated with the dispute evidence.""" + serviceDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """The mailing address for shipping that's provided by the customer.""" + shippingAddress: MailingAddress + + """The shipping documentation file associated with the dispute evidence.""" + shippingDocumentationFile: ShopifyPaymentsDisputeFileUpload + + """Whether the dispute evidence is submitted.""" + submitted: Boolean! + + """The uncategorized file associated with the dispute evidence.""" + uncategorizedFile: ShopifyPaymentsDisputeFileUpload + + """The uncategorized text for the dispute evidence.""" + uncategorizedText: String +} + +"""The possible dispute evidence file types.""" +enum ShopifyPaymentsDisputeEvidenceFileType { + """Customer Communication File.""" + CUSTOMER_COMMUNICATION_FILE + + """Refund Policy File.""" + REFUND_POLICY_FILE + + """Cancellation Policy File.""" + CANCELLATION_POLICY_FILE + + """Uncategorized File.""" + UNCATEGORIZED_FILE + + """Shipping Documentation File.""" + SHIPPING_DOCUMENTATION_FILE + + """Service Documentation File.""" + SERVICE_DOCUMENTATION_FILE + + """Response Summary File.""" + RESPONSE_SUMMARY_FILE +} + +"""The input fields required to update a dispute evidence object.""" +input ShopifyPaymentsDisputeEvidenceUpdateInput { + """Customer email address.""" + customerEmailAddress: String + + """Customer last name.""" + customerLastName: String + + """Customer first name.""" + customerFirstName: String + + """The shipping address associated with the dispute evidence.""" + shippingAddress: MailingAddressInput + + """Uncategorized text.""" + uncategorizedText: String + + """Activity logs.""" + accessActivityLog: String + + """Cancellation policy disclosure.""" + cancellationPolicyDisclosure: String + + """Cancellation rebuttal.""" + cancellationRebuttal: String + + """Refund policy disclosure.""" + refundPolicyDisclosure: String + + """Refund refusal explanation.""" + refundRefusalExplanation: String + + """Cancellation policy file.""" + cancellationPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Customer communication file.""" + customerCommunicationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Refund policy file.""" + refundPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Shipping documentation file.""" + shippingDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Uncategorized file.""" + uncategorizedFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Service documentation file.""" + serviceDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """Whether to submit the evidence.""" + submitEvidence: Boolean = false +} + +"""The file upload associated with the dispute evidence.""" +type ShopifyPaymentsDisputeFileUpload implements Node { + """The type of the file for the dispute evidence.""" + disputeEvidenceType: ShopifyPaymentsDisputeEvidenceFileType + + """The file size.""" + fileSize: Int! + + """The file type.""" + fileType: String! + + """A globally-unique ID.""" + id: ID! + + """The original file name.""" + originalFileName: String + + """The URL for accessing the file.""" + url: URL! +} + +"""The input fields required to update a dispute file upload object.""" +input ShopifyPaymentsDisputeFileUploadUpdateInput { + """The ID of the file upload to be updated.""" + id: ID! + + """Whether to delete this file upload.""" + destroy: Boolean = false +} + +"""The fulfillment associated with dispute evidence.""" +type ShopifyPaymentsDisputeFulfillment implements Node { + """A globally-unique ID.""" + id: ID! + + """The shipping carrier for this fulfillment.""" + shippingCarrier: String + + """The shipping date for this fulfillment.""" + shippingDate: Date + + """The shipping tracking number for this fulfillment.""" + shippingTrackingNumber: String +} + +"""The reason for the dispute provided by the cardholder's bank.""" +enum ShopifyPaymentsDisputeReason { + """The cardholder claims that they didn’t authorize the payment.""" + FRAUDULENT + + """ + The dispute is uncategorized, so you should contact the customer for + additional details to find out why the payment was disputed. + """ + GENERAL + + """ + The customer doesn’t recognize the payment appearing on their card statement. + """ + UNRECOGNIZED + + """ + The customer claims they were charged multiple times for the same product or service. + """ + DUPLICATE + + """ + The customer claims that you continued to charge them after a subscription was canceled. + """ + SUBSCRIPTION_CANCELLED + + """ + The product or service was received but was defective, damaged, or not as described. + """ + PRODUCT_UNACCEPTABLE + + """ + The customer claims they did not receive the products or services purchased. + """ + PRODUCT_NOT_RECEIVED + + """ + The customer claims that the purchased product was returned or the transaction + was otherwise canceled, but you haven't yet provided a refund or credit. + """ + CREDIT_NOT_PROCESSED + + """The customer account associated with the purchase is incorrect.""" + INCORRECT_ACCOUNT_DETAILS + + """The customer's bank account has insufficient funds.""" + INSUFFICIENT_FUNDS + + """The customer's bank can't process the charge.""" + BANK_CANNOT_PROCESS + + """ + The customer's bank can't proceed with the debit since it hasn't been authorized. + """ + DEBIT_NOT_AUTHORIZED + + """ + The customer initiated the dispute. Contact the customer for additional details on why the payment was disputed. + """ + CUSTOMER_INITIATED + + """ + The card issuer believes the disputed transaction doesn't conform to the + network rules. These disputes occur when transactions don't meet card network + requirements and may incur additional network fees if escalated for resolution. + """ + NONCOMPLIANT +} + +"""Details regarding a dispute reason.""" +type ShopifyPaymentsDisputeReasonDetails { + """The raw code provided by the payment network.""" + networkReasonCode: String + + """The reason for the dispute provided by the cardholder's banks.""" + reason: ShopifyPaymentsDisputeReason! +} + +""" +Presents all Shopify Payments information related to an extended authorization. +""" +type ShopifyPaymentsExtendedAuthorization { + """ + The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment. + """ + extendedAuthorizationExpiresAt: DateTime! + + """The time after which capture will incur an additional fee.""" + standardAuthorizationExpiresAt: DateTime! +} + +"""The charge descriptors for a Japanese payments account.""" +type ShopifyPaymentsJpChargeStatementDescriptor implements ShopifyPaymentsChargeStatementDescriptor { + """The default charge statement descriptor.""" + default: String + + """The charge statement descriptor in kana.""" + kana: String + + """The charge statement descriptor in kanji.""" + kanji: String + + """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! +} + +""" +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 business entity associated with the payout.""" + businessEntity: BusinessEntity! + + """ + A unique trace ID from the financial institution. Use this reference number to track the payout with your provider. + """ + externalTraceId: String + + """The total amount and currency of the payout.""" + gross: MoneyV2! @deprecated(reason: "Use `net` instead.") + + """A globally-unique ID.""" + id: ID! + + """ + The exact time when the payout was issued. The payout only contains + balance transactions that were available at this time. + """ + issuedAt: DateTime! + + """The ID of the corresponding resource in the REST Admin API.""" + legacyResourceId: UnsignedInt64! + + """The total amount and currency of the payout.""" + net: MoneyV2! + + """The transfer status of the payout.""" + status: ShopifyPaymentsPayoutStatus! + + """The summary of the payout.""" + summary: ShopifyPaymentsPayoutSummary! + + """The direction of the payout.""" + transactionType: ShopifyPaymentsPayoutTransactionType! +} + +""" +Return type for `shopifyPaymentsPayoutAlternateCurrencyCreate` mutation. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreatePayload { + """The resulting alternate currency payout created.""" + payout: ShopifyPaymentsToolingProviderPayout + + """Whether the alternate currency payout was created successfully.""" + success: Boolean + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ShopifyPaymentsPayoutAlternateCurrencyCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopifyPaymentsPayoutAlternateCurrencyCreate`. +""" +type ShopifyPaymentsPayoutAlternateCurrencyCreateUserError implements DisplayableError { + """The error code.""" + code: ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ShopifyPaymentsPayoutAlternateCurrencyCreateUserError`. +""" +enum ShopifyPaymentsPayoutAlternateCurrencyCreateUserErrorCode { + """No Stripe provider account was found.""" + MISSING_PROVIDER_ACCOUNT + + """Failed to create payout due to an error from Stripe.""" + ALTERNATE_CURRENCY_PAYOUT_FAILED_STRIPE_ERROR + + """Failed to create payout due to an error from Shopify Core.""" + UNKNOWN_CORE_ERROR + + """ + Failed to create payout, there is no eligible balance in this currency. + """ + ALTERNATE_CURRENCY_PAYOUT_FAILED_NO_ELIGIBLE_BALANCE +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsPayouts. +""" +type ShopifyPaymentsPayoutConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopifyPaymentsPayoutEdge!]! + + """ + A list of nodes that are contained in ShopifyPaymentsPayoutEdge. You can fetch + data about an individual node, or you can follow the edges to fetch data about + a collection of related nodes. At each node, you specify the fields that you + want to retrieve. + """ + nodes: [ShopifyPaymentsPayout!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination. +""" +type ShopifyPaymentsPayoutEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ShopifyPaymentsPayoutEdge.""" + node: ShopifyPaymentsPayout! +} + +"""The interval at which payouts are sent to the connected bank account.""" +enum ShopifyPaymentsPayoutInterval { + """Each business day.""" + DAILY + + """Each week, on the day of week specified by weeklyAnchor.""" + WEEKLY + + """Each month, on the day of month specified by monthlyAnchor.""" + MONTHLY + + """Payouts will not be automatically made.""" + MANUAL +} + +"""The payment schedule for a payments account.""" +type ShopifyPaymentsPayoutSchedule { + """The interval at which payouts are sent to the connected bank account.""" + interval: ShopifyPaymentsPayoutInterval! + + """ + The day of the month funds will be paid out. + + The value can be any day of the month from the 1st to the 31st. + If the payment interval is set to monthly, this value will be used. + Payouts scheduled between 29-31st of the month are sent on the last day of shorter months. + """ + monthlyAnchor: Int + + """ + The day of the week funds will be paid out. + + The value can be any weekday from Monday to Friday. + If the payment interval is set to weekly, this value will be used. + """ + weeklyAnchor: DayOfTheWeek +} + +"""The transfer status of the payout.""" +enum ShopifyPaymentsPayoutStatus { + """ + The payout has been created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED + + """The payout has been submitted to the bank.""" + IN_TRANSIT @deprecated(reason: "Use `SCHEDULED` instead.") + + """The payout has been successfully deposited into the bank.""" + PAID + + """The payout has been declined by the bank.""" + FAILED + + """The payout has been canceled by Shopify.""" + CANCELED +} + +""" +Breakdown of the total fees and gross of each of the different types of transactions associated +with the payout. +""" +type ShopifyPaymentsPayoutSummary { + """Total fees for all adjustments including disputes.""" + adjustmentsFee: MoneyV2! + + """Total gross amount for all adjustments including disputes.""" + adjustmentsGross: MoneyV2! + + """Total fees for all advances.""" + advanceFees: MoneyV2! + + """Total gross amount for all advances.""" + advanceGross: MoneyV2! + + """Total fees for all charges.""" + chargesFee: MoneyV2! + + """Total gross amount for all charges.""" + chargesGross: MoneyV2! + + """Total fees for all refunds.""" + refundsFee: MoneyV2! + + """Total gross amount for all refunds.""" + refundsFeeGross: MoneyV2! + + """Total fees for all reserved funds.""" + reservedFundsFee: MoneyV2! + + """Total gross amount for all reserved funds.""" + reservedFundsGross: MoneyV2! + + """Total fees for all retried payouts.""" + retriedPayoutsFee: MoneyV2! + + """Total gross amount for all retried payouts.""" + retriedPayoutsGross: MoneyV2! + + """Total amount for all usdc rebate credit balance adjustments.""" + usdcRebateCreditAmount: MoneyV2! +} + +"""The possible transaction types for a payout.""" +enum ShopifyPaymentsPayoutTransactionType { + """The payout is a deposit.""" + DEPOSIT + + """The payout is a withdrawal.""" + WITHDRAWAL +} + +""" +Presents all Shopify Payments specific information related to an order refund. +""" +type ShopifyPaymentsRefundSet { + """ + The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. + """ + acquirerReferenceNumber: String +} + +"""The possible source types for a balance transaction.""" +enum ShopifyPaymentsSourceType { + """The adjustment_reversal source type.""" + ADJUSTMENT_REVERSAL + + """The charge source type.""" + CHARGE + + """The refund source type.""" + REFUND + + """The system_adjustment source type.""" + SYSTEM_ADJUSTMENT + + """The dispute source type.""" + DISPUTE + + """The adjustment source type.""" + ADJUSTMENT + + """The transfer source type.""" + TRANSFER +} + +""" +A typed identifier that represents an individual within a tax jurisdiction. +""" +type ShopifyPaymentsTaxIdentification { + """The type of the identification.""" + taxIdentificationType: ShopifyPaymentsTaxIdentificationType! + + """The value of the identification.""" + value: String! +} + +"""The type of tax identification field.""" +enum ShopifyPaymentsTaxIdentificationType { + """The last 4 digits of the SSN.""" + SSN_LAST4_DIGITS + + """Full SSN.""" + FULL_SSN + + """Business EIN.""" + EIN +} + +"""Relevant reference information for an alternate currency payout.""" +type ShopifyPaymentsToolingProviderPayout { + """The balance amount the alternate currency payout was created for.""" + amount: MoneyV2! + + """A timestamp for the arrival of the alternate currency payout.""" + arrivalDate: DateTime + + """A timestamp for the creation of the alternate currency payout.""" + createdAt: DateTime + + """The currency alternate currency payout was created in.""" + currency: String! + + """The remote ID for the alternate currency payout.""" + remoteId: String! +} + +""" +Presents all Shopify Payments specific information related to an order transaction. +""" +type ShopifyPaymentsTransactionSet { + """Contains all fields related to an extended authorization.""" + extendedAuthorizationSet: ShopifyPaymentsExtendedAuthorization + + """Contains all fields related to a refund.""" + refundSet: ShopifyPaymentsRefundSet +} + +"""The possible types of transactions.""" +enum ShopifyPaymentsTransactionType { + """The ach_bank_failure_debit_fee transaction type.""" + ACH_BANK_FAILURE_DEBIT_FEE + + """The ach_bank_failure_debit_reversal_fee transaction type.""" + ACH_BANK_FAILURE_DEBIT_REVERSAL_FEE + + """The ads_publisher_credit transaction type.""" + ADS_PUBLISHER_CREDIT + + """The ads_publisher_credit_reversal transaction type.""" + ADS_PUBLISHER_CREDIT_REVERSAL + + """The chargeback_protection_credit transaction type.""" + CHARGEBACK_PROTECTION_CREDIT + + """The chargeback_protection_credit_reversal transaction type.""" + CHARGEBACK_PROTECTION_CREDIT_REVERSAL + + """The chargeback_protection_debit transaction type.""" + CHARGEBACK_PROTECTION_DEBIT + + """The chargeback_protection_debit_reversal transaction type.""" + CHARGEBACK_PROTECTION_DEBIT_REVERSAL + + """The collections_credit transaction type.""" + COLLECTIONS_CREDIT + + """The collections_credit_reversal transaction type.""" + COLLECTIONS_CREDIT_REVERSAL + + """The promotion_credit transaction type.""" + PROMOTION_CREDIT + + """The promotion_credit_reversal transaction type.""" + PROMOTION_CREDIT_REVERSAL + + """The anomaly_credit transaction type.""" + ANOMALY_CREDIT + + """The anomaly_credit_reversal transaction type.""" + ANOMALY_CREDIT_REVERSAL + + """The anomaly_debit transaction type.""" + ANOMALY_DEBIT + + """The anomaly_debit_reversal transaction type.""" + ANOMALY_DEBIT_REVERSAL + + """The vat_refund_credit transaction type.""" + VAT_REFUND_CREDIT + + """The vat_refund_credit_reversal transaction type.""" + VAT_REFUND_CREDIT_REVERSAL + + """The channel_credit transaction type.""" + CHANNEL_CREDIT + + """The channel_credit_reversal transaction type.""" + CHANNEL_CREDIT_REVERSAL + + """The channel_transfer_credit transaction type.""" + CHANNEL_TRANSFER_CREDIT + + """The channel_transfer_credit_reversal transaction type.""" + CHANNEL_TRANSFER_CREDIT_REVERSAL + + """The channel_transfer_debit transaction type.""" + CHANNEL_TRANSFER_DEBIT + + """The channel_transfer_debit_reversal transaction type.""" + CHANNEL_TRANSFER_DEBIT_REVERSAL + + """The channel_promotion_credit transaction type.""" + CHANNEL_PROMOTION_CREDIT + + """The channel_promotion_credit_reversal transaction type.""" + CHANNEL_PROMOTION_CREDIT_REVERSAL + + """The marketplace_fee_credit transaction type.""" + MARKETPLACE_FEE_CREDIT + + """The marketplace_fee_credit_reversal transaction type.""" + MARKETPLACE_FEE_CREDIT_REVERSAL + + """The merchant_goodwill_credit transaction type.""" + MERCHANT_GOODWILL_CREDIT + + """The merchant_goodwill_credit_reversal transaction type.""" + MERCHANT_GOODWILL_CREDIT_REVERSAL + + """The tax_adjustment_debit transaction type.""" + TAX_ADJUSTMENT_DEBIT + + """The tax_adjustment_debit_reversal transaction type.""" + TAX_ADJUSTMENT_DEBIT_REVERSAL + + """The tax_adjustment_credit transaction type.""" + TAX_ADJUSTMENT_CREDIT + + """The tax_adjustment_credit_reversal transaction type.""" + TAX_ADJUSTMENT_CREDIT_REVERSAL + + """The billing_debit transaction type.""" + BILLING_DEBIT + + """The billing_debit_reversal transaction type.""" + BILLING_DEBIT_REVERSAL + + """The shop_cash_credit transaction type.""" + SHOP_CASH_CREDIT + + """The shop_cash_credit_reversal transaction type.""" + SHOP_CASH_CREDIT_REVERSAL + + """The shop_cash_billing_debit transaction type.""" + SHOP_CASH_BILLING_DEBIT + + """The shop_cash_billing_debit_reversal transaction type.""" + SHOP_CASH_BILLING_DEBIT_REVERSAL + + """The shop_cash_refund_debit transaction type.""" + SHOP_CASH_REFUND_DEBIT + + """The shop_cash_refund_debit_reversal transaction type.""" + SHOP_CASH_REFUND_DEBIT_REVERSAL + + """The shop_cash_campaign_billing_debit transaction type.""" + SHOP_CASH_CAMPAIGN_BILLING_DEBIT + + """The shop_cash_campaign_billing_debit_reversal transaction type.""" + SHOP_CASH_CAMPAIGN_BILLING_DEBIT_REVERSAL + + """The shop_cash_campaign_billing_credit transaction type.""" + SHOP_CASH_CAMPAIGN_BILLING_CREDIT + + """The shop_cash_campaign_billing_credit_reversal transaction type.""" + SHOP_CASH_CAMPAIGN_BILLING_CREDIT_REVERSAL + + """The seller_protection_credit transaction type.""" + SELLER_PROTECTION_CREDIT + + """The seller_protection_credit_reversal transaction type.""" + SELLER_PROTECTION_CREDIT_REVERSAL + + """The shopify_collective_debit transaction type.""" + SHOPIFY_COLLECTIVE_DEBIT + + """The shopify_collective_debit_reversal transaction type.""" + SHOPIFY_COLLECTIVE_DEBIT_REVERSAL + + """The shopify_collective_credit transaction type.""" + SHOPIFY_COLLECTIVE_CREDIT + + """The shopify_collective_credit_reversal transaction type.""" + SHOPIFY_COLLECTIVE_CREDIT_REVERSAL + + """The lending_debit transaction type.""" + LENDING_DEBIT + + """The lending_debit_reversal transaction type.""" + LENDING_DEBIT_REVERSAL + + """The lending_credit transaction type.""" + LENDING_CREDIT + + """The lending_credit_reversal transaction type.""" + LENDING_CREDIT_REVERSAL + + """The lending_capital_remittance transaction type.""" + LENDING_CAPITAL_REMITTANCE + + """The lending_capital_remittance_reversal transaction type.""" + LENDING_CAPITAL_REMITTANCE_REVERSAL + + """The lending_credit_remittance transaction type.""" + LENDING_CREDIT_REMITTANCE + + """The lending_credit_remittance_reversal transaction type.""" + LENDING_CREDIT_REMITTANCE_REVERSAL + + """The lending_capital_refund transaction type.""" + LENDING_CAPITAL_REFUND + + """The lending_capital_refund_reversal transaction type.""" + LENDING_CAPITAL_REFUND_REVERSAL + + """The lending_credit_refund transaction type.""" + LENDING_CREDIT_REFUND + + """The lending_credit_refund_reversal transaction type.""" + LENDING_CREDIT_REFUND_REVERSAL + + """The balance_transfer_inbound transaction type.""" + BALANCE_TRANSFER_INBOUND + + """The markets_pro_credit transaction type.""" + MARKETS_PRO_CREDIT + + """The customs_duty_adjustment transaction type.""" + CUSTOMS_DUTY_ADJUSTMENT + + """The import_tax_adjustment transaction type.""" + IMPORT_TAX_ADJUSTMENT + + """The shipping_label_adjustment transaction type.""" + SHIPPING_LABEL_ADJUSTMENT + + """The shipping_label_adjustment_base transaction type.""" + SHIPPING_LABEL_ADJUSTMENT_BASE + + """The shipping_label_adjustment_surcharge transaction type.""" + SHIPPING_LABEL_ADJUSTMENT_SURCHARGE + + """The shipping_return_to_origin_adjustment transaction type.""" + SHIPPING_RETURN_TO_ORIGIN_ADJUSTMENT + + """The shipping_other_carrier_charge_adjustment transaction type.""" + SHIPPING_OTHER_CARRIER_CHARGE_ADJUSTMENT + + """The charge_adjustment transaction type.""" + CHARGE_ADJUSTMENT + + """The refund_adjustment transaction type.""" + REFUND_ADJUSTMENT + + """The chargeback_fee transaction type.""" + CHARGEBACK_FEE + + """The chargeback_fee_refund transaction type.""" + CHARGEBACK_FEE_REFUND + + """The transfer transaction type.""" + TRANSFER + + """The transfer_failure transaction type.""" + TRANSFER_FAILURE + + """The transfer_cancel transaction type.""" + TRANSFER_CANCEL + + """The reserved_funds_withdrawal transaction type.""" + RESERVED_FUNDS_WITHDRAWAL + + """The reserved_funds_reversal transaction type.""" + RESERVED_FUNDS_REVERSAL + + """The risk_reversal transaction type.""" + RISK_REVERSAL + + """The risk_withdrawal transaction type.""" + RISK_WITHDRAWAL + + """The merchant_to_merchant_debit transaction type.""" + MERCHANT_TO_MERCHANT_DEBIT + + """The merchant_to_merchant_debit_reversal transaction type.""" + MERCHANT_TO_MERCHANT_DEBIT_REVERSAL + + """The merchant_to_merchant_credit transaction type.""" + MERCHANT_TO_MERCHANT_CREDIT + + """The merchant_to_merchant_credit_reversal transaction type.""" + MERCHANT_TO_MERCHANT_CREDIT_REVERSAL + + """The shopify_source_debit transaction type.""" + SHOPIFY_SOURCE_DEBIT + + """The shopify_source_debit_reversal transaction type.""" + SHOPIFY_SOURCE_DEBIT_REVERSAL + + """The shopify_source_credit transaction type.""" + SHOPIFY_SOURCE_CREDIT + + """The shopify_source_credit_reversal transaction type.""" + SHOPIFY_SOURCE_CREDIT_REVERSAL + + """The charge transaction type.""" + CHARGE + + """The refund transaction type.""" + REFUND + + """The refund_failure transaction type.""" + REFUND_FAILURE + + """The application_fee_refund transaction type.""" + APPLICATION_FEE_REFUND + + """The adjustment transaction type.""" + ADJUSTMENT + + """The dispute_withdrawal transaction type.""" + DISPUTE_WITHDRAWAL + + """The dispute_reversal transaction type.""" + DISPUTE_REVERSAL + + """The shipping_label transaction type.""" + SHIPPING_LABEL + + """The customs_duty transaction type.""" + CUSTOMS_DUTY + + """The import_tax transaction type.""" + IMPORT_TAX + + """The chargeback_hold transaction type.""" + CHARGEBACK_HOLD + + """The chargeback_hold_release transaction type.""" + CHARGEBACK_HOLD_RELEASE + + """The reserved_funds transaction type.""" + RESERVED_FUNDS + + """The stripe_fee transaction type.""" + STRIPE_FEE + + """The transfer_refund transaction type.""" + TRANSFER_REFUND + + """The advance transaction type.""" + ADVANCE + + """The advance funding transaction type.""" + ADVANCE_FUNDING + + """The tax refund transaction type.""" + IMPORT_TAX_REFUND +} + +""" +The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect. +""" +enum ShopifyProtectEligibilityStatus { + """ + The eligibility of the order is pending and has not yet been determined. + """ + PENDING + + """ + 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 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 pending and has not yet been determined. + """ + PENDING + + """ + 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 fraudulent chargeback and it was protected.""" + PROTECTED + + """ + The order received a chargeback but the order wasn't protected because it didn't meet coverage requirements. + """ + NOT_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 locale that's been enabled on a shop.""" +type ShopLocale { + """The locale ISO code.""" + locale: String! + + """The market web presences that use the locale.""" + marketWebPresences: [MarketWebPresence!]! + + """The human-readable locale name.""" + name: String! + + """Whether the locale is the default locale for the shop.""" + primary: Boolean! + + """Whether the locale is visible to buyers.""" + published: Boolean! +} + +"""Return type for `shopLocaleDisable` mutation.""" +type ShopLocaleDisablePayload { + """ISO code of the locale that was deleted.""" + locale: String + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `shopLocaleEnable` mutation.""" +type ShopLocaleEnablePayload { + """ISO code of the locale that was enabled.""" + shopLocale: ShopLocale + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""The input fields for a shop locale.""" +input ShopLocaleInput { + """ + Whether the locale is published. Only published locales are visible to the buyer. + """ + published: Boolean + + """ + The market web presences on which the locale should be enabled. Pass in an + empty array to remove the locale across all market web presences. + """ + marketWebPresenceIds: [ID!] +} + +"""Return type for `shopLocaleUpdate` mutation.""" +type ShopLocaleUpdatePayload { + """The locale that was updated.""" + shopLocale: ShopLocale + + """The list of errors that occurred from executing the mutation.""" + userErrors: [UserError!]! +} + +"""Shop Pay Installments payment details related to a transaction.""" +type ShopPayInstallmentsPaymentDetails implements BasePaymentDetails { + """The name of payment method used by the buyer.""" + paymentMethodName: String +} + +"""Represents a Shop Pay payment request.""" +type ShopPayPaymentRequest { + """The discounts for the payment request order.""" + discounts: [ShopPayPaymentRequestDiscount!] + + """The line items for the payment request.""" + lineItems: [ShopPayPaymentRequestLineItem!]! + + """The presentment currency for the payment request.""" + presentmentCurrency: CurrencyCode! + + """The delivery method type for the payment request.""" + selectedDeliveryMethodType: ShopPayPaymentRequestDeliveryMethodType! + + """The shipping address for the payment request.""" + shippingAddress: ShopPayPaymentRequestContactField + + """The shipping lines for the payment request.""" + shippingLines: [ShopPayPaymentRequestShippingLine!]! + + """The subtotal amount for the payment request.""" + subtotal: MoneyV2! + + """The total amount for the payment request.""" + total: MoneyV2! + + """The total shipping price for the payment request.""" + totalShippingPrice: ShopPayPaymentRequestTotalShippingPrice + + """The total tax for the payment request.""" + totalTax: MoneyV2 +} + +"""Represents a contact field for a Shop Pay payment request.""" +type ShopPayPaymentRequestContactField { + """The first address line of the contact field.""" + address1: String! + + """The second address line of the contact field.""" + address2: String + + """The city of the contact field.""" + city: String! + + """The company name of the contact field.""" + companyName: String + + """The country of the contact field.""" + countryCode: String! + + """The email of the contact field.""" + email: String + + """The first name of the contact field.""" + firstName: String! + + """The last name of the contact field.""" + lastName: String! + + """The phone number of the contact field.""" + phone: String + + """The postal code of the contact field.""" + postalCode: String + + """The province of the contact field.""" + provinceCode: String +} + +"""Represents the delivery method type for a Shop Pay payment request.""" +enum ShopPayPaymentRequestDeliveryMethodType { + """The delivery method type is shipping.""" + SHIPPING + + """The delivery method type is pickup.""" + PICKUP +} + +"""Represents a discount for a Shop Pay payment request.""" +type ShopPayPaymentRequestDiscount { + """The amount of the discount.""" + amount: MoneyV2! + + """The label of the discount.""" + label: String! +} + +"""Represents an image for a Shop Pay payment request line item.""" +type ShopPayPaymentRequestImage { + """The alt text of the image.""" + alt: String + + """The source URL of the image.""" + url: String! +} + +"""Represents a line item for a Shop Pay payment request.""" +type ShopPayPaymentRequestLineItem { + """The final item price for the line item.""" + finalItemPrice: MoneyV2! + + """The final line price for the line item.""" + finalLinePrice: MoneyV2! + + """The image of the line item.""" + image: ShopPayPaymentRequestImage + + """The item discounts for the line item.""" + itemDiscounts: [ShopPayPaymentRequestDiscount!] + + """The label of the line item.""" + label: String! + + """The line discounts for the line item.""" + lineDiscounts: [ShopPayPaymentRequestDiscount!] + + """The original item price for the line item.""" + originalItemPrice: MoneyV2 + + """The original line price for the line item.""" + originalLinePrice: MoneyV2 + + """The quantity of the line item.""" + quantity: Int! + + """Whether the line item requires shipping.""" + requiresShipping: Boolean + + """The SKU of the line item.""" + sku: String +} + +"""The receipt of Shop Pay payment request session submission.""" +type ShopPayPaymentRequestReceipt { + """The date and time when the payment request receipt was created.""" + createdAt: DateTime! + + """The order that's associated with the payment request receipt.""" + order: Order + + """The shop pay payment request object.""" + paymentRequest: ShopPayPaymentRequest! + + """The status of the payment request session submission.""" + processingStatus: ShopPayPaymentRequestReceiptProcessingStatus! + + """ + The source identifier provided in the `ShopPayPaymentRequestSessionCreate` mutation. + """ + sourceIdentifier: String! + + """ + The token of the receipt, initially returned by an `ShopPayPaymentRequestSessionSubmit` mutation. + """ + token: String! +} + +""" +An auto-generated type for paginating through multiple ShopPayPaymentRequestReceipts. +""" +type ShopPayPaymentRequestReceiptConnection { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ShopPayPaymentRequestReceiptEdge!]! + + """ + A list of nodes that are contained in ShopPayPaymentRequestReceiptEdge. You + can fetch data about an individual node, or you can follow the edges to fetch + data about a collection of related nodes. At each node, you specify the fields + that you want to retrieve. + """ + nodes: [ShopPayPaymentRequestReceipt!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ShopPayPaymentRequestReceipt and a cursor during pagination. +""" +type ShopPayPaymentRequestReceiptEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of ShopPayPaymentRequestReceiptEdge.""" + node: ShopPayPaymentRequestReceipt! +} + +""" +The processing status of a Shop Pay payment request. +Represents the different states a payment request can be in during its lifecycle, +from initial creation through to completion or failure. +""" +type ShopPayPaymentRequestReceiptProcessingStatus { + """A standardized error code, independent of the payment provider.""" + errorCode: ShopPayPaymentRequestReceiptProcessingStatusErrorCode + + """The message of the payment request receipt.""" + message: String + + """The state of the payment request receipt.""" + state: ShopPayPaymentRequestReceiptProcessingStatusState! +} + +"""A standardized error code, independent of the payment provider.""" +enum ShopPayPaymentRequestReceiptProcessingStatusErrorCode { + """The card number is incorrect.""" + INCORRECT_NUMBER + + """The format of the card number is incorrect.""" + INVALID_NUMBER + + """The format of the expiry date is incorrect.""" + INVALID_EXPIRY_DATE + + """The format of the CVC is incorrect.""" + INVALID_CVC + + """The card is expired.""" + EXPIRED_CARD + + """The CVC does not match the card number.""" + INCORRECT_CVC + + """The ZIP or postal code does not match the card number.""" + INCORRECT_ZIP + + """The address does not match the card number.""" + INCORRECT_ADDRESS + + """The entered PIN is incorrect.""" + INCORRECT_PIN + + """The amount is too small.""" + AMOUNT_TOO_SMALL + + """The card was declined.""" + CARD_DECLINED + + """There was an error while processing the payment.""" + PROCESSING_ERROR + + """Call the card issuer.""" + CALL_ISSUER + + """The 3D Secure check failed.""" + THREE_D_SECURE_FAILED + + """The card issuer has flagged the transaction as potentially fraudulent.""" + FRAUD_SUSPECTED + + """ + The card has been reported as lost or stolen, and the card issuer has + requested that the merchant keep the card and call the number on the back. + """ + PICK_UP_CARD + + """There is an error in the gateway or merchant configuration.""" + CONFIG_ERROR + + """A real card was used but the gateway was in test mode.""" + TEST_MODE_LIVE_CARD + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE + + """There was an unknown error with processing the payment.""" + GENERIC_ERROR + + """The payment method is not available in the customer's country.""" + INVALID_COUNTRY + + """The amount is either too high or too low for the provider.""" + INVALID_AMOUNT + + """The payment method is momentarily unavailable.""" + PAYMENT_METHOD_UNAVAILABLE +} + +"""The state of the payment request receipt.""" +enum ShopPayPaymentRequestReceiptProcessingStatusState { + """The payment request is ready and queued to be processed.""" + READY + + """The payment request currently being processed.""" + PROCESSING + + """The payment request processing failed.""" + FAILED + + """The payment request processing completed successfully.""" + COMPLETED + + """The payment request requires action from the buyer.""" + ACTION_REQUIRED +} + +""" +The set of valid sort keys for the ShopPayPaymentRequestReceipts query. +""" +enum ShopPayPaymentRequestReceiptsSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `id` value.""" + ID +} + +"""Represents a shipping line for a Shop Pay payment request.""" +type ShopPayPaymentRequestShippingLine { + """The amount for the shipping line.""" + amount: MoneyV2! + + """The code of the shipping line.""" + code: String! + + """The label of the shipping line.""" + label: String! +} + +"""Represents a shipping total for a Shop Pay payment request.""" +type ShopPayPaymentRequestTotalShippingPrice { + """The discounts for the shipping total.""" + discounts: [ShopPayPaymentRequestDiscount!]! + + """The final total for the shipping line.""" + finalTotal: MoneyV2! + + """The original total for the shipping line.""" + originalTotal: MoneyV2 +} + +"""The 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! + + """ + The public display name of the shop's billing plan. Possible values are: + Advanced, 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 { + """The shop policy type.""" + type: ShopPolicyType! + + """Policy text, maximum size of 512kb.""" + body: String! +} + +"""Available shop policy types.""" +enum ShopPolicyType { + """The refund policy.""" + REFUND_POLICY + + """The shipping policy.""" + SHIPPING_POLICY + + """The privacy policy.""" + PRIVACY_POLICY + + """The terms of service.""" + TERMS_OF_SERVICE + + """The terms of sale.""" + TERMS_OF_SALE + + """The legal notice.""" + LEGAL_NOTICE + + """The cancellation policy.""" + SUBSCRIPTION_POLICY + + """The contact information.""" + CONTACT_INFORMATION +} + +"""Return type for `shopPolicyUpdate` mutation.""" +type ShopPolicyUpdatePayload { + """The shop policy that has been updated.""" + shopPolicy: ShopPolicy + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ShopPolicyUserError!]! +} + +"""An error that occurs during the execution of a shop policy mutation.""" +type ShopPolicyUserError implements DisplayableError { + """The error code.""" + code: ShopPolicyErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Return type for `shopResourceFeedbackCreate` mutation.""" +type ShopResourceFeedbackCreatePayload { + """The shop feedback that's created.""" + feedback: AppFeedback + + """The list of errors that occurred from executing the mutation.""" + userErrors: [ShopResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `ShopResourceFeedbackCreate`. +""" +type ShopResourceFeedbackCreateUserError implements DisplayableError { + """The error code.""" + code: ShopResourceFeedbackCreateUserErrorCode + + """The path to the input field that caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +Possible error codes that can be returned by `ShopResourceFeedbackCreateUserError`. +""" +enum ShopResourceFeedbackCreateUserErrorCode { + """The feedback for a later version of the resource was already accepted.""" + OUTDATED_FEEDBACK + + """The feedback date cannot be set in the future.""" + FEEDBACK_DATE_IN_FUTURE + + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """The input value needs to be blank.""" + PRESENT +} + +"""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 +} + +""" +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 { + """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 + ): 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 transparent avatar image for the staff member.""" + TRANSPARENT + + """Returns a URL that returns a 404 error if the image is not present.""" + NOT_FOUND +} + +""" +An auto-generated type which holds one StaffMember and a cursor during pagination. +""" +type StaffMemberEdge { + """ + The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). + """ + cursor: String! + + """The item at the end of StaffMemberEdge.""" + node: StaffMember! +} + +"""Represents access permissions for a staff member.""" +enum StaffMemberPermission { + """The staff member can manage and install apps and channels.""" + APPLICATIONS + + """The staff member can manage and install sales channels.""" + CHANNELS + + """The staff member can create and edit customers.""" + CREATE_AND_EDIT_CUSTOMERS + + """The staff member can create and edit gift cards.""" + CREATE_AND_EDIT_GIFT_CARDS + + """The staff member can view customers.""" + CUSTOMERS + + """ + The staff member can view the Shopify Home page, which includes sales information and other shop data. + """ + DASHBOARD + + """The staff member can deactivate gift cards.""" + DEACTIVATE_GIFT_CARDS + + """The staff member can delete customers.""" + DELETE_CUSTOMERS + + """The staff member can view, buy, and manage domains.""" + DOMAINS + + """The staff member can create, update, and delete draft orders.""" + DRAFT_ORDERS + + """The staff member can update orders.""" + EDIT_ORDERS + + """The staff member can erase customer private data.""" + ERASE_CUSTOMER_DATA + + """The staff member can export customers.""" + EXPORT_CUSTOMERS + + """The staff member can export gift cards.""" + EXPORT_GIFT_CARDS + + """ + The staff has the same permissions as the [store owner](https://shopify.dev/en/manual/your-account/staff-accounts/staff-permissions#store-owner-permissions) + with some exceptions, such as modifying the account billing or deleting staff accounts. + """ + FULL @deprecated(reason: "Use the list of the staff member's explicit permissions returned in the `StaffMember.permissions.userPermissions` field instead of `full` permission.") + + """ + The staff member can view, create, issue, and export gift cards to a CSV file. + """ + GIFT_CARDS + + """The staff member can view and modify links and navigation menus.""" + LINKS + + """ + The staff member can create, update, and delete locations where inventory is stocked or managed. + """ + LOCATIONS + + """The staff member can view markets.""" + VIEW_MARKETS + + """The staff member can create and edit markets.""" + CREATE_AND_EDIT_MARKETS + + """The staff member can delete markets.""" + DELETE_MARKETS + + """ + The staff member can view and create discount codes and automatic discounts, and export discounts to a CSV file. + """ + MARKETING + + """The staff member can view, create, and automate marketing campaigns.""" + MARKETING_SECTION + + """The staff member can merge customers.""" + MERGE_CUSTOMERS + + """ + The staff member can view, create, update, delete, and cancel orders, and + receive order notifications. The staff member can still create draft orders + without this permission. + """ + ORDERS + + """ + The staff member can view the Overview and Live view pages, which include + sales information, and other shop and sales channels data. + """ + OVERVIEWS + + """ + The staff member can view, create, update, publish, and delete blog posts and pages. + """ + PAGES + + """The staff member can pay for an order by using a vaulted card.""" + PAY_ORDERS_BY_VAULTED_CARD + + """The staff member can view the preferences and configuration of a shop.""" + PREFERENCES + + """ + The staff member can view, create, import, and update products, collections, and inventory. + """ + PRODUCTS + + """ + The staff member can view and create all reports, which includes sales information and other shop data. + """ + REPORTS + + """The staff member can request customer private data.""" + REQUEST_CUSTOMER_DATA + + """The staff member can view, update, and publish themes.""" + THEMES + + """The staff member can view and create translations.""" + TRANSLATIONS @deprecated(reason: "Unused.") +} + +""" +Represents the data used to customize the Shopify admin experience for a logged-in staff member. +""" +type StaffMemberPrivateData { + """The URL to the staff member's account settings page.""" + accountSettingsUrl: URL! + + """The date and time when the staff member was created.""" + createdAt: DateTime! + + """Access permissions for the staff member.""" + permissions: [StaffMemberPermission!]! @deprecated(reason: "There's no alternative field to use instead.") +} + +"""The set of valid sort keys for the StaffMembers query.""" +enum StaffMembersSortKeys { + """Sort by the `email` value.""" + EMAIL + + """Sort by the `first_name` value.""" + FIRST_NAME + + """Sort by the `id` value.""" + ID + + """Sort by the `last_name` value.""" + LAST_NAME +} + +""" +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 file's intended Shopify resource type.""" + resource: StagedUploadTargetGenerateUploadResource! + + """The file's name and extension.""" + filename: String! + + """The file's MIME type.""" + mimeType: 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 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 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! +} + +"""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!]! +} + +""" +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 resource type being uploaded.""" + resource: StagedUploadTargetGenerateUploadResource! + + """The filename of the asset being uploaded.""" + filename: String! + + """The MIME type of the asset being uploaded.""" + mimeType: String! + + """The HTTP method to be used by the staged upload.""" + httpMethod: StagedUploadHttpMethodType = PUT + + """The size of the file to upload, in bytes.""" + fileSize: UnsignedInt64 +} + +"""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 { + """ + 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 + + """ + 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 + + """ + 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 + + """ + 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 + + """ + 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 + + """ + 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 + + """ + 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 +} + +"""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!]! +} + +""" +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 resource.""" + resource: StagedUploadTargetGenerateUploadResource! + + """The image filename.""" + filename: String! + + """The image MIME type.""" + mimeType: String! + + """HTTP method to be used by the staged upload.""" + httpMethod: StagedUploadHttpMethodType = PUT +} + +""" +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 +} + +""" +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 Storefront API access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput +} + +"""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 { + """The input value is invalid.""" + INVALID + + """The input value is already taken.""" + TAKEN + + """The standard metafield definition template was not found.""" + TEMPLATE_NOT_FOUND + + """The maximum number of definitions per owner type has been exceeded.""" + LIMIT_EXCEEDED + + """The namespace and key is already in use for a set of your metafields.""" + UNSTRUCTURED_ALREADY_EXISTS + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """The metafield definition capability is invalid.""" + INVALID_CAPABILITY + + """The metafield definition capability cannot be disabled.""" + CAPABILITY_CANNOT_BE_DISABLED + + """The metafield definition does not support pinning.""" + UNSUPPORTED_PINNING + + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """The input combination is invalid.""" + INVALID_INPUT_COMBINATION +} + +""" +Standard metafield definition templates provide preset configurations to create metafield definitions. +Each template has a specific namespace and key that we've reserved to have specific meanings for common use cases. + +Refer to the [list of standard metafield definitions](https://shopify.dev/apps/metafields/definitions/standard-definitions). +""" +type StandardMetafieldDefinitionTemplate implements Node { + """The description of the standard metafield definition.""" + description: String + + """A globally-unique ID.""" + id: ID! + + """ + The key owned by the definition after the definition has been activated. + """ + key: String! + + """The human-readable name for the standard metafield definition.""" + 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! +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: TransactionSortKeys = CREATED_AT + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | 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 + ): 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 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 + + """Owner does not exist.""" + OWNER_NOT_FOUND + + """A positive amount must be used to credit a store credit account.""" + NEGATIVE_OR_ZERO_AMOUNT + + """ + The currency provided does not match the currency of the store credit account. + """ + MISMATCHING_CURRENCY + + """The expiry date must be in the future.""" + EXPIRES_AT_IN_PAST + + """The operation would cause the account's credit limit to be exceeded.""" + CREDIT_LIMIT_EXCEEDED + + """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 + + """A positive amount must be used to debit a store credit account.""" + NEGATIVE_OR_ZERO_AMOUNT + + """ + 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 +} + +""" +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 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 + + """Store credit was returned when an authorized payment was voided.""" + ORDER_CANCELLATION + + """Tax finalization affected the store credit payment.""" + TAX_FINALIZATION +} + +""" +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!]! + + """ + 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 new subscription line.""" + line: SubscriptionLineInput! + + """The discount to be added to the subscription line.""" + discounts: [SubscriptionAtomicManualDiscountInput!] +} + +"""The input fields for mapping a subscription line to a discount.""" +input SubscriptionAtomicManualDiscountInput { + """The title associated with the subscription discount.""" + title: String + + """Percentage or fixed amount value of the discount.""" + value: SubscriptionManualDiscountValueInput + + """ + The maximum number of times the subscription discount will be applied on orders. + """ + recurringCycleLimit: Int +} + +""" +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 + + """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 + + """Whether the billing attempt is still processing.""" + ready: Boolean! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderTransactionConnection! +} + +""" +An auto-generated type for paginating through multiple SubscriptionBillingAttempts. +""" +type SubscriptionBillingAttemptConnection { + """ + 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 { + """Payment method was not found.""" + PAYMENT_METHOD_NOT_FOUND + + """Payment provider is not enabled.""" + PAYMENT_PROVIDER_IS_NOT_ENABLED + + """ + Payment method is invalid. Please update or create a new payment method. + """ + INVALID_PAYMENT_METHOD + + """There was an unexpected error during the billing attempt.""" + UNEXPECTED_ERROR + + """Payment method is expired.""" + EXPIRED_PAYMENT_METHOD + + """Payment method was declined by processor.""" + PAYMENT_METHOD_DECLINED + + """There was an error during the authentication.""" + AUTHENTICATION_ERROR + + """Gateway is in test mode and attempted to bill a live payment method.""" + TEST_MODE + + """Payment method was canceled by buyer.""" + BUYER_CANCELED_PAYMENT_METHOD + + """Customer was not found.""" + CUSTOMER_NOT_FOUND + + """Customer is invalid.""" + CUSTOMER_INVALID + + """The shipping address is either missing or invalid.""" + INVALID_SHIPPING_ADDRESS + + """ + The billing agreement ID or the transaction ID for the customer's payment method is invalid. + """ + INVALID_CUSTOMER_BILLING_AGREEMENT + + """A payment has already been made for this invoice.""" + INVOICE_ALREADY_PAID + + """ + Payment method cannot be used with the current payment gateway test mode configuration. + """ + PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG + + """The amount is too small.""" + AMOUNT_TOO_SMALL + + """No inventory location found or enabled.""" + INVENTORY_ALLOCATIONS_NOT_FOUND + + """Not enough inventory found.""" + INSUFFICIENT_INVENTORY + + """Transient error, try again later.""" + TRANSIENT_ERROR + + """Insufficient funds.""" + INSUFFICIENT_FUNDS + + """Purchase Type is not supported.""" + PURCHASE_TYPE_NOT_SUPPORTED + + """Paypal Error General.""" + PAYPAL_ERROR_GENERAL + + """Card number was incorrect.""" + CARD_NUMBER_INCORRECT + + """Fraud was suspected.""" + FRAUD_SUSPECTED + + """ + Non-test order limit reached. Use a test payment gateway to place another order. + """ + NON_TEST_ORDER_LIMIT_REACHED + + """Gift cards must have a price greater than zero.""" + FREE_GIFT_CARD_NOT_ALLOWED +} + +"""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 { + """ + 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 + + """ + Select the specific billing cycle to be billed. + Default to bill the current billing cycle if not specified. + """ + billingCycleSelector: SubscriptionBillingCycleSelector + + """ + The behaviour to follow when creating an order for a product variant + when it's out of stock. + """ + inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY +} + +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptInsufficientStockProductVariantsError implements SubscriptionBillingAttemptProcessingError { + """The code for the error.""" + code: SubscriptionBillingAttemptErrorCode! + + """ + A list of product variants that caused the insufficient inventory error. + """ + insufficientStockProductVariants( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! + + """An explanation of the error.""" + message: String! +} + +"""The inventory policy for a billing attempt.""" +enum SubscriptionBillingAttemptInventoryPolicy { + """ + Respect the merchant's product variant + inventory policy for this billing attempt. + """ + PRODUCT_VARIANT_INVENTORY_POLICY + + """ + Override the merchant's product variant + inventory policy and allow overselling for this billing attempt. + """ + ALLOW_OVERSELLING +} + +""" +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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantConnection! @deprecated(reason: "Use `subscriptionBillingAttemptInsufficientStockProductVariantsError` type instead.") +} + +"""An error that prevented a billing attempt.""" +interface SubscriptionBillingAttemptProcessingError { + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionBillingAttemptConnection! + + """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 at least one billing attempt.""" + HAS_ATTEMPT + + """Billing cycle has no billing attempts.""" + NO_ATTEMPT + + """Billing cycle has any number of billing attempts.""" + ANY +} + +"""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 their status.""" + billingCycleStatus: [SubscriptionBillingCycleBillingCycleStatus!] + + """ + Filters the billing cycles based on the status of their associated subscription contracts. + """ + contractStatus: [SubscriptionContractSubscriptionStatus!] + + """Filters the billing cycles based on the presence of billing attempts.""" + billingAttemptStatus: SubscriptionBillingCycleBillingAttemptStatus = ANY +} + +"""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 invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """End date can't be more than 24 hours in the future.""" + END_DATE_IN_THE_FUTURE + + """ + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX + ): SubscriptionBillingCycleConnection! + + """The date and time when the 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """The number of 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderConnection! + + """The date and time when the 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 { + """The input value is invalid.""" + INVALID + + """Can't find the billing cycle.""" + CYCLE_NOT_FOUND + + """ + There's no contract or schedule edit associated with the targeted billing cycle(s). + """ + NO_CYCLE_EDITS + + """The index selector is invalid.""" + INVALID_CYCLE_INDEX + + """The date selector is invalid.""" + INVALID_DATE + + """ + Billing cycle schedule edit input provided is empty. Must take in parameters to modify schedule. + """ + EMPTY_BILLING_CYCLE_EDIT_SCHEDULE_INPUT + + """Billing date cannot be set on skipped billing cycle.""" + BILLING_DATE_SET_ON_SKIPPED + + """ + 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 + + """ + 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 + + """Billing cycle has incomplete billing attempts in progress.""" + INCOMPLETE_BILLING_ATTEMPTS +} + +""" +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 skip status for the billing cycle.""" + skip: Boolean + + """Sets the expected billing date for the billing cycle.""" + billingDate: DateTime + + """The reason for editing.""" + reason: SubscriptionBillingCycleScheduleEditInputScheduleEditReason! +} + +""" +The input fields for possible reasons for editing the billing cycle's schedule. +""" +enum SubscriptionBillingCycleScheduleEditInputScheduleEditReason { + """Buyer initiated the schedule edit.""" + BUYER_INITIATED + + """Merchant initiated the schedule edit.""" + MERCHANT_INITIATED + + """Developer initiated the schedule edit.""" + DEV_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 a subset of subscription billing cycles within a date range. +""" +input SubscriptionBillingCyclesDateRangeSelector { + """The start date and time for the range.""" + startDate: DateTime! + + """The end date and time for the range.""" + endDate: DateTime! +} + +""" +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 index.""" + index: Int + + """Returns a billing cycle by date.""" + date: DateTime +} + +""" +The input fields to select a subset of subscription billing cycles within an index range. +""" +input SubscriptionBillingCyclesIndexRangeSelector { + """The start index for the range.""" + startIndex: Int! + + """The end index for the range.""" + endIndex: 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 +} + +"""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 +} + +"""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! +} + +"""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 { + """ + 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! + + """Minimum amount of cycles required in the subscription.""" + minCycles: Int + + """Maximum amount of cycles required in the subscription.""" + maxCycles: Int + + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] = [] +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionBillingAttemptConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderConnection! + + """The 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 ID of the customer to associate with the subscription contract.""" + customerId: ID! + + """ + The next billing date for the subscription contract.This field is independent + of billing cycles.It stores metadata set by the apps, and thus not managed by + Shopify.It can be queried from subscriptionContract.nextBillingDate. + """ + nextBillingDate: DateTime! + + """The currency used for the subscription contract.""" + currencyCode: CurrencyCode! + + """The attributes used as input for the Subscription Draft.""" + contract: SubscriptionDraftInput! + + """A list of new Subscription Lines.""" + lines: [SubscriptionAtomicLineInput!]! + + """A list of discount redeem codes to apply to the subscription contract.""" + discountCodes: [String!] = [] +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """The number of 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderConnection! + + """The date and time when the 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 ID of the customer to associate with the subscription contract.""" + customerId: ID! + + """The next billing date for the subscription contract.""" + nextBillingDate: DateTime! + + """The currency used for the subscription contract.""" + currencyCode: CurrencyCode! + + """The attributes used as input for the Subscription Draft.""" + contract: SubscriptionDraftInput! +} + +"""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 payment error.""" + PAYMENT_ERROR + + """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 +} + +""" +The possible status values of the last payment on a subscription contract. +""" +enum SubscriptionContractLastPaymentStatus { + """Successful subscription billing attempt.""" + SUCCEEDED + + """Failed subscription billing attempt.""" + FAILED +} + +"""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 ID of the product variant the subscription line refers to.""" + productVariantId: ID + + """The price of the product.""" + currentPrice: Decimal +} + +"""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!]! +} + +"""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 +} + +""" +Possible error codes that can be returned by `SubscriptionContractStatusUpdateUserError`. +""" +enum SubscriptionContractStatusUpdateErrorCode { + """The input value is invalid.""" + INVALID + + """Subscription contract status cannot be changed once terminated.""" + CONTRACT_TERMINATED +} + +"""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 is temporarily paused and is expected to resume in the future. + """ + PAUSED + + """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 +} + +"""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 shipping delivery method.""" + shipping: SubscriptionDeliveryMethodShippingInput + + """The input fields for the local delivery method.""" + localDelivery: SubscriptionDeliveryMethodLocalDeliveryInput + + """The input fields for the pickup delivery method.""" + pickup: SubscriptionDeliveryMethodPickupInput +} + +""" +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 { + """The title of the local delivery option.""" + title: String + + """The presentment title of the local delivery option.""" + presentmentTitle: String + + """ + The details displayed to the customer to describe the local delivery option. + """ + description: String + + """A custom reference to the delivery method for use with automations.""" + code: String + + """ + The phone number that the customer must provide to the merchant. + Formatted using E.164 standard. For example, `+16135551111`. + """ + phone: String! + + """ + The delivery instructions that the customer can provide to the merchant. + """ + instructions: 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 { + """The title of the pickup option.""" + title: String + + """The presentment title of the pickup option.""" + presentmentTitle: String + + """The details displayed to the customer to describe the pickup option.""" + description: String + + """A custom reference to the delivery method for use with automations.""" + code: String + + """The ID of the pickup location.""" + locationId: ID! +} + +""" +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 title of the shipping option.""" + title: String + + """The presentment title of the shipping option.""" + presentmentTitle: String + + """The description of the shipping option.""" + description: String + + """The code of the shipping option.""" + code: String + + """The carrier service ID of the shipping option.""" + carrierServiceId: ID +} + +"""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 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! + + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] = [] +} + +"""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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! +} + +"""The value of the discount and how it will be applied.""" +type SubscriptionDiscountFixedAmountValue { + """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 code is not found.""" + NOT_FOUND + + """Discount does not apply to any of the given line items.""" + NO_ENTITLED_LINE_ITEMS + + """Quantity of items does not qualify for the discount.""" + QUANTITY_NOT_IN_RANGE + + """Purchase amount of items does not qualify for the discount.""" + PURCHASE_NOT_IN_RANGE + + """Given customer does not qualify for the discount.""" + CUSTOMER_NOT_ELIGIBLE + + """Discount usage limit has been reached.""" + USAGE_LIMIT_REACHED + + """Customer usage limit has been reached.""" + CUSTOMER_USAGE_LIMIT_REACHED + + """Discount is inactive.""" + CURRENTLY_INACTIVE + + """No applicable shipping lines.""" + NO_ENTITLED_SHIPPING_LINES + + """Purchase type does not qualify for the discount.""" + INCOMPATIBLE_PURCHASE_TYPE + + """Internal error during discount code validation.""" + INTERNAL_ERROR +} + +"""The value of the discount and how it will be applied.""" +union SubscriptionDiscountValue = SubscriptionDiscountFixedAmountValue | SubscriptionDiscountPercentageValue + +""" +The `SubscriptionDraft` object represents a draft version of a +[subscription contract](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionContract) +before it's committed. It serves as a staging area for making changes to an existing subscription or creating +a new one. The draft allows you to preview and modify various aspects of a subscription before applying the changes. + +Use the `SubscriptionDraft` object to: + +- Add, remove, or modify subscription lines and their quantities +- Manage discounts (add, remove, or update manual and code-based discounts) +- Configure delivery options and shipping methods +- Set up billing and delivery policies +- Manage customer payment methods +- Add custom attributes and notes to generated orders +- Configure billing cycles and next billing dates +- Preview the projected state of the subscription + +Each `SubscriptionDraft` object maintains a projected state that shows how the subscription will look after the changes +are committed. This allows you to preview the impact of your modifications before applying them. The draft can be +associated with an existing subscription contract (for modifications) or used to create a new subscription. + +The draft remains in a draft state until it's committed, at which point the changes are applied to the subscription +contract and the draft is no longer accessible. + +Learn more about +[how subscription contracts work](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts) +and how to [build](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/build-a-subscription-contract), +[update](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract), and +[combine](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/contracts/combine-subscription-contracts) subscription contracts. +""" +type SubscriptionDraft implements Node { + """ + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: SubscriptionBillingCyclesSortKeys = CYCLE_INDEX + ): SubscriptionBillingCycleConnection! + + """The 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be added to the subscription contract. + """ + discountsAdded( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be removed from the subscription contract. + """ + discountsRemoved( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be updated on the subscription contract. + """ + discountsUpdated( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """A globally-unique ID.""" + id: ID! + + """ + The list of subscription lines which will be associated with the subscription contract. + """ + lines( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The list of subscription lines to be added to the subscription contract. + """ + linesAdded( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The list of subscription lines to be removed from the subscription contract. + """ + linesRemoved( + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): SubscriptionLineConnection! + + """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 + + """Input value is not present.""" + PRESENCE + + """Subscription draft has been already committed.""" + COMMITTED + + """Value is not in range.""" + NOT_IN_RANGE + + """The value is not an integer.""" + NOT_AN_INTEGER + + """The maximum number of cycles must be greater than the minimum.""" + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES + + """ + The delivery policy interval must be a multiple of the billing policy interval. + """ + DELIVERY_MUST_BE_MULTIPLE_OF_BILLING + + """Next billing date is invalid.""" + INVALID_BILLING_DATE + + """Note length is too long.""" + INVALID_NOTE_LENGTH + + """Must have at least one line.""" + INVALID_LINES + + """Discount must have at least one entitled line.""" + NO_ENTITLED_LINES + + """The customer doesn't exist.""" + CUSTOMER_DOES_NOT_EXIST + + """The payment method customer must be the same as the contract customer.""" + CUSTOMER_MISMATCH + + """The delivery method can't be blank if any lines require shipping.""" + DELIVERY_METHOD_REQUIRED + + """The local delivery options must be set for local delivery.""" + MISSING_LOCAL_DELIVERY_OPTIONS + + """The after cycle attribute must be unique between cycle discounts.""" + CYCLE_DISCOUNTS_UNIQUE_AFTER_CYCLE + + """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 + + """ + Another operation updated the contract concurrently as the commit was in progress. + """ + STALE_CONTRACT + + """Currency is not enabled.""" + CURRENCY_NOT_ENABLED + + """ + Cannot update a subscription contract with a current or upcoming billing cycle contract edit. + """ + HAS_FUTURE_EDITS + + """ + Cannot commit a billing cycle contract draft with this mutation. Please use SubscriptionBillingCycleContractDraftCommit. + """ + BILLING_CYCLE_PRESENT + + """ + Cannot commit a contract draft with this mutation. Please use SubscriptionDraftCommit. + """ + BILLING_CYCLE_ABSENT + + """Delivery policy cannot be updated for billing cycle contract drafts.""" + BILLING_CYCLE_CONTRACT_DRAFT_DELIVERY_POLICY_INVALID + + """Billing policy cannot be updated for billing cycle contract drafts.""" + BILLING_CYCLE_CONTRACT_DRAFT_BILLING_POLICY_INVALID + + """ + 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 + + """ + Concatenated contracts cannot contain duplicate subscription contracts. + """ + DUPLICATE_CONCATENATED_CONTRACTS + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED + + """ + 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 + + """ + Billing cycle selector requires exactly one of index or date to be provided. + """ + CYCLE_SELECTOR_VALIDATE_ONE_OF + + """ + Maximum number of concatenated contracts on a billing cycle contract draft exceeded. + """ + EXCEEDED_MAX_CONCATENATED_CONTRACTS + + """Customer is scheduled for redaction or has been redacted.""" + CUSTOMER_REDACTED + + """Customer payment method is required.""" + MISSING_CUSTOMER_PAYMENT_METHOD + + """The input value is invalid.""" + INVALID + + """The input value is blank.""" + BLANK + + """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 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 too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT +} + +"""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 current status of the subscription contract.""" + status: SubscriptionContractSubscriptionStatus + + """The ID of the payment method to be used for the subscription contract.""" + paymentMethodId: ID + + """The next billing date for the subscription contract.""" + nextBillingDate: DateTime + + """The billing policy for the subscription contract.""" + billingPolicy: SubscriptionBillingPolicyInput + + """The delivery policy for the subscription contract.""" + deliveryPolicy: SubscriptionDeliveryPolicyInput + + """The shipping price for each renewal the subscription contract.""" + deliveryPrice: Decimal + + """The delivery method for the subscription contract.""" + deliveryMethod: SubscriptionDeliveryMethodInput + + """The note field that will be applied to the generated orders.""" + note: String + + """A list of the custom attributes added to the subscription contract.""" + customAttributes: [AttributeInput!] +} + +"""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 title associated with the subscription free shipping discount.""" + title: String + + """ + The maximum number of times the subscription free shipping discount will be applied on orders. + """ + recurringCycleLimit: Int +} + +"""Represents a Subscription Line.""" +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 ID of the product variant the subscription line refers to.""" + productVariantId: ID! + + """The quantity of the product.""" + quantity: Int! + + """The price of the product.""" + currentPrice: Decimal! + + """The custom attributes for this subscription line.""" + customAttributes: [AttributeInput!] + + """The selling plan for the subscription line.""" + sellingPlanId: ID + + """ + The selling plan name for the subscription line. + + Defaults to using the selling plan's current name when not specified. + """ + sellingPlanName: String + + """Describes expected price changes of the subscription line over time.""" + pricingPolicy: SubscriptionPricingPolicyInput +} + +"""The input fields required to update a subscription line on a contract.""" +input SubscriptionLineUpdateInput { + """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 + + """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 +} + +"""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 { + """The title associated with the subscription discount.""" + title: String + + """Percentage or fixed amount value of the discount.""" + value: SubscriptionManualDiscountValueInput + + """ + The maximum number of times the subscription discount will be applied on orders. + """ + recurringCycleLimit: Int + + """Entitled line items used to apply the subscription discount on.""" + entitledLines: SubscriptionManualDiscountEntitledLinesInput +} + +"""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 { + """The percentage value of the discount. Value must be between 0 - 100.""" + percentage: Int + + """Fixed amount input in the currency defined by the subscription.""" + fixedAmount: SubscriptionManualDiscountFixedAmountInput +} + +"""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 cycle after which the pricing policy applies.""" + afterCycle: Int! + + """The price adjustment type.""" + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """The price adjustment value.""" + adjustmentValue: SellingPlanPricingPolicyValueInput! + + """The computed price after the adjustments are applied.""" + computedPrice: Decimal! +} + +""" +The input fields for expected price changes of the subscription line over time. +""" +input SubscriptionPricingPolicyInput { + """ + The 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! +} + +""" +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 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 find the tax partner record.""" + TAX_PARTNER_NOT_FOUND + + """Unable to update tax partner state.""" + TAX_PARTNER_STATE_UPDATE_FAILED + + """Unable to update already active tax partner.""" + TAX_PARTNER_ALREADY_ACTIVE +} + +"""Available customer tax exemptions.""" +enum TaxExemption { + """ + 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 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 RESELLER_EXEMPTION in Manitoba. + """ + CA_MB_RESELLER_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 DIPLOMAT_EXEMPTION in Canada. + """ + CA_DIPLOMAT_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. + """ + CA_BC_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. + """ + CA_MB_COMMERCIAL_FISHERY_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 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 PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. + """ + CA_BC_PRODUCTION_AND_MACHINERY_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 SUB_CONTRACTOR_EXEMPTION in British Columbia. + """ + CA_BC_SUB_CONTRACTOR_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 CONTRACTOR_EXEMPTION in British Columbia. + """ + CA_BC_CONTRACTOR_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 PURCHASE_EXEMPTION in Ontario. + """ + CA_ON_PURCHASE_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 FARMER_EXEMPTION in Nova Scotia. + """ + CA_NS_FARMER_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 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 Alabama. + """ + US_AL_RESELLER_EXEMPTION + + """ + 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 Arizona. + """ + US_AZ_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 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 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 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 Iowa. + """ + US_IA_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 Maine. + """ + US_ME_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 Massachusetts. + """ + US_MA_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 Mississippi. + """ + US_MS_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 Montana. + """ + US_MT_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 Nevada. + """ + US_NV_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 New York. + """ + US_NY_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 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 Vermont. + """ + US_VT_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 Washington. + """ + US_WA_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 Wisconsin. + """ + US_WI_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. + """ + US_WY_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington DC. + """ + US_DC_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 source of the tax.""" + source: String + + """The name of the tax.""" + title: String! +} + +""" +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( + """Searches the product taxonomy for matching categories.""" + search: String + + """The ID of the category associated with the child categories to return.""" + childrenOf: ID + + """ + The ID of the category associated with the sibling categories to return. + """ + siblingsOf: ID + + """ + The ID of the category associated with the descendant categories to return. + """ + descendantsOf: ID + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): TaxonomyCategoryConnection! +} + +"""A Shopify product taxonomy attribute.""" +type TaxonomyAttribute implements Node { + """A globally-unique ID.""" + 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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): TaxonomyCategoryAttributeConnection! + + """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 first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + ): TaxonomyValueConnection! +} + +"""A Shopify product taxonomy measurement attribute.""" +type TaxonomyMeasurementAttribute implements Node { + """The 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! +} + +"""State of the tax app configuration.""" +enum TaxPartnerState { + """App is not configured.""" + PENDING + + """App is configured, but not used for tax calculations.""" + READY + + """App is configured and to be used for tax calculations.""" + ACTIVE +} + +""" +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 { + """Must be a zip file.""" + INVALID_ZIP + + """Zip is empty.""" + ZIP_IS_EMPTY + + """ + May not be used to fetch a file bigger + than 50MB. + """ + ZIP_TOO_LARGE + + """Theme creation is not allowed for your shop's plan.""" + THEME_CREATION_NOT_ALLOWED_FOR_THEME_LIMITED_PLAN + + """Invalid theme role for theme creation.""" + INVALID_THEME_ROLE_FOR_THEME_CREATION +} + +"""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 { + """The record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """Theme publishing is not available during install.""" + CANNOT_PUBLISH_THEME_DURING_INSTALL + + """Theme publishing is not allowed on this plan.""" + THEME_PUBLISH_NOT_AVAILABLE_FOR_THEME_LIMITED_PLAN +} + +"""The role of the theme.""" +enum ThemeRole { + """ + The currently published theme. There can only be one main theme at any time. + """ + MAIN + + """ + The theme is currently not published. It can be transitioned to the main role if it is published by the merchant. + """ + UNPUBLISHED + + """ + 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 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 locked if it is identified as unlicensed. Customization and + publishing are restricted until the merchant resolves the licensing issue. + """ + LOCKED + + """ + The currently published theme that is only accessible to a mobile client. + """ + MOBILE @deprecated(reason: "The feature for this role has been deprecated.") +} + +"""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 record with the ID used as the input value couldn't be found.""" + NOT_FOUND + + """The input value is too long.""" + TOO_LONG + + """The input value is invalid.""" + INVALID +} + +"""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 does not exist.""" + TRANSACTION_NOT_FOUND + + """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 +} + +"""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 that has translatable fields.""" +type TranslatableResource { + """Nested translatable resources under the current resource.""" + nestedTranslatableResources( + """Return only resources of a type.""" + resourceType: TranslatableResourceType + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): TranslatableResourceConnection! + + """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 by outdated translations.""" + outdated: Boolean + + """ + 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 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 + + """ + 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 + + """ + 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 + + """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 +} + +"""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 + + """The input value is invalid.""" + INVALID + + """Resource does not exist.""" + RESOURCE_NOT_FOUND + + """Resource is not translatable.""" + RESOURCE_NOT_TRANSLATABLE + + """Too many translation keys for the resource.""" + TOO_MANY_KEYS_FOR_RESOURCE + + """Translation key is invalid.""" + INVALID_KEY_FOR_MODEL + + """Translation value is invalid.""" + FAILS_RESOURCE_VALIDATION + + """Translatable content is invalid.""" + INVALID_TRANSLATABLE_CONTENT + + """Market localizable content is invalid.""" + INVALID_MARKET_LOCALIZABLE_CONTENT + + """Locale is invalid for the shop.""" + INVALID_LOCALE_FOR_SHOP + + """Locale language code is invalid.""" + INVALID_CODE + + """Locale code format is invalid.""" + INVALID_FORMAT + + """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 + + """The specified resource can't be customized for a market.""" + RESOURCE_NOT_MARKET_CUSTOMIZABLE + + """ + 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") + + """The handle is already taken for this resource.""" + INVALID_VALUE_FOR_HANDLE_TRANSLATION +} + +"""The input fields and values for creating or updating a translation.""" +input TranslationInput { + """ + ISO code of the locale being translated into. Only locales returned in `shopLocales` are valid. + """ + locale: String! + + """ + On the resource that this translation belongs to, the reference to the value being translated. + """ + key: String! + + """The value of the translation.""" + value: String! + + """Hash digest representation of the content being translated.""" + translatableContentDigest: 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 +} + +"""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 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! +} + +"""Represents a typed custom attribute.""" +type TypedAttribute { + """Key or name of the attribute.""" + key: String! + + """Value of the attribute.""" + value: String! +} + +"""The input fields that identify a unique valued metafield.""" +input UniqueMetafieldValueInput { + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: 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 value for the unit price measurement.""" + quantityValue: Float + + """The quantity unit for the unit price measurement.""" + quantityUnit: UnitPriceMeasurementMeasuredUnit + + """The reference value for the unit price measurement.""" + referenceValue: Int + + """The reference unit for the unit price measurement.""" + referenceUnit: UnitPriceMeasurementMeasuredUnit +} + +"""The accepted types of unit of measurement.""" +enum UnitPriceMeasurementMeasuredType { + """Unit of measurements representing volumes.""" + VOLUME + + """Unit of measurements representing weights.""" + WEIGHT + + """Unit of measurements representing lengths.""" + LENGTH + + """Unit of measurements representing areas.""" + AREA + + """Unit of measurements representing counts.""" + COUNT + + """ + The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. + """ + UNKNOWN +} + +"""The valid units of measurement for a unit price measurement.""" +enum UnitPriceMeasurementMeasuredUnit { + """1000 milliliters equals 1 liter.""" + ML + + """100 centiliters equals 1 liter.""" + CL + + """Metric system unit of volume.""" + L + + """1 cubic meter equals 1000 liters.""" + M3 + + """Imperial system unit of volume (U.S. customary unit).""" + FLOZ + + """1 pint equals 16 fluid ounces (U.S. customary unit).""" + PT + + """1 quart equals 32 fluid ounces (U.S. customary unit).""" + QT + + """1 gallon equals 128 fluid ounces (U.S. customary unit).""" + GAL + + """1000 milligrams equals 1 gram.""" + MG + + """Metric system unit of weight.""" + G + + """1 kilogram equals 1000 grams.""" + KG + + """16 ounces equals 1 pound.""" + OZ + + """Imperial system unit of weight.""" + LB + + """1000 millimeters equals 1 meter.""" + MM + + """100 centimeters equals 1 meter.""" + CM + + """Metric system unit of length.""" + M + + """Imperial system unit of length.""" + IN + + """1 foot equals 12 inches.""" + FT + + """1 yard equals 36 inches.""" + YD + + """Metric system unit of area.""" + M2 + + """Imperial system unit of area.""" + FT2 + + """1 item, a unit of count.""" + ITEM + + """ + The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. + """ + UNKNOWN +} + +"""Systems of weights and measures.""" +enum UnitSystem { + """Imperial system of weights and measures.""" + IMPERIAL_SYSTEM + + """Metric system of weights and measures.""" + METRIC_SYSTEM +} + +""" +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! + + """ + 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 { + """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 alt text associated to the media.""" + alt: String +} + +""" +Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and +[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + +For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host +(`example.myshopify.com`). +""" +scalar URL + +"""The 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 { + """Saved search not found.""" + SAVED_SEARCH_NOT_FOUND + + """The saved search's query cannot match all entries or be empty.""" + INVALID_SAVED_SEARCH_QUERY +} + +"""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 does not exist.""" + DOES_NOT_EXIST + + """Redirect could not be created.""" + CREATE_FAILED + + """Redirect could not be updated.""" + UPDATE_FAILED + + """Redirect could not be deleted.""" + DELETE_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 { + """CSV file does not exist at given URL.""" + FILE_DOES_NOT_EXIST @deprecated(reason: "This error code is never returned") + + """URL redirect import not found.""" + NOT_FOUND + + """The import has already completed.""" + ALREADY_IMPORTED + + """The import is already in progress.""" + IN_PROGRESS +} + +"""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 + +""" +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 name of the website or application where the referral link exists.""" + source: String! + + """The UTM campaign medium.""" + medium: 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 +} + +"""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 container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """The key for the metafield.""" + key: String! + ): Metafield + + """List of metafield definitions.""" + metafieldDefinitions( + """Filter metafield definitions by namespace.""" + namespace: String + + """Filter by the definition's pinned status.""" + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """ + Sort the underlying list using a key. If your query is slow or returns an + error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). + """ + sortKey: MetafieldDefinitionSortKeys = ID + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_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 + ): MetafieldDefinitionConnection! @deprecated(reason: "This field will be removed in a future version. Use `QueryRoot.metafieldDefinitions` instead.") + + """ + A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) + that a merchant associates with a Shopify resource. + """ + metafields( + """ + The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """The Shopify Function implementing the 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 { + """The function handle representing the extension to install.""" + functionHandle: String + + """Whether the validation should be live on the merchant checkout.""" + enable: Boolean = false + + """ + Whether the validation should block on failures other than expected violations. + """ + blockOnFailure: Boolean = false + + """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 be live on the merchant checkout.""" + enable: Boolean = false + + """ + Whether the validation should block on failures other than expected violations. + """ + blockOnFailure: 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 { + """Validation not found.""" + NOT_FOUND + + """Function not found.""" + FUNCTION_NOT_FOUND + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Function does not implement the required interface for this cart & checkout validation. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """Only unlisted apps can be used for this cart & checkout validation.""" + PUBLIC_APP_NOT_ALLOWED + + """Function is pending deletion.""" + FUNCTION_PENDING_DELETION + + """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 + + """The type is invalid.""" + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """Unstructured reserved namespace.""" + UNSTRUCTURED_RESERVED_NAMESPACE + + """Owner type can't be used in this mutation.""" + DISALLOWED_OWNER_TYPE + + """The input value isn't included in the list.""" + INCLUSION + + """The input value is already taken.""" + TAKEN + + """The input value needs to be blank.""" + PRESENT + + """The input value is blank.""" + BLANK + + """The input value is too long.""" + TOO_LONG + + """The input value is too short.""" + TOO_SHORT + + """The input value is invalid.""" + INVALID + + """The metafield violates a capability restriction.""" + CAPABILITY_VIOLATION + + """An internal error occurred.""" + INTERNAL_ERROR +} + +""" +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 + + """Metafield value associated with an option.""" + linkedMetafieldValue: 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! +} + +""" +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 { + """The format in which the webhook subscription should send the data.""" + format: WebhookSubscriptionFormat + + """ + The list of fields to be included in the webhook subscription. Only the fields + specified will be included in the webhook payload. If null, then all fields + will be included. Learn more about [modifying webhook payloads](https://shopify.dev/docs/apps/build/webhooks/customize/modify_payloads). + """ + includeFields: [String!] + + """ + A constraint specified using search syntax that ensures only webhooks that + match the specified filter are emitted. See our [guide on + filters](https://shopify.dev/docs/apps/build/webhooks/customize/filters) for more details. + """ + filter: String + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!] + + """ + A list of identifiers specifying metafields to include in the webhook payload. + """ + metafields: [HasMetafieldsMetafieldIdentifierInput!] + + """ + The 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/uninstalled` events. Occurs whenever a shop has uninstalled the app. + """ + APP_UNINSTALLED + + """ + 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 `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 `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/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_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 `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 `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 `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 `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/enable` events. Occurs whenever a customer + account is enabled. Requires the `read_customers` scope. + """ + CUSTOMERS_ENABLE + + """ + The webhook topic for `customers/update` events. Occurs whenever a customer is + updated. Requires the `read_customers` scope. + """ + CUSTOMERS_UPDATE + + """ + 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_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 `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 `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 `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 `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 `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 `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 `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 `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 `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/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 `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/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/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_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/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/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_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/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/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/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/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_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_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_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/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/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/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 `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 `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/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 `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 `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 `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 `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 `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 `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 `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 `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 + + """ + 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/update` events. Occurs whenever an + inventory level is updated. Requires the `read_inventory` scope. + """ + INVENTORY_LEVELS_UPDATE + + """ + 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_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/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_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 `locations/activate` events. Occurs whenever a + deactivated location is re-activated. Requires the `read_locations` scope. + """ + LOCATIONS_ACTIVATE + + """ + 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/create` events. Occurs whenever a location is + created. Requires the `read_locations` scope. + """ + LOCATIONS_CREATE + + """ + The webhook topic for `locations/update` events. Occurs whenever a location is + updated. Requires the `read_locations` scope. + """ + LOCATIONS_UPDATE + + """ + The webhook topic for `locations/delete` events. Occurs whenever a location is + deleted. Requires the `read_locations` scope. + """ + LOCATIONS_DELETE + + """ + 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 `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 `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 `locales/destroy` events. Occurs whenever a shop locale + is destroyed Requires the `read_locales` scope. + """ + LOCALES_DESTROY + + """ + The webhook topic for `domains/create` events. Occurs whenever a domain is created. + """ + DOMAINS_CREATE + + """ + The webhook topic for `domains/update` events. Occurs whenever a domain is updated. + """ + DOMAINS_UPDATE + + """ + The webhook topic for `domains/destroy` events. Occurs whenever a domain is destroyed. + """ + DOMAINS_DESTROY + + """ + 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/update` events. Occurs whenever + a subscription contract is updated. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_UPDATE + + """ + 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/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_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 `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/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 `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 `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_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/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 `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/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/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/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 `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/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 `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 `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 `payment_schedules/due` events. Occurs whenever payment + schedules are due. Requires the `read_payment_terms` scope. + """ + PAYMENT_SCHEDULES_DUE + + """ + 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/update` events. Notifies when a + SellingPlanGroup is updated. Requires the `read_products` scope. + """ + SELLING_PLAN_GROUPS_UPDATE + + """ + 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 `bulk_operations/finish` events. Notifies when a Bulk Operation finishes. + """ + BULK_OPERATIONS_FINISH + + """ + 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/update` events. Triggers when product + feed is updated Requires the `read_product_listings` scope. + """ + PRODUCT_FEEDS_UPDATE + + """ + 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/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 `markets/create` events. Occurs when a new market is created. Requires the `read_markets` scope. + """ + MARKETS_CREATE + + """ + The webhook topic for `markets/update` events. Occurs when a market is updated. Requires the `read_markets` scope. + """ + MARKETS_UPDATE + + """ + The webhook topic for `markets/delete` events. Occurs when a market is deleted. Requires the `read_markets` scope. + """ + MARKETS_DELETE + + """ + 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 `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 `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 `publications/delete` events. Occurs whenever a + publication is deleted. Requires the `read_publications` scope. + """ + PUBLICATIONS_DELETE + + """ + 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 `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 `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/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 `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 `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/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 `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_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/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_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 `customers/merge` events. Triggers when two customers + are merged Requires the `read_customer_merge` scope. + """ + CUSTOMERS_MERGE + + """ + 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/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 `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/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/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_shipments/delete` events. Triggers when a + shipment is deleted. Requires the `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_DELETE + + """ + 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/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/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_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/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/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/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 `customer_account_settings/update` events. Triggers when merchants change customer account setting. + """ + CUSTOMER_ACCOUNT_SETTINGS_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 `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 `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/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/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/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/expire` events. Occurs when a + subscription contract expires. Requires the `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_EXPIRE + + """ + 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 `metaobjects/create` events. Occurs when a metaobject is + created. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_CREATE + + """ + The webhook topic for `metaobjects/update` events. Occurs when a metaobject is + updated. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_UPDATE + + """ + The webhook topic for `metaobjects/delete` events. Occurs when a metaobject is + deleted. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_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/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/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 `discounts/create` events. Occurs whenever a discount is + created. Requires the `read_discounts` scope. + """ + DISCOUNTS_CREATE + + """ + The webhook topic for `discounts/update` events. Occurs whenever a discount is + updated. Requires the `read_discounts` scope. + """ + DISCOUNTS_UPDATE + + """ + 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 `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/update` events. Occurs when a + metafield definition is updated. Requires the `read_content` scope. + """ + METAFIELD_DEFINITIONS_UPDATE + + """ + 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 `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 `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 `checkout_and_accounts_configurations/update` events. + The event occurs whenever a published checkout and account configuration is updated. + """ + CHECKOUT_AND_ACCOUNTS_CONFIGURATIONS_UPDATE +} + +"""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 +} + +""" +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 web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. + """ + domainId: ID + + """The default locale for the web presence.""" + defaultLocale: String! + + """The alternate locales for the web presence.""" + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + For example: in `/en-us`, the subfolder suffix is `us`. + Only ASCII characters are allowed. This field must be `null` if the `domainId` isn't `null`. + """ + subfolderSuffix: String +} + +"""Return type for `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 default locale for the web presence.""" + defaultLocale: String + + """The alternate locales for the web presence.""" + alternateLocales: [String!] + + """ + The market-specific suffix of the subfolders defined by the web presence. + Example: in `/en-us` the subfolder suffix is `us`. + Only ASCII characters are allowed. + This field must be null if 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 +} + +"""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 { + """The weight value using the unit system specified with `weight_unit`.""" + value: Float! + + """Unit of measurement for `value`.""" + unit: WeightUnit! +} + +"""Units of measurement for weight.""" +enum WeightUnit { + """1 kilogram equals 1000 grams.""" + KILOGRAMS + + """Metric system unit of mass.""" + GRAMS + + """1 pound equals 16 ounces.""" + POUNDS + + """Imperial system unit of mass.""" + OUNCES +} diff --git a/oura/shopify/shopify_suite_test.go b/oura/shopify/shopify_suite_test.go new file mode 100644 index 000000000..0d66389af --- /dev/null +++ b/oura/shopify/shopify_suite_test.go @@ -0,0 +1,11 @@ +package shopify_test + +import ( + "testing" + + "github.com/tidepool-org/platform/test" +) + +func TestSuite(t *testing.T) { + test.Test(t) +} diff --git a/oura/shopify/test/client.go b/oura/shopify/test/client.go new file mode 100644 index 000000000..5596ed1d5 --- /dev/null +++ b/oura/shopify/test/client.go @@ -0,0 +1,72 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: client.go +// +// Generated by this command: +// +// mockgen -source=client.go -destination=./test/client.go -package=test Client +// + +// Package test is a generated GoMock package. +package test + +import ( + context "context" + reflect "reflect" + + gomock "go.uber.org/mock/gomock" + + shopify "github.com/tidepool-org/platform/oura/shopify" +) + +// MockClient is a mock of Client interface. +type MockClient struct { + ctrl *gomock.Controller + recorder *MockClientMockRecorder + isgomock struct{} +} + +// MockClientMockRecorder is the mock recorder for MockClient. +type MockClientMockRecorder struct { + mock *MockClient +} + +// NewMockClient creates a new mock instance. +func NewMockClient(ctrl *gomock.Controller) *MockClient { + mock := &MockClient{ctrl: ctrl} + mock.recorder = &MockClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClient) EXPECT() *MockClientMockRecorder { + return m.recorder +} + +// CreateDiscountCode mocks base method. +func (m *MockClient) CreateDiscountCode(ctx context.Context, discountCodeInput shopify.DiscountCodeInput) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateDiscountCode", ctx, discountCodeInput) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateDiscountCode indicates an expected call of CreateDiscountCode. +func (mr *MockClientMockRecorder) CreateDiscountCode(ctx, discountCodeInput any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDiscountCode", reflect.TypeOf((*MockClient)(nil).CreateDiscountCode), ctx, discountCodeInput) +} + +// GetDeliveredProducts mocks base method. +func (m *MockClient) GetDeliveredProducts(ctx context.Context, orderID string) (*shopify.DeliveredProducts, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDeliveredProducts", ctx, orderID) + ret0, _ := ret[0].(*shopify.DeliveredProducts) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDeliveredProducts indicates an expected call of GetDeliveredProducts. +func (mr *MockClientMockRecorder) GetDeliveredProducts(ctx, orderID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeliveredProducts", reflect.TypeOf((*MockClient)(nil).GetDeliveredProducts), ctx, orderID) +} diff --git a/oura/shopify/test/fixtures/customers.json b/oura/shopify/test/fixtures/customers.json new file mode 100644 index 000000000..d2e18b90b --- /dev/null +++ b/oura/shopify/test/fixtures/customers.json @@ -0,0 +1,13 @@ +{ + "identifiers": [ + { + "id": "1aacb960-430c-4081-8b3b-a32688807dc5", + "email": "james.jellyfish@tidepool.org", + "cio_id": "cio_0987654321" + } + ], + "ids": [ + "1aacb960-430c-4081-8b3b-a32688807dc5" + ], + "next": "MDox" +} diff --git a/oura/test/fixtures.go b/oura/test/fixtures.go new file mode 100644 index 000000000..370ab1b6b --- /dev/null +++ b/oura/test/fixtures.go @@ -0,0 +1,15 @@ +package test + +import ( + "fmt" + "os" +) + +func LoadFixture(filename string) (string, error) { + data, err := os.ReadFile(filename) + if err != nil { + return "", fmt.Errorf("failed to read file %s: %w", filename, err) + } + + return string(data), nil +} diff --git a/oura/test/stubs.go b/oura/test/stubs.go new file mode 100644 index 000000000..62ac3a045 --- /dev/null +++ b/oura/test/stubs.go @@ -0,0 +1,90 @@ +package test + +import ( + "encoding/json" + "net/http" + "net/http/httptest" + "reflect" +) + +func NewStubServer(resp *StubResponses) *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + for _, stubbed := range resp.responses { + if matches := stubbed.matchers.MatchesAll(r); matches { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(stubbed.response.StatusCode) + w.Write([]byte(stubbed.response.Body)) + return + } + } + + resp.unmatchedResponses++ + + w.WriteHeader(http.StatusNotFound) + w.Write([]byte("Not Found")) + return + })) +} + +type RequestMatchers []RequestMatcher + +func (rm RequestMatchers) MatchesAll(r *http.Request) bool { + for _, m := range rm { + if !m(r) { + return false + } + } + return true +} + +type RequestMatcher func(r *http.Request) bool + +func NewRequestMethodAndPathMatcher(method, path string) RequestMatcher { + return func(r *http.Request) bool { + return r.Method == method && r.URL.Path == path + } +} + +func NewRequestJSONBodyMatcher(expected string) RequestMatcher { + return func(r *http.Request) bool { + expectedJSON := map[string]interface{}{} + err := json.Unmarshal([]byte(expected), &expectedJSON) + if err != nil { + panic(err) + } + + actualJSON := map[string]interface{}{} + if err := json.NewDecoder(r.Body).Decode(&actualJSON); err != nil { + panic(err) + } + + return reflect.DeepEqual(expectedJSON, actualJSON) + } +} + +type StubResponses struct { + responses []StubResponse + unmatchedResponses int +} + +func NewStubResponses() *StubResponses { + return &StubResponses{} +} + +func (s *StubResponses) AddResponse(matchers []RequestMatcher, response Response) { + s.responses = append(s.responses, StubResponse{matchers: matchers, response: response}) +} + +func (s *StubResponses) UnmatchedResponses() int { + return s.unmatchedResponses +} + +type StubResponse struct { + matchers RequestMatchers + response Response +} + +type Response struct { + StatusCode int + Body string +}