Stock Adjustments Mutations

Note: StockEntry, StockRemoval, and StockTransfer are aliases of StockAdjustment. They use the same input types but require different permissions.

StockAdjustment Mutations

CreateStockAdjustment

Creates a new stock adjustment.

Parameters:

ParameterTypeDescription
inputStockAdjustmentInput!Adjustment data.

Example Query:

mutation CreateStockAdjustment($input: StockAdjustmentInput!) {
  CreateStockAdjustment(input: $input) {
    id
    label
    status
  }
}

UpdateStockAdjustment

Updates an existing stock adjustment.

Parameters:

ParameterTypeDescription
idInt!ID of the adjustment.
inputStockAdjustmentInput!Updated data.

DeleteStockAdjustment / DeleteStockAdjustments

Deletes one or multiple stock adjustments.

DuplicateStockAdjustment

Creates a copy of the specified stock adjustment.

GenerateStockAdjustmentNumber

Generates the next available stock adjustment label.


StockEntry Mutations

StockEntry mutations require stock_entries.create or stock_entries.update permission.

CreateStockEntry

Creates a new stock entry (incoming stock).

Parameters:

ParameterTypeDescription
inputStockAdjustmentInput!Entry data.

Example Query:

mutation CreateStockEntry($input: StockAdjustmentInput!) {
  CreateStockEntry(input: $input) {
    id
    label
    status
  }
}

UpdateStockEntry

Updates an existing stock entry.

Parameters:

ParameterTypeDescription
idInt!ID of the entry.
inputStockAdjustmentInput!Updated data.

DeleteStockEntry / DeleteStockEntries

Deletes one or multiple stock entries.

GenerateStockEntryNumber

Generates the next available stock entry label.


StockRemoval Mutations

StockRemoval mutations require stock_removals.create or stock_removals.update permission.

CreateStockRemoval

Creates a new stock removal (outgoing stock).

Parameters:

ParameterTypeDescription
inputStockAdjustmentInput!Removal data.

Example Query:

mutation CreateStockRemoval($input: StockAdjustmentInput!) {
  CreateStockRemoval(input: $input) {
    id
    label
    status
  }
}

UpdateStockRemoval

Updates an existing stock removal.

Parameters:

ParameterTypeDescription
idInt!ID of the removal.
inputStockAdjustmentInput!Updated data.

DeleteStockRemoval / DeleteStockRemovals

Deletes one or multiple stock removals.

GenerateStockRemovalNumber

Generates the next available stock removal label.


StockTransfer Mutations

StockTransfer mutations require stock_transfers.create or stock_transfers.update permission.

CreateStockTransfer

Creates a new stock transfer (between locations).

Parameters:

ParameterTypeDescription
inputStockAdjustmentInput!Transfer data.

Example Query:

mutation CreateStockTransfer($input: StockAdjustmentInput!) {
  CreateStockTransfer(input: $input) {
    id
    label
    status
    to_location { id label }
  }
}

UpdateStockTransfer

Updates an existing stock transfer.

Parameters:

ParameterTypeDescription
idInt!ID of the transfer.
inputStockAdjustmentInput!Updated data.

DeleteStockTransfer / DeleteStockTransfers

Deletes one or multiple stock transfers.

GenerateStockTransferNumber

Generates the next available stock transfer label.


Input Data Types

StockAdjustmentInput

FieldTypeDescription
idIntID.
labelStringStock adjustment number.
notesStringPrivate notes.
statusStockAdjustmentStatusStatus.
dated_atDateDocument date.
to_locationLocationInputDestination location (for transfers).
manufacturing_order_idIntID of related manufacturing order.
manufacturing_order_batch_idIntID of related manufacturing batch.
ordersOrderStockAdjustmentInputLinked sales orders.
line_items[LineItemStockAdjustmentInput]Items list.
pdf_templatePdfTemplateInputPDF design.
files[FileInput]Attachments.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

OrderStockAdjustmentInput

FieldTypeDescription
data[OrderInput]List of orders data.

Enums

StockAdjustmentStatus

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