company.graphql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. # Represents information about a company which is also a customer of the shop.
  2. type Company implements CommentEventSubject&HasEvents&Navigable&Node {
  3. # The number of contacts that belong to the company.
  4. contactCount: Int!
  5. # The list of roles for the company contacts.
  6. contactRoles(
  7. first: Int
  8. after: String
  9. last: Int
  10. before: String
  11. reverse: Boolean = false
  12. sortKey: CompanyContactRoleSortKeys = ID
  13. ): CompanyContactRoleConnection!
  14. # The list of contacts in the company.
  15. contacts(
  16. first: Int
  17. after: String
  18. last: Int
  19. before: String
  20. reverse: Boolean = false
  21. sortKey: CompanyContactSortKeys = ID
  22. query: String
  23. ): CompanyContactConnection!
  24. # The date and time (ISO 8601 format) at which the company was created in Shopify.
  25. createdAt: DateTime!
  26. # The date and time (ISO 8601 format) at which the company became the customer.
  27. customerSince: DateTime!
  28. # A default cursor that returns the single next record, sorted ascending by ID.
  29. defaultCursor: String!
  30. # The role proposed by default for a contact at the company.
  31. defaultRole: CompanyContactRole
  32. # The list of the company's draft orders.
  33. draftOrders(
  34. first: Int
  35. after: String
  36. last: Int
  37. before: String
  38. reverse: Boolean = false
  39. sortKey: DraftOrderSortKeys = ID
  40. query: String
  41. ): DraftOrderConnection!
  42. # The paginated list of events associated with the host subject.
  43. events(
  44. first: Int
  45. after: String
  46. last: Int
  47. before: String
  48. reverse: Boolean = false
  49. sortKey: EventSortKeys = ID
  50. query: String
  51. ): EventConnection!
  52. # A unique externally-supplied identifier for the company.
  53. externalId: String
  54. # Whether the merchant added a timeline comment to the company.
  55. hasTimelineComment: Boolean!
  56. # A globally-unique identifier.
  57. id: ID!
  58. # The lifetime duration of the company, since it became a customer of the shop. Examples: 2 days, 3 months, 1 year.
  59. lifetimeDuration: String!
  60. # The number of locations that belong to the company.
  61. locationCount: Int!
  62. # The list of locations in the company.
  63. locations(
  64. first: Int
  65. after: String
  66. last: Int
  67. before: String
  68. reverse: Boolean = false
  69. sortKey: CompanyLocationSortKeys = ID
  70. query: String
  71. ): CompanyLocationConnection!
  72. # The main contact for the company.
  73. mainContact: CompanyContact
  74. # The name of the company.
  75. name: String!
  76. # A note about the company.
  77. note: String
  78. # The total number of orders placed for this company, across all its locations.
  79. orderCount: Int!
  80. # The list of the company's orders.
  81. orders(
  82. first: Int
  83. after: String
  84. last: Int
  85. before: String
  86. reverse: Boolean = false
  87. sortKey: OrderSortKeys = ID
  88. ): OrderConnection!
  89. # The total amount spent by this company, across all its locations.
  90. totalSpent: MoneyV2!
  91. # The date and time (ISO 8601 format) at which the company was last modified.
  92. updatedAt: DateTime!
  93. }
  94. # A person that acts on behalf of company associated to a customer.
  95. type CompanyContact implements Node {
  96. # The company to which the contact belongs.
  97. company: Company!
  98. # The date and time (ISO 8601 format) at which the company contact was created at Shopify.
  99. createdAt: DateTime!
  100. # The customer associated to this contact.
  101. customer: Customer!
  102. # The list of draft orders for the company contact.
  103. draftOrders(
  104. first: Int
  105. after: String
  106. last: Int
  107. before: String
  108. reverse: Boolean = false
  109. sortKey: DraftOrderSortKeys = ID
  110. query: String
  111. ): DraftOrderConnection!
  112. # A globally-unique identifier.
  113. id: ID!
  114. # Whether the contact is the main contact of the company.
  115. isMainContact: Boolean!
  116. # The lifetime duration of the company contact, since its creation date on Shopify. Examples: 1 year, 2 months, 3 days.
  117. lifetimeDuration: String!
  118. # The company contact's locale (language).
  119. locale: String
  120. # The list of orders for the company contact.
  121. orders(
  122. first: Int
  123. after: String
  124. last: Int
  125. before: String
  126. reverse: Boolean = false
  127. sortKey: OrderSortKeys = ID
  128. ): OrderConnection!
  129. # The list of roles assigned to this company contact.
  130. roleAssignments(
  131. first: Int
  132. after: String
  133. last: Int
  134. before: String
  135. reverse: Boolean = false
  136. sortKey: CompanyContactRoleAssignmentSortKeys = ID
  137. query: String
  138. ): CompanyContactRoleAssignmentConnection!
  139. # The company contact's job title.
  140. title: String
  141. # The date and time (ISO 8601 format) at which the company contact was last updated.
  142. updatedAt: DateTime!
  143. }
  144. # The role for a company contact.
  145. type CompanyContactRole implements Node {
  146. # A globally-unique identifier.
  147. id: ID!
  148. # The name of a role.
  149. # For example, admin or buyer.
  150. name: String!
  151. # A note for the role.
  152. note: String
  153. }
  154. # The CompanyContactRoleAssignment describes the company and location associated to a company contact's role.
  155. type CompanyContactRoleAssignment implements Node {
  156. # The company this role assignment belongs to.
  157. company: Company!
  158. # The company contact for whom this role is assigned.
  159. companyContact: CompanyContact!
  160. # The company location to which the role is assigned.
  161. companyLocation: CompanyLocation!
  162. # The date and time (ISO 8601 format) when the assignment record was created.
  163. createdAt: DateTime!
  164. # A globally-unique identifier.
  165. id: ID!
  166. # The role that is assigned to the company contact.
  167. role: CompanyContactRole!
  168. # The date and time (ISO 8601 format) when the assignment record was last updated.
  169. updatedAt: DateTime!
  170. }
  171. # A location or branch of a company that's a customer of the shop.
  172. # Configuration of B2B relationship, for example prices lists and checkout settings, may be done for a location.
  173. type CompanyLocation implements CommentEventSubject&HasEvents&Navigable&Node {
  174. # The address used as billing address for the location.
  175. billingAddress: CompanyAddress
  176. # The configuration for the buyer's B2B checkout.
  177. buyerExperienceConfiguration: BuyerExperienceConfiguration
  178. # The company that the company location belongs to.
  179. company: Company!
  180. # The date and time (ISO 8601 format) at which the company location was created in Shopify.
  181. createdAt: DateTime!
  182. # The location's currency based on the shipping address. If the shipping address is empty, then the value is the shop's primary market.
  183. currency: CurrencyCode!
  184. # A default cursor that returns the single next record, sorted ascending by ID.
  185. defaultCursor: String!
  186. # The list of draft orders for the company location.
  187. draftOrders(
  188. first: Int
  189. after: String
  190. last: Int
  191. before: String
  192. reverse: Boolean = false
  193. sortKey: DraftOrderSortKeys = ID
  194. query: String
  195. ): DraftOrderConnection!
  196. # The paginated list of events associated with the host subject.
  197. events(
  198. first: Int
  199. after: String
  200. last: Int
  201. before: String
  202. reverse: Boolean = false
  203. sortKey: EventSortKeys = ID
  204. query: String
  205. ): EventConnection!
  206. # A unique externally-supplied identifier for the company location.
  207. externalId: String
  208. # Whether the merchant added a timeline comment to the company location.
  209. hasTimelineComment: Boolean!
  210. # A globally-unique identifier.
  211. id: ID!
  212. # The preferred locale of the company location.
  213. locale: String
  214. # The market that includes the location's shipping address. If the shipping address is empty, then the value is the shop's primary market.
  215. market: Market!
  216. # The name of the company location.
  217. name: String!
  218. # A note about the company location.
  219. note: String
  220. # The total number of orders placed for the location.
  221. orderCount: Int!
  222. # The list of orders for the company location.
  223. orders(
  224. first: Int
  225. after: String
  226. last: Int
  227. before: String
  228. reverse: Boolean = false
  229. sortKey: OrderSortKeys = ID
  230. ): OrderConnection!
  231. # The phone number of the company location.
  232. phone: String
  233. # The list of roles assigned to the company location.
  234. roleAssignments(
  235. first: Int
  236. after: String
  237. last: Int
  238. before: String
  239. reverse: Boolean = false
  240. sortKey: CompanyContactRoleAssignmentSortKeys = ID
  241. query: String
  242. ): CompanyContactRoleAssignmentConnection!
  243. # The address used as shipping address for the location.
  244. shippingAddress: CompanyAddress
  245. # The list of tax exemptions applied to the location.
  246. taxExemptions: [TaxExemption!]!
  247. # The tax registration ID for the company location.
  248. taxRegistrationId: String
  249. # The total amount spent by the location.
  250. totalSpent: MoneyV2!
  251. # The date and time (ISO 8601 format) at which the company location was last modified.
  252. updatedAt: DateTime!
  253. }
  254. # Represents a billing or shipping address for a company location.
  255. type CompanyAddress implements Node {
  256. # The first line of the address. Typically the street address or PO Box number.
  257. address1: String!
  258. # The second line of the address. Typically the number of the apartment, suite, or unit.
  259. address2: String
  260. # The name of the city, district, village, or town.
  261. city: String
  262. # The name of the company.
  263. companyName: String!
  264. # The name of the country.
  265. country: String
  266. # The two-letter code for the country of the address.
  267. # For example, US.
  268. countryCode: CountryCode!
  269. # The date and time (ISO 8601 format) at which the company address was created.
  270. #
  271. # formattedAddress(withName: Boolean = falsewithCompanyName: Boolean = true): [String!]!
  272. # The formatted version of the address.
  273. createdAt: DateTime!
  274. # A comma-separated list of the values for city, province, and country.
  275. formattedArea: String
  276. # A globally-unique identifier.
  277. id: ID!
  278. # A unique phone number for the customer.
  279. # Formatted using E.164 standard. For example, +16135551111.
  280. phone: String
  281. # The region of the address, such as the province, state, or district.
  282. province: String
  283. # The identity of the recipient e.g. 'Receiving Department'.
  284. recipient: String
  285. # The date and time (ISO 8601 format) at which the company address was last updated.
  286. updatedAt: DateTime!
  287. # The zip or postal code of the address.
  288. zip: String
  289. # The two-letter code for the region.
  290. # For example, ON.
  291. zoneCode: String
  292. }
  293. # Settings describing the behavior of checkout for a B2B buyer.
  294. type BuyerExperienceConfiguration {
  295. # Whether to checkout to draft order for merchant review.
  296. checkoutToDraft: Boolean!
  297. # Whether a buyer must pay at checkout or they can also choose to pay
  298. # later using net terms.
  299. payNowOnly: Boolean!
  300. # Represents the merchant configured payment terms.
  301. paymentTermsTemplate: PaymentTermsTemplate
  302. }
  303. # Represents information about the purchasing company for the order or draft order.
  304. type PurchasingCompany {
  305. # The company associated to the order or draft order.
  306. company: Company!
  307. # The company contact associated to the order or draft order.
  308. contact: CompanyContact
  309. # The company location associated to the order or draft order.
  310. location: CompanyLocation!
  311. }
  312. # An auto-generated type for paginating through multiple CompanyContactRoles.
  313. type CompanyContactRoleConnection {
  314. # A list of edges.
  315. edges: [CompanyContactRoleEdge!]!
  316. # A list of the nodes contained in CompanyContactRoleEdge.
  317. nodes: [CompanyContactRole!]!
  318. # Information to aid in pagination.
  319. pageInfo: PageInfo!
  320. }
  321. # An auto-generated type which holds one CompanyContactRole and a cursor during pagination.
  322. type CompanyContactRoleEdge {
  323. # A cursor for use in pagination.
  324. cursor: String!
  325. # The item at the end of CompanyContactRoleEdge.
  326. node: CompanyContactRole!
  327. }
  328. # An auto-generated type for paginating through multiple CompanyContacts.
  329. type CompanyContactConnection {
  330. # A list of edges.
  331. edges: [CompanyContactEdge!]!
  332. # A list of the nodes contained in CompanyContactEdge.
  333. nodes: [CompanyContact!]!
  334. # Information to aid in pagination.
  335. pageInfo: PageInfo!
  336. }
  337. # An auto-generated type which holds one CompanyContact and a cursor during pagination.
  338. type CompanyContactEdge {
  339. # A cursor for use in pagination.
  340. cursor: String!
  341. # The item at the end of CompanyContactEdge.
  342. node: CompanyContact!
  343. }
  344. # An auto-generated type for paginating through multiple CompanyLocations.
  345. type CompanyLocationConnection {
  346. # A list of edges.
  347. edges: [CompanyLocationEdge!]!
  348. # A list of the nodes contained in CompanyLocationEdge.
  349. nodes: [CompanyLocation!]!
  350. # Information to aid in pagination.
  351. pageInfo: PageInfo!
  352. }
  353. # An auto-generated type which holds one CompanyLocation and a cursor during pagination.
  354. type CompanyLocationEdge {
  355. # A cursor for use in pagination.
  356. cursor: String!
  357. # The item at the end of CompanyLocationEdge.
  358. node: CompanyLocation!
  359. }
  360. # An auto-generated type for paginating through multiple CompanyContactRoleAssignments.
  361. type CompanyContactRoleAssignmentConnection {
  362. # A list of edges.
  363. edges: [CompanyContactRoleAssignmentEdge!]!
  364. # A list of the nodes contained in CompanyContactRoleAssignmentEdge.
  365. nodes: [CompanyContactRoleAssignment!]!
  366. # Information to aid in pagination.
  367. pageInfo: PageInfo!
  368. }
  369. # An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination.
  370. type CompanyContactRoleAssignmentEdge {
  371. # A cursor for use in pagination.
  372. cursor: String!
  373. # The item at the end of CompanyContactRoleAssignmentEdge.
  374. node: CompanyContactRoleAssignment!
  375. }