POST api/BranchRating
Updates the overall rating details of a branch. The branch must be in a publishable state, i.e. not have errors, for the data to be applied successfully, which can be tested by republishing the branch node within Umbraco.
Request Information
URI Parameters
None.
Body Parameters
To add or update
BranchRatingName | Description | Type | Additional information |
---|---|---|---|
BranchId |
Branch ID. |
string |
Required |
BrandCode |
Brand code of the branch, e.g. "HRT". |
string |
Required |
NumberOfRatings |
Number of ratings that contributed to the Overall Rating. |
integer |
Required |
OverallRating |
Overall rating between 0 and 10. Send a double value and it will serialise to this domain model. |
Rating |
Required |
Request Formats
application/json, text/json
{ "BranchId": "sample string 1", "BrandCode": "sample string 2", "NumberOfRatings": 3, "OverallRating": "1.1" }
application/xml, text/xml
<BranchRating xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Spicerhaart.Library.Models"> <BranchId>sample string 1</BranchId> <BrandCode>sample string 2</BrandCode> <NumberOfRatings>3</NumberOfRatings> <OverallRating /> </BranchRating>
Response Information
Resource Description
Success
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Content | HttpContent |
None. |
|
Headers | Collection of Object |
None. |
|
IsSuccessStatusCode | boolean |
None. |
|
ReasonPhrase | string |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
Version | Version |
None. |