Items

Moves stock for an item from one location to another.

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 }.

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

Path parameters

idinteger required

Numeric item id.

Request body

fromLocationIdinteger

Location the units leave (see GET /api/v1/locations). Must hold at least quantity available units.

toLocationIdinteger 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.

quantityinteger

Whole units to move, 1..1000. Oldest units at the source move first.

reasonstring nullable

Optional note recorded in each moved unit's change history. Max 500 characters.

Response

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

itemIdinteger

The item (template) whose stock changed.

messagestring

Human-readable confirmation, e.g. Moved 3 x 'Widget' from 'Main' to 'Van 2'.

unitsinteger

Whole units added, removed or moved (always positive).

locationIdinteger

For an adjustment: the location adjusted. For a move: the source location.

locationNamestring

Name of LocationId.

destinationLocationIdinteger nullable

For a move: the destination location; null for an adjustment.

destinationLocationNamestring nullable

Name of DestinationLocationId; null for an adjustment.

Changes

No recorded changes to this operation across all 1 revision of this API.