fulfillment.graphql 19 KB

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