---
title: "Allocate Stock To Project"
method: POST
path: "/api/v1/materials/inventory/allocate"
tags: ["v1", "Materials"]
---

# Allocate Stock To Project

`POST /api/v1/materials/inventory/allocate`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/materials/inventory/allocate`
- Auth: none declared

Claim shop stock for a project - the financial event, split by lot.

ONE MIRRORED BOM ROW PER LOT CONSUMED, never one row for the whole claim.
A part restocked three times is three lots at three prices under three INY-
POs. Collapsing 12 units into a single row at an averaged price destroys the
only thing that makes a claim auditable: which purchase order the metal on
this job actually came from, and what it truly cost. That trace runs from a
finished weld back to a dock inspection and an MTR, and an average has no
MTR behind it.

So each row carries its OWN lot's po_number and unit_price, and the project
materials table groups them by PO exactly like a vendor purchase - which is
what makes "click through to the receiving log" work with no new screen.

FIFO, oldest lot first: the shop consumes what it bought first, and the cost
it books is the cost that lot was bought at.

## Request body

- AllocateStockBody
  - `material_item_id` integer, required
  - `project_id` integer, required
  - `material_list_id` integer, nullable
  - `qty` number, required
  - `task_id` integer, nullable
  - `bom_node_id` string, nullable
  - `serial_ids` string[], nullable
  - `lot_picks` LotPickBody[], nullable
    - `lot_id` string, required
    - `qty` number, required
  - `new_lot_number` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-14** `0232dd947747`: 3 info
  - added the new optional request property `lot_picks`
  - added the new optional request property `new_lot_number`
  - added the new optional request property `serial_ids`
- **2026-11-09** `d9ef00c0253a`: 1 info
  - added the new optional request property `bom_node_id`

[Operation history](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/changes/api/v1/materials/inventory/allocate/post.md)

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
