directive @goTag( key: String! value: String ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION scalar DateTime scalar UnsignedInt64 scalar URL scalar HTML union MetafieldParentResource = Customer union MetafieldReference = Page type Query { # Find a customer by its access token. customer(customerAccessToken: String!): Customer } type Mutation { # Creates a customer access token. # The customer access token is required to modify the customer object in any way. customerAccessTokenCreate(input: CustomerAccessTokenCreateInput!): CustomerAccessTokenCreatePayload # Renews a customer access token. # # Access token renewal must happen before a token expires. # If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. customerAccessTokenRenew(customerAccessToken: String!): CustomerAccessTokenRenewPayload # Permanently destroys a customer access token. customerAccessTokenDelete(customerAccessToken: String!): CustomerAccessTokenDeletePayload # Creates a new customer. customerCreate(input: CustomerCreateInput!): CustomerCreatePayload # Updates an existing customer. customerUpdate(customerAccessToken: String! customer: CustomerUpdateInput!): CustomerUpdatePayload } type Page implements Node&HasMetafields&OnlineStorePublishable{ # The description of the page, complete with HTML formatting. body: HTML! # Summary of the page body. bodySummary: String! # The timestamp of the page creation. createdAt: DateTime! # A human-friendly unique string for the page automatically generated from its title. handle: String! # A globally-unique identifier. id: ID! # Returns a metafield found by namespace and key. metafield(namespace: String!key: String!): Metafield # The metafields associated with the resource matching the supplied list of namespaces and keys. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. onlineStoreUrl: URL # The page's SEO information. seo: SEO # The title of the page. title: String! # The timestamp of the latest page update. updatedAt: DateTime! } # SEO information. type SEO { # The meta description. description: String # The SEO title. title: String } # Represents a resource that can be published to the Online Store sales channel. interface OnlineStorePublishable { # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel. onlineStoreUrl: URL } # Represents information about the metafields associated to the specified resource. interface HasMetafields { # Returns a metafield found by namespace and key. metafield(namespace: String!key: String!): Metafield # The metafields associated with the resource matching the supplied list of namespaces and keys. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! } type MetafieldReferenceEdge { # A cursor for use in pagination. cursor: String! # The item at the end of MetafieldReferenceEdge. node: MetafieldReference! } # An object with an ID field to support global identification, in accordance with the # Relay specification. # This interface is used by the node # and nodes queries. interface Node { # A globally-unique identifier. id: ID! } # Metafields represent custom metadata attached to a resource. # Metafields can be sorted into namespaces and are comprised of keys, values, and value types. type Metafield implements Node { # The date and time when the storefront metafield was created. createdAt: DateTime! # The description of a metafield. description: String # A globally-unique identifier. id: ID! # The key name for a metafield. key: String! # The namespace for a metafield. namespace: String! # The parent object that the metafield belongs to. parentResource: MetafieldParentResource! # 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( first: Int after: String last: Int before: String ): MetafieldReferenceConnection # The type name of the metafield. See the list of supported types. type: String! # The date and time when the storefront metafield was updated. updatedAt: DateTime! # The value of a metafield. value: String! } # An auto-generated type for paginating through multiple MetafieldReferences. type MetafieldReferenceConnection { # A list of edges. edges: [MetafieldReferenceEdge!]! # A list of the nodes contained in MetafieldReferenceEdge. nodes: [MetafieldReference!]! # Information to aid in pagination. pageInfo: PageInfo! } # Identifies a metafield on an owner resource by namespace and key. input HasMetafieldsIdentifier { # A container for a set of metafields. namespace: String! # The identifier for the metafield. key: String! } # Returns information about pagination in a connection, in accordance with the Relay specification. type PageInfo { # The cursor corresponding to the last node in edges. endCursor: String # Whether there are more pages to fetch following the current page. hasNextPage: Boolean! # Whether there are any pages prior to the current page. hasPreviousPage: Boolean! # The cursor corresponding to the first node in edges. startCursor: String } # A customer represents a customer account with the shop. # Customer accounts store contact information for the customer, # saving logged-in customers the trouble of having to provide it at every checkout. type Customer implements HasMetafields { # Indicates whether the customer has consented to be sent marketing material via email. acceptsMarketing: Boolean! @goTag(key: "mapstructure" value: "accepts_marketing") # A list of addresses for the customer. addresses( after: String before: String first: Int last: Int reverse: Boolean = false ): MailingAddressConnection! @goTag(key: "mapstructure" value: "addresses") # The date and time when the customer was created. createdAt: DateTime! @goTag(key: "mapstructure" value: "created_at") # The customer’s default address. defaultAddress: MailingAddress @goTag(key: "mapstructure" value: "default_address") # The customer’s name, email or phone number. displayName: String! @goTag(key: "mapstructure" value: "name") # The customer’s email address. email: String @goTag(key: "mapstructure" value: "email") # The customer’s first name. firstName: String @goTag(key: "mapstructure" value: "given_name") # A unique identifier for the customer. id: ID! @goTag(key: "mapstructure" value: "sub") # The customer's most recently updated, incomplete checkout. # lastIncompleteCheckout: Checkout # The customer’s last name. lastName: String @goTag(key: "mapstructure" value: "family_name") # Returns a metafield found by namespace and key. metafield(key: String!namespace: String!): Metafield @goTag(key: "mapstructure" value: "metafield") # The metafields associated with the resource matching the supplied list of namespaces and keys. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! @goTag(key: "mapstructure" value: "metafields") # The number of orders that the customer has made at the store in their lifetime. numberOfOrders: UnsignedInt64! @goTag(key: "mapstructure" value: "number_of_orders") # The orders associated with the customer. # orders( # after: String # before: String # first: Int # last: Int # query: String # reverse: Boolean = false # sortKey: OrderSortKeys = ID # ): OrderConnection! @goTag(key: "mapstructure" value: "orders") # The customer’s phone number. phone: String @goTag(key: "mapstructure" value: "phone_number") # A comma separated list of tags that have been added to the customer. # Additional access scope required: unauthenticated_read_customer_tags. tags: [String!]! @goTag(key: "mapstructure" value: "tags") # The date and time when the customer information was updated. updatedAt: DateTime! @goTag(key: "mapstructure" value: "updated_at") } # An auto-generated type for paginating through multiple MailingAddresses. type MailingAddressConnection { # A list of edges. edges: [MailingAddressEdge!]! # A list of the nodes contained in MailingAddressEdge. nodes: [MailingAddress!]! # Information to aid in pagination. pageInfo: PageInfo! } # An auto-generated type which holds one MailingAddress and a cursor during pagination. type MailingAddressEdge { # A cursor for use in pagination. cursor: String! # The item at the end of MailingAddressEdge. node: MailingAddress! } # Represents a mailing address for customers and shipping. type MailingAddress implements Node { # The first line of the address. Typically the street address or PO Box number. address1: String # The second line of the address. Typically the number of the apartment, suite, or unit. address2: String # The name of the city, district, village, or town. city: String # The name of the customer's company or organization. company: String # The name of the country. country: String # The two-letter code for the country of the address. # # For example, US. countryCodeV2: CountryCode # The first name of the customer. firstName: String # A formatted version of the address, customized by the provided arguments. formatted(withName: Boolean = false, withCompany: Boolean = true): [String!]! # A comma-separated list of the values for city, province, and country. formattedArea: String # A globally-unique identifier. id: ID! # The last name of the customer. lastName: String # The latitude coordinate of the customer address. latitude: Float # The longitude coordinate of the customer address. longitude: Float # The full name of the customer, based on firstName and lastName. name: String # A unique phone number for the customer. # # Formatted using E.164 standard. For example, +16135551111. phone: String # The region of the address, such as the province, state, or district. province: String # The two-letter code for the region. # # For example, ON. provinceCode: String # The zip or postal code of the address. zip: String # The two-letter code for the country of the address. countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.") } type CustomerAccessTokenCreatePayload { customerAccessToken: CustomerAccessToken customerUserErrors: [CustomerUserError!]! } type CustomerAccessTokenRenewPayload { customerAccessToken: CustomerAccessToken userErrors: [UserError!]! } input CustomerAccessTokenCreateInput { email: String! password: String! } type CustomerAccessToken { accessToken: String! expiresAt: DateTime! } interface DisplayableError { field: [String!] message: String! } type UserError implements DisplayableError { field: [String!] message: String! } type CustomerUserError implements DisplayableError { code: CustomerErrorCode field: [String!] message: String! } enum CustomerErrorCode { # The input value is blank. BLANK # The input value is invalid. INVALID # The input value is already taken. TAKEN # The input value is too long. TOO_LONG # The input value is too short. TOO_SHORT # Unidentified customer. UNIDENTIFIED_CUSTOMER # Customer is disabled. CUSTOMER_DISABLED # Input password starts or ends with whitespace. PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE # Input contains HTML tags. CONTAINS_HTML_TAGS # Input contains URL. CONTAINS_URL # Invalid activation token. TOKEN_INVALID # Customer already enabled. ALREADY_ENABLED # Address does not exist. NOT_FOUND # Input email contains an invalid domain name. BAD_DOMAIN # Multipass token is not valid. INVALID_MULTIPASS_REQUEST } # Return type for `customerAccessTokenDelete` mutation. type CustomerAccessTokenDeletePayload { # The destroyed access token. deletedAccessToken: String # ID of the destroyed customer access token. deletedCustomerAccessTokenId: String # The list of errors that occurred from executing the mutation. userErrors: [UserError!]! } # Specifies the fields required to update the Customer information. input CustomerUpdateInput { # The customer’s first name. firstName: String # The customer’s last name. lastName: String # The customer’s email. email: String # A unique phone number for the customer. # # Formatted using E.164 standard. For example, +16135551111. To remove the phone number, specify null. phone: String # The login password used by the customer. password: String # Indicates whether the customer has consented to be sent marketing material via email. acceptsMarketing: Boolean } # The fields required to create a new customer. input CustomerCreateInput { # The customer’s first name. firstName: String # The customer’s last name. lastName: String # The customer’s email. email: String! # A unique phone number for the customer. # # Formatted using E.164 standard. For example, +16135551111. phone: String # The login password used by the customer. password: String! # Indicates whether the customer has consented to be sent marketing material via email. acceptsMarketing: Boolean } # Return type for `customerCreate` mutation. type CustomerCreatePayload { # The created customer object. customer: Customer # The list of errors that occurred from executing the mutation. customerUserErrors: [CustomerUserError!]! } # Return type for `customerUpdate` mutation. type CustomerUpdatePayload { # The updated customer object. customer: Customer # The newly created customer access token. If the customer's password is updated, all previous access tokens # (including the one used to perform this mutation) become invalid, and a new token is generated. customerAccessToken: CustomerAccessToken # The list of errors that occurred from executing the mutation. customerUserErrors: [CustomerUserError!]! } # ISO 639-1 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 # Czech CS # Church Slavic CU # Welsh CY # Danish DA # German DE # Dzongkha DZ # Ewe EE # Greek EL # English EN # Esperanto EO # Spanish ES # Estonian ET # Basque EU # Persian FA # Fulah FF # Finnish FI # 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 QU # Quechua. # Romansh. RM # Rundi. RN # Romanian. RO # Russian. RU # Kinyarwanda. RW # 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 # Volapük. VO } # 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 # Turkey. 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 }