Attach an uploaded photo to a medicine
Admin, inventory manager, or branch manager. Points a medicine at an already stored photo. The key must sit under the medicines prefix at 5 MB or less, and the medicine must exist.
POST
/api/v1/images/medicines/{medicineId}/imageAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Path parameters
medicineIdstringrequiredThe medicine whose photo changes.
Request body
requiredapplication/jsonimage_keystringrequiredmin length 1
Responses
200
The medicine with its new photo
idstringrequirednamestringrequiredgeneric_namestringrequiredbarcodestringrequiredcategorystringrequiredformstringrequiredstrengthstringrequiredunitstringrequiredselling_pricestringrequiredmax_public_pricestringrequiredstock_quantityintegerrequiredmin -9007199254740991 · max 9007199254740991
low_stock_thresholdintegerrequiredmin -9007199254740991 · max 9007199254740991
requires_prescriptionbooleanrequiredis_controlledbooleanrequiredvat_categorystringrequiredrequires_cold_chainbooleanrequiredsfda_registration_nostringrequiredimage_keystringrequiredimage_urlstringrequiredis_activebooleanrequiredcreated_atstringrequiredupdated_atstringrequired400
The image key is not under the medicines prefix, or the upload is missing or larger than 5 MB
detailstringrequired401
Not authenticated
detailstringrequired403
Caller is not an admin, inventory manager, or branch manager
detailstringrequired404
Medicine not found
detailstringrequired500
Image storage is unavailable
detailstringrequired