POST
/api/v4/locations/photos/star사업장 사진에 별표 표시
지원되는 게시 플랫폼에서 우선 배치되도록 사업장의 추가 사진을 1개 이상 별표로 표시합니다.
매개변수
본문
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
| input.locationId | string | 필수 | The location's Base64-encoded Relay ID the photos belong to. |
| input.photoIds | array of strings | 필수 | Media file IDs to star (as returned by the get-photos or upload endpoints). |
| input.starred | boolean | 필수 | `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. |
요청 예시
바로 붙여 넣을 수 있는 본문입니다. 예시 ID와 값을 실제 값으로 바꾸세요.
{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "photoIds": [ "TWVkaWFGaWxlOjU4Nzg5MzI=" ], "starred": true }}응답
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.
사업장의 지정된 사진에 별표를 표시합니다. 별표가 표시된 사진은 대표 이미지 기능을 지원하는 게시 플랫폼 디렉터리에서 우선 배치되므로, 이 기능을 통해 가장 좋은 사진을 등록 정보의 상단에 노출할 수 있습니다.
사용 사례: 계절별 대표 이미지 강조. 새 매장 전면 사진을 업로드한 후 별표를 표시하면 Google 및 기타 지원 사이트의 갤러리에서 맨 앞에 배치됩니다. 업로드 응답의 미디어 ID를 photoIds에 전달합니다.
사용 사례: 일관된 브랜드 사진 구성. 여러 사업장을 관리할 때 각 사업장에서 동일한 카테고리의 추가 사진(예: 외관 사진)에 별표를 표시하여 공개 갤러리의 일관성을 유지합니다.
주의 사항.
- 응답의 키는 경로 이름이 아닌
starUnstarLocationPhotos이며,/locations/photos/star와/locations/photos/unstar에서 모두 동일합니다. - 응답 페이로드에는
errors배열이 아닌 단일error객체가 포함되며,clientMutationId는 없습니다. 사진에도caption필드는 없습니다. ADDITIONAL카테고리의 사진에만 별표를 표시할 수 있습니다.LOGO및COVER이미지는 이미 기본 이미지이므로 별표를 표시할 수 없습니다.- 사업장별로 별표를 표시할 수 있는 사진은 최대 4개이며, 이를 초과하면
SY15012오류로 실패합니다. 이 검사는 이미 별표가 표시된 사진과 이번 요청에 포함된 사진의 수를 합산하며,starred가true일 때만 적용됩니다. - 작업을 되돌리려면
starred: false와 함께POST /api/v4/locations/photos/unstar를 사용합니다. 동작을 결정하는 것은 경로가 아니라starred값이며,/unstar에starred: true를 POST하면 사진에 별표가 표시됩니다.
Request
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 } }'