---
title: "Update Stock"
method: PUT
path: "/inventory/stocks/update"
tags: ["provider", "inventory"]
---

# Update Stock

`PUT /inventory/stocks/update`

## Headers

- `TENANT` string, required
- `API-KEY` string, required

## Request body

- StockDetailInput[]
  - `id` string — Unique identifier for the stock
  - `name` string, required — Name of the stock
  - `description` string, nullable — Optional description of the stock
  - `notes` string, nullable — Notes about the stock
  - `category` string, nullable — Category name (references category.name)
  - `unit` 'AMPOULES' | 'APPLICATORS' | 'BOTTLES' | 'BOXES' | 'CAPSULES' | 'CUPS' | 'DOSES' | 'G_PER_ML' | 'GRAMS' | 'IU' | 'IU_PER_ML' | 'OUNCES' | 'FLUID_OUNCES' | 'KG' | 'KITS' | 'LITERS' | 'MCG' | 'MG' | 'MG_PER_ML' | 'ML' | 'MMOL' | 'MICROGRAM_PER_ML' | 'PACKS' | 'PAIRS' | 'PATCHES' | 'PERCENTAGE' | 'PIECES' | 'POUCHES' | 'ROLLS' | 'SACHETS' | 'SHEETS' | 'SPRAYS' | 'STRIPS' | 'SYRINGES' | 'TABLETS' | 'TABLETS_PER_DAY' | 'TESTS' | 'TUBES' | 'UNITS' | 'VIALS' | 'TREATMENTS' | 'SESSIONS' | 'PULSES' | 'JOULES' | 'CENTIMETERS' | 'THREAD_COUNT' | 'INJECTIONS' | 'WRINKLE_UNITS' | 'POUNDS' | 'FEET' | 'INCHES', required
  - `isArchived` boolean — Whether the stock is archived
  - `shipments` ShipmentInput[], nullable — Shipments in the stock
    - `id` string — Unique identifier for the shipment
    - `stockId` string, required — ID of the stock
    - `supplierId` string, required — ID of the supplier
    - `locationId` string, required — ID of the location where the shipment was delivered
    - `lotNumber` string, nullable — Optional lot number of the shipment
    - `expiryDate` string, date-time, nullable — Optional expiry date of the shipment
    - `sku` string, nullable — Optional SKU (Stock Keeping Unit)
    - `quantity` number, required — Total quantity
    - `remainingQuantity` number, required — Remaining quantity
    - `cost` integer, nullable — Cost of the shipment in cents
    - `supplier` Supplier
      - `id` string — Unique identifier for the supplier
      - `name` string, required — Name of the supplier
      - `description` string, nullable — Optional description of the supplier
      - `website` string, nullable — Optional website of the supplier
      - `email` string, nullable — Optional email of the supplier
      - `preferredContactMethod` string, nullable — Optional preferred contact method
      - `phoneNumber` string, nullable — Optional phone number of the supplier
      - `addressLineOne` string, nullable — Optional first line of address
      - `addressLineTwo` string, nullable — Optional second line of address
      - `city` string, nullable — Optional city
      - `state` string, nullable — Optional state or province
      - `zipCode` string, nullable — Optional ZIP or postal code
      - `country` string, nullable — Optional country
      - `isArchived` boolean — Whether the supplier is archived
    - `createdDate` string, date-time, nullable — Date and time the shipment was created
    - `note` string, nullable — Optional note for inventory log when updating shipment
  - `items` ItemStock[], nullable — Items in the stock
    - `itemId` string, required — ID of the item
    - `stockId` string, required — ID of the stock
    - `quantityUsed` number, required — Quantity of the item
  - `locationSummaries` StockLocationSummary[], nullable — Stock quantities grouped by location
    - `locationId` string, required — ID of the location
    - `locationName` string, required — Name of the location
    - `totalQuantity` number, required — Total quantity at this location
    - `remainingQuantity` number, required — Remaining quantity at this location
    - `percentage` number, required — Percentage of stock remaining
  - `note` string, nullable — Optional note for inventory log when updating stock

## Response `200`

Successful Response

- StockDetailOutput[]
  - `id` string — Unique identifier for the stock
  - `name` string, required — Name of the stock
  - `description` string, nullable — Optional description of the stock
  - `notes` string, nullable — Notes about the stock
  - `category` string, nullable — Category name (references category.name)
  - `unit` 'AMPOULES' | 'APPLICATORS' | 'BOTTLES' | 'BOXES' | 'CAPSULES' | 'CUPS' | 'DOSES' | 'G_PER_ML' | 'GRAMS' | 'IU' | 'IU_PER_ML' | 'OUNCES' | 'FLUID_OUNCES' | 'KG' | 'KITS' | 'LITERS' | 'MCG' | 'MG' | 'MG_PER_ML' | 'ML' | 'MMOL' | 'MICROGRAM_PER_ML' | 'PACKS' | 'PAIRS' | 'PATCHES' | 'PERCENTAGE' | 'PIECES' | 'POUCHES' | 'ROLLS' | 'SACHETS' | 'SHEETS' | 'SPRAYS' | 'STRIPS' | 'SYRINGES' | 'TABLETS' | 'TABLETS_PER_DAY' | 'TESTS' | 'TUBES' | 'UNITS' | 'VIALS' | 'TREATMENTS' | 'SESSIONS' | 'PULSES' | 'JOULES' | 'CENTIMETERS' | 'THREAD_COUNT' | 'INJECTIONS' | 'WRINKLE_UNITS' | 'POUNDS' | 'FEET' | 'INCHES', required
  - `isArchived` boolean — Whether the stock is archived
  - `shipments` ShipmentOutput[], nullable — Shipments in the stock
    - `id` string — Unique identifier for the shipment
    - `stockId` string, required — ID of the stock
    - `supplierId` string, required — ID of the supplier
    - `locationId` string, required — ID of the location where the shipment was delivered
    - `lotNumber` string, nullable — Optional lot number of the shipment
    - `expiryDate` string, date-time, nullable — Optional expiry date of the shipment
    - `sku` string, nullable — Optional SKU (Stock Keeping Unit)
    - `quantity` number, required — Total quantity
    - `remainingQuantity` number, required — Remaining quantity
    - `cost` integer, nullable — Cost of the shipment in cents
    - `supplier` Supplier
      - `id` string — Unique identifier for the supplier
      - `name` string, required — Name of the supplier
      - `description` string, nullable — Optional description of the supplier
      - `website` string, nullable — Optional website of the supplier
      - `email` string, nullable — Optional email of the supplier
      - `preferredContactMethod` string, nullable — Optional preferred contact method
      - `phoneNumber` string, nullable — Optional phone number of the supplier
      - `addressLineOne` string, nullable — Optional first line of address
      - `addressLineTwo` string, nullable — Optional second line of address
      - `city` string, nullable — Optional city
      - `state` string, nullable — Optional state or province
      - `zipCode` string, nullable — Optional ZIP or postal code
      - `country` string, nullable — Optional country
      - `isArchived` boolean — Whether the supplier is archived
    - `createdDate` string, date-time, nullable — Date and time the shipment was created
    - `note` string, nullable — Optional note for inventory log when updating shipment
    - `locationName` string, nullable, required — Get the location name from the related location object
  - `items` ItemStock[], nullable — Items in the stock
    - `itemId` string, required — ID of the item
    - `stockId` string, required — ID of the stock
    - `quantityUsed` number, required — Quantity of the item
  - `locationSummaries` StockLocationSummary[], nullable — Stock quantities grouped by location
    - `locationId` string, required — ID of the location
    - `locationName` string, required — Name of the location
    - `totalQuantity` number, required — Total quantity at this location
    - `remainingQuantity` number, required — Remaining quantity at this location
    - `percentage` number, required — Percentage of stock remaining
  - `note` string, nullable — Optional note for inventory log when updating stock

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/decodahealth/apis/decoda-api.md) · [All operations](https://skmtc.dev/decodahealth/apis/decoda-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decodahealth/decoda-api/revisions/4939a65a89d2/schema)
