delivery.graphql 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. # A participant defines carrier-calculated rates for shipping services
  2. # with a possible merchant-defined fixed fee or a percentage-of-rate fee.
  3. type DeliveryParticipant implements Node {
  4. # Whether to display new shipping services automatically to the customer when the service becomes available.
  5. adaptToNewServicesFlag: Boolean!
  6. # The carrier used for this participant.
  7. carrierService: DeliveryCarrierService!
  8. # The merchant-defined fixed fee for this participant.
  9. fixedFee: MoneyV2
  10. # A globally-unique identifier.
  11. id: ID!
  12. # The carrier-specific services offered by the participant, and whether each service is active.
  13. participantServices: [DeliveryParticipantService!]!
  14. # The merchant-defined percentage-of-rate fee for this participant.
  15. percentageOfRateFee: Float!
  16. }
  17. # Represents the shipping details that the customer chose for their order.
  18. type ShippingLine {
  19. # A reference to the carrier service that provided the rate.
  20. # Present when the rate was computed by a third-party carrier service.
  21. carrierIdentifier: String
  22. # A reference to the shipping method.
  23. code: String
  24. # Whether the shipping line is custom or not.
  25. custom: Boolean!
  26. # The general classification of the delivery method.
  27. deliveryCategory: String
  28. # The discounts that have been allocated to the shipping line.
  29. discountAllocations: [DiscountAllocation!]!
  30. # The pre-tax shipping price with discounts applied.
  31. discountedPriceSet: MoneyBag!
  32. # A globally-unique identifier.
  33. id: ID
  34. # The pre-tax shipping price without any discounts applied.
  35. originalPriceSet: MoneyBag!
  36. # The phone number at the shipping address.
  37. phone: String
  38. # The fulfillment service requested for the shipping method.
  39. # Present if the shipping method requires processing by a third party fulfillment service.
  40. requestedFulfillmentService: FulfillmentService
  41. # A unique identifier for the shipping rate. The format can change without notice and is not meant to be shown to users.
  42. shippingRateHandle: String
  43. # Returns the rate source for the shipping line.
  44. source: String
  45. # The TaxLine objects connected to this shipping line.
  46. taxLines: [TaxLine!]!
  47. # Returns the title of the shipping line.
  48. title: String!
  49. }
  50. # A shipping profile. In Shopify, a shipping profile is a set of shipping rates scoped to a set of products or variants
  51. # that can be shipped from selected locations to zones.
  52. type DeliveryProfile implements Node {
  53. # The number of active shipping rates for the profile.
  54. activeMethodDefinitionsCount: Int!
  55. # Whether this is the default profile.
  56. default: Boolean!
  57. # A globally-unique identifier.
  58. id: ID!
  59. # Whether this shop has enabled legacy compatibility mode for delivery profiles.
  60. legacyMode: Boolean!
  61. # The number of locations without rates defined.
  62. locationsWithoutRatesCount: Int!
  63. # The name of the delivery profile.
  64. name: String!
  65. # The number of active origin locations for the profile.
  66. originLocationCount: Int!
  67. # How many product variants are in this profile.
  68. productVariantsCountV2: DeliveryProductVariantsCount!
  69. # The products and variants associated with this profile.
  70. profileItems(
  71. first: Int
  72. after: String
  73. last: Int
  74. before: String
  75. reverse: Boolean = false
  76. ): DeliveryProfileItemConnection!
  77. # The location groups and associated zones using this profile.
  78. profileLocationGroups: [DeliveryProfileLocationGroup!]!
  79. # Selling plan groups associated with the specified delivery profile.
  80. sellingPlanGroups(
  81. first: Int
  82. after: String
  83. last: Int
  84. before: String
  85. reverse: Boolean = false
  86. ): SellingPlanGroupConnection!
  87. # List of locations that have not been assigned to a location group for this profile.
  88. unassignedLocations: [Location!]!
  89. # The number of countries with active rates to deliver to.
  90. zoneCountryCount: Int!
  91. }
  92. # A product and the subset of associated variants that are part of this delivery profile.
  93. type DeliveryProfileItem implements Node {
  94. # A globally-unique identifier.
  95. id: ID!
  96. # A product associated with this profile.
  97. product: Product!
  98. # The product variants associated with this delivery profile.
  99. variants(
  100. first: Int
  101. after: String
  102. last: Int
  103. before: String
  104. reverse: Boolean = false
  105. ): ProductVariantConnection!
  106. }
  107. # How many product variants are in a profile. This count is capped at 500.
  108. type DeliveryProductVariantsCount {
  109. # Whether the count has reached the cap of 500.
  110. capped: Boolean!
  111. # The product variant count.
  112. count: Int!
  113. }
  114. # Links a location group with zones. Both are associated to a delivery profile.
  115. type DeliveryProfileLocationGroup {
  116. # The countries already selected in any zone for the specified location group.
  117. countriesInAnyZone: [DeliveryCountryAndZone!]!
  118. # The collection of locations that make up the specified location group.
  119. locationGroup: DeliveryLocationGroup!
  120. # The applicable zones associated to the specified location group.
  121. locationGroupZones(
  122. first: Int
  123. after: String
  124. last: Int
  125. before: String
  126. reverse: Boolean = false
  127. ): DeliveryLocationGroupZoneConnection!
  128. }
  129. # A location group is a collection of locations. They share zones and delivery methods across delivery profiles.
  130. type DeliveryLocationGroup implements Node {
  131. # A globally-unique identifier.
  132. id: ID!
  133. # A list of all locations that are part of this location group.
  134. locations(
  135. first: Int
  136. after: String
  137. last: Int
  138. before: String
  139. reverse: Boolean = false
  140. sortKey: LocationSortKeys = NAME
  141. query: String
  142. includeLegacy: Boolean = false
  143. includeInactive: Boolean = false
  144. ): LocationConnection!
  145. }
  146. # Links a location group with a zone and the associated method definitions.
  147. type DeliveryLocationGroupZone {
  148. # The number of method definitions for the zone.
  149. methodDefinitionCounts: DeliveryMethodDefinitionCounts!
  150. # The method definitions associated to a zone and location group.
  151. methodDefinitions(
  152. eligible: Boolean
  153. type: DeliveryMethodDefinitionType
  154. first: Int
  155. after: String
  156. last: Int
  157. before: String
  158. reverse: Boolean = false
  159. sortKey: MethodDefinitionSortKeys = ID
  160. ): DeliveryMethodDefinitionConnection!
  161. # The zone associated to a location group.
  162. zone: DeliveryZone!
  163. }
  164. # A zone is a group of countries that have the same shipping rates.
  165. # Customers can order products from a store only if they choose a shipping destination that's included in one of the store's zones.
  166. type DeliveryZone implements Node {
  167. # The list of countries within the zone.
  168. countries: [DeliveryCountry!]!
  169. # A globally-unique identifier.
  170. id: ID!
  171. # The name of the zone.
  172. name: String!
  173. }
  174. # The number of method definitions for a zone, separated into merchant-owned and participant definitions.
  175. type DeliveryMethodDefinitionCounts {
  176. # The number of participant method definitions for the specified zone.
  177. participantDefinitionsCount: Int!
  178. # The number of merchant-defined method definitions for the specified zone.
  179. rateDefinitionsCount: Int!
  180. }
  181. # The country details and the associated shipping zone.
  182. type DeliveryCountryAndZone {
  183. # The country details.
  184. country: DeliveryCountry!
  185. # The name of the shipping zone.
  186. zone: String!
  187. }
  188. # A country that is used to define a shipping zone.
  189. type DeliveryCountry implements Node {
  190. # A two-letter country code in ISO 3166-1 alpha-2 standard.
  191. # It also includes a flag indicating whether the country should be
  192. # a part of the 'Rest Of World' shipping zone.
  193. code: DeliveryCountryCodeOrRestOfWorld!
  194. # A globally-unique identifier.
  195. id: ID!
  196. # The full name of the country.
  197. name: String!
  198. # The list of regions associated with this country.
  199. provinces: [DeliveryProvince!]!
  200. # The translated name of the country. The translation returned is based on the system's locale.
  201. translatedName: String!
  202. }
  203. # The country code and whether the country is a part of the 'Rest Of World' shipping zone.
  204. type DeliveryCountryCodeOrRestOfWorld {
  205. # The country code in the ISO 3166-1 alpha-2 format.
  206. countryCode: CountryCode
  207. # Whether the country is a part of the 'Rest of World' shipping zone.
  208. restOfWorld: Boolean!
  209. }
  210. # A region that is used to define a shipping zone.
  211. type DeliveryProvince implements Node {
  212. # The code of the region.
  213. code: String!
  214. # A globally-unique identifier.
  215. id: ID!
  216. # The full name of the region.
  217. name: String!
  218. # The translated name of the region. The translation returned is based on the system's locale.
  219. translatedName: String!
  220. }
  221. # A method definition contains the delivery rate and the conditions that must be met for the method to be applied.
  222. type DeliveryMethodDefinition implements Node {
  223. # Whether this method definition is active.
  224. active: Boolean!
  225. # The description of the method definition.
  226. description: String
  227. # A globally-unique identifier.
  228. id: ID!
  229. # The method conditions that must pass for this method definition to be applied to an order.
  230. methodConditions: [DeliveryCondition!]!
  231. # The name of the method definition.
  232. name: String!
  233. # The provided rate for this method definition, from a rate definition or participant.
  234. rateProvider: DeliveryRateProvider!
  235. }
  236. # A condition that must pass for a delivery method definition to be applied to an order.
  237. type DeliveryCondition implements Node {
  238. # The value (weight or price) that the condition field is compared to.
  239. conditionCriteria: DeliveryConditionCriteria!
  240. # The field to compare the criterion value against, using the operator.
  241. field: DeliveryConditionField!
  242. # A globally-unique identifier.
  243. id: ID!
  244. # The operator to compare the field and criterion value.
  245. operator: DeliveryConditionOperator!
  246. }
  247. # The delivery method used by a fulfillment order.
  248. type DeliveryMethod implements Node {
  249. # A globally-unique identifier.
  250. id: ID!
  251. # The maximum date and time by which the delivery is expected to be completed.
  252. maxDeliveryDateTime: DateTime
  253. # The type of the delivery method.
  254. methodType: DeliveryMethodType!
  255. # The minimum date and time by which the delivery is expected to be completed.
  256. minDeliveryDateTime: DateTime
  257. }
  258. # The merchant-defined rate of the DeliveryMethodDefinition.
  259. type DeliveryRateDefinition implements Node {
  260. # A globally-unique identifier.
  261. id: ID!
  262. # The price of this rate.
  263. price: MoneyV2!
  264. }
  265. # A local delivery method, which includes a mailing address and a local delivery option.
  266. type SubscriptionDeliveryMethodLocalDelivery {
  267. # The address to deliver to.
  268. address: SubscriptionMailingAddress!
  269. # The details of the local delivery method to use.
  270. localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption!
  271. }
  272. # Represents a Mailing Address on a Subscription.
  273. type SubscriptionMailingAddress {
  274. # The first line of the address. Typically the street address or PO Box number.
  275. address1: String
  276. # The second line of the address. Typically the number of the apartment, suite, or unit.
  277. address2: String
  278. # The name of the city, district, village, or town.
  279. city: String
  280. # The name of the customer's company or organization.
  281. company: String
  282. # The name of the country.
  283. country: String
  284. # The two-letter code for the country of the address.
  285. #
  286. # For example, US.
  287. countryCode: CountryCode
  288. # The first name of the customer.
  289. firstName: String
  290. # The last name of the customer.
  291. lastName: String
  292. # The full name of the customer, based on firstName and lastName.
  293. name: String
  294. # A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111.
  295. phone: String
  296. # The region of the address, such as the province, state, or district.
  297. province: String
  298. # The two-letter code for the region.
  299. #
  300. # For example, ON.
  301. provinceCode: String
  302. # The zip or postal code of the address.
  303. zip: String
  304. }
  305. # The selected delivery option on a subscription contract.
  306. type SubscriptionDeliveryMethodLocalDeliveryOption {
  307. # A custom reference to the delivery method for use with automations.
  308. code: String
  309. # The details displayed to the customer to describe the local delivery option.
  310. description: String
  311. # The delivery instructions that the customer can provide to the merchant.
  312. instructions: String
  313. # The phone number that the customer provided to the merchant.
  314. # Formatted using E.164 standard. For example, +16135551111.
  315. phone: String!
  316. # The presentment title of the local delivery option.
  317. presentmentTitle: String
  318. # The title of the local delivery option.
  319. title: String
  320. }
  321. # A delivery method with a pickup option.
  322. type SubscriptionDeliveryMethodPickup {
  323. # The details of the pickup delivery method to use.
  324. pickupOption: SubscriptionDeliveryMethodPickupOption!
  325. }
  326. # Represents the selected pickup option on a subscription contract.
  327. type SubscriptionDeliveryMethodPickupOption {
  328. # A custom reference to the delivery method for use with automations.
  329. code: String
  330. # The details displayed to the customer to describe the pickup option.
  331. description: String
  332. # The location where the customer will pickup the merchandise.
  333. location: Location!
  334. # The presentment title of the pickup option.
  335. presentmentTitle: String
  336. # The title of the pickup option.
  337. title: String
  338. }
  339. # Represents a shipping delivery method: a mailing address and a shipping option.
  340. type SubscriptionDeliveryMethodShipping {
  341. # The address to ship to.
  342. address: SubscriptionMailingAddress!
  343. # The details of the shipping method to use.
  344. shippingOption: SubscriptionDeliveryMethodShippingOption!
  345. }
  346. # Represents the selected shipping option on a subscription contract.
  347. type SubscriptionDeliveryMethodShippingOption {
  348. # The carrier service of the shipping option.
  349. carrierService: DeliveryCarrierService
  350. # The code of the shipping option.
  351. code: String
  352. # The description of the shipping option.
  353. description: String
  354. # The presentment title of the shipping option.
  355. presentmentTitle: String
  356. # The title of the shipping option.
  357. title: String
  358. }
  359. # A shipping service provider or a carrier account.
  360. type DeliveryCarrierService implements Node {
  361. # The list of services offered for given destinations.
  362. availableServicesForCountries(
  363. origins: [ID!]
  364. countryCodes: [CountryCode!]
  365. restOfWorld: Boolean!
  366. ): [DeliveryAvailableService!]!
  367. # The properly formatted name of the shipping service provider, ready to display.
  368. formattedName: String
  369. # The logo of the service provider.
  370. icon: Image!
  371. # A globally-unique identifier.
  372. id: ID!
  373. # The name of the shipping service provider.
  374. name: String
  375. }
  376. # A shipping service and a list of countries that the service is available for.
  377. type DeliveryAvailableService {
  378. # The countries the service provider ships to.
  379. countries: DeliveryCountryCodesOrRestOfWorld!
  380. # The name of the service.
  381. name: String!
  382. }
  383. # The list of country codes and information whether the countries
  384. # are a part of the 'Rest Of World' shipping zone.
  385. type DeliveryCountryCodesOrRestOfWorld {
  386. # List of applicable country codes in the ISO 3166-1 alpha-2 format.
  387. countryCodes: [CountryCode!]!
  388. # Whether the countries are a part of the 'Rest of World' shipping zone.
  389. restOfWorld: Boolean!
  390. }
  391. # A mail service provided by the participant.
  392. type DeliveryParticipantService {
  393. # Whether the service is active.
  394. active: Boolean!
  395. # The name of the service.
  396. name: String!
  397. }
  398. # An auto-generated type for paginating through multiple DeliveryProfileItems.
  399. type DeliveryProfileItemConnection {
  400. # A list of edges.
  401. edges: [DeliveryProfileItemEdge!]!
  402. # A list of the nodes contained in DeliveryProfileItemEdge.
  403. nodes: [DeliveryProfileItem!]!
  404. # Information to aid in pagination.
  405. pageInfo: PageInfo!
  406. }
  407. # An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination.
  408. type DeliveryProfileItemEdge {
  409. # A cursor for use in pagination.
  410. cursor: String!
  411. # The item at the end of DeliveryProfileItemEdge.
  412. node: DeliveryProfileItem!
  413. }
  414. # An auto-generated type for paginating through multiple DeliveryLocationGroupZones.
  415. type DeliveryLocationGroupZoneConnection {
  416. # A list of edges.
  417. edges: [DeliveryLocationGroupZoneEdge!]!
  418. # A list of the nodes contained in DeliveryLocationGroupZoneEdge.
  419. nodes: [DeliveryLocationGroupZone!]!
  420. # Information to aid in pagination.
  421. pageInfo: PageInfo!
  422. }
  423. # An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination.
  424. type DeliveryLocationGroupZoneEdge {
  425. # A cursor for use in pagination.
  426. cursor: String!
  427. # The item at the end of DeliveryLocationGroupZoneEdge.
  428. node: DeliveryLocationGroupZone!
  429. }
  430. # An auto-generated type for paginating through multiple DeliveryMethodDefinitions.
  431. type DeliveryMethodDefinitionConnection {
  432. # A list of edges.
  433. edges: [DeliveryMethodDefinitionEdge!]!
  434. # A list of the nodes contained in DeliveryMethodDefinitionEdge.
  435. nodes: [DeliveryMethodDefinition!]!
  436. # Information to aid in pagination.
  437. pageInfo: PageInfo!
  438. }
  439. # An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination.
  440. type DeliveryMethodDefinitionEdge {
  441. # A cursor for use in pagination.
  442. cursor: String!
  443. # The item at the end of DeliveryMethodDefinitionEdge.
  444. node: DeliveryMethodDefinition!
  445. }