app.graphql 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. # A Shopify application.
  2. type App implements Node {
  3. # A unique application API identifier.
  4. apiKey: String!
  5. # App store page URL of the app.
  6. appStoreAppUrl: URL
  7. # App store page URL of the developer who created the app.
  8. appStoreDeveloperUrl: URL
  9. # The access scopes available to the app.
  10. availableAccessScopes: [AccessScope!]!
  11. # Banner image for the app.
  12. banner: Image!
  13. # Description of the app.
  14. description: String
  15. # The name of the app developer.
  16. developerName: String
  17. # The type of app developer.
  18. developerType: AppDeveloperType!
  19. # Whether the app uses the Embedded App SDK.
  20. embedded: Boolean!
  21. # Requirements that must be met before the app can be installed.
  22. failedRequirements: [FailedRequirement!]!
  23. # A list of app features that are shown in the Shopify App Store listing.
  24. features: [String!]!
  25. # Feedback from this app about the store.
  26. feedback: AppFeedback
  27. # Handle of the app.
  28. handle: String
  29. # Icon that represents the app.
  30. icon: Image!
  31. # A globally-unique identifier.
  32. id: ID!
  33. # Webpage where you can install the app.
  34. installUrl: URL
  35. # Corresponding AppInstallation for this shop and App.
  36. # Returns null if the App is not installed.
  37. installation: AppInstallation
  38. # Whether the app is the post purchase app in use.
  39. isPostPurchaseAppInUse: Boolean!
  40. # Whether the app was previously installed on the current shop.
  41. previouslyInstalled: Boolean!
  42. # Detailed information about the app pricing.
  43. pricingDetails: String
  44. # Summary of the app pricing details.
  45. pricingDetailsSummary: String!
  46. # Link to app privacy policy.
  47. privacyPolicyUrl: URL
  48. # The public category for the app.
  49. publicCategory: AppPublicCategory!
  50. # Whether the app is published to the Shopify App Store.
  51. published: Boolean!
  52. # The access scopes requested by the app.
  53. requestedAccessScopes: [AccessScope!]!
  54. # Screenshots of the app.
  55. screenshots: [Image!]!
  56. # Whether the app was developed by Shopify.
  57. shopifyDeveloped: Boolean!
  58. # Name of the app.
  59. title: String!
  60. # Message that appears when the app is uninstalled. For example:
  61. # By removing this app, you will no longer be able to publish products to MySocialSite or view this app in your Shopify admin. You can re-enable this channel at any time.
  62. uninstallMessage: String!
  63. # The webhook API version for the app.
  64. webhookApiVersion: String!
  65. }
  66. # The application that created the order.
  67. type OrderApp {
  68. # The application icon.
  69. icon: Image!
  70. # The application ID.
  71. id: ID!
  72. # The name of the application.
  73. name: String!
  74. }
  75. # Requirements that must be met before an app can be installed.
  76. type FailedRequirement {
  77. # Action to be taken to resolve a failed requirement, including URL link.
  78. action: NavigationItem
  79. # A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app
  80. # encounters when trying to make use of their Shop and its resources.
  81. message: String!
  82. }
  83. # A navigation item, holding basic link attributes.
  84. type NavigationItem {
  85. # The unique identifier of the navigation item.
  86. id: String!
  87. # The name of the navigation item.
  88. title: String!
  89. # The URL of the page that the navigation item links to.
  90. url: URL!
  91. }
  92. # Reports the status of shops and their resources and displays this information
  93. # within Shopify admin. AppFeedback is used to notify merchants about steps they need to take
  94. # to set up an app on their store.
  95. type AppFeedback {
  96. # The application associated to the feedback.
  97. app: App!
  98. # A link to where merchants can resolve errors.
  99. link: Link
  100. # The feedback message presented to the merchant.
  101. messages: [UserError!]!
  102. }
  103. # Represents an installed application on a shop.
  104. type AppInstallation implements HasMetafields&Node {
  105. # The access scopes granted to the application by a merchant during installation.
  106. accessScopes: [AccessScope!]!
  107. # The active application subscriptions billed to the shop on a recurring basis.
  108. activeSubscriptions: [AppSubscription!]!
  109. # All subscriptions created for a shop.
  110. allSubscriptions(
  111. first: Int
  112. after: String
  113. last: Int
  114. before: String
  115. reverse: Boolean = false
  116. sortKey: AppSubscriptionSortKeys = CREATED_AT
  117. ): AppSubscriptionConnection!
  118. # Application which is installed.
  119. app: App!
  120. # Credits that can be used towards future app purchases.
  121. credits(
  122. first: Int
  123. after: String
  124. last: Int
  125. before: String
  126. reverse: Boolean = false
  127. sortKey: AppTransactionSortKeys = CREATED_AT
  128. ): AppCreditConnection!
  129. # A globally-unique identifier.
  130. id: ID!
  131. # The URL to launch the application.
  132. launchUrl: URL!
  133. # Returns a metafield by namespace and key that belongs to the resource.
  134. metafield(namespace: String!key: String!): Metafield
  135. # List of metafields that belong to the resource.
  136. metafields(
  137. namespace: String
  138. first: Int
  139. after: String
  140. last: Int
  141. before: String
  142. reverse: Boolean = false
  143. ): MetafieldConnection!
  144. # One-time purchases to a shop.
  145. oneTimePurchases(
  146. first: Int
  147. after: String
  148. last: Int
  149. before: String
  150. reverse: Boolean = false
  151. sortKey: AppTransactionSortKeys = CREATED_AT
  152. ): AppPurchaseOneTimeConnection!
  153. # Returns a private metafield by namespace and key that belongs to the resource.
  154. privateMetafield(namespace: String!key: String!): PrivateMetafield
  155. # List of private metafields that belong to the resource.
  156. privateMetafields(
  157. namespace: String
  158. first: Int
  159. after: String
  160. last: Int
  161. before: String
  162. reverse: Boolean = false
  163. ): PrivateMetafieldConnection!
  164. # The publication associated with the installed application.
  165. publication: Publication
  166. # The records that track the externally-captured revenue for the app. The records are used for revenue attribution purposes.
  167. revenueAttributionRecords(
  168. first: Int
  169. after: String
  170. last: Int
  171. before: String
  172. reverse: Boolean = false
  173. sortKey: AppRevenueAttributionRecordSortKeys = CREATED_AT
  174. ): AppRevenueAttributionRecordConnection!
  175. # The URL to uninstall the application.
  176. uninstallUrl: URL
  177. }
  178. # Provides users access to services and/or features for a duration of time.
  179. type AppSubscription implements Node {
  180. # The date and time when the app subscription was created.
  181. createdAt: DateTime!
  182. # The date and time when the current app subscription period ends. Returns null if the subscription isn't active.
  183. currentPeriodEnd: DateTime
  184. # A globally-unique identifier.
  185. id: ID!
  186. # The plans attached to the app subscription.
  187. lineItems: [AppSubscriptionLineItem!]!
  188. # The name of the app subscription.
  189. name: String!
  190. # The URL that the merchant is redirected to after approving the app subscription.
  191. returnUrl: URL!
  192. # The status of the app subscription.
  193. status: AppSubscriptionStatus!
  194. # Specifies whether the app subscription is a test transaction.
  195. test: Boolean!
  196. # The number of free trial days, starting at the subscription's creation date, by which billing is delayed.
  197. trialDays: Int!
  198. }
  199. # The plan attached to an app subscription.
  200. type AppSubscriptionLineItem {
  201. # A globally-unique identifier.
  202. id: ID!
  203. # The pricing model for the app subscription.
  204. plan: AppPlanV2!
  205. # A list of the store's usage records for a usage pricing plan.
  206. usageRecords(
  207. first: Int
  208. after: String
  209. last: Int
  210. before: String
  211. reverse: Boolean = false
  212. sortKey: AppUsageRecordSortKeys = CREATED_AT
  213. ): AppUsageRecordConnection!
  214. }
  215. # The app plan that the merchant is subscribed to.
  216. type AppPlanV2 {
  217. # The plan billed to a shop on a recurring basis.
  218. pricingDetails: AppPricingDetails!
  219. }
  220. # A link to direct users to.
  221. type Link implements HasPublishedTranslations {
  222. # A context-sensitive label for the link.
  223. label: String!
  224. # The translations associated with the resource.
  225. translations(locale: String!marketId: ID): [PublishedTranslation!]!
  226. # The URL that the link visits.
  227. url: URL!
  228. }
  229. # A publication is a group of products and collections that is published to an app.
  230. type Publication implements Node {
  231. # The app associated with the publication.
  232. app: App!
  233. # The collection publications for the list of collections published to the publication.
  234. collectionPublicationsV3(
  235. first: Int
  236. after: String
  237. last: Int
  238. before: String
  239. reverse: Boolean = false
  240. ): ResourcePublicationConnection!
  241. # The list of collections published to the publication.
  242. collections(
  243. first: Int
  244. after: String
  245. last: Int
  246. before: String
  247. reverse: Boolean = false
  248. ): CollectionConnection!
  249. # Whether the collection is available to the publication.
  250. hasCollection(id: ID!): Boolean!
  251. # A globally-unique identifier.
  252. id: ID!
  253. # Name of the publication.
  254. name: String!
  255. # The product publications for the list of products published to the publication.
  256. productPublicationsV3(
  257. first: Int
  258. after: String
  259. last: Int
  260. before: String
  261. reverse: Boolean = false
  262. ): ResourcePublicationConnection!
  263. # The list of products published to the publication.
  264. products(
  265. first: Int
  266. after: String
  267. last: Int
  268. before: String
  269. reverse: Boolean = false
  270. ): ProductConnection!
  271. # Whether the publication supports future publishing.
  272. supportsFuturePublishing: Boolean!
  273. }
  274. # App credits can be applied by the merchant towards future app purchases, subscriptions, or usage records in Shopify.
  275. type AppCredit implements Node {
  276. # The amount that can be used towards future app purchases in Shopify.
  277. amount: MoneyV2!
  278. # The date and time when the app credit was created.
  279. createdAt: DateTime!
  280. # The description of the app credit.
  281. description: String!
  282. # A globally-unique identifier.
  283. id: ID!
  284. # Whether the app credit is a test transaction.
  285. test: Boolean!
  286. }
  287. # Services and features purchased once by a store.
  288. type AppPurchaseOneTime implements AppPurchase&Node {
  289. # The date and time when the app purchase occurred.
  290. createdAt: DateTime!
  291. # A globally-unique identifier.
  292. id: ID!
  293. # The name of the app purchase.
  294. name: String!
  295. # The amount to be charged to the store for the app purchase.
  296. price: MoneyV2!
  297. # The status of the app purchase.
  298. status: AppPurchaseStatus!
  299. # Whether the app purchase is a test transaction.
  300. test: Boolean!
  301. }
  302. # Represents app revenue that was captured externally by the partner.
  303. type AppRevenueAttributionRecord implements Node {
  304. # The financial amount captured in this attribution.
  305. amount: MoneyV2!
  306. # The timestamp when the financial amount was captured.
  307. capturedAt: DateTime!
  308. # The timestamp at which this revenue attribution was issued.
  309. createdAt: DateTime!
  310. # A globally-unique identifier.
  311. id: ID!
  312. # The unique value submitted during the creation of the app revenue attribution record.
  313. # For more information, refer to Idempotent requests.
  314. idempotencyKey: String!
  315. # Indicates whether this is a test submission.
  316. test: Boolean!
  317. # The type of revenue attribution.
  318. type: AppRevenueAttributionType!
  319. }
  320. # Store usage for app subscriptions with usage pricing.
  321. type AppUsageRecord implements Node {
  322. # The date and time when the usage record was created.
  323. createdAt: DateTime!
  324. # The description of the app usage record.
  325. description: String!
  326. # A globally-unique identifier.
  327. id: ID!
  328. # The price of the usage record. The only permitted currency code is USD.
  329. price: MoneyV2!
  330. # Defines the usage pricing plan the merchant is subscribed to.
  331. subscriptionLineItem: AppSubscriptionLineItem!
  332. }
  333. # SEO information.
  334. type SEO {
  335. # SEO Description.
  336. description: String
  337. # SEO Title.
  338. title: String
  339. }
  340. # SEO information.
  341. input SEOInput {
  342. # SEO title of the product.
  343. title: String
  344. # SEO description of the product.
  345. description: String
  346. }
  347. # Represents feedback from apps about a resource, and the steps required to set up the apps on the shop.
  348. type ResourceFeedback {
  349. # List of AppFeedback detailing issues regarding a resource.
  350. details: [AppFeedback!]!
  351. # Summary of resource feedback pertaining to the resource.
  352. summary: String!
  353. }
  354. # Represents a Subscription Contract.
  355. type SubscriptionContract implements Node&SubscriptionContractBase {
  356. # The subscription app that the subscription contract is registered to.
  357. app: App
  358. # The URL of the subscription contract page on the subscription app.
  359. appAdminUrl: URL
  360. # The list of billing attempts associated with the subscription contract.
  361. billingAttempts(
  362. first: Int
  363. after: String
  364. last: Int
  365. before: String
  366. reverse: Boolean = false
  367. ): SubscriptionBillingAttemptConnection!
  368. # The billing policy associated with the subscription contract.
  369. billingPolicy: SubscriptionBillingPolicy!
  370. # The date and time when the subscription contract was created.
  371. createdAt: DateTime!
  372. # The currency that's used for the subscription contract.
  373. currencyCode: CurrencyCode!
  374. # A list of the custom attributes to be added to the generated orders.
  375. customAttributes: [Attribute!]!
  376. # The customer to whom the subscription contract belongs.
  377. customer: Customer
  378. # The customer payment method that's used for the subscription contract.
  379. customerPaymentMethod(showRevoked: Boolean = false): CustomerPaymentMethod
  380. # The delivery method for each billing of the subscription contract.
  381. deliveryMethod: SubscriptionDeliveryMethod
  382. # The delivery policy associated with the subscription contract.
  383. deliveryPolicy: SubscriptionDeliveryPolicy!
  384. # The delivery price for each billing of the subscription contract.
  385. deliveryPrice: MoneyV2!
  386. # The list of subscription discounts associated with the subscription contract.
  387. discounts(
  388. first: Int
  389. after: String
  390. last: Int
  391. before: String
  392. reverse: Boolean = false
  393. ): SubscriptionManualDiscountConnection!
  394. # A globally-unique identifier.
  395. id: ID!
  396. # The current status of the last payment.
  397. lastPaymentStatus: SubscriptionContractLastPaymentStatus
  398. # The number of lines associated with the subscription contract.
  399. lineCount: Int!
  400. # The list of subscription lines associated with the subscription contract.
  401. lines(
  402. first: Int
  403. after: String
  404. last: Int
  405. before: String
  406. reverse: Boolean = false
  407. ): SubscriptionLineConnection!
  408. # The next billing date for the subscription contract.
  409. nextBillingDate: DateTime
  410. # The note field that will be applied to the generated orders.
  411. note: String
  412. # A list of the subscription contract's orders.
  413. orders(
  414. first: Int
  415. after: String
  416. last: Int
  417. before: String
  418. reverse: Boolean = false
  419. ): OrderConnection!
  420. # The order from which this contract originated.
  421. originOrder: Order
  422. # The current status of the subscription contract.
  423. status: SubscriptionContractSubscriptionStatus!
  424. # The date and time when the subscription contract was updated.
  425. updatedAt: DateTime!
  426. }
  427. # A setting for a presentment currency.
  428. type CurrencySetting {
  429. # The currency's ISO code.
  430. currencyCode: CurrencyCode!
  431. # The full name of the currency.
  432. currencyName: String!
  433. # Whether the currency is enabled or not.
  434. # An enabled currency setting is visible to buyers and allows orders to be generated with that currency as presentment.
  435. enabled: Boolean!
  436. # The date and time when the active exchange rate for the currency was last modified.
  437. # It can be the automatic rate's creation date, or the manual rate's last updated at date if active.
  438. rateUpdatedAt: DateTime
  439. }
  440. # A unique string that represents the address of a Shopify store on the Internet.
  441. type Domain implements Node {
  442. # The host name of the domain. For example, example.com.
  443. host: String!
  444. # A globally-unique identifier.
  445. id: ID!
  446. # The localization of the domain, if the domain doesn't redirect.
  447. localization: DomainLocalization
  448. # The web presence of the domain.
  449. marketWebPresence: MarketWebPresence
  450. # Whether SSL is enabled.
  451. sslEnabled: Boolean!
  452. # The URL of the domain (for example, https://example.com).
  453. url: URL!
  454. }
  455. # The country and language settings assigned to a domain.
  456. type DomainLocalization {
  457. # The ISO codes for the domain’s alternate locales. For example, ["en"].
  458. alternateLocales: [String!]!
  459. # The ISO code for the country assigned to the domain. For example, "CA" or "*" for a domain set to "Rest of world".
  460. country: String
  461. # The ISO code for the domain’s default locale. For example, "en".
  462. defaultLocale: String!
  463. }
  464. # A custom page on the Online Store.
  465. type OnlineStorePage implements HasPublishedTranslations&Navigable&Node {
  466. # A default cursor that returns the single next record, sorted ascending by ID.
  467. defaultCursor: String!
  468. # A globally-unique identifier.
  469. id: ID!
  470. # The translations associated with the resource.
  471. translations(locale: String!marketId: ID): [PublishedTranslation!]!
  472. }
  473. # Automatic discount applications capture the intentions of a discount that was automatically applied.
  474. type AutomaticDiscountApplication implements DiscountApplication {
  475. # The method by which the discount's value is applied to its entitled items.
  476. allocationMethod: DiscountApplicationAllocationMethod!
  477. # An ordered index that can be used to identify the discount application and indicate the precedence
  478. # of the discount application for calculations.
  479. index: Int!
  480. # How the discount amount is distributed on the discounted lines.
  481. targetSelection: DiscountApplicationTargetSelection!
  482. # Whether the discount is applied on line items or shipping lines.
  483. targetType: DiscountApplicationTargetType!
  484. # The title of the discount application.
  485. title: String!
  486. # The value of the discount application.
  487. value: PricingValue!
  488. }
  489. # Discount code applications capture the intentions of a discount code at
  490. # he time that it is applied onto an order.
  491. #
  492. # Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the DiscountAllocation object.
  493. type DiscountCodeApplication implements DiscountApplication {
  494. # The method by which the discount's value is applied to its entitled items.
  495. allocationMethod: DiscountApplicationAllocationMethod!
  496. # The string identifying the discount code that was used at the time of application.
  497. code: String!
  498. # An ordered index that can be used to identify the discount application and indicate the precedence
  499. # of the discount application for calculations.
  500. index: Int!
  501. # How the discount amount is distributed on the discounted lines.
  502. targetSelection: DiscountApplicationTargetSelection!
  503. # Whether the discount is applied on line items or shipping lines.
  504. targetType: DiscountApplicationTargetType!
  505. # The value of the discount application.
  506. value: PricingValue!
  507. }
  508. # Manual discount applications capture the intentions of a discount that was manually created for an order.
  509. #
  510. # Discount applications don't represent the actual final amount discounted on a line (line item or shipping line).
  511. # The actual amount discounted on a line is represented by the DiscountAllocation object.
  512. type ManualDiscountApplication implements DiscountApplication {
  513. # The method by which the discount's value is applied to its entitled items.
  514. allocationMethod: DiscountApplicationAllocationMethod!
  515. # The description of the discount application.
  516. description: String
  517. # An ordered index that can be used to identify the discount application and indicate the precedence
  518. # of the discount application for calculations.
  519. index: Int!
  520. # How the discount amount is distributed on the discounted lines.
  521. targetSelection: DiscountApplicationTargetSelection!
  522. # Whether the discount is applied on line items or shipping lines.
  523. targetType: DiscountApplicationTargetType!
  524. # The title of the discount application.
  525. title: String!
  526. # The value of the discount application.
  527. value: PricingValue!
  528. }
  529. # Script discount applications capture the intentions of a discount that
  530. # was created by a Shopify Script for an order's line item or shipping line.
  531. #
  532. # Discount applications don't represent the actual final amount discounted on a line (line item or shipping line).
  533. # The actual amount discounted on a line is represented by the DiscountAllocation object.
  534. type ScriptDiscountApplication implements DiscountApplication {
  535. # The method by which the discount's value is applied to its entitled items.
  536. allocationMethod: DiscountApplicationAllocationMethod!
  537. # An ordered index that can be used to identify the discount application and indicate the precedence
  538. # of the discount application for calculations.
  539. index: Int!
  540. # How the discount amount is distributed on the discounted lines.
  541. targetSelection: DiscountApplicationTargetSelection!
  542. # Whether the discount is applied on line items or shipping lines.
  543. targetType: DiscountApplicationTargetType!
  544. # The title of the application as defined by the Script.
  545. title: String!
  546. # The value of the discount application.
  547. value: PricingValue!
  548. }