Create a medicine photo upload URL
Admin, inventory manager, or branch manager. Returns a presigned medicine photo upload URL. The key sits under the medicines prefix and allows JPEG, PNG, or WebP photos of 5 MB or less.
POST
/api/v1/images/medicines/upload-urlAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Request body
requiredapplication/jsoncontent_typestringrequiredmin length 1
size_bytesintegerrequiredmax 9007199254740991
Responses
200
The presigned upload and the key it targets
keystringrequireduploadUrlstringrequiredpublicUrlstringrequired400
The size is not a positive whole number, the content type is not JPEG, PNG, or WebP, or the photo is more than 5 MB
detailstringrequired401
Not authenticated
detailstringrequired403
Caller is not an admin, inventory manager, or branch manager
detailstringrequired500
Image storage is not configured
detailstringrequired