Stock Adjustments Queries

Note: StockEntry, StockRemoval, and StockTransfer are aliases of StockAdjustment filtered by type. They return the same StockAdjustment type with different permissions.

StockAdjustment — Returns a single stock adjustment by id

query GetStockAdjustment($id: ID!) {
  StockAdjustment(id: $id) {
    id
    label
    notes
    status
    dated_at
    total_units
    total_cost
    line_items {
      id
      variant { id label }
      quantity
      price
    }
    to_location { id label }
  }
}

StockAdjustments — Returns a list of stock adjustments with sorting and filters

query StockAdjustments(
  $where: QueryStockAdjustmentsWhereWhereConditions,
  $orderBy: [QueryStockAdjustmentsOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  StockAdjustments(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      total_units
    }
  }
}

StockEntry — Returns stock entries (incoming stock)

StockEntry is an alias of StockAdjustment filtered to incoming stock movements. Requires stock_entries.view permission.

StockEntry(id) — Returns a single stock entry by id

query GetStockEntry($id: ID!) {
  StockEntry(id: $id) {
    id
    label
    notes
    status
    dated_at
    total_units
    total_cost
    line_items {
      id
      variant { id label }
      quantity
      price
    }
  }
}

StockEntries — Returns a paginated list of stock entries

query StockEntries(
  $where: QueryStockEntriesWhereWhereConditions,
  $orderBy: [QueryStockEntriesOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  StockEntries(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      total_units
    }
  }
}

StockRemoval — Returns stock removals (outgoing stock)

StockRemoval is an alias of StockAdjustment filtered to outgoing stock movements. Requires stock_removals.view permission.

StockRemoval(id) — Returns a single stock removal by id

query GetStockRemoval($id: ID!) {
  StockRemoval(id: $id) {
    id
    label
    notes
    status
    dated_at
    total_units
    total_cost
    line_items {
      id
      variant { id label }
      quantity
      price
    }
  }
}

StockRemovals — Returns a paginated list of stock removals

query StockRemovals(
  $where: QueryStockRemovalsWhereWhereConditions,
  $orderBy: [QueryStockRemovalsOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  StockRemovals(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      total_units
    }
  }
}

StockTransfer — Returns stock transfers (between locations)

StockTransfer is an alias of StockAdjustment filtered to transfer movements between locations. Requires stock_transfers.view permission.

StockTransfer(id) — Returns a single stock transfer by id

query GetStockTransfer($id: ID!) {
  StockTransfer(id: $id) {
    id
    label
    notes
    status
    dated_at
    total_units
    total_cost
    line_items {
      id
      variant { id label }
      quantity
      price
    }
    to_location { id label }
  }
}

StockTransfers — Returns a paginated list of stock transfers

query StockTransfers(
  $where: QueryStockTransfersWhereWhereConditions,
  $orderBy: [QueryStockTransfersOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  StockTransfers(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      total_units
      to_location { id label }
    }
  }
}

Available fields

FieldTypeDescription
idIntUnique identifier.
labelStringStock adjustment number.
notesStringPrivate notes.
statusStockAdjustmentStatusCurrent status.
dated_atDateDocument date.
total_unitsFloatTotal quantity adjusted.
total_costFloatTotal cost value of the adjustment.
line_items[LineItemStockAdjustment]List of items.
location_labelStringSource warehouse label.
to_locationLocationDestination location (for transfers).
to_location_labelStringDestination warehouse label.
manufacturing_orderManufacturingOrderLinked manufacturing order.
manufacturing_order_batchManufacturingOrderBatchLinked manufacturing batch.
orders_countIntNumber of linked sales orders.
orders[Order]Linked sales orders.
has_batch_numbersBooleanTrue if items have batch tracking.
tracking_completedBooleanTrue if all tracking info is entered.
created_atDateTimeCreation time.
updated_atDateTimeLast update time.
custom_fields[EntityCustomField]Custom fields for this entity.

Filters

The following fields can be used in the where parameter:

id, label, total_units, status, dated_at, created_at, updated_at, to_location_id, variant_id, variant_label, variant_sku, location_id, batch_number_id, has_batch_numbers, tracking_completed.

Example Filters:

FieldExample
id{ "column": "ID", "operator": "EQ", "value": 200050 }
label{ "column": "LABEL", "operator": "LIKE", "value": "%ADJ-2025%" }
status{ "column": "STATUS", "operator": "EQ", "value": "completed" }
variant_id{ "column": "VARIANT_ID", "operator": "EXISTS", "value": 200050 }
variant_sku{ "column": "VARIANT_SKU", "operator": "EQ", "value": "SKU-RED" }
location_id{ "column": "LOCATION_ID", "operator": "EXISTS", "value": 100 }
to_location_id{ "column": "TO_LOCATION_ID", "operator": "EQ", "value": 101 }
dated_at{ "column": "DATED_AT", "operator": "GTE", "value": "2025-01-01" }

Sorting

You can sort results using the orderBy parameter:

  • id
  • label
  • notes
  • total_units
  • status
  • dated_at
  • created_at
  • to_location_id
  • location_label
  • to_location_label

Grouping Options

You can group results using the groupBy parameter for reports:

FieldDescription
idGroup by internal ID.
yearGroup by year of dated_at.
monthGroup by month of dated_at.
dayGroup by day of dated_at.

Enums

StockAdjustmentStatus

ValueDescription
unpublishedDraft status (no stock impact).
activePublished and evolving.
completedAdjustment finalized and confirmed.
cancelledDocument voided.