Skip to main content
POST
/
inventory
/
stocks
/
drawdown
Drawdown Stock
curl --request POST \
  --url https://api.decodahealth.com/inventory/stocks/drawdown \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "quantity": 123,
  "stockId": "<string>",
  "shipmentIds": [
    "<string>"
  ],
  "note": "<string>"
}
'
{
  "name": "<string>",
  "unit": "AMPOULES",
  "id": "<string>",
  "description": "<string>",
  "notes": "<string>",
  "category": "<string>",
  "isArchived": false,
  "shipments": [
    {
      "stockId": "<string>",
      "supplierId": "<string>",
      "locationId": "<string>",
      "quantity": 123,
      "remainingQuantity": 123,
      "locationName": "<string>",
      "id": "<string>",
      "lotNumber": "<string>",
      "expiryDate": "2023-11-07T05:31:56Z",
      "sku": "<string>",
      "cost": 123,
      "supplier": {
        "name": "<string>",
        "id": "<string>",
        "description": "<string>",
        "website": "<string>",
        "email": "<string>",
        "preferredContactMethod": "<string>",
        "phoneNumber": "<string>",
        "addressLineOne": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>",
        "country": "<string>",
        "isArchived": false
      },
      "createdDate": "2023-11-07T05:31:56Z",
      "note": "<string>"
    }
  ]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
quantity
number
required

Quantity to drawdown

stockId
string
required

ID of the stock

shipmentIds
string[] | null

Optional IDs of the shipments

note
string | null

Optional note about the drawdown

Response

Successful Response

name
string
required

Name of the stock

unit
enum<string>
required

Unit of measurement

Available options:
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
id
string

Unique identifier for the stock

description
string | null

Optional description of the stock

notes
string | null

Notes about the stock

category
string | null

Category name (references category.name)

isArchived
boolean
default:false

Whether the stock is archived

shipments
Shipment · object[] | null

Shipments in the stock