Skip to main content

Create Location Aggregate Rating Resource

API Description

Create a new aggregate rating resource with summary information that is derived from a collection of user reviews about a location.

Request

URI Parameters

NameInput
orgId
REQUIRED
locationId
REQUIRED
Path Template
POST {url}/api/{version}/orgs/{orgId}/locations/{locationId}/aggregate-ratings
Path Example
POST {url}/api/v1/orgs/9467895078742654934/locations/9467895078742654976/aggregate-ratings

Request Headers

NameInput
Authorization
REQUIRED
Content-Type
REQUIRED
Example Request Headers
Authorization: Bearer <access_token>
Content-Type: application/json

Request Body

NameTypeInput
$.aggregateRatingDetailsobject
REQUIRED
Example Request Body (raw JSON)
{
"aggregateRatingDetails": {
"starRatings": [
{
"category": "OVERALL",
"bestRating": 5,
"worstRating": 1,
"ratingValue": 4.0,
"ratingCount": 504,
"reviewCount": 249,
"distribution": [
{ "key": "1", "value": 7},
{ "key": "2", "value": 19},
{ "key": "3", "value": 25},
{ "key": "4", "value": 358},
{ "key": "5", "value": 95}
]
}
],
"pricing": {
"indicator": 4
},
"type": "USER"
}
}

Response

201 Created or Error

Response Headers

Name
apple-request-id
content-type
etag
location
Example Response Headers
HTTP/1.1 201 Created
apple-request-id: 366406af-3e43-44e4-911f-40d82c84dac1
content-type: application/json
etag: "7ef2d2b4-b6e3-11ed-afa1-0242ac120002"
location: /api/v1/orgs/9467895078742654934/locations/9467895078742654976/aggregate-ratings

Response Body

NameTypeOutput
$.orgIdstring
REQUIRED
$.locationIdstring
REQUIRED
$.createdDatedateTime
REQUIRED
$.updatedDatedateTime
REQUIRED
$.statestring
REQUIRED
$.etagstring
REQUIRED
$.aggregateRatingDetailsobject
REQUIRED
$.validationReports[]array
CONDITIONAL
Example Response Body (raw JSON)
{
"orgId": "9467895078742654934",
"locationId": "9467895078742654976",
"createdDate": "2026-10-01T17:22:19.00Z",
"updatedDate": "2026-10-01T17:22:19.00Z",
"state": "SUBMITTED",
"etag": "7ef2d2b4-b6e3-11ed-afa1-0242ac120002",
"aggregateRatingDetails": {
"starRatings": [
{
"category": "OVERALL",
"bestRating": 5,
"worstRating": 1,
"ratingValue": 4.0,
"ratingCount": 504,
"reviewCount": 249,
"distribution": [
{ "key": "1", "value": 7 },
{ "key": "2", "value": 19 },
{ "key": "3", "value": 25 },
{ "key": "4", "value": 358 },
{ "key": "5", "value": 95 }
]
}
],
"pricing": {
"indicator": 4
},
"type": "USER"
},
"validationReports": []
}