POSTapi.synup.com/api/v4/locations/photos/star
Star/Unstar Location Photos
This API allows you to star or unstar photo(s) for a specific location. A starred photo highlights its importance and increases its visibility in certain displays.
For more details, refer to Manage photos for your location.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | object | required | |
input.locationId | string | required | ID of the location containing the photos |
input.photoIds | array of string | required | List of Photo IDs to be starred/unstarred, which can found from query locations |
input.starred | boolean | required | true to star; false to unstar |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/locations/photos/star' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"locationId": "TG9jYXRpb246MTA4NzIxMQ==",
"photoIds": [
"TWVkaWFGaWxlOjU2MzgyMDU="
],
"starred": true
}
}'const res = await fetch('https://api.synup.com/api/v4/locations/photos/star', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"locationId": "TG9jYXRpb246MTA4NzIxMQ==",
"photoIds": [
"TWVkaWFGaWxlOjU2MzgyMDU="
],
"starred": true
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/locations/photos/star",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"locationId": "TG9jYXRpb246MTA4NzIxMQ==",
"photoIds": [
"TWVkaWFGaWxlOjU2MzgyMDU="
],
"starred": True
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/locations/photos/star", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | The response will provide details of the photos that were processed, whether successfully starred or unstarred. If any errors occur, the response will include error information. |
Example response (generated from the schema)
{
"data": {
"starUnstarLocationPhotos": {
"success": true,
"error": null,
"photos": [
{
"databaseId": 0,
"fileSize": 0,
"id": "string",
"name": "string",
"starred": true,
"thumbnailUrl": "string",
"type": "string",
"url": "string",
"publisherOverride": "string"
}
]
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | |
data.starUnstarLocationPhotos | object | required | |
data.starUnstarLocationPhotos.success | boolean | required | |
data.starUnstarLocationPhotos.error | null | required | |
data.starUnstarLocationPhotos.photos | array of object | required | |
data.starUnstarLocationPhotos.photos[].databaseId | integer | optional | |
data.starUnstarLocationPhotos.photos[].fileSize | integer | optional | |
data.starUnstarLocationPhotos.photos[].id | string | optional | |
data.starUnstarLocationPhotos.photos[].name | string | optional | |
data.starUnstarLocationPhotos.photos[].starred | boolean | optional | |
data.starUnstarLocationPhotos.photos[].thumbnailUrl | string | optional | |
data.starUnstarLocationPhotos.photos[].type | string | optional | |
data.starUnstarLocationPhotos.photos[].url | string | optional | |
data.starUnstarLocationPhotos.photos[].publisherOverride | string | optional |