Skip to main content
POST
Issue stock

Headers

Prefer
enum<string>

Preference

Available options:
params=single-object

Body

Hand stock to a person, a project, a department, a Cost Center or an asset.

Exactly one recipient: stock that went to one place recorded as having gone to two is a cost counted twice. The movement carries the store's moving average, so spend by recipient is a sum over the ledger; no budget is charged.

Stock is either used up or expected back. Left unsaid, the part's own consumable setting decides; used-up stock is never listed as still out and cannot be returned.

Where consumables are billed, the issue also records who it was drawn on behalf of: the user named, or the caller when none is. p_stock_rate_card_id hands out one rate card's stock and the issue is billed on that card; left unsaid, the stock held longest goes first.

Stock going to a project names at least one of its open tasks in p_project_tasks, a list of task ids in the order chosen, and the project may then be left out. The issue is split equally across the tasks, and where consumables are billed each task is billed an equal share.

p_part_id
string<uuid>
required
p_quantity
number<numeric>
required
p_warehouse_id
string<uuid>
required
p_asset_id
string<uuid>
p_client_operation_id
string<uuid>
p_consumed
boolean<boolean>
p_cost_center_id
string<uuid>
p_department_id
string<uuid>
p_device_id
string<uuid>
p_drawn_for_user_id
string<uuid>
p_notes
string<text>
p_project_id
string<uuid>
p_project_tasks
string<jsonb>
p_reason_code
string<text>
p_stock_rate_card_id
string<uuid>
p_to_worker_id
string<uuid>

Response

200

OK