Skip to main content
object

Requires read_batches access scope.

A group of items rejected from a batch for the same reason.

•[BatchItemRejectionDetail!]!
non-null

Action-scoped finer-grained rejection details, grouped beneath reason. Empty when no finer detail is available; clients should fall back to message.

Show fields
•Int!
non-null

The number of items rejected for this reason.

•[Batchable!]!
non-null

The items that were rejected for this reason.

Show fields
•String

A human-readable rejection message for this reason.

•BatchItemRejectionReason!
non-null

The reason why the items were rejected from the batch.

Show enum values
•BatchWorkflowStepAction

The batch workflow step action that rejected the items, if the rejection is action-scoped.

Show fields

Was this section helpful?

•mutation

Adds items to the first step of an existing batch.

Supports an optional idempotency key using the @idempotent directive. For more information, see the idempotency documentation.

Show payload

Arguments

•ID!
required

The ID of the batch.

•[ID!]!
required

The IDs of the items to add to the batch. An empty list returns a NO_ITEMS error.


•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 @idempotent directive. For more information, see the idempotency documentation.

Show payload

Arguments

•[ID!]

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_ITEMS error.

•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.

•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.


•mutation

Creates a batch.

Show payload

Arguments

•[ID!]

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_ITEMS error.

•String

The display name for the batch. If omitted, a name is generated automatically.

•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.


•mutation

Moves items between steps within a batch. Supports an optional idempotency key using the @idempotent directive. Retrying with the same key returns the original move outcome without moving items again.

Show payload

Arguments

•BatchStepMoveDirection!
required

The direction to move items (next or previous step).

Show enum values
•ID!
required

The batch's globally unique ID.

•[ID!]

The items to move. When omitted or null, all items in the step are moved. An empty list may return a NO_ITEMS error.

•ID!
required

The step containing the items to move.


•mutation

Transfers items from one batch to another. Items land in the target batch's first step.

Show payload

Arguments

•[ID!]

The items to transfer. When omitted or null, all items in the step are transferred. An empty list may return a NO_ITEMS error.

•ID!
required

The batch the items currently belong to.

•ID!
required

The step in the source batch containing the items to transfer.

•ID!
required

The batch to transfer the items to.



Was this section helpful?