PUT api/Village/{village}/Medication/{id}/Photos
Update medication photos. This method MUST be called
with multipart/form-data encoding for the file
The request payload for the image MAY include a pill photo, which MUST have Content-Disposition and Content-Type headers. The 'name' in the Content-Disposition header MUST be "pillphoto":
- Content-Disposition: form-data; name="pillphoto"; filename="whatever-you-want"
- Content-Type: mime/type
- Content-Disposition: form-data; name="labelphoto"; filename="whatever-you-want"
- Content-Type: mime/type
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id | globally unique identifier |
Required |
|
village | string |
None. |
Body Parameters
ApiMedicationPhotoModelName | Description | Type | Additional information |
---|---|---|---|
pillphoto |
The pill photo |
ApiFileUpload |
None. |
labelphoto |
The label photo |
ApiFileUpload |
None. |
RemovePillPhoto |
If true and pillPhoto is null, remove the existing pill photo |
boolean |
None. |
RemoveLabelPhoto |
If true and labelPhoto is null, remove the existing label photo |
boolean |
None. |
Request Formats
application/json, text/json
Sample:
{ "pillphoto": null, "labelphoto": null, "RemovePillPhoto": true, "RemoveLabelPhoto": true }
application/xml
Sample:
text/xml
Sample:
multipart/form-data
Sample:
Response Information
Resource Description
true if the medication was updated successfully
PrimitiveOfBooleanName | Description | Type | Additional information |
---|---|---|---|
value | boolean |
Required |
Response Formats
application/json, text/json
Sample:
{ "value": true }
application/xml, text/xml
Sample:
<PrimitiveOfboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.API.Models"> <value>true</value> </PrimitiveOfboolean>