Note: StockEntry, StockRemoval, and StockTransfer are aliases of StockAdjustment. They use the same input types but require different permissions.
StockAdjustment Mutations
CreateStockAdjustment
CreateStockAdjustmentCreates a new stock adjustment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | StockAdjustmentInput! | Adjustment data. |
Example Query:
mutation CreateStockAdjustment($input: StockAdjustmentInput!) {
CreateStockAdjustment(input: $input) {
id
label
status
}
}UpdateStockAdjustment
UpdateStockAdjustmentUpdates an existing stock adjustment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the adjustment. |
input | StockAdjustmentInput! | Updated data. |
DeleteStockAdjustment / DeleteStockAdjustments
DeleteStockAdjustment / DeleteStockAdjustmentsDeletes one or multiple stock adjustments.
DuplicateStockAdjustment
DuplicateStockAdjustmentCreates a copy of the specified stock adjustment.
GenerateStockAdjustmentNumber
GenerateStockAdjustmentNumberGenerates the next available stock adjustment label.
StockEntry Mutations
StockEntry mutations require
stock_entries.createorstock_entries.updatepermission.
CreateStockEntry
CreateStockEntryCreates a new stock entry (incoming stock).
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | StockAdjustmentInput! | Entry data. |
Example Query:
mutation CreateStockEntry($input: StockAdjustmentInput!) {
CreateStockEntry(input: $input) {
id
label
status
}
}UpdateStockEntry
UpdateStockEntryUpdates an existing stock entry.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the entry. |
input | StockAdjustmentInput! | Updated data. |
DeleteStockEntry / DeleteStockEntries
DeleteStockEntry / DeleteStockEntriesDeletes one or multiple stock entries.
GenerateStockEntryNumber
GenerateStockEntryNumberGenerates the next available stock entry label.
StockRemoval Mutations
StockRemoval mutations require
stock_removals.createorstock_removals.updatepermission.
CreateStockRemoval
CreateStockRemovalCreates a new stock removal (outgoing stock).
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | StockAdjustmentInput! | Removal data. |
Example Query:
mutation CreateStockRemoval($input: StockAdjustmentInput!) {
CreateStockRemoval(input: $input) {
id
label
status
}
}UpdateStockRemoval
UpdateStockRemovalUpdates an existing stock removal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the removal. |
input | StockAdjustmentInput! | Updated data. |
DeleteStockRemoval / DeleteStockRemovals
DeleteStockRemoval / DeleteStockRemovalsDeletes one or multiple stock removals.
GenerateStockRemovalNumber
GenerateStockRemovalNumberGenerates the next available stock removal label.
StockTransfer Mutations
StockTransfer mutations require
stock_transfers.createorstock_transfers.updatepermission.
CreateStockTransfer
CreateStockTransferCreates a new stock transfer (between locations).
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | StockAdjustmentInput! | Transfer data. |
Example Query:
mutation CreateStockTransfer($input: StockAdjustmentInput!) {
CreateStockTransfer(input: $input) {
id
label
status
to_location { id label }
}
}UpdateStockTransfer
UpdateStockTransferUpdates an existing stock transfer.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the transfer. |
input | StockAdjustmentInput! | Updated data. |
DeleteStockTransfer / DeleteStockTransfers
DeleteStockTransfer / DeleteStockTransfersDeletes one or multiple stock transfers.
GenerateStockTransferNumber
GenerateStockTransferNumberGenerates the next available stock transfer label.
Input Data Types
StockAdjustmentInput
StockAdjustmentInput| Field | Type | Description |
|---|---|---|
id | Int | ID. |
label | String | Stock adjustment number. |
notes | String | Private notes. |
status | StockAdjustmentStatus | Status. |
dated_at | Date | Document date. |
to_location | LocationInput | Destination location (for transfers). |
manufacturing_order_id | Int | ID of related manufacturing order. |
manufacturing_order_batch_id | Int | ID of related manufacturing batch. |
orders | OrderStockAdjustmentInput | Linked sales orders. |
line_items | [LineItemStockAdjustmentInput] | Items list. |
pdf_template | PdfTemplateInput | PDF design. |
files | [FileInput] | Attachments. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
OrderStockAdjustmentInput
OrderStockAdjustmentInput| Field | Type | Description |
|---|---|---|
data | [OrderInput] | List of orders data. |
Enums
StockAdjustmentStatus
StockAdjustmentStatus| Value | Description |
|---|---|
unpublished | Draft status (no stock impact). |
active | Published and evolving. |
completed | Adjustment finalized and confirmed. |
cancelled | Document voided. |
