fulfillment.graphql 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. # Represents a fulfillment. In Shopify, a fulfillment represents a shipment of one or more items in an order.
  2. # When an order has been completely fulfilled, it means that all the items that are included in the order have been sent to the customer.
  3. # There can be more than one fulfillment for an order.
  4. type Fulfillment implements LegacyInteroperability&Node {
  5. # The date and time when the fulfillment was created.
  6. createdAt: DateTime!
  7. # The date that this fulfillment was delivered.
  8. deliveredAt: DateTime
  9. # Human readable display status for this fulfillment.
  10. displayStatus: FulfillmentDisplayStatus
  11. # The estimated date that this fulfillment will arrive.
  12. estimatedDeliveryAt: DateTime
  13. # The history of events associated with this fulfillment.
  14. events(
  15. first: Int
  16. after: String
  17. last: Int
  18. before: String
  19. reverse: Boolean = false
  20. sortKey: FulfillmentEventSortKeys = HAPPENED_AT
  21. ): FulfillmentEventConnection!
  22. # List of the fulfillment's line items.
  23. fulfillmentLineItems(
  24. first: Int
  25. after: String
  26. last: Int
  27. before: String
  28. reverse: Boolean = false
  29. ): FulfillmentLineItemConnection!
  30. # A paginated list of fulfillment orders for the fulfillment.
  31. fulfillmentOrders(
  32. first: Int
  33. after: String
  34. last: Int
  35. before: String
  36. reverse: Boolean = false
  37. ): FulfillmentOrderConnection!
  38. # A globally-unique identifier.
  39. id: ID!
  40. # The date and time when the fulfillment went into transit.
  41. inTransitAt: DateTime
  42. # The ID of the corresponding resource in the REST Admin API.
  43. legacyResourceId: UnsignedInt64!
  44. # The location that the fulfillment was processed at.
  45. location: Location
  46. # Human readable reference identifier for this fulfillment.
  47. name: String!
  48. # The order for which the fulfillment was created.
  49. order: Order!
  50. # The address at which the fulfillment occurred.
  51. # Typically this is the address of the warehouse or fulfillment center.
  52. originAddress: FulfillmentOriginAddress
  53. # Whether any of the line items in the fulfillment require shipping.
  54. requiresShipping: Boolean!
  55. # Fulfillment service associated with the fulfillment.
  56. service: FulfillmentService
  57. # The status of the fulfillment.
  58. status: FulfillmentStatus!
  59. # Sum of all line item quantities for the fulfillment.
  60. totalQuantity: Int!
  61. # Tracking information associated with the fulfillment,
  62. # such as the tracking company, tracking number, and tracking URL.
  63. trackingInfo(first: Int): [FulfillmentTrackingInfo!]!
  64. # The date and time when the fulfillment was last modified.
  65. updatedAt: DateTime!
  66. }
  67. # Represents the tracking information for a fulfillment.
  68. type FulfillmentTrackingInfo {
  69. # The name of the tracking company.
  70. company: String
  71. # The tracking number of the fulfillment.
  72. number: String
  73. # The URLs to track the fulfillment.
  74. url: URL
  75. }
  76. # Represents a fulfillment order. In Shopify, a fulfillment order represents a group of one or more items
  77. # in an order that are to be fulfilled from the same location. There can be more than one fulfillment order
  78. # for an order at a given location. Fulfillment orders are created automatically when an order is created.
  79. # To learn how to build a fulfillment app, refer to Fulfillment apps.
  80. type FulfillmentOrder implements Node {
  81. # The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen.
  82. #
  83. # The fulfillment order's assigned location might change in the following cases:
  84. #
  85. # The fulfillment order has been entirely moved to a new location. For example, the fulfillmentOrderMove mutation has been called, and you see the original fulfillment order in the movedFulfillmentOrder field within the mutation's response.
  86. # Work on the fulfillment order has not yet begun, which means that the fulfillment order has the
  87. # OPEN,
  88. # SCHEDULED, or
  89. # ON_HOLD
  90. # status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin).
  91. assignedLocation: FulfillmentOrderAssignedLocation!
  92. # Delivery method of this fulfillment order.
  93. deliveryMethod: DeliveryMethod
  94. # The destination where the items should be sent.
  95. destination: FulfillmentOrderDestination
  96. # The date and time at which the fulfillment order will be fulfillable.
  97. # When this date and time is reached, the scheduled fulfillment order is automatically transitioned to open.
  98. # For example, the fulfill_at date for a subscription order might be the 1st of each month, a pre-order fulfill_at date would be nil, and a standard order fulfill_at date would be the order creation date.
  99. fulfillAt: DateTime
  100. # The latest date and time by which all items in the fulfillment order need to be fulfilled.
  101. fulfillBy: DateTime
  102. # The fulfillment holds applied on the fulfillment order.
  103. fulfillmentHolds: [FulfillmentHold!]!
  104. # A list of fulfillments for the fulfillment order.
  105. fulfillments(
  106. first: Int
  107. after: String
  108. last: Int
  109. before: String
  110. reverse: Boolean = false
  111. ): FulfillmentConnection!
  112. # A globally-unique identifier.
  113. id: ID!
  114. # The duties delivery method of this fulfillment order.
  115. internationalDuties: FulfillmentOrderInternationalDuties
  116. # A list of the fulfillment order's line items.
  117. lineItems(
  118. first: Int
  119. after: String
  120. last: Int
  121. before: String
  122. reverse: Boolean = false
  123. ): FulfillmentOrderLineItemConnection!
  124. # A list of locations that the fulfillment order can potentially move to.
  125. locationsForMove(
  126. first: Int
  127. after: String
  128. last: Int
  129. before: String
  130. reverse: Boolean = false
  131. ): FulfillmentOrderLocationForMoveConnection!
  132. # A list of requests sent by the merchant to the fulfillment service for this fulfillment order.
  133. merchantRequests(
  134. kind: FulfillmentOrderMerchantRequestKind
  135. first: Int
  136. after: String
  137. last: Int
  138. before: String
  139. reverse: Boolean = false
  140. ): FulfillmentOrderMerchantRequestConnection!
  141. # The order that's associated with the fulfillment order.
  142. order: Order!
  143. # The request status of the fulfillment order.
  144. requestStatus: FulfillmentOrderRequestStatus!
  145. # The status of the fulfillment order.
  146. status: FulfillmentOrderStatus!
  147. # The actions that can be performed on this fulfillment order.
  148. supportedActions: [FulfillmentOrderSupportedAction!]!
  149. }
  150. # The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen.
  151. #
  152. # The fulfillment order's assigned location might change in the following cases:
  153. #
  154. # The fulfillment order has been entirely moved to a new location. For example, the fulfillmentOrderMove mutation has been called, and you see the original fulfillment order in the movedFulfillmentOrder field within the mutation's response.
  155. #
  156. # Work on the fulfillment order has not yet begun, which means that the fulfillment order has the
  157. # OPEN,
  158. # SCHEDULED, or
  159. # ON_HOLD
  160. # status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin).
  161. #
  162. # If the fulfillmentOrderMove mutation has moved the fulfillment order's line items to a new location,
  163. # but hasn't moved the fulfillment order instance itself, then the original fulfillment order's assigned location
  164. # doesn't change.
  165. # This happens if the fulfillment order is being split during the move, or if all line items can be moved
  166. # to an existing fulfillment order at a new location.
  167. #
  168. # Once the fulfillment order has been taken into work or canceled,
  169. # which means that the fulfillment order has the
  170. # IN_PROGRESS,
  171. # CLOSED,
  172. # CANCELLED, or
  173. # INCOMPLETE
  174. # status, FulfillmentOrderAssignedLocation acts as a snapshot of the shop's location content.
  175. # Up-to-date shop's location data may be queried through location connection.
  176. type FulfillmentOrderAssignedLocation {
  177. # The first line of the address for the location.
  178. address1: String
  179. # The second line of the address for the location.
  180. address2: String
  181. # The city of the location.
  182. city: String
  183. # The two-letter country code of the location.
  184. countryCode: CountryCode!
  185. # The location where the fulfillment is expected to happen. This value might be different from
  186. # FulfillmentOrderAssignedLocation if the location's attributes were updated
  187. # after the fulfillment order was taken into work of canceled.
  188. location: Location
  189. # The name of the location.
  190. name: String!
  191. # The phone number of the location.
  192. phone: String
  193. # The province of the location.
  194. province: String
  195. # The ZIP code of the location.
  196. zip: String
  197. }
  198. # Represents the goods available to be shipped to a customer.
  199. # It holds essential information about the goods, including SKU and whether it is tracked.
  200. type InventoryItem implements LegacyInteroperability&Node {
  201. # The ISO 3166-1 alpha-2 country code of where the item originated from.
  202. countryCodeOfOrigin: CountryCode
  203. # A list of country specific harmonized system codes.
  204. countryHarmonizedSystemCodes(
  205. first: Int
  206. after: String
  207. last: Int
  208. before: String
  209. reverse: Boolean = false
  210. ): CountryHarmonizedSystemCodeConnection!
  211. # The date and time when the inventory item was created.
  212. createdAt: DateTime!
  213. # The number of inventory items that share the same SKU with this item.
  214. duplicateSkuCount: Int!
  215. # The harmonized system code of the item.
  216. harmonizedSystemCode: String
  217. # A globally-unique identifier.
  218. id: ID!
  219. # The URL that points to the inventory history for the item.
  220. inventoryHistoryUrl: URL
  221. # The inventory item's quantities at the specified location.
  222. inventoryLevel(locationId: ID!): InventoryLevel
  223. # A list of the inventory item's quantities for each location that the inventory item can be stocked at.
  224. inventoryLevels(
  225. first: Int
  226. after: String
  227. last: Int
  228. before: String
  229. reverse: Boolean = false
  230. query: String
  231. ): InventoryLevelConnection!
  232. # The ID of the corresponding resource in the REST Admin API.
  233. legacyResourceId: UnsignedInt64!
  234. # The number of locations where this inventory item is stocked.
  235. locationsCount: Int!
  236. # The ISO 3166-2 alpha-2 province code of where the item originated from.
  237. provinceCodeOfOrigin: String
  238. # Whether the inventory item requires shipping.
  239. requiresShipping: Boolean!
  240. # Inventory item SKU.
  241. sku: String
  242. # Whether inventory levels are tracked for the item.
  243. tracked: Boolean!
  244. # Whether the value of the tracked field for the inventory item can be changed.
  245. trackedEditable: EditableProperty!
  246. # Unit cost associated with the inventory item.
  247. unitCost: MoneyV2
  248. # The date and time when the inventory item was updated.
  249. updatedAt: DateTime!
  250. # The variant that owns this inventory item.
  251. variant: ProductVariant!
  252. }
  253. # The address at which the fulfillment occurred.
  254. # Typically this is the address of the warehouse or fulfillment center.
  255. type FulfillmentOriginAddress {
  256. # The street address of the fulfillment location.
  257. address1: String
  258. # The second line of the address. Typically the number of the apartment, suite, or unit.
  259. address2: String
  260. # The city in which the fulfillment location is located.
  261. city: String
  262. # The country code of the fulfillment location.
  263. countryCode: String!
  264. # The province code of the fulfillment location.
  265. provinceCode: String
  266. # The zip code of the fulfillment location.
  267. zip: String
  268. }
  269. # Represents the destination where the items should be sent upon fulfillment.
  270. type FulfillmentOrderDestination implements Node {
  271. # The first line of the address of the destination.
  272. address1: String
  273. # The second line of the address of the destination.
  274. address2: String
  275. # The city of the destination.
  276. city: String
  277. # The company of the destination.
  278. company: String
  279. # The two-letter country code of the destination.
  280. countryCode: CountryCode
  281. # The email of the customer at the destination.
  282. email: String
  283. # The first name of the customer at the destination.
  284. firstName: String
  285. # A globally-unique identifier.
  286. id: ID!
  287. # The last name of the customer at the destination.
  288. lastName: String
  289. # The phone number of the customer at the destination.
  290. phone: String
  291. # The province of the destination.
  292. province: String
  293. # The ZIP code of the destination.
  294. zip: String
  295. }
  296. # A fulfillment hold currently applied on a fulfillment order.
  297. type FulfillmentHold {
  298. # The reason for the fulfillment hold.
  299. reason: FulfillmentHoldReason!
  300. # Additional information about the fulfillment hold reason.
  301. reasonNotes: String
  302. }
  303. # The international duties relevant to a fulfillment order.
  304. type FulfillmentOrderInternationalDuties {
  305. # The method of duties payment. Example values: DDP, DAP.
  306. incoterm: String!
  307. }
  308. # One of the actions that the fulfillment order supports in its current state.
  309. type FulfillmentOrderSupportedAction {
  310. # The action value.
  311. action: FulfillmentOrderAction!
  312. # The external URL to be used to initiate the fulfillment process outside Shopify.
  313. # Applicable only when the action value is EXTERNAL.
  314. externalUrl: URL
  315. }
  316. # The fulfillment event that describes the fulfilllment status at a particular time.
  317. type FulfillmentEvent implements Node {
  318. # The time at which this fulfillment event happened.
  319. happenedAt: DateTime!
  320. # A globally-unique identifier.
  321. id: ID!
  322. # The status of this fulfillment event.
  323. status: FulfillmentEventStatus!
  324. }
  325. # Represents a line item from an order that's included in a fulfillment.
  326. type FulfillmentLineItem implements Node {
  327. # The total price after discounts are applied in shop and presentment currencies.
  328. discountedTotalSet: MoneyBag!
  329. # A globally-unique identifier.
  330. id: ID!
  331. # The associated order's line item.
  332. lineItem: LineItem!
  333. # The total price before discounts are applied in shop and presentment currencies.
  334. originalTotalSet: MoneyBag!
  335. # Number of line items in the fulfillment.
  336. quantity: Int
  337. }
  338. # Associates an order line item with quantities requiring fulfillment from the respective fulfillment order.
  339. type FulfillmentOrderLineItem implements Node {
  340. # A globally-unique identifier.
  341. id: ID!
  342. # The associated order line item.
  343. lineItem: LineItem!
  344. # The number of units remaining to be fulfilled.
  345. remainingQuantity: Int!
  346. # The total number of units to be fulfilled.
  347. totalQuantity: Int!
  348. # Warning messages for a fulfillment order line item.
  349. warnings: [FulfillmentOrderLineItemWarning!]!
  350. }
  351. # A fulfillment order line item warning. For example, a warning about why a fulfillment request was rejected.
  352. type FulfillmentOrderLineItemWarning {
  353. # The description of warning.
  354. description: String
  355. # The title of warning.
  356. title: String
  357. }
  358. # A location that a fulfillment order can potentially move to.
  359. type FulfillmentOrderLocationForMove {
  360. # The location being considered as the fulfillment order's new assigned location.
  361. location: Location!
  362. # A human-readable string with the reason why the fulfillment order, or some of its line items, can't be
  363. # moved to the location.
  364. message: String
  365. # Whether the fulfillment order can be moved to the location.
  366. movable: Boolean!
  367. }
  368. # Represents a request made by the merchant to a fulfillment service for a fulfillment order.
  369. type FulfillmentOrderMerchantRequest implements Node {
  370. # A globally-unique identifier.
  371. id: ID!
  372. # The kind of request made.
  373. kind: FulfillmentOrderMerchantRequestKind!
  374. # The optional message that the merchant included in the request.
  375. message: String
  376. # Additional options requested by the merchant. These depend on the kind of the request.
  377. # For example, for a FULFILLMENT_REQUEST, one option is notify_customer, which indicates whether the
  378. # merchant intends to notify the customer upon fulfillment. The fulfillment service can then set
  379. # notifyCustomer when making calls to FulfillmentCreateV2.
  380. requestOptions: JSON
  381. # The response from the fulfillment service.
  382. responseData: JSON
  383. # The timestamp when the request was made.
  384. sentAt: DateTime!
  385. }
  386. # An auto-generated type for paginating through multiple FulfillmentEvents.
  387. type FulfillmentEventConnection {
  388. # A list of edges.
  389. edges: [FulfillmentEventEdge!]!
  390. # A list of the nodes contained in FulfillmentEventEdge.
  391. nodes: [FulfillmentEvent!]!
  392. # Information to aid in pagination.
  393. pageInfo: PageInfo!
  394. }
  395. # An auto-generated type which holds one FulfillmentEvent and a cursor during pagination.
  396. type FulfillmentEventEdge {
  397. # A cursor for use in pagination.
  398. cursor: String!
  399. # The item at the end of FulfillmentEventEdge.
  400. node: FulfillmentEvent!
  401. }
  402. # An auto-generated type for paginating through multiple FulfillmentLineItems.
  403. type FulfillmentLineItemConnection {
  404. # A list of edges.
  405. edges: [FulfillmentLineItemEdge!]!
  406. # A list of the nodes contained in FulfillmentLineItemEdge.
  407. nodes: [FulfillmentLineItem!]!
  408. # Information to aid in pagination.
  409. pageInfo: PageInfo!
  410. }
  411. # An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination.
  412. type FulfillmentLineItemEdge {
  413. # A cursor for use in pagination.
  414. cursor: String!
  415. # The item at the end of FulfillmentLineItemEdge.
  416. node: FulfillmentLineItem!
  417. }
  418. # An auto-generated type for paginating through multiple FulfillmentOrders.
  419. type FulfillmentOrderConnection {
  420. # A list of edges.
  421. edges: [FulfillmentOrderEdge!]!
  422. # A list of the nodes contained in FulfillmentOrderEdge.
  423. nodes: [FulfillmentOrder!]!
  424. # Information to aid in pagination.
  425. pageInfo: PageInfo!
  426. }
  427. # An auto-generated type which holds one FulfillmentOrder and a cursor during pagination.
  428. type FulfillmentOrderEdge {
  429. # A cursor for use in pagination.
  430. cursor: String!
  431. # The item at the end of FulfillmentOrderEdge.
  432. node: FulfillmentOrder!
  433. }
  434. # An auto-generated type for paginating through multiple Fulfillments.
  435. type FulfillmentConnection {
  436. # A list of edges.
  437. edges: [FulfillmentEdge!]!
  438. # A list of the nodes contained in FulfillmentEdge.
  439. nodes: [Fulfillment!]!
  440. # Information to aid in pagination.
  441. pageInfo: PageInfo!
  442. }
  443. # An auto-generated type which holds one Fulfillment and a cursor during pagination.
  444. type FulfillmentEdge {
  445. # A cursor for use in pagination.
  446. cursor: String!
  447. # The item at the end of FulfillmentEdge.
  448. node: Fulfillment!
  449. }
  450. # An auto-generated type for paginating through multiple FulfillmentOrderLineItems.
  451. type FulfillmentOrderLineItemConnection {
  452. # A list of edges.
  453. edges: [FulfillmentOrderLineItemEdge!]!
  454. # A list of the nodes contained in FulfillmentOrderLineItemEdge.
  455. nodes: [FulfillmentOrderLineItem!]!
  456. # Information to aid in pagination.
  457. pageInfo: PageInfo!
  458. }
  459. # An auto-generated type which holds one FulfillmentOrderLineItem and a cursor during pagination.
  460. type FulfillmentOrderLineItemEdge {
  461. # A cursor for use in pagination.
  462. cursor: String!
  463. # The item at the end of FulfillmentOrderLineItemEdge.
  464. node: FulfillmentOrderLineItem!
  465. }
  466. # An auto-generated type for paginating through multiple FulfillmentOrderLocationForMoves.
  467. type FulfillmentOrderLocationForMoveConnection {
  468. # A list of edges.
  469. edges: [FulfillmentOrderLocationForMoveEdge!]!
  470. # A list of the nodes contained in FulfillmentOrderLocationForMoveEdge.
  471. nodes: [FulfillmentOrderLocationForMove!]!
  472. # Information to aid in pagination.
  473. pageInfo: PageInfo!
  474. }
  475. # An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination.
  476. type FulfillmentOrderLocationForMoveEdge {
  477. # A cursor for use in pagination.
  478. cursor: String!
  479. # The item at the end of FulfillmentOrderLocationForMoveEdge.
  480. node: FulfillmentOrderLocationForMove!
  481. }
  482. # An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests.
  483. type FulfillmentOrderMerchantRequestConnection {
  484. # A list of edges.
  485. edges: [FulfillmentOrderMerchantRequestEdge!]!
  486. # A list of the nodes contained in FulfillmentOrderMerchantRequestEdge.
  487. nodes: [FulfillmentOrderMerchantRequest!]!
  488. # Information to aid in pagination.
  489. pageInfo: PageInfo!
  490. }
  491. # An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination.
  492. type FulfillmentOrderMerchantRequestEdge {
  493. # A cursor for use in pagination.
  494. cursor: String!
  495. # The item at the end of FulfillmentOrderMerchantRequestEdge.
  496. node: FulfillmentOrderMerchantRequest!
  497. }