katana_public_api_client.api.stock_adjustment.create_stock_adjustment¶
katana_public_api_client.api.stock_adjustment.create_stock_adjustment
¶
Classes¶
Functions¶
asyncio(*, client, body)
async
¶
Create a stock adjustment
Creates a new stock adjustment to correct inventory levels.
Parameters:
-
body(CreateStockAdjustmentRequest) –Request payload for creating a new stock adjustment to correct inventory levels Example: {'reference_no': 'SA-2024-003', 'location_id': 1, 'adjustment_date': '2024-01-17T14:30:00.000Z', 'reason': 'Cycle count correction', 'additional_info': 'Q1 2024 physical inventory', 'status': 'DRAFT', 'stock_adjustment_rows': [{'variant_id': 501, 'quantity': 100, 'cost_per_unit': 123.45}, {'variant_id': 502, 'quantity': -25, 'cost_per_unit': 234.56}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
DetailedErrorResponse | ErrorResponse | StockAdjustment | None–Union[DetailedErrorResponse, ErrorResponse, StockAdjustment]
Source code in katana_public_api_client/api/stock_adjustment/create_stock_adjustment.py
asyncio_detailed(*, client, body)
async
¶
Create a stock adjustment
Creates a new stock adjustment to correct inventory levels.
Parameters:
-
body(CreateStockAdjustmentRequest) –Request payload for creating a new stock adjustment to correct inventory levels Example: {'reference_no': 'SA-2024-003', 'location_id': 1, 'adjustment_date': '2024-01-17T14:30:00.000Z', 'reason': 'Cycle count correction', 'additional_info': 'Q1 2024 physical inventory', 'status': 'DRAFT', 'stock_adjustment_rows': [{'variant_id': 501, 'quantity': 100, 'cost_per_unit': 123.45}, {'variant_id': 502, 'quantity': -25, 'cost_per_unit': 234.56}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[DetailedErrorResponse | ErrorResponse | StockAdjustment]–Response[Union[DetailedErrorResponse, ErrorResponse, StockAdjustment]]
Source code in katana_public_api_client/api/stock_adjustment/create_stock_adjustment.py
sync(*, client, body)
¶
Create a stock adjustment
Creates a new stock adjustment to correct inventory levels.
Parameters:
-
body(CreateStockAdjustmentRequest) –Request payload for creating a new stock adjustment to correct inventory levels Example: {'reference_no': 'SA-2024-003', 'location_id': 1, 'adjustment_date': '2024-01-17T14:30:00.000Z', 'reason': 'Cycle count correction', 'additional_info': 'Q1 2024 physical inventory', 'status': 'DRAFT', 'stock_adjustment_rows': [{'variant_id': 501, 'quantity': 100, 'cost_per_unit': 123.45}, {'variant_id': 502, 'quantity': -25, 'cost_per_unit': 234.56}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
DetailedErrorResponse | ErrorResponse | StockAdjustment | None–Union[DetailedErrorResponse, ErrorResponse, StockAdjustment]
Source code in katana_public_api_client/api/stock_adjustment/create_stock_adjustment.py
sync_detailed(*, client, body)
¶
Create a stock adjustment
Creates a new stock adjustment to correct inventory levels.
Parameters:
-
body(CreateStockAdjustmentRequest) –Request payload for creating a new stock adjustment to correct inventory levels Example: {'reference_no': 'SA-2024-003', 'location_id': 1, 'adjustment_date': '2024-01-17T14:30:00.000Z', 'reason': 'Cycle count correction', 'additional_info': 'Q1 2024 physical inventory', 'status': 'DRAFT', 'stock_adjustment_rows': [{'variant_id': 501, 'quantity': 100, 'cost_per_unit': 123.45}, {'variant_id': 502, 'quantity': -25, 'cost_per_unit': 234.56}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[DetailedErrorResponse | ErrorResponse | StockAdjustment]–Response[Union[DetailedErrorResponse, ErrorResponse, StockAdjustment]]