create_stock_adjustment
Modify inventory quantities for products by creating stock adjustments with specified locations, products, quantities, and adjustment reasons.
Instructions
Create a stock adjustment to modify inventory quantities for one or more products
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adjustmentDate | No | Date of adjustment (ISO format) | |
| adjustmentReasonId | No | Reason ID for the adjustment | |
| lines | Yes | Array of products and quantities to adjust | |
| locationId | Yes | Location ID where adjustment occurs | |
| notes | No | Notes about the adjustment | |
| stockAdjustmentId | Yes | UUID for the adjustment (generate with crypto.randomUUID()) |
Input Schema (JSON Schema)
{
"properties": {
"adjustmentDate": {
"description": "Date of adjustment (ISO format)",
"type": "string"
},
"adjustmentReasonId": {
"description": "Reason ID for the adjustment",
"type": "string"
},
"lines": {
"description": "Array of products and quantities to adjust",
"items": {
"additionalProperties": false,
"properties": {
"productId": {
"description": "Product ID being adjusted",
"type": "string"
},
"quantity": {
"description": "Quantity to adjust (can be negative for reductions)",
"type": "number"
}
},
"required": [
"productId",
"quantity"
],
"type": "object"
},
"type": "array"
},
"locationId": {
"description": "Location ID where adjustment occurs",
"type": "string"
},
"notes": {
"description": "Notes about the adjustment",
"type": "string"
},
"stockAdjustmentId": {
"description": "UUID for the adjustment (generate with crypto.randomUUID())",
"type": "string"
}
},
"required": [
"stockAdjustmentId",
"locationId",
"lines"
],
"type": "object"
}