/api/v4/locations/photos/starStar location photos
Marks one or more of a location's additional photos as favourites for priority placement on supported publishers.
Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
| input.locationId | string | required | The location's Base64-encoded Relay ID the photos belong to. |
| input.photoIds | array of strings | required | Media file IDs to star (as returned by the get-photos or upload endpoints). |
| input.starred | boolean | required | `true` to star the given photos, `false` to unstar them. This flag, not the path, decides what happens: `/star` and `/unstar` behave the same way. |
Sample request
Ready-to-paste body. Replace placeholder IDs and values with yours.
{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "photoIds": [ "TWVkaWFGaWxlOjU4Nzg5MzI=" ], "starred": true }}Responses
200Photos starred. Returns each affected photo with `starred` set to true; `error` is null on success.
{ "data": { "starUnstarLocationPhotos": { "success": true, "photos": [ { "id": "TWVkaWFGaWxlOjU4Nzg5MzI=", "databaseId": 5878932, "url": "https://sy-media-store.s3-us-west-2.amazonaws.com/f868bb3f/59c670a3/ef4ffb12.jpg", "thumbnailUrl": "https://sy-media-store.s3-us-west-2.amazonaws.com/f868bb3f/59c670a3/thumbnail_ef4ffb12.jpg", "type": "ADDITIONAL", "starred": true } ], "error": null } }}401Unauthenticated, missing or invalid API key.
Stars the specified photos for a location. Starred photos are given priority placement on publisher directories that support featured imagery, so this is how you promote your best shots to the top of a listing.
Use case: feature a seasonal hero image. After uploading a new storefront photo, star it so it leads the gallery on Google and other supported sites. Pass the media ID from the upload response in photoIds.
Use case: curate a consistent brand set. When managing many locations, star the same category of additional photo (for example, the exterior shot) at each location to keep the public-facing gallery consistent.
Gotchas.
- The response is keyed
starUnstarLocationPhotos, not after the route, and the key is the same on both/locations/photos/starand/locations/photos/unstar. - Its payload carries a singular
errorobject, not anerrorsarray, and there is noclientMutationId. There is nocaptionfield on a photo either. - Only
ADDITIONALcategory photos can be starred.LOGOandCOVERimages are already primary and cannot be starred. - A location can have at most 4 starred photos; going past it fails with
SY15012. The check counts the photos already starred plus the ones in this request, and it only applies whenstarredistrue. - To reverse the action,
POST /api/v4/locations/photos/unstarwithstarred: false. Thestarredvalue decides what happens, not the path: postingstarred: trueto/unstarstars the photos.
curl -X POST 'https://listingsapi.com/api/v4/locations/photos/star' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "photoIds": [ "TWVkaWFGaWxlOjU4Nzg5MzI=" ], "starred": true } }'