PUT v1/Article/{articleKey}/media/{mediaKey}/CustomFieldValues
Updates the values in the custom fields for the media matching the specified mediaKey related to the article matching the specified articleKey. This will completely replace all custom field values for the specified media. Any custom fields not listed in fieldValues will have their values removed from the Media.
Roles Allowed
admin, editor
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
articleKey | integer |
Required |
|
mediaKey | integer |
Required |
Body Parameters
Collection of Collection of CustomFieldValuesRequest Formats
application/json, text/json
Sample:
[ [ { "CustomFieldId": 1, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": null, "CustomFieldValue": "Blue" } ] }, { "CustomFieldId": 2, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": 15, "CustomFieldValue": "Versace" } ] }, { "CustomFieldId": 5, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": 15, "CustomFieldValue": "Jacket" } ] } ], [ { "CustomFieldId": 1, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": null, "CustomFieldValue": "Red" }, { "CustomFieldLookupID": null, "CustomFieldValue": "Yellow" } ] }, { "CustomFieldId": 2, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": 15, "CustomFieldValue": "Versace" } ] }, { "CustomFieldId": 5, "CustomFieldName": null, "Values": [ { "CustomFieldLookupID": 15, "CustomFieldValue": "Hat" } ] } ] ]
application/xml, text/xml
Sample:
<ArrayOfArrayOfCustomFieldValues xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bondi.Models.V3.ApiDto"> <ArrayOfCustomFieldValues> <CustomFieldValues> <CustomFieldId>1</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID i:nil="true" /> <CustomFieldValue>Blue</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> <CustomFieldValues> <CustomFieldId>2</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID>15</CustomFieldLookupID> <CustomFieldValue>Versace</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> <CustomFieldValues> <CustomFieldId>5</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID>15</CustomFieldLookupID> <CustomFieldValue>Jacket</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> </ArrayOfCustomFieldValues> <ArrayOfCustomFieldValues> <CustomFieldValues> <CustomFieldId>1</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID i:nil="true" /> <CustomFieldValue>Red</CustomFieldValue> </CustomFieldEntry> <CustomFieldEntry> <CustomFieldLookupID i:nil="true" /> <CustomFieldValue>Yellow</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> <CustomFieldValues> <CustomFieldId>2</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID>15</CustomFieldLookupID> <CustomFieldValue>Versace</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> <CustomFieldValues> <CustomFieldId>5</CustomFieldId> <CustomFieldName i:nil="true" /> <Values> <CustomFieldEntry> <CustomFieldLookupID>15</CustomFieldLookupID> <CustomFieldValue>Hat</CustomFieldValue> </CustomFieldEntry> </Values> </CustomFieldValues> </ArrayOfCustomFieldValues> </ArrayOfArrayOfCustomFieldValues>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
HTTP 200 with no content, HTTP 409 if fieldValues is invalid, HTTP 404 if media is not found, HTTP 409 if validation fails
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.