order.graphql 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876
  1. # An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks:
  2. #
  3. # 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.
  4. # Send invoices to customers to pay with a secure checkout link.
  5. # Use custom items to represent additional costs or products that aren't displayed in a shop's inventory.
  6. # Re-create orders manually from active sales channels.
  7. # Sell products at discount or wholesale rates.
  8. # Take pre-orders.
  9. # Save an order as a draft and resume working on it later.
  10. # 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 local currency.
  11. #
  12. # Caution: Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
  13. type DraftOrder implements CommentEventSubject&HasEvents&HasLocalizationExtensions&HasMetafields&LegacyInteroperability&Navigable&Node{
  14. # The order-level discount applied to the draft order.
  15. appliedDiscount: DraftOrderAppliedDiscount
  16. # The billing address of the customer.
  17. billingAddress: MailingAddress
  18. # Whether the billing address matches the shipping address.
  19. billingAddressMatchesShippingAddress: Boolean!
  20. # The date and time when the draft order converted to a new order,
  21. # and the draft order's status changed to Completed.
  22. completedAt: DateTime
  23. # The date and time when the draft order was created in Shopify.
  24. createdAt: DateTime!
  25. # The three letter code for the currency of the store at the time of the most recent update to the draft order.
  26. currencyCode: CurrencyCode!
  27. # The custom information added to the draft order on behalf of the customer.
  28. customAttributes: [Attribute!]!
  29. # The customer who will be sent an invoice for the draft order, if there is one.
  30. customer: Customer
  31. # A default cursor that returns the single next record, sorted ascending by ID.
  32. defaultCursor: String!
  33. # The email address of the customer, which is used to send notifications.
  34. email: String
  35. # The list of events associated with the draft order.
  36. events(
  37. first: Int
  38. after: String
  39. last: Int
  40. before: String
  41. reverse: Boolean = false
  42. sortKey: EventSortKeys = ID
  43. query: String
  44. ): EventConnection!
  45. # Whether the merchant has added timeline comments to the draft order.
  46. hasTimelineComment: Boolean!
  47. # A globally-unique identifier.
  48. id: ID!
  49. # The subject defined for the draft invoice email template.
  50. invoiceEmailTemplateSubject: String!
  51. # The date and time when the invoice was last emailed to the customer.
  52. invoiceSentAt: DateTime
  53. # The link to the checkout, which is sent to the customer in the invoice email.
  54. invoiceUrl: URL
  55. # The ID of the corresponding resource in the REST Admin API.
  56. legacyResourceId: UnsignedInt64!
  57. # The list of the line items in the draft order.
  58. lineItems(
  59. first: Int
  60. after: String
  61. last: Int
  62. before: String
  63. reverse: Boolean = false
  64. ): DraftOrderLineItemConnection!
  65. # The subtotal of the line items and corresponding discounts. The subtotal doesn't include shipping charges, shipping discounts, taxes, or order discounts.
  66. lineItemsSubtotalPrice: MoneyBag!
  67. # List of localization extensions for the resource.
  68. localizationExtensions(
  69. countryCodes: [CountryCode!]
  70. purposes: [LocalizationExtensionPurpose!]
  71. first: Int
  72. after: String
  73. last: Int
  74. before: String
  75. reverse: Boolean = false
  76. ): LocalizationExtensionConnection!
  77. # The name of the selected market.
  78. marketName: String!
  79. # The selected market region country code for the draft order.
  80. marketRegionCountryCode: CountryCode!
  81. # Returns a metafield by namespace and key that belongs to the resource.
  82. metafield(namespace: String!key: String!): Metafield
  83. # List of metafields that belong to the resource.
  84. metafields(
  85. namespace: String
  86. first: Int
  87. after: String
  88. last: Int
  89. before: String
  90. reverse: Boolean = false
  91. ): MetafieldConnection!
  92. # The identifier for the draft order, which is unique within the store. For example, #D1223.
  93. name: String!
  94. # The text from an optional note attached to the draft order.
  95. note2: String
  96. # The order that was created from this draft order.
  97. order: Order
  98. # The associated payment terms for this draft order.
  99. paymentTerms: PaymentTerms
  100. # The phone number assigned to the draft order.
  101. phone: String
  102. # The payment currency of the customer for this draft order.
  103. presentmentCurrencyCode: CurrencyCode!
  104. # Returns a private metafield by namespace and key that belongs to the resource.
  105. privateMetafield(namespace: String!key: String!): PrivateMetafield
  106. # List of private metafields that belong to the resource.
  107. privateMetafields(
  108. namespace: String
  109. first: Int
  110. after: String
  111. last: Int
  112. before: String
  113. reverse: Boolean = false
  114. ): PrivateMetafieldConnection!
  115. # The purchasing entity for the draft order.
  116. purchasingEntity: PurchasingEntity
  117. # Whether the Draft Order is ready and can be completed. Draft Orders
  118. # might have asynchronous operations that can take time to finish.
  119. ready: Boolean!
  120. # The time after which inventory will automatically be restocked.
  121. reserveInventoryUntil: DateTime
  122. # The shipping address of the customer.
  123. shippingAddress: MailingAddress
  124. # The line item that contains the shipping costs.
  125. shippingLine: ShippingLine
  126. # Status of the draft order.
  127. status: DraftOrderStatus!
  128. # The subtotal of the line items and their discounts. The subtotal doesn't include shipping charges, shipping discounts, or taxes.
  129. subtotalPrice: Money!
  130. # A subtotal of the line items and corresponding discounts. The subtotal doesn't include shipping charges, shipping discounts, or taxes.
  131. subtotalPriceSet: MoneyBag!
  132. # A comma separated list of tags associated with the draft order. Updating tags overwrites
  133. # any existing tags that were previously added to the draft order. To add new tags without overwriting
  134. # existing tags, use the tagsAdd mutation.
  135. tags: [String!]!
  136. # Whether the draft order is tax exempt.
  137. taxExempt: Boolean!
  138. # Total amount of taxes charged for each line item and shipping line.
  139. taxLines: [TaxLine!]!
  140. # Whether the line item prices include taxes.
  141. taxesIncluded: Boolean!
  142. # The total discounts for this draft order.
  143. totalDiscountsSet: MoneyBag!
  144. # The total price of line items for this draft order.
  145. totalLineItemsPriceSet: MoneyBag!
  146. # The total amount of the draft order, including taxes, shipping charges, and discounts.
  147. totalPrice: Money!
  148. # The total amount of the draft order including taxes, shipping charges, and discounts.
  149. totalPriceSet: MoneyBag!
  150. # The total shipping charge for the draft order.
  151. totalShippingPrice: Money!
  152. # The total shipping charge for the draft order.
  153. totalShippingPriceSet: MoneyBag!
  154. # The total amount of taxes for the draft order.
  155. totalTax: Money!
  156. # The total amount of taxes for the draft order.
  157. totalTaxSet: MoneyBag!
  158. # The total weight in grams of the draft order.
  159. totalWeight: UnsignedInt64!
  160. # The date and time when the draft order was last changed.
  161. # The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01.
  162. updatedAt: DateTime!
  163. # Whether the draft order will be visible to the customer on the self-serve portal.
  164. visibleToCustomer: Boolean!
  165. }
  166. # The order-level discount applied to a draft order.
  167. type DraftOrderAppliedDiscount {
  168. # The amount of money discounted, with values shown in both shop currency and presentment currency.
  169. amountSet: MoneyBag!
  170. # Amount of money discounted.
  171. amountV2: MoneyV2!
  172. # Description of the order-level discount.
  173. description: String!
  174. # Name of the order-level discount.
  175. title: String
  176. # The order level discount amount. If valueType is "percentage",
  177. # then value is the percentage discount.
  178. value: Float!
  179. # Type of the order-level discount.
  180. valueType: DraftOrderAppliedDiscountType!
  181. }
  182. # A line item included in a draft order.
  183. type DraftOrderLineItem implements Node {
  184. # The discount that will be applied to the line item or the overall order.
  185. appliedDiscount: DraftOrderAppliedDiscount
  186. # Whether the line item is a custom line item (true) or a product variant line item (false).
  187. custom: Boolean!
  188. # A list of attributes that represent custom features or special requests.
  189. customAttributes: [Attribute!]!
  190. # Additional information (metafields) about the line item with the associated types.
  191. customAttributesV2: [TypedAttribute!]!
  192. # The line item price after discounts are applied.
  193. discountedTotal: Money!
  194. # The line item price after discounts are applied.
  195. discountedTotalSet: MoneyBag!
  196. # The discountedTotal divided by quantity, resulting in the value of the discount per unit.
  197. discountedUnitPrice: Money!
  198. # The discountedTotal divided by quantity, resulting in the value of the discount per unit.
  199. discountedUnitPriceSet: MoneyBag!
  200. # Name of the service provider who fulfilled the order.
  201. #
  202. # Valid values are either manual or the name of the provider.
  203. # For example, amazon, shipwire.
  204. #
  205. # Deleted fulfillment services will return null.
  206. fulfillmentService: FulfillmentService
  207. # A globally-unique identifier.
  208. id: ID!
  209. # The image associated with the draft order line item.
  210. image: Image
  211. # Whether the line item is a gift card.
  212. isGiftCard: Boolean!
  213. # The name of the product.
  214. name: String!
  215. # The total price (without discounts) of the line item, based on the original unit price of the variant x quantity.
  216. originalTotal: Money!
  217. # The total price (without discounts) of the line item,based on the original unit price of the variant x quantity.
  218. originalTotalSet: MoneyBag!
  219. # The variant price without any discounts applied.
  220. originalUnitPrice: Money!
  221. # The variant price without any discounts applied.
  222. originalUnitPriceSet: MoneyBag!
  223. # The product corresponding to the line item’s product variant.
  224. product: Product
  225. # The number of product variants that are requested in the draft order.
  226. quantity: Int!
  227. # Whether physical shipping is required for the variant.
  228. requiresShipping: Boolean!
  229. # The SKU number of the product variant.
  230. sku: String
  231. # A list of tax line objects, each of which details the total taxes applicable to the order.
  232. taxLines: [TaxLine!]!
  233. # Whether the variant is taxable.
  234. taxable: Boolean!
  235. # The title of the product or variant. This field only applies to custom line items.
  236. title: String!
  237. # The total value of the discount that is applied to the line item.
  238. totalDiscount: Money!
  239. # The total value of the discount that is applied to the line item.
  240. totalDiscountSet: MoneyBag!
  241. # The associated variant for the line item.
  242. variant: ProductVariant
  243. # The name of the variant.
  244. variantTitle: String
  245. # The name of the vendor who created the product variant.
  246. vendor: String
  247. # The weight unit and value for a draft order line item.
  248. weight: Weight
  249. }
  250. # An order is a customer's request to purchase one or more products from a shop. You can retrieve and update orders using the Order object.
  251. # Learn more about
  252. # editing an existing order with the GraphQL Admin API.
  253. #
  254. # 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 orders,
  255. # then you need to request access to all orders. If your app is granted
  256. # access, then you can add the read_all_orders scope to your app along with read_orders or write_orders.
  257. # Private apps are not affected by this change and are automatically granted the scope.
  258. #
  259. # Caution: Only use this data if it's required for your app's functionality.
  260. # Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
  261. type Order implements CommentEventSubject&HasEvents&HasLocalizationExtensions&HasMetafieldDefinitions&HasMetafields&LegacyInteroperability&Node {
  262. # A list of sales agreements associated with the order.
  263. agreements(
  264. first: Int
  265. after: String
  266. last: Int
  267. before: String
  268. reverse: Boolean = false
  269. query: String
  270. ): SalesAgreementConnection!
  271. # A list of messages that appear on the order page in the Shopify admin.
  272. alerts: [ResourceAlert!]!
  273. # The application that created the order.
  274. app: OrderApp
  275. # The billing address of the customer.
  276. billingAddress: MailingAddress
  277. # Whether the billing address matches the shipping address.
  278. billingAddressMatchesShippingAddress: Boolean!
  279. # Whether the order can be manually marked as paid.
  280. canMarkAsPaid: Boolean!
  281. # Whether a customer email exists for the order.
  282. canNotifyCustomer: Boolean!
  283. # The reason provided when the order was canceled.
  284. # Returns null if the order wasn't canceled.
  285. cancelReason: OrderCancelReason
  286. # The date and time when the order was canceled.
  287. # Returns null if the order wasn't canceled.
  288. cancelledAt: DateTime
  289. # Whether payment for the order can be captured.
  290. capturable: Boolean!
  291. # The total order-level discount amount, before returns, in shop and presentment currencies.
  292. cartDiscountAmountSet: MoneyBag
  293. # Details about the channel that created the order.
  294. channelInformation: ChannelInformation
  295. # The IP address of the API client that created the order.
  296. clientIp: String
  297. # Whether the order is closed.
  298. closed: Boolean!
  299. # The date and time when the order was closed.
  300. # Returns null if the order is not closed.
  301. closedAt: DateTime
  302. # Whether inventory has been reserved for the order.
  303. confirmed: Boolean!
  304. # Date and time when the order was created in Shopify.
  305. createdAt: DateTime!
  306. # The shop currency when the order was placed.
  307. currencyCode: CurrencyCode!
  308. # The current order-level discount amount after all order updates, in shop and presentment currencies.
  309. currentCartDiscountAmountSet: MoneyBag!
  310. # The sum of the quantities for all line items that contribute to the order's current subtotal price.
  311. currentSubtotalLineItemsQuantity: Int!
  312. # The sum of the prices for all line items after discounts and returns, in shop and presentment currencies.
  313. # If taxesIncluded is true, then the subtotal also includes tax.
  314. currentSubtotalPriceSet: MoneyBag!
  315. # A list of all tax lines applied to line items on the order, after returns.
  316. # Tax line prices represent the total price for all tax lines with the same rate and title.
  317. currentTaxLines: [TaxLine!]!
  318. # The total amount discounted on the order after returns, in shop and presentment currencies.
  319. # This includes both order and line level discounts.
  320. currentTotalDiscountsSet: MoneyBag!
  321. # The total amount of duties after returns, in shop and presentment currencies.
  322. # Returns null if duties aren't applicable.
  323. currentTotalDutiesSet: MoneyBag
  324. # The total price of the order, after returns, in shop and presentment currencies.
  325. # This includes taxes and discounts.
  326. currentTotalPriceSet: MoneyBag!
  327. # The sum of the prices of all tax lines applied to line items on the order, after returns, in shop and presentment currencies.
  328. currentTotalTaxSet: MoneyBag!
  329. # The total weight of the order after returns, in grams.
  330. currentTotalWeight: UnsignedInt64!
  331. # A list of the custom attributes added to the order.
  332. customAttributes: [Attribute!]!
  333. # The customer that placed the order.
  334. customer: Customer
  335. # Whether the customer agreed to receive marketing materials.
  336. customerAcceptsMarketing: Boolean!
  337. # The customer's visits and interactions with the online store before placing the order.
  338. customerJourneySummary: CustomerJourneySummary
  339. # A two-letter or three-letter language code, optionally followed by a region modifier.
  340. customerLocale: String
  341. # A list of discounts that are applied to the order, not including order edits and refunds.
  342. discountApplications(
  343. first: Int
  344. after: String
  345. last: Int
  346. before: String
  347. reverse: Boolean = false
  348. ): DiscountApplicationConnection!
  349. # The discount code used for the order.
  350. discountCode: String
  351. # The discount codes used for the order.
  352. discountCodes: [String!]!
  353. # The primary address of the customer.
  354. # Returns null if neither the shipping address nor the billing address was provided.
  355. displayAddress: MailingAddress
  356. # The financial status of the order that can be shown to the merchant.
  357. # This field does not capture all the details of an order's financial state. It should only be used for display summary purposes.
  358. displayFinancialStatus: OrderDisplayFinancialStatus
  359. # The fulfillment status for the order that can be shown to the merchant.
  360. # This field does not capture all the details of an order's fulfillment state. It should only be used for display summary purposes.
  361. # For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
  362. displayFulfillmentStatus: OrderDisplayFulfillmentStatus!
  363. # A list of the disputes associated with the order.
  364. disputes: [OrderDisputeSummary!]!
  365. # Whether the order has had any edits applied.
  366. edited: Boolean!
  367. # The email address associated with the customer.
  368. email: String
  369. # Whether taxes on the order are estimated.
  370. # This field returns false when taxes on the order are finalized and aren't subject to any changes.
  371. estimatedTaxes: Boolean!
  372. # A list of events associated with the order.
  373. events(
  374. first: Int
  375. after: String
  376. last: Int
  377. before: String
  378. reverse: Boolean = false
  379. sortKey: EventSortKeys = ID
  380. query: String
  381. ): EventConnection!
  382. # Whether there are line items that can be fulfilled.
  383. # This field returns false when the order has no fulfillable line items.
  384. # For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
  385. fulfillable: Boolean!
  386. # A list of fulfillment orders for the order.
  387. fulfillmentOrders(
  388. displayable: Boolean = false
  389. first: Int
  390. after: String
  391. last: Int
  392. before: String
  393. reverse: Boolean = false
  394. query: String
  395. ): FulfillmentOrderConnection!
  396. # List of shipments for the order.
  397. fulfillments(first: Int): [Fulfillment!]!
  398. # Whether the order has been paid in full.
  399. fullyPaid: Boolean!
  400. # Whether the merchant added a timeline comment to the order.
  401. hasTimelineComment: Boolean!
  402. # A globally-unique identifier.
  403. id: ID!
  404. # The ID of the corresponding resource in the REST Admin API.
  405. legacyResourceId: UnsignedInt64!
  406. # A list of the order's line items.
  407. lineItems(
  408. first: Int
  409. after: String
  410. last: Int
  411. before: String
  412. reverse: Boolean = false
  413. ): LineItemConnection!
  414. # List of localization extensions for the resource.
  415. localizationExtensions(
  416. countryCodes: [CountryCode!]
  417. purposes: [LocalizationExtensionPurpose!]
  418. first: Int
  419. after: String
  420. last: Int
  421. before: String
  422. reverse: Boolean = false
  423. ): LocalizationExtensionConnection!
  424. # Whether the order can be edited by the merchant. For example, canceled orders can’t be edited.
  425. merchantEditable: Boolean!
  426. # A list of reasons why the order can't be edited. For example, "Canceled orders can’t be edited".
  427. merchantEditableErrors: [String!]!
  428. # The application acting as the Merchant of Record for the order.
  429. merchantOfRecordApp: OrderApp
  430. # Returns a metafield by namespace and key that belongs to the resource.
  431. metafield(namespace: String!key: String!): Metafield
  432. # List of metafield definitions.
  433. metafieldDefinitions(
  434. namespace: String
  435. pinnedStatus: MetafieldDefinitionPinnedStatus = ANY
  436. first: Int
  437. after: String
  438. last: Int
  439. before: String
  440. reverse: Boolean = false
  441. sortKey: MetafieldDefinitionSortKeys = ID
  442. query: String
  443. ): MetafieldDefinitionConnection!
  444. # List of metafields that belong to the resource.
  445. metafields(
  446. namespace: String
  447. first: Int
  448. after: String
  449. last: Int
  450. before: String
  451. reverse: Boolean = false
  452. ): MetafieldConnection!
  453. # The unique identifier for the order that appears on the order page in the Shopify admin and the order status page.
  454. # For example, "#1001", "EN1001", or "1001-A".
  455. # This value isn't unique across multiple stores.
  456. name: String!
  457. # The net payment for the order, based on the total amount received minus the total amount refunded, in shop and presentment currencies.
  458. netPaymentSet: MoneyBag!
  459. # A list of line items that can't be fulfilled.
  460. # For example, tips and fully refunded line items can't be fulfilled.
  461. # For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
  462. nonFulfillableLineItems(
  463. first: Int
  464. after: String
  465. last: Int
  466. before: String
  467. reverse: Boolean = false
  468. ): LineItemConnection!
  469. # The contents of the note associated with the order.
  470. note: String
  471. # The total amount of duties before returns, in shop and presentment currencies.
  472. # Returns null if duties aren't applicable.
  473. originalTotalDutiesSet: MoneyBag
  474. # The total price of the order at the time of order creation, in shop and presentment currencies.
  475. originalTotalPriceSet: MoneyBag!
  476. # The payment collection details for the order.
  477. paymentCollectionDetails: OrderPaymentCollectionDetails!
  478. # A list of the names of all payment gateways used for the order.
  479. # For example, "Shopify Payments" and "Cash on Delivery (COD)".
  480. paymentGatewayNames: [String!]!
  481. # The payment terms associated with the order.
  482. paymentTerms: PaymentTerms
  483. # The phone number associated with the customer.
  484. phone: String
  485. # The fulfillment location that was assigned when the order was created.
  486. # Use the FulfillmentOrder object for up to date fulfillment location information.
  487. physicalLocation: Location
  488. # The payment CurrencyCode of the customer for the order.
  489. presentmentCurrencyCode: CurrencyCode!
  490. # Returns a private metafield by namespace and key that belongs to the resource.
  491. privateMetafield(namespace: String!key: String!): PrivateMetafield
  492. # List of private metafields that belong to the resource.
  493. privateMetafields(
  494. namespace: String
  495. first: Int
  496. after: String
  497. last: Int
  498. before: String
  499. reverse: Boolean = false
  500. ): PrivateMetafieldConnection!
  501. # The date and time when the order was processed.
  502. # This date and time might not match the date and time when the order was created.
  503. processedAt: DateTime!
  504. # The publication that the order was created from.
  505. publication: Publication
  506. # The purchasing entity for the order.
  507. purchasingEntity: PurchasingEntity
  508. # 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.
  509. refundDiscrepancySet: MoneyBag!
  510. # Whether the order can be refunded.
  511. refundable: Boolean!
  512. # A list of refunds that have been applied to the order.
  513. refunds(first: Int): [Refund!]!
  514. # The URL of the source that the order originated from, if found in the domain registry.
  515. registeredSourceUrl: URL
  516. # Whether the order has shipping lines or at least one line item on the order that requires shipping.
  517. requiresShipping: Boolean!
  518. # Whether any line item on the order can be restocked.
  519. restockable: Boolean!
  520. # The fraud risk level of the order.
  521. riskLevel: OrderRiskLevel!
  522. # A list of risks associated with the order.
  523. risks(first: Int): [OrderRisk!]!
  524. # The mailing address of the customer.
  525. shippingAddress: MailingAddress
  526. # A summary of all shipping costs on the order.
  527. shippingLine: ShippingLine
  528. # A list of the order's shipping lines.
  529. shippingLines(
  530. first: Int
  531. after: String
  532. last: Int
  533. before: String
  534. reverse: Boolean = false
  535. ): ShippingLineConnection!
  536. # A unique POS or third party order identifier.
  537. # For example, "1234-12-1000" or "111-98567-54". The receipt_number field is derived from this value for POS orders.
  538. sourceIdentifier: String
  539. # The sum of the quantities for all line items that contribute to the order's subtotal price.
  540. subtotalLineItemsQuantity: Int!
  541. # The sum of the prices for all line items after discounts and before returns, in shop and presentment currencies.
  542. # If taxesIncluded is true, then the subtotal also includes tax.
  543. subtotalPriceSet: MoneyBag
  544. # A suggested refund for the order.
  545. suggestedRefund(
  546. shippingAmount: Money
  547. refundShipping: Boolean
  548. refundLineItems: [RefundLineItemInput!]
  549. refundDuties: [RefundDutyInput!]
  550. suggestFullRefund: Boolean = false
  551. ): SuggestedRefund
  552. # A comma separated list of tags associated with the order. Updating tags overwrites
  553. # any existing tags that were previously added to the order. To add new tags without overwriting
  554. # existing tags, use the tagsAdd mutation.
  555. tags: [String!]!
  556. # A list of all tax lines applied to line items on the order, before returns.
  557. # Tax line prices represent the total price for all tax lines with the same rate and title.
  558. taxLines: [TaxLine!]!
  559. # Whether taxes are included in the subtotal price of the order.
  560. taxesIncluded: Boolean!
  561. # Whether the order is a test.
  562. # Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled.
  563. # A test order cannot be converted into a real order and vice versa.
  564. test: Boolean!
  565. # The authorized amount that is uncaptured or undercaptured, in shop and presentment currencies.
  566. # This amount isn't adjusted for returns.
  567. totalCapturableSet: MoneyBag!
  568. # The total amount discounted on the order before returns, in shop and presentment currencies.
  569. # This includes both order and line level discounts.
  570. totalDiscountsSet: MoneyBag
  571. # The total amount not yet transacted for the order, in shop and presentment currencies.
  572. # 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).
  573. totalOutstandingSet: MoneyBag!
  574. # The total price of the order, before returns, in shop and presentment currencies.
  575. # This includes taxes and discounts.
  576. totalPriceSet: MoneyBag!
  577. # The total amount received from the customer before returns, in shop and presentment currencies.
  578. totalReceivedSet: MoneyBag!
  579. # The total amount that was refunded, in shop and presentment currencies.
  580. totalRefundedSet: MoneyBag!
  581. # The total amount of shipping that was refunded, in shop and presentment currencies.
  582. totalRefundedShippingSet: MoneyBag!
  583. # The total shipping amount before discounts and returns, in shop and presentment currencies.
  584. totalShippingPriceSet: MoneyBag!
  585. # The total tax amount before returns, in shop and presentment currencies.
  586. totalTaxSet: MoneyBag
  587. # The sum of all tip amounts for the order, in shop and presentment currencies.
  588. totalTipReceivedSet: MoneyBag!
  589. # The total weight of the order before returns, in grams.
  590. totalWeight: UnsignedInt64
  591. # A list of transactions associated with the order.
  592. transactions(
  593. first: Int
  594. capturable: Boolean
  595. manuallyResolvable: Boolean
  596. ): [OrderTransaction!]!
  597. # Whether no payments have been made for the order.
  598. unpaid: Boolean!
  599. # The date and time when the order was modified last.
  600. updatedAt: DateTime!
  601. }
  602. # Represents the payment schedule for a single payment defined in the payment terms.
  603. type PaymentSchedule implements Node {
  604. # Amount owed for this payment schedule.
  605. amount: MoneyV2!
  606. # Date and time when the payment schedule is paid or fulfilled.
  607. completedAt: DateTime
  608. # Date and time when the payment schedule is due.
  609. dueAt: DateTime
  610. # A globally-unique identifier.
  611. id: ID!
  612. # Date and time when the invoice is sent.
  613. issuedAt: DateTime
  614. }
  615. # Represents the payment terms for an order or draft order.
  616. type PaymentTerms implements Node {
  617. # Duration of payment terms in days based on the payment terms template used to create the payment terms.
  618. dueInDays: Int
  619. # A globally-unique identifier.
  620. id: ID!
  621. # Whether the payment terms have overdue payment schedules.
  622. overdue: Boolean!
  623. # List of schedules for the payment terms.
  624. paymentSchedules(
  625. first: Int
  626. after: String
  627. last: Int
  628. before: String
  629. reverse: Boolean = false
  630. ): PaymentScheduleConnection!
  631. # The name of the payment terms template used to create the payment terms.
  632. paymentTermsName: String!
  633. # The payment terms template type used to create the payment terms.
  634. paymentTermsType: PaymentTermsType!
  635. # The payment terms name, translated into the shop admin's preferred language.
  636. translatedName: String!
  637. }
  638. # Represents a selling method (for example, "Subscribe and save" or "Pre-paid"). Selling plan groups
  639. # and associated records (selling plans and policies) are deleted 48 hours after a merchant
  640. # uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later.
  641. type SellingPlanGroup implements Node {
  642. # The identifier for app, exposed in Liquid and product JSON.
  643. appId: String
  644. # Whether the given product is directly associated to the selling plan group.
  645. appliesToProduct(productId: ID!): Boolean!
  646. # Whether the given product variant is directly associated to the selling plan group.
  647. appliesToProductVariant(productVariantId: ID!): Boolean!
  648. # Whether any of the product variants of the given product are associated to the selling plan group.
  649. appliesToProductVariants(productId: ID!): Boolean!
  650. # The date and time when the selling plan group was created.
  651. createdAt: DateTime!
  652. # The merchant-facing description of the selling plan group.
  653. description: String
  654. # A globally-unique identifier.
  655. id: ID!
  656. # The merchant-facing label of the selling plan group.
  657. merchantCode: String!
  658. # The buyer-facing label of the selling plan group.
  659. name: String!
  660. # The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they are created by the same app, and have the same selling_plan_group.name and selling_plan_group.options values.
  661. options: [String!]!
  662. # The relative position of the selling plan group for display.
  663. position: Int
  664. # A count of products associated to the selling plan group.
  665. productCount: Int!
  666. # A count of product variants associated to the selling plan group.
  667. productVariantCount(productId: ID): Int!
  668. # Product variants associated to the selling plan group.
  669. productVariants(
  670. productId: ID
  671. first: Int
  672. after: String
  673. last: Int
  674. before: String
  675. reverse: Boolean = false
  676. ): ProductVariantConnection!
  677. # Products associated to the selling plan group.
  678. products(
  679. first: Int
  680. after: String
  681. last: Int
  682. before: String
  683. reverse: Boolean = false
  684. ): ProductConnection!
  685. # Selling plans associated to the selling plan group.
  686. sellingPlans(
  687. first: Int
  688. after: String
  689. last: Int
  690. before: String
  691. reverse: Boolean = false
  692. ): SellingPlanConnection!
  693. # A summary of the policies associated to the selling plan group.
  694. summary: String
  695. }
  696. # Represents how a product can be sold and purchased. Selling plans and associated records (selling plan groups
  697. # and policies) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing
  698. # up these records if you need to restore them later.
  699. #
  700. # For more information on selling plans, refer to
  701. # Creating and managing selling plans.
  702. type SellingPlan implements Node {
  703. # A selling plan policy which describes the recurring billing details.
  704. billingPolicy: SellingPlanBillingPolicy!
  705. # The category used to classify the selling plan for reporting purposes.
  706. category: SellingPlanCategory
  707. # The date and time when the selling plan was created.
  708. createdAt: DateTime!
  709. # A selling plan policy which describes the delivery details.
  710. deliveryPolicy: SellingPlanDeliveryPolicy!
  711. # Buyer facing string which describes the selling plan commitment.
  712. description: String
  713. # A globally-unique identifier.
  714. id: ID!
  715. # When to reserve inventory for a selling plan.
  716. inventoryPolicy: SellingPlanInventoryPolicy
  717. # A customer-facing description of the selling plan.
  718. #
  719. # If your store supports multiple currencies, then don't include country-specific pricing content,
  720. # such as "Buy monthly, get 10$ CAD off". This field won't be converted to reflect different currencies.
  721. name: String!
  722. # The values of all options available on the selling plan.
  723. # Selling plans are grouped together in Liquid when they are created by the same app,
  724. # and have the same selling_plan_group.name and selling_plan_group.options values.
  725. options: [String!]!
  726. # Relative position of the selling plan for display. A lower position will be displayed before a higher position.
  727. position: Int
  728. # Selling plan pricing details.
  729. pricingPolicies: [SellingPlanPricingPolicy!]!
  730. }
  731. # The selling plan inventory policy.
  732. type SellingPlanInventoryPolicy {
  733. # When to reserve inventory for the order.
  734. reserve: SellingPlanReserve!
  735. }
  736. # A payment transaction in the context of an order.
  737. type OrderTransaction implements Node {
  738. # The masked account number associated with the payment method.
  739. accountNumber: String
  740. # The amount and currency of the transaction in shop and presentment currencies.
  741. amountSet: MoneyBag!
  742. authorizationCode: String
  743. # Authorization code associated with the transaction.
  744. # The time when the authorization expires. This field is available only to stores on a Shopify Plus plan and is populated only for Shopify Payments authorizations.
  745. authorizationExpiresAt: DateTime
  746. # Date and time when the transaction was created.
  747. createdAt: DateTime!
  748. # A standardized error code, independent of the payment provider.
  749. errorCode: OrderTransactionErrorCode
  750. # The transaction fees charged on the order transaction. Only present for Shopify Payments transactions.
  751. fees: [TransactionFee!]!
  752. # The human-readable payment gateway name used to process the transaction.
  753. formattedGateway: String
  754. # The payment gateway used to process the transaction.
  755. gateway: String
  756. # A globally-unique identifier.
  757. id: ID!
  758. # The kind of transaction.
  759. kind: OrderTransactionKind!
  760. # Whether the transaction can be manually captured.
  761. manuallyCapturable: Boolean!
  762. # Specifies the available amount with currency to refund on the gateway.
  763. # This value is only available for transactions of type SuggestedRefund.
  764. maximumRefundableV2: MoneyV2
  765. # The associated order.
  766. order: Order
  767. # The associated parent transaction, for example the authorization of a capture.
  768. parentTransaction: OrderTransaction
  769. # The payment icon to display for the transaction.
  770. paymentIcon: Image
  771. # Date and time when the transaction was processed.
  772. processedAt: DateTime
  773. # The transaction receipt that the payment gateway attaches to the transaction.
  774. # The value of this field depends on which payment gateway processed the transaction.
  775. receiptJson: JSON
  776. # The settlement currency.
  777. settlementCurrency: CurrencyCode
  778. # The rate used when converting the transaction amount to settlement currency.
  779. settlementCurrencyRate: Decimal
  780. # Contains all Shopify Payments information related to an order transaction.
  781. # This field is available only to stores on a Shopify Plus plan.
  782. shopifyPaymentsSet: ShopifyPaymentsTransactionSet
  783. # The status of this transaction.
  784. status: OrderTransactionStatus!
  785. # Whether the transaction is a test transaction.
  786. test: Boolean!
  787. # Specifies the available amount with currency to capture on the gateway in shop and presentment currencies.
  788. # Only available when an amount is capturable or manually mark as paid.
  789. totalUnsettledSet: MoneyBag
  790. # Staff member who was logged into the Shopify POS device when the transaction was processed.
  791. user: StaffMember
  792. }
  793. # Transaction fee related to an order transaction.
  794. type TransactionFee implements Node {
  795. # Amount of the fee.
  796. amount: MoneyV2!
  797. # Flat rate charge for a transaction.
  798. flatFee: MoneyV2!
  799. # Name of the credit card flat fee.
  800. flatFeeName: String
  801. # A globally-unique identifier.
  802. id: ID!
  803. # Percentage charge.
  804. rate: Decimal!
  805. # Name of the credit card rate.
  806. rateName: String
  807. # Tax amount charged on the fee.
  808. taxAmount: MoneyV2!
  809. # Name of the type of fee.
  810. type: String!
  811. }
  812. # Presents all Shopify Payments specific information related to an order transaction.
  813. type ShopifyPaymentsTransactionSet {
  814. # Contains all fields related to an extended authorization.
  815. extendedAuthorizationSet: ShopifyPaymentsExtendedAuthorization
  816. # Contains all fields related to a refund.
  817. refundSet: ShopifyPaymentsRefundSet
  818. }
  819. # Presents all Shopify Payments specific information related to an order refund.
  820. type ShopifyPaymentsRefundSet {
  821. # The acquirer reference number (ARN) code generated for Visa/Mastercard transactions.
  822. acquirerReferenceNumber: String
  823. }
  824. # Presents all Shopify Payments information related to an extended authorization.
  825. type ShopifyPaymentsExtendedAuthorization {
  826. # The time after which the extended authorization expires.
  827. # After the expiry, the merchant is unable to capture the payment.
  828. extendedAuthorizationExpiresAt: DateTime!
  829. # The time after which capture will incur an additional fee.
  830. standardAuthorizationExpiresAt: DateTime!
  831. }
  832. # Represents a refund suggested by Shopify based on the items being reimbursed.
  833. # You can then use the suggested refund object to generate an actual refund.
  834. type SuggestedRefund {
  835. # The total monetary value to be refunded in shop and presentment currencies.
  836. amountSet: MoneyBag!
  837. # The sum of all the discounted prices of the line items being refunded.
  838. discountedSubtotalSet: MoneyBag!
  839. # The total monetary value available to refund in shop and presentment currencies.
  840. maximumRefundableSet: MoneyBag!
  841. # A list of duties to be refunded from the order.
  842. refundDuties: [RefundDuty!]!
  843. # A list of line items to be refunded, along with restock instructions.
  844. refundLineItems: [RefundLineItem!]!
  845. # The shipping costs to be refunded from the order.
  846. shipping: ShippingRefund!
  847. # The sum of all the prices of the line items being refunded in shop and presentment currencies.
  848. subtotalSet: MoneyBag!
  849. # A list of suggested order transactions.
  850. suggestedTransactions: [SuggestedOrderTransaction!]!
  851. # The total cart discount amount that was applied to all line items in this refund.
  852. totalCartDiscountAmountSet: MoneyBag!
  853. # The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive.
  854. totalDutiesSet: MoneyBag!
  855. # The sum of the taxes being refunded from the order in shop and presentment currencies. The value must be positive.
  856. totalTaxSet: MoneyBag!
  857. }
  858. # A suggested transaction. Suggested transaction are usually used in the context of refunds
  859. # and exchanges.
  860. type SuggestedOrderTransaction {
  861. # The masked account number associated with the payment method.
  862. accountNumber: String
  863. # The amount and currency of the suggested order transaction in shop and presentment currencies.
  864. amountSet: MoneyBag!
  865. # The human-readable payment gateway name suggested to process the transaction.
  866. formattedGateway: String
  867. # The suggested payment gateway used to process the transaction.
  868. gateway: String
  869. # Specifies the kind of the suggested order transaction.
  870. kind: SuggestedOrderTransactionKind!
  871. # Specifies the available amount to refund on the gateway in shop and presentment currencies. Only available within SuggestedRefund.
  872. maximumRefundableSet: MoneyBag
  873. # The associated parent transaction, for example the authorization of a capture.
  874. parentTransaction: OrderTransaction
  875. }
  876. # Represents the shipping costs refunded on the Refund.
  877. type ShippingRefund {
  878. # The monetary value of the shipping fees to be refunded in shop and presentment currencies.
  879. amountSet: MoneyBag!
  880. # The maximum amount of shipping fees currently refundable in shop and presentment currencies.
  881. maximumRefundableSet: MoneyBag!
  882. # The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies.
  883. taxSet: MoneyBag!
  884. }
  885. # A line item that's included in a refund.
  886. type RefundLineItem {
  887. # The LineItem resource associated to the refunded line item.
  888. lineItem: LineItem!
  889. # The inventory restock location.
  890. location: Location
  891. # The price of a refunded line item in shop and presentment currencies.
  892. priceSet: MoneyBag!
  893. # The quantity of a refunded line item.
  894. quantity: Int!
  895. # The type of restock for the refunded line item.
  896. restockType: RefundLineItemRestockType!
  897. # Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund.
  898. restocked: Boolean!
  899. # The subtotal price of a refunded line item in shop and presentment currencies.
  900. subtotalSet: MoneyBag!
  901. # The total tax charged on a refunded line item in shop and presentment currencies.
  902. totalTaxSet: MoneyBag!
  903. }
  904. type LineItem implements Node {
  905. # The subscription contract associated with this line item.
  906. contract: SubscriptionContract
  907. # The line item's quantity, minus the removed quantity.
  908. currentQuantity: Int!
  909. # A list of attributes that represent custom features or special requests.
  910. customAttributes: [Attribute!]!
  911. # The discounts that have been allocated onto the line item by discount applications.
  912. discountAllocations: [DiscountAllocation!]!
  913. # The total line price after discounts are applied, in shop and presentment currencies.
  914. discountedTotalSet: MoneyBag!
  915. # The approximate split price of a line item unit, in shop and presentment currencies.
  916. # This value doesn't include discounts applied to the entire order.
  917. discountedUnitPriceSet: MoneyBag!
  918. # The duties associated with the line item.
  919. duties: [Duty!]!
  920. # A globally-unique identifier.
  921. id: ID!
  922. # The image associated to the line item's variant.
  923. image: Image
  924. # Whether the line item can be edited or not.
  925. merchantEditable: Boolean!
  926. # The name of the product.
  927. name: String!
  928. # The total number of units that can't be fulfilled.
  929. # For example, if items have been refunded, or the item is not something that can be fulfilled,
  930. # like a tip.Please see the FulfillmentOrder object for more fulfillment details.
  931. nonFulfillableQuantity: Int!
  932. # The total price in shop and presentment currencies, without discounts applied.
  933. # This value is based on the unit price of the variant x quantity.
  934. originalTotalSet: MoneyBag!
  935. # The variant unit price without discounts applied, in shop and presentment currencies.
  936. originalUnitPriceSet: MoneyBag!
  937. # The Product object associated with this line item's variant.
  938. product: Product
  939. # The number of variant units ordered.
  940. quantity: Int!
  941. # The line item's quantity, minus the removed quantity.
  942. refundableQuantity: Int!
  943. # Whether physical shipping is required for the variant.
  944. requiresShipping: Boolean!
  945. # Whether the line item can be restocked.
  946. restockable: Boolean!
  947. # The selling plan details associated with the line item.
  948. sellingPlan: LineItemSellingPlan
  949. sku: String
  950. # The variant SKU number.
  951. # Staff attributed to the initial sale of the line item.
  952. staffMember: StaffMember
  953. # The taxes charged for this line item.
  954. taxLines(first: Int): [TaxLine!]!
  955. # Whether the variant is taxable.
  956. taxable: Boolean!
  957. # The title of the product.
  958. title: String!
  959. # The total amount of the discount that's allocated to the line item, in the shop and presentment currencies.
  960. # This field must be explicitly set using draft orders, Shopify scripts, or the API.
  961. totalDiscountSet: MoneyBag!
  962. # The total discounted value of unfulfilled units, in shop and presentment currencies.
  963. unfulfilledDiscountedTotalSet: MoneyBag!
  964. # The total price, without any discounts applied.
  965. # This value is based on the unit price of the variant x quantity of all unfulfilled units, in shop and presentment currencies.
  966. unfulfilledOriginalTotalSet: MoneyBag!
  967. # The number of units not yet fulfilled.
  968. unfulfilledQuantity: Int!
  969. # The Variant object associated with this line item.
  970. variant: ProductVariant
  971. # The name of the variant.
  972. variantTitle: String
  973. # The name of the vendor who made the variant.
  974. vendor: String
  975. }
  976. # Custom subscription discount.
  977. type SubscriptionManualDiscount {
  978. # Entitled line items used to apply the subscription discount on.
  979. entitledLines: SubscriptionDiscountEntitledLines!
  980. # The unique identifier.
  981. id: ID!
  982. # The maximum number of times the subscription discount will be applied on orders.
  983. recurringCycleLimit: Int
  984. # The reason that the discount on the subscription draft is rejected.
  985. rejectionReason: SubscriptionDiscountRejectionReason
  986. # Type of line the discount applies on.
  987. targetType: DiscountTargetType!
  988. # The title associated with the subscription discount.
  989. title: String
  990. # The type of the subscription discount.
  991. type: DiscountType!
  992. # The number of times the discount was applied.
  993. usageCount: Int!
  994. # The value of the subscription discount.
  995. value: SubscriptionDiscountValue!
  996. }
  997. # Represents the subscription lines the discount applies on.
  998. type SubscriptionDiscountEntitledLines {
  999. # Specify whether the subscription discount will apply on all subscription lines.
  1000. all: Boolean!
  1001. # The list of subscription lines associated with the subscription discount.
  1002. lines(
  1003. first: Int
  1004. after: String
  1005. last: Int
  1006. before: String
  1007. reverse: Boolean = false
  1008. ): SubscriptionLineConnection!
  1009. }
  1010. # Represents a Subscription Line.
  1011. type SubscriptionLine {
  1012. # The price per unit for the subscription line in the contract's currency.
  1013. currentPrice: MoneyV2!
  1014. # List of custom attributes associated to the line item.
  1015. customAttributes: [Attribute!]!
  1016. # Discount allocations.
  1017. discountAllocations: [SubscriptionDiscountAllocation!]!
  1018. # The unique identifier.
  1019. id: ID!
  1020. # Total line price including all discounts.
  1021. lineDiscountedPrice: MoneyV2!
  1022. # Describe the price changes of the line over time.
  1023. pricingPolicy: SubscriptionPricingPolicy
  1024. # The product id associated with the subscription line.
  1025. productId: ID
  1026. # The quantity of the unit selected for the subscription line.
  1027. quantity: Int!
  1028. # Whether physical shipping is required for the variant.
  1029. requiresShipping: Boolean!
  1030. # The selling plan ID associated to the line.
  1031. #
  1032. # Indicates which selling plan was used to create this
  1033. # contract line initially. The selling plan ID is also used to
  1034. # find the associated delivery profile.
  1035. #
  1036. # The subscription contract, subscription line, or selling plan might have
  1037. # changed. As a result, the selling plan's attributes might not
  1038. # match the information on the contract.
  1039. sellingPlanId: ID
  1040. # The selling plan name associated to the line. This name describes
  1041. # the order line items created from this subscription line
  1042. # for both merchants and customers.
  1043. #
  1044. # The value can be different from the selling plan's name, because both
  1045. # the selling plan's name and the subscription line's selling_plan_name
  1046. # attribute can be updated independently.
  1047. sellingPlanName: String
  1048. # Variant SKU number of the item associated with the subscription line.
  1049. sku: String
  1050. # Whether the variant is taxable.
  1051. taxable: Boolean!
  1052. # Product title of the item associated with the subscription line.
  1053. title: String!
  1054. # The product variant id associated with the subscription line.
  1055. variantId: ID
  1056. # The image associated with the line item's variant or product.
  1057. variantImage: Image
  1058. # Product variant title of the item associated with the subscription line.
  1059. variantTitle: String
  1060. }
  1061. # Represents a Subscription Delivery Policy.
  1062. type SubscriptionDeliveryPolicy {
  1063. # The specific anchor dates upon which the delivery interval calculations should be made.
  1064. anchors: [SellingPlanAnchor!]!
  1065. # The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc).
  1066. interval: SellingPlanInterval!
  1067. # The number of delivery intervals between deliveries.
  1068. intervalCount: Int!
  1069. }
  1070. # Represents a Subscription Billing Policy.
  1071. type SubscriptionBillingPolicy {
  1072. # Specific anchor dates upon which the billing interval calculations should be made.
  1073. anchors: [SellingPlanAnchor!]!
  1074. # The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc).
  1075. interval: SellingPlanInterval!
  1076. # The number of billing intervals between invoices.
  1077. intervalCount: Int!
  1078. # Maximum amount of cycles after which the subscription ends.
  1079. maxCycles: Int
  1080. # Minimum amount of cycles required in the subscription.
  1081. minCycles: Int
  1082. }
  1083. # Represents a selling plan policy anchor.
  1084. type SellingPlanAnchor {
  1085. # The cutoff day for the anchor.
  1086. #
  1087. # If type is WEEKDAY, then the value must be between 1-7. Shopify interprets
  1088. # the days of the week according to ISO 8601, where 1 is Monday.
  1089. #
  1090. # If type is MONTHDAY, then the value must be between 1-31.
  1091. #
  1092. # If type is YEARDAY, then the value must be null.
  1093. cutoffDay: Int
  1094. # The day of the anchor.
  1095. #
  1096. # If type is WEEKDAY, then the value must be between 1-7. Shopify interprets
  1097. # the days of the week according to ISO 8601, where 1 is Monday.
  1098. #
  1099. # If type is not WEEKDAY, then the value must be between 1-31.
  1100. day: Int!
  1101. # The month of the anchor. If type is different than YEARDAY, then the value must
  1102. # be null or between 1-12.
  1103. month: Int
  1104. # Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY.
  1105. type: SellingPlanAnchorType!
  1106. }
  1107. # Represents a Subscription Line Pricing Policy.
  1108. type SubscriptionPricingPolicy {
  1109. # The base price per unit for the subscription line in the contract's currency.
  1110. basePrice: MoneyV2!
  1111. # The adjustments per cycle for the subscription line.
  1112. cycleDiscounts: [SubscriptionCyclePriceAdjustment!]!
  1113. }
  1114. # Represents a Subscription Line Pricing Cycle Adjustment.
  1115. type SubscriptionCyclePriceAdjustment {
  1116. # Price adjustment type.
  1117. adjustmentType: SellingPlanPricingPolicyAdjustmentType!
  1118. # Price adjustment value.
  1119. adjustmentValue: SellingPlanPricingPolicyAdjustmentValue!
  1120. # The number of cycles required before this pricing policy applies.
  1121. afterCycle: Int!
  1122. # The computed price after the adjustments applied.
  1123. computedPrice: MoneyV2!
  1124. }
  1125. # Represents what a particular discount reduces from a line price.
  1126. type SubscriptionDiscountAllocation {
  1127. # Allocation amount.
  1128. amount: MoneyV2!
  1129. # Discount that created the allocation.
  1130. discount: SubscriptionDiscount!
  1131. }
  1132. # Represents the selling plan for a line item.
  1133. type LineItemSellingPlan {
  1134. # The name of the selling plan for display purposes.
  1135. name: String!
  1136. # The ID of the selling plan associated with the line item.
  1137. sellingPlanId: ID
  1138. }
  1139. type Duty implements Node {
  1140. # The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty.
  1141. countryCodeOfOrigin: CountryCode
  1142. # The harmonized system code of the item used in calculating the duty.
  1143. harmonizedSystemCode: String
  1144. # A globally-unique identifier.
  1145. id: ID!
  1146. # The amount of the duty.
  1147. price: MoneyBag!
  1148. # A list of taxes charged on the duty.
  1149. taxLines: [TaxLine!]!
  1150. }
  1151. # Represents a refunded duty.
  1152. type RefundDuty {
  1153. # The amount of a refunded duty in shop and presentment currencies.
  1154. amountSet: MoneyBag!
  1155. # The duty associated with this refunded duty.
  1156. originalDuty: Duty
  1157. }
  1158. # The record of the line items and transactions that were refunded to a customer,
  1159. # along with restocking instructions for refunded line items.
  1160. type Refund implements LegacyInteroperability&Node {
  1161. # The date and time when the refund was created.
  1162. createdAt: DateTime
  1163. # A list of the refunded duties as part of this refund.
  1164. duties: [RefundDuty!]
  1165. # A globally-unique identifier.
  1166. id: ID!
  1167. # The ID of the corresponding resource in the REST Admin API.
  1168. legacyResourceId: UnsignedInt64!
  1169. # The optional note associated with the refund.
  1170. note: String
  1171. # The order associated with the refund.
  1172. order: Order!
  1173. # The RefundLineItem resources attached to the refund.
  1174. refundLineItems(
  1175. first: Int
  1176. after: String
  1177. last: Int
  1178. before: String
  1179. reverse: Boolean = false
  1180. ): RefundLineItemConnection!
  1181. # The staff member who created the refund.
  1182. staffMember: StaffMember
  1183. # The total amount across all transactions for the refund, in shop and presentment currencies.
  1184. totalRefundedSet: MoneyBag!
  1185. # The transactions associated with the refund.
  1186. transactions(
  1187. first: Int
  1188. after: String
  1189. last: Int
  1190. before: String
  1191. reverse: Boolean = false
  1192. ): OrderTransactionConnection!
  1193. # The date and time when the refund was updated.
  1194. updatedAt: DateTime!
  1195. }
  1196. # Represents a fraud check on an order.
  1197. type OrderRisk {
  1198. # Whether the risk level is shown in the Shopify admin.
  1199. # If false, then this order risk is ignored when Shopify determines the overall risk level for the order.
  1200. display: Boolean!
  1201. # The likelihood that an order is fraudulent, based on this order risk.
  1202. #
  1203. # The level can be set by Shopify risk analysis or by an app.
  1204. level: OrderRiskLevel
  1205. # The risk message that's shown to the merchant in the Shopify admin.
  1206. message: String
  1207. }
  1208. # The payment collection details for an order that requires additional payment following an edit to the order.
  1209. type OrderPaymentCollectionDetails {
  1210. # The URL to use for collecting an additional payment on the order.
  1211. additionalPaymentCollectionUrl: URL
  1212. # The list of vaulted payment methods for the order with their permissions.
  1213. vaultedPaymentMethods: [PaymentMandate!]
  1214. }
  1215. # A payment instrument and the permission
  1216. # the owner of the instrument gives to the merchant to debit it.
  1217. type PaymentMandate implements Node {
  1218. # The unique identifier of a payment mandate.
  1219. id: ID!
  1220. # The outputs details of the payment instrument.
  1221. paymentInstrument: PaymentInstrument!
  1222. }
  1223. # The fields required to reimburse duties on a refund.
  1224. input RefundDutyInput {
  1225. # The ID of the duty in the refund.
  1226. dutyId: ID!
  1227. # The type of refund for this duty.
  1228. refundType: RefundDutyRefundType
  1229. }
  1230. # The fields required to reimburse line items on a refund.
  1231. input RefundLineItemInput {
  1232. # The ID of the line item in the refund.
  1233. lineItemId: ID!
  1234. # The quantity of the associated line item to be refunded.
  1235. quantity: Int!
  1236. # The type of restock for this line item.
  1237. restockType: RefundLineItemRestockType
  1238. # The intended location for restocking. If the restockType is set to NO_RESTOCK, then this value is empty.`
  1239. locationId: ID
  1240. }
  1241. # A summary of the important details for a dispute on an order.
  1242. type OrderDisputeSummary implements Node {
  1243. # A globally-unique identifier.
  1244. id: ID!
  1245. # The type that the dispute was initiated as.
  1246. initiatedAs: DisputeType!
  1247. # The current status of the dispute.
  1248. status: DisputeStatus!
  1249. }
  1250. # The tax allocated to a sale from a single tax line.
  1251. type SaleTax {
  1252. # The portion of the total tax amount on the related sale that comes from the associated tax line.
  1253. amount: MoneyBag!
  1254. # The unique identifier for the sale tax.
  1255. id: ID!
  1256. # The tax line associated with the sale.
  1257. taxLine: TaxLine!
  1258. }
  1259. # A record of an execution of the subscription billing process. Billing attempts use
  1260. #idempotency keys to avoid duplicate order creation. A successful billing attempt
  1261. #will create an order.
  1262. type SubscriptionBillingAttempt implements Node {
  1263. # The date and time when the billing attempt was completed.
  1264. completedAt: DateTime
  1265. # The date and time when the billing attempt was created.
  1266. createdAt: DateTime!
  1267. # A code corresponding to a payment error during processing.
  1268. errorCode: SubscriptionBillingAttemptErrorCode
  1269. # A message describing a payment error during processing.
  1270. errorMessage: String
  1271. # A globally-unique identifier.
  1272. id: ID!
  1273. # A unique key generated by the client to avoid duplicate payments.
  1274. idempotencyKey: String!
  1275. # The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow.
  1276. nextActionUrl: URL
  1277. # The result of this billing attempt if completed successfully.
  1278. order: Order
  1279. # The date and time used to calculate fulfillment intervals for a billing attempt that
  1280. # successfully completed after the current anchor date. To prevent fulfillment from being
  1281. # pushed to the next anchor date, this field can override the billing attempt date.
  1282. originTime: DateTime
  1283. # Whether the billing attempt is still processing.
  1284. ready: Boolean!
  1285. # The subscription contract.
  1286. subscriptionContract: SubscriptionContract!
  1287. }
  1288. # Represents the payment terms template object.
  1289. type PaymentTermsTemplate implements Node {
  1290. # The description of the payment terms template.
  1291. description: String!
  1292. # The number of days between the issued date and due date if this is the net type of payment terms.
  1293. dueInDays: Int
  1294. # A globally-unique identifier.
  1295. id: ID!
  1296. # The name of the payment terms template.
  1297. name: String!
  1298. # The type of the payment terms template.
  1299. paymentTermsType: PaymentTermsType!
  1300. # The translated payment terms template name.
  1301. translatedName: String!
  1302. }
  1303. # The fixed selling plan billing policy.
  1304. type SellingPlanFixedBillingPolicy {
  1305. # The checkout charge when the full amount isn't charged at checkout.
  1306. checkoutCharge: SellingPlanCheckoutCharge!
  1307. # The exact time when to capture the full payment.
  1308. remainingBalanceChargeExactTime: DateTime
  1309. # The period after remaining_balance_charge_trigger, before capturing the full payment.
  1310. # Expressed as an ISO8601 duration.
  1311. remainingBalanceChargeTimeAfterCheckout: String
  1312. # When to capture payment for amount due.
  1313. remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger!
  1314. }
  1315. # The amount charged at checkout when the full amount isn't charged at checkout.
  1316. type SellingPlanCheckoutCharge {
  1317. # The charge type for the checkout charge.
  1318. type: SellingPlanCheckoutChargeType!
  1319. # The charge value for the checkout charge.
  1320. value: SellingPlanCheckoutChargeValue!
  1321. }
  1322. # Represents a recurring selling plan billing policy.
  1323. type SellingPlanRecurringBillingPolicy {
  1324. # Specific anchor dates upon which the billing interval calculations should be made.
  1325. anchors: [SellingPlanAnchor!]!
  1326. # The date and time when the selling plan billing policy was created.
  1327. createdAt: DateTime!
  1328. # The billing frequency, it can be either: day, week, month or year.
  1329. interval: SellingPlanInterval!
  1330. # The number of intervals between billings.
  1331. intervalCount: Int!
  1332. # Maximum number of billing iterations.
  1333. maxCycles: Int
  1334. # Minimum number of billing iterations.
  1335. minCycles: Int
  1336. }
  1337. # Represents a fixed selling plan delivery policy.
  1338. type SellingPlanFixedDeliveryPolicy {
  1339. # The specific anchor dates upon which the delivery interval calculations should be made.
  1340. anchors: [SellingPlanAnchor!]!
  1341. # A buffer period for orders to be included in next fulfillment anchor.
  1342. cutoff: Int
  1343. # The date and time when the fulfillment should trigger.
  1344. fulfillmentExactTime: DateTime
  1345. # What triggers the fulfillment. The value must be one of ANCHOR, ASAP, EXACT_TIME, or UNKNOWN.
  1346. fulfillmentTrigger: SellingPlanFulfillmentTrigger!
  1347. # Whether the delivery policy is merchant or buyer-centric.
  1348. # Buyer-centric delivery policies state the time when the buyer will receive the goods.
  1349. # Merchant-centric delivery policies state the time when the fulfillment should be started.
  1350. # Currently, only merchant-centric delivery policies are supported.
  1351. intent: SellingPlanFixedDeliveryPolicyIntent!
  1352. # The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor.
  1353. # The default value for this field is ASAP.
  1354. preAnchorBehavior: SellingPlanFixedDeliveryPolicyPreAnchorBehavior!
  1355. }
  1356. # Represents a recurring selling plan delivery policy.
  1357. type SellingPlanRecurringDeliveryPolicy {
  1358. # The specific anchor dates upon which the delivery interval calculations should be made.
  1359. anchors: [SellingPlanAnchor!]!
  1360. # The date and time when the selling plan delivery policy was created.
  1361. createdAt: DateTime!
  1362. # A buffer period for orders to be included in a cycle.
  1363. cutoff: Int
  1364. # Whether the delivery policy is merchant or buyer-centric.
  1365. # Buyer-centric delivery policies state the time when the buyer will receive the goods.
  1366. # Merchant-centric delivery policies state the time when the fulfillment should be started.
  1367. # Currently, only merchant-centric delivery policies are supported.
  1368. intent: SellingPlanRecurringDeliveryPolicyIntent!
  1369. # The delivery frequency, it can be either: day, week, month or year.
  1370. interval: SellingPlanInterval!
  1371. # The number of intervals between deliveries.
  1372. intervalCount: Int!
  1373. # The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor.
  1374. # The default value for this field is ASAP.
  1375. preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior!
  1376. }
  1377. # The percentage value of the price used for checkout charge.
  1378. type SellingPlanCheckoutChargePercentageValue {
  1379. # The percentage value of the price used for checkout charge.
  1380. percentage: Float!
  1381. }
  1382. # Represents a fixed selling plan pricing policy.
  1383. type SellingPlanFixedPricingPolicy implements SellingPlanPricingPolicyBase {
  1384. # The price adjustment type.
  1385. adjustmentType: SellingPlanPricingPolicyAdjustmentType!
  1386. # The price adjustment value.
  1387. adjustmentValue: SellingPlanPricingPolicyAdjustmentValue!
  1388. # The date and time when the fixed selling plan pricing policy was created.
  1389. createdAt: DateTime!
  1390. }
  1391. # Represents a recurring selling plan pricing policy.
  1392. type SellingPlanRecurringPricingPolicy implements SellingPlanPricingPolicyBase {
  1393. # The price adjustment type.
  1394. adjustmentType: SellingPlanPricingPolicyAdjustmentType!
  1395. # The price adjustment value.
  1396. adjustmentValue: SellingPlanPricingPolicyAdjustmentValue!
  1397. # Cycle after which this pricing policy applies.
  1398. afterCycle: Int
  1399. # The date and time when the recurring selling plan pricing policy was created.
  1400. createdAt: DateTime!
  1401. }