---
title: "Create a stock movement"
method: POST
path: "/maintenance/parts/stock-movements"
tags: ["Maintenance"]
---

# Create a stock movement

`POST /maintenance/parts/stock-movements`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/maintenance/parts/stock-movements`
- Auth: HTTP bearer

Records a receive, transfer, scrap, or adjust stock movement against a part's inventory and returns the resulting inventory location(s). Not idempotent — retrying a request that already succeeded records the movement again.

 <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Parts** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Request body

- CreateStockMovementActionServiceCreateStockMovementRequestBody: Request body for the CreateStockMovement action
  - `batch` string: Batch or lot identifier the movement applies to, if the part is batch-tracked.
  - `fromPlaceId` string: Unique identifier of the place linked to the maintenance site the inventory is transferred out of. Transfer only.
  - `happenedAtTime` string: Time when the movement occurred. Defaults to the current time if not provided.
  - `movementType` string, required: Type of stock movement to record. Must be one of Receive, Transfer, Scrap, or Adjust; Unknown is rejected.
  - `notes` string: Notes explaining the movement. Scrap and adjust only.
  - `partSamsaraId` string, required: Unique identifier of the part definition the movement applies to.
  - `placeId` string: Unique identifier of the place linked to the maintenance site the movement targets. Required for receive, scrap, and adjust; rejected for transfer (use fromPlaceId and toPlaceId).
  - `purchaseOrder` string: Purchase order reference for the received inventory. Receive only.
  - `quantity` number, double, required: Quantity moved, in the part's unit of measure. Positive magnitude for receive, transfer, and scrap; signed delta for adjust.
  - `toPlaceId` string: Unique identifier of the place linked to the maintenance site the inventory is transferred into. Transfer only.
  - `unitCost` EntityCreateStockMovementMoneyInputTypeRequestBody: Money object
    - `amount` string, required: Monetary amount as a decimal string in major currency units (e.g. "24.50").
    - `currency` string, required: ISO 4217 currency code, lowercased (e.g. "usd").
  - `vendorId` string: Unique identifier of the vendor the inventory was received from. Receive only.

## Response `200`

OK response.

- CreateStockMovementActionServiceCreateStockMovementResponseBody
  - `data` CreateStockMovementResponseObjectTypeResponseBody, required: Response for the CreateStockMovement action
    - `destinationLocation` EntityCreateStockMovementStockMovementLocationTypeResponseBody: StockMovementLocation object
      - `aisle` string: Aisle within the location where the part is stored.
      - `availableQuantity` number, double: Quantity available to be consumed at this location after the movement.
      - `bin` string: Bin within the location where the part is stored.
      - `createdAtTime` string: Time when the inventory level record was created.
      - `currentQuantity` number, double: Total physical quantity on hand at this location after the movement.
      - `id` string: Unique identifier for the part inventory level record.
      - `isCostTracked` boolean: Whether costing is tracked at this location.
      - `isLowStock` boolean: Whether the available quantity is greater than zero and at or below the reorder threshold.
      - `maxStockLevel` number, double: Maximum quantity to keep in stock at this location.
      - `minStockLevel` number, double: Minimum quantity to keep in stock at this location.
      - `partSamsara` string: Unique identifier for the part definition these inventory levels are tracked for.
      - `place` string: Unique identifier for the place linked to the maintenance site holding this inventory.
      - `reorderQuantity` number, double: Quantity to reorder when stock reaches the reorder threshold.
      - `reorderThreshold` number, double: Available quantity at or below which the part should be reordered at this location.
      - `reservedQuantity` number, double: Quantity reserved against work orders at this location.
      - `row` string: Row within the location where the part is stored.
      - `unitCost` EntityCreateStockMovementMoneyTypeResponseBody: Money object
        - `amount` string: Monetary amount as a decimal string in major currency units (e.g. "24.50").
        - `currency` string: ISO 4217 currency code, lowercased (e.g. "usd").
      - `unitOfMeasureType` string: Unit of measure that the quantity fields on this record are expressed in.
      - `updatedAtTime` string: Time when the inventory level record was last updated.
    - `sourceLocation` EntityCreateStockMovementStockMovementLocationTypeResponseBody: StockMovementLocation object
      - `aisle` string: Aisle within the location where the part is stored.
      - `availableQuantity` number, double: Quantity available to be consumed at this location after the movement.
      - `bin` string: Bin within the location where the part is stored.
      - `createdAtTime` string: Time when the inventory level record was created.
      - `currentQuantity` number, double: Total physical quantity on hand at this location after the movement.
      - `id` string: Unique identifier for the part inventory level record.
      - `isCostTracked` boolean: Whether costing is tracked at this location.
      - `isLowStock` boolean: Whether the available quantity is greater than zero and at or below the reorder threshold.
      - `maxStockLevel` number, double: Maximum quantity to keep in stock at this location.
      - `minStockLevel` number, double: Minimum quantity to keep in stock at this location.
      - `partSamsara` string: Unique identifier for the part definition these inventory levels are tracked for.
      - `place` string: Unique identifier for the place linked to the maintenance site holding this inventory.
      - `reorderQuantity` number, double: Quantity to reorder when stock reaches the reorder threshold.
      - `reorderThreshold` number, double: Available quantity at or below which the part should be reordered at this location.
      - `reservedQuantity` number, double: Quantity reserved against work orders at this location.
      - `row` string: Row within the location where the part is stored.
      - `unitCost` EntityCreateStockMovementMoneyTypeResponseBody: Money object
        - `amount` string: Monetary amount as a decimal string in major currency units (e.g. "24.50").
        - `currency` string: ISO 4217 currency code, lowercased (e.g. "usd").
      - `unitOfMeasureType` string: Unit of measure that the quantity fields on this record are expressed in.
      - `updatedAtTime` string: Time when the inventory level record was last updated.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

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