POST/api/v4/locations/photos/star

사업장 사진에 별표 표시

지원되는 게시 플랫폼에서 우선 배치되도록 사업장의 추가 사진을 1개 이상 별표로 표시합니다.

API 키가 필요합니다. 헤더 형식과 키 교체는 인증을 참고하세요.

매개변수

본문

이름유형필수설명
input.locationIdstring필수The location's Base64-encoded Relay ID the photos belong to.
input.photoIdsarray of strings필수Media file IDs to star (as returned by the get-photos or upload endpoints).
input.starredboolean필수`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와 값을 실제 값으로 바꾸세요.

Request body
{  "input": {    "locationId": "TG9jYXRpb246MTgwMDI4OQ==",    "photoIds": [      "TWVkaWFGaWxlOjU4Nzg5MzI="    ],    "starred": true  }}

응답

200Photos starred. Returns each affected photo with `starred` set to true; `error` is null on success.
Response
{  "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    }  }'