Batch
Requires access scope.
A group of items being processed through a batch workflow.
Anchor to FieldsFields
- createdAt (DateTime!)
- currentStep (BatchStep)
- events (EventConnection!)
- hasTimelineComment (Boolean!)
- id (ID!)
- itemCount (Count!)
- name (String!)
- number (UnsignedInt64)
- status (BatchStatus!)
- steps (BatchStepConnection!)
- updatedAt (DateTime!)
- workflowConfiguration (BatchWorkflowConfiguration!)
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the batch was created.
- Anchor to currentStepcurrent•Batch
Step Step The last step that still has items in progress. Returns the Done step only when all items are in Done.
Show fields
- Anchor to eventsevents•Event
Connection! non-null The list of events associated with the batch.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Show filters
- Anchor to comments•boolean
Whether or not to include comment-events in your search, passing
falsewill exclude comment-events, any other value will include comment-events.falsetrue- Anchor to created_at•time
Filter by the date and time when the event occurred. Event data is retained for 1 year.
created_at:>2025-10-21created_at:<now- Anchor to subject_type•string
The resource type affected by this event. See EventSubjectType for possible values.
PRODUCT_VARIANTPRODUCTCOLLECTION
Example:
Example:
Example:
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Event
Key Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Show enum values
Arguments
- Anchor to hasTimelineCommenthas•Boolean!
Timeline Comment non-null Whether the merchant has added timeline comments to the batch.
- •ID!non-null
A globally-unique ID.
- Anchor to itemCountitem•Count!
Count non-null The total number of items in this batch, summed across every step.
Show fields
- Anchor to namename•String!non-null
The display name of the batch.
- Anchor to numbernumber•Unsigned
Int64 The shop-scoped batch number, if one has been assigned.
- Anchor to statusstatus•Batch
Status! non-null The current status of the batch.
Show enum values
- Anchor to stepssteps•Batch
Step Connection! non-null The steps in this batch.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the batch was last updated.
- Anchor to workflowConfigurationworkflow•Batch
Configuration Workflow Configuration! non-null The batch workflow configuration that this batch uses.
Show fields
Anchor to QueriesQueries
- batch (Batch)
- batches (BatchConnection)
- fulfillmentOrderBatches (BatchConnection)
- •query
Returns a batch for the shop.
Show fields
- •ID!required
The ID of the batch to return.
Arguments
- •ID!
- •query
Returns a paginated list of batches for the shop.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Show filters
- Anchor to assigned_to•id
Filter batches where any step is assigned to this staff member.
assigned_to:12345- Anchor to created_at•time
Filter by creation date and time.
created_at:>'2020-10-21T23:39:20Z'created_at:<nowcreated_at:<='2024'- Anchor to item_count•integer
Filter batches by the number of items they contain.
item_count:0item_count:>5item_count:<=10- Anchor to name•string
Filter batches by name. Quoted values match the whole name, ignoring case. Unquoted values match substrings.
name:2026-04-15name:"Morning picks"- Anchor to status•string
Filter batches by their status.
openin_progressclosedstatus:openstatus:closedstatus:in_progress- Anchor to updated_at•time
Filter batches by their last update date and time. Dates without a timezone use the shop's timezone.
updated_at:>=2026-10-19updated_at:<'2026-10-20T00:00:00Z'
Example:
Example:
Example:
Example:
Valid values:
Example:
Example:
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Batch
Key Sort Keys Default:CREATED_AT Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Show enum values
Arguments
- •query
Returns a paginated list of non-closed batches that can be filtered by fulfillment order attributes.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to fulfillmentOrderQueryfulfillment•String
Order Query A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Show filters
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Show filters
- Anchor to assigned_to•id
Filter batches where any step is assigned to this staff member.
assigned_to:12345- Anchor to created_at•time
Filter by creation date and time.
created_at:>'2020-10-21T23:39:20Z'created_at:<nowcreated_at:<='2024'- Anchor to item_count•integer
Filter batches by the number of items they contain.
item_count:0item_count:>5item_count:<=10- Anchor to name•string
Filter batches by name. Quoted values match the whole name, ignoring case. Unquoted values match substrings.
name:2026-04-15name:"Morning picks"- Anchor to status•string
Filter batches by their status.
openin_progressclosedstatus:openstatus:closedstatus:in_progress- Anchor to updated_at•time
Filter batches by their last update date and time. Dates without a timezone use the shop's timezone.
updated_at:>=2026-10-19updated_at:<'2026-10-20T00:00:00Z'
Example:
Example:
Example:
Example:
Valid values:
Example:
Example:
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Batch
Key Sort Keys Default:CREATED_AT Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Show enum values
Arguments
Anchor to MutationsMutations
- batchAddItems (BatchAddItemsPayload)
- batchAddItemsByName (BatchAddItemsByNamePayload)
- batchClose (BatchClosePayload)
- batchCreate (BatchCreatePayload)
- batchMoveItems (BatchMoveItemsPayload)
- batchRemoveItems (BatchRemoveItemsPayload)
- batchReopen (BatchReopenPayload)
- batchTransferItems (BatchTransferItemsPayload)
- batchUpdate (BatchUpdatePayload)
- •mutation
Adds items to the first step of an existing batch.
Supports an optional idempotency key using the
@idempotentdirective. For more information, see the idempotency documentation.Show payload
- •ID!required
The ID of the batch.
- Anchor to itemIdsitem•[ID!]!
Ids required The IDs of the items to add to the batch. An empty list returns a
NO_ITEMSerror.
Arguments
- •ID!
- •mutation
Adds items to the most recent open or in-progress batch with the given name. An item goes to a different batch with the same name when that batch is full or when the batch workflow's steps don't allow the item in that batch alongside the items it already has. A full batch's overflow goes to a new batch with the same name, never an older one. Concurrent requests with the same name don't create duplicate batches.
Supports an optional idempotency key using the
@idempotentdirective. For more information, see the idempotency documentation.Show payload
- Anchor to itemIdsitem•[ID!]
Ids The items to add. If omitted or null, the matching batch is returned, or an empty batch with the given name is created if none exists. An empty list returns a
NO_ITEMSerror.- Anchor to namename•String!required
The name of the batch to add items to. A batch with this name is created if no eligible batch with the name exists.
- Anchor to workflowIdworkflow•ID
Id The batch workflow to match. If set, only batches that use it are matched. If omitted, matching batches can use any batch workflow, and new batches use the shop's default batch workflow, which is created if it doesn't exist.
Arguments
- •mutation
Closes a batch. Every item must be in the batch workflow's Done step. An empty batch can be closed at any time. Closing a batch cancels any actions that are still running.
Show payload
- •ID!required
The ID of the batch to close.
Arguments
- •ID!
- •mutation
Creates a batch.
Show payload
- Anchor to itemIdsitem•[ID!]
Ids The items to add to the first step during batch creation. If omitted or null, an empty batch is created. An empty list returns a
NO_ITEMSerror.- Anchor to namename•String
The display name for the batch. If omitted, a name is generated automatically.
- Anchor to workflowIdworkflow•ID
Id The batch workflow for the new batch. If omitted, the shop's default batch workflow is used, and it's created if it doesn't exist.
Arguments
- •mutation
Moves items between steps within a batch. Supports an optional idempotency key using the
@idempotentdirective. Retrying with the same key returns the original move outcome without moving items again.Show payload
- Anchor to directiondirection•Batch
Step Move Direction! required The direction to move items (next or previous step).
Show enum values
- •ID!required
The batch's globally unique ID.
- Anchor to itemIdsitem•[ID!]
Ids The items to move. When omitted or null, all items in the step are moved. An empty list may return a
NO_ITEMSerror.- Anchor to stepIdstep•ID!
Id required The step containing the items to move.
Arguments
- •mutation
Removes items from a batch.
Show payload
- •ID!required
The batch's globally unique ID.
- Anchor to targettarget•Batch
Remove Items Target Input! required What to remove. Provide exactly one of
(bulk-remove all items in the step) or(remove specific items).Show input fields
Arguments
- •ID!
- •mutation
Reopens a closed batch.
Show payload
- •ID!required
The ID of the batch to reopen.
Arguments
- •ID!
- •mutation
Transfers items from one batch to another. Items land in the target batch's first step.
Show payload
- Anchor to itemIdsitem•[ID!]
Ids The items to transfer. When omitted or null, all items in the step are transferred. An empty list may return a
NO_ITEMSerror.- Anchor to sourceBatchIdsource•ID!
Batch Id required The batch the items currently belong to.
- Anchor to stepIdstep•ID!
Id required The step in the source batch containing the items to transfer.
- Anchor to targetBatchIdtarget•ID!
Batch Id required The batch to transfer the items to.
Arguments
- •mutation
Updates a batch.
Show payload
- •ID!required
The ID of the batch to update.
- Anchor to namename•String
The new name for the batch.
Arguments
- •ID!
Anchor to InterfacesInterfaces
- CommentEventSubject
- HasEvents
- Node
- •interface
- •interface
- •interface