---
title: "Moves stock for an item from one location to another."
method: POST
path: "/api/v1/items/{id}/stock/move"
tags: ["Items"]
---

# Moves stock for an item from one location to another.

`POST /api/v1/items/{id}/stock/move`

## Request

- Base URL: `https://app.flexonthejob.com`
- URL: `https://app.flexonthejob.com/api/v1/items/{id}/stock/move`
- Auth: HTTP bearer

Requires `ManageInventory` and an `Idempotency-Key` header. Re-points
`quantity` of the oldest available units at `fromLocationId` to
`toLocationId` - the same thing as "Quick move" on the Inventory page, recorded in
each unit's change history. Nothing is created or destroyed; the item's total on hand is
unchanged. Fewer available units than requested answers `409` and moves nothing.
Omit `toLocationId` for the organization's "No Location" bucket. Job sites are refused
at either end (`422`) - stock reaches a job site through a job or a transfer.
Example: `{ "fromLocationId": 1, "toLocationId": 4, "quantity": 3 }`.

## Path parameters

- `id` integer, required

## Request body

- MoveStockRequest: Body of `POST /api/v1/items/{id}/stock/move`: move whole units of an item between two stock locations. Example: `{ "fromLocationId": 1, "toLocationId": 4, "quantity": 3 }`.
  - `fromLocationId` integer: Location the units leave (see `GET /api/v1/locations`). Must hold at least `quantity` available units.
  - `toLocationId` integer, nullable: Location the units arrive at. Omit or null for the organization's "No Location" bucket. Job sites are refused (422) — deliver there through a job or transfer.
  - `quantity` integer: Whole units to move, 1..1000. Oldest units at the source move first.
  - `reason` string, nullable: Optional note recorded in each moved unit's change history. Max 500 characters.

## Response `200`

Stock moved; body carries the confirmation and the item's updated per-location stock.

- StockChangeResponse: Result of a stock adjustment or move, with the item's stock position after the change.
  - `itemId` integer: The item (template) whose stock changed.
  - `message` string: Human-readable confirmation, e.g. `Moved 3 x 'Widget' from 'Main' to 'Van 2'.`
  - `units` integer: Whole units added, removed or moved (always positive).
  - `locationId` integer: For an adjustment: the location adjusted. For a move: the source location.
  - `locationName` string: Name of LocationId.
  - `destinationLocationId` integer, nullable: For a move: the destination location; null for an adjustment.
  - `destinationLocationName` string, nullable: Name of DestinationLocationId; null for an adjustment.
  - `stock` StockSummary: Stock position of an item.
    - `onHand` number, double: Total on hand; same semantics as `onHand`.
    - `byLocation` LocationStock[]: Per-location breakdown of physical rows. Sums to the row count, which may differ from OnHand for oversold or sub-unit items.
      - `locationId` integer: Location id.
      - `locationName` string: Location name.
      - `quantity` integer: Whole item rows at the location (not deleted, not in a job site).

## Other responses

- `400`: Malformed body or missing `Idempotency-Key`.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: No such active item in this organization.
- `409`: Not enough units at the source, the item cannot hold stock, or the key's creator is unknown on this server.
- `422`: Unknown location, a job site at either end, or source and destination are the same.
- `429`: Too Many Requests

---

[API](https://skmtc.dev/flexonthejob/apis/flex-api.md) · [All operations](https://skmtc.dev/flexonthejob/apis/flex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexonthejob/apis/flex-api/revisions/19c8f4d27acf?raw)
