/api/v4/locations/{locationId}/photosGet photos for a location
Returns all media files attached to a single location, including starred and unstarred photos.
Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
| locationId | string | required | The location's raw Base64-encoded Relay ID (for example `TG9jYXRpb246MTgwMDI4OQ==`). Send it un-encoded — a numeric database ID or a URL-encoded value returns `SY90002: Invalid Id`. |
Responses
200Array of media files for the location. Returns an empty array when the location has no photos.
{
"data": {
"mediaFilesOfLocation": [
{
"id": "TWVkaWFGaWxlOjU4Nzg5MzE=",
"url": "https://sy-media-store.s3-us-west-2.amazonaws.com/f868bb3f/59c670a3/f47d62a6.jpg",
"thumbnailUrl": "https://sy-media-store.s3-us-west-2.amazonaws.com/f868bb3f/59c670a3/thumbnail_f47d62a6.jpg",
"categoryName": "Logo",
"categoryId": "4",
"fileType": "image",
"starred": false,
"viewsCount": 0
},
{
"id": "TWVkaWFGaWxlOjU4Nzg5MzI=",
"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",
"categoryName": "Additional",
"categoryId": "12",
"fileType": "image",
"starred": true,
"viewsCount": 143
}
]
}
}401Unauthenticated — missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
Returns every media file attached to a location — logo, cover, and additional images — with each file's public url, thumbnailUrl, category, whether it is starred, and a lifetime viewsCount.
Use case — render a location's photo gallery. Fetch the media list to display the images a business already has live, using thumbnailUrl for the grid and url for the full-size view. starred tells you which additional photos are pinned for priority placement on supported publishers.
Use case — audit media coverage before an upload. Call this endpoint first to see whether a location is missing a Logo or Cover category image, then only upload what is absent. The returned id values are exactly what you pass to the star and remove endpoints.
Gotchas.
- The
locationIdpath segment must be the raw Base64 Relay ID. Passing the numeric database ID (1800289) or a percent-encoded value (...%3D%3D) returns HTTP 200 with anerrorsarray containingSY90002: Invalid Idand anullpayload. - A location with no media returns
{ "data": { "mediaFilesOfLocation": [] } }— this is the live response for a freshly created location such as "Jenny Home", not an error.
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/photos' \
-H "Authorization: API $LISTINGSAPI_KEY"