---
title: "Update stock weight/volume for stock in sample element"
method: POST
path: "/api/v1/stocks/{id}/update_stock_amount"
tags: ["Stocks"]
---

# Update stock weight/volume for stock in sample element

`POST /api/v1/stocks/{id}/update_stock_amount`

## Path parameters

- `id` integer, required

## Query parameters

- `token` string, required

## Request body

- UpdateStockAmountInSampleElement
  - `token` string, required
  - `unit_type` string — weight/volume
  - `element_id` integer — the samples element id
  - `amount_used` string — amount_used
  - `unit_type_name` string — unit_type_name
  - `subtract` string — true
  - `sample_id` integer — the sample id

## Response `200`

stock amount updated

## Other responses

- `401` — Error: Unauthorized

---

[API](https://skmtc.net/labguru/apis/labguru-api.md) · [All operations](https://skmtc.net/labguru/apis/labguru-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labguru/labguru-api/revisions/0534e4d70b77/schema)
