Skip to main content
PUT
/
medications
/
bulk
Bulk Update Medications
curl --request PUT \
  --url https://api.decodahealth.com/medications/bulk \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "updates": [
    {
      "id": "<string>",
      "name": "<string>",
      "unit": "AMPOULES",
      "brandName": "<string>",
      "price": 123,
      "cost": 123,
      "category": "<string>",
      "sortOrder": 123,
      "allowCustomPricing": true
    }
  ]
}
'
[
  {
    "name": "<string>",
    "allowCustomPricing": true,
    "id": "<string>",
    "createdDate": "2023-11-07T05:31:56Z",
    "isPhysical": true,
    "isArchived": true,
    "unit": "AMPOULES",
    "brandName": "<string>",
    "description": "<string>",
    "price": 0,
    "cost": 123,
    "category": "<string>",
    "internalNotes": "<string>",
    "sortOrder": 123,
    "isUsedAsTemplate": false,
    "externalId": "<string>",
    "templateAmount": 123,
    "templateAdministrationLocation": "<string>",
    "templateFrequency": "<string>",
    "templateQuantity": 123,
    "templateComment": "<string>",
    "templateLotNumber": "<string>",
    "updatedDate": "2023-11-07T05:31:56Z",
    "template": {
      "name": "<string>",
      "id": "<string>",
      "amount": 123,
      "unit": "AMPOULES",
      "administrationLocation": "<string>",
      "frequency": "<string>",
      "quantity": 1,
      "comment": "<string>",
      "lotNumber": "<string>"
    },
    "stocks": [
      {
        "itemId": "<string>",
        "stockId": "<string>",
        "quantityUsed": 123,
        "stock": {
          "name": "<string>",
          "unit": "AMPOULES",
          "id": "<string>",
          "description": "<string>",
          "notes": "<string>",
          "category": "<string>",
          "minStockLevel": 123,
          "isArchived": false,
          "shipments": [
            {
              "stockId": "<string>",
              "supplierId": "<string>",
              "locationId": "<string>",
              "quantity": 123,
              "remainingQuantity": 123,
              "locationName": "<string>",
              "id": "<string>",
              "poLineItemId": "<string>",
              "lotNumber": "<string>",
              "expiryDate": "2023-11-07T05:31:56Z",
              "sku": "<string>",
              "actualConversionFactor": 123,
              "cost": 123,
              "supplier": {
                "name": "<string>",
                "description": "<string>",
                "website": "<string>",
                "email": "<string>",
                "preferredContactMethod": "<string>",
                "phoneNumber": "<string>",
                "addressLineOne": "<string>",
                "addressLineTwo": "<string>",
                "city": "<string>",
                "state": "<string>",
                "zipCode": "<string>",
                "country": "<string>",
                "shipmentTime": 123,
                "isArchived": false,
                "defaultNotes": [
                  {
                    "content": "<string>",
                    "id": "<string>",
                    "supplierId": "<string>",
                    "name": "<string>"
                  }
                ],
                "id": "<string>"
              },
              "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
updates
BulkMedicationUpdateItem · object[]
required
Maximum array length: 200

Response

Successful Response

name
string
required
allowCustomPricing
boolean
required
id
string
required
createdDate
string<date-time>
required
isPhysical
boolean
required
isArchived
boolean
required
unit
enum<string> | null
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
brandName
string | null
description
string | null
price
integer
default:0
cost
integer | null
category
string | null
internalNotes
string | null
sortOrder
integer | null
isUsedAsTemplate
boolean
default:false
externalId
string | null
templateAmount
number | null
templateAdministrationLocation
string | null
templateFrequency
string | null
templateQuantity
number | null
templateComment
string | null
templateLotNumber
string | null
updatedDate
string<date-time> | null
template
MedicationTemplateSummary · object

Schema for returning medication template information.

stocks
ItemStockDetail · object[] | null