POST/api/v4/locations/reviews/settings/edit

사업장의 리뷰 설정 수정

사업장에서 모니터링할 리뷰 소스와 긍정적 리뷰의 기준 평점을 설정합니다.

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

매개변수

본문

필수로 표시된 중첩 필드는 상위 필드를 보낼 때만 적용됩니다. 상위 필드가 선택 사항이고 이를 생략하면 필수 하위 필드도 적용되지 않습니다.

이름유형필수설명
locationIdstring필수Location to update, as its Base64-encoded Relay ID (e.g. `TG9jYXRpb246MTgwMDI4OQ==`). This is a body field, so unlike path parameters a raw numeric ID is not converted and fails with `SY90002: Invalid Id`.
siteUrlsarray선택The complete set of review sources for the location. This REPLACES the current selection, so send every source you want kept, not just the additions.
siteUrls[].namestring선택Site key, as returned in `siteSettings[].name` (e.g. `maps.google.com`, `yelp.com`).
siteUrls[].urlstring선택The location's page URL on that site. Send `null` or omit to stop monitoring a source that needs an explicit URL.
positiveInteractionThresholdinteger선택Star rating at or above which a review counts as positive. Sent on its own, it leaves the source selection untouched.

요청 예시

바로 붙여 넣을 수 있는 본문입니다. 예시 ID와 값을 실제 값으로 바꾸세요.

Request body
{  "locationId": "TG9jYXRpb246MTgwMDI4OQ==",  "positiveInteractionThreshold": 4,  "siteUrls": [    { "name": "maps.google.com", "url": null },    { "name": "yelp.com", "url": "https://www.yelp.com/biz/blue-bottle-coffee-oakland" }  ]}

응답

200Settings applied. `data.editInteractionsSetting.interactionSetting` returns the stored settings; `errors` is `null` on success.
Response
{  "data": {    "editInteractionsSetting": {      "errors": null,      "interactionSetting": {        "id": "1800289",        "locationId": "1800289",        "positiveInteractionThreshold": 4,        "siteSettings": [          { "name": "maps.google.com", "url": null, "monitored": true, "canRespond": true },          { "name": "yelp.com", "url": "https://www.yelp.com/biz/blue-bottle-coffee-oakland", "monitored": true, "canRespond": false }        ]      }    }  }}
401Unauthenticated, missing or invalid API key.
403The key is valid but not permitted to change review settings for this location (`SY90003`).

사업장에서 모니터링할 리뷰 소스와 긍정적 리뷰로 간주하는 평점을 업데이트합니다. 동일한 설정을 조회하려면 사업장의 리뷰 소스 목록 조회를 참조하세요.

siteUrls는 부분 수정이 아니라 전체 교체입니다. 전송한 배열이 해당 사업장의 소스 선택 항목이 됩니다. 소스 1개를 추가하려면 먼저 현재 siteSettings를 조회한 후 기존 항목과 새 항목을 함께 전송해야 합니다. 요소가 1개인 배열을 전송하면 별도의 알림 없이 다른 모든 소스가 제거됩니다.

두 필드는 서로 독립적입니다. 소스를 변경하지 않고 기준 평점만 변경하려면 positiveInteractionThreshold만 전송하고, 기준 평점을 변경하지 않고 소스만 변경하려면 siteUrls만 전송합니다.

소스를 추가하면 해당 소스의 스크래핑이 예약되므로, 새로 추가한 사이트의 리뷰는 이 응답에 포함되지 않고 비동기적으로 수집됩니다. 유효성 검사에서 거부된 소스(접속할 수 없는 URL 또는 계정의 요금제에 포함되지 않은 소스)는 설정이 변경되지 않은 채 errors에 반환되므로, 200인 경우에도 errors를 확인해야 합니다.

사용 사례: 사업장의 Yelp 페이지 온보딩

사업장을 생성한 직후부터 Google 및 Facebook 소스는 자동으로 모니터링되지만, Yelp 페이지는 명시적으로 지정해야 합니다. 설정 조회 엔드포인트에서 현재 선택 항목을 가져오고 { "name": "yelp.com", "url": "<the location's Yelp URL>" }를 추가한 다음, 전체 배열을 사업장 ID와 함께 다시 전송합니다. 스크래핑은 즉시 대기열에 추가되며, 완료되면 첫 Yelp 리뷰가 상호작용 목록 조회에 표시됩니다.

이 엔드포인트는 실제 모니터링 설정을 변경합니다. 위의 샘플 요청과 응답은 예시입니다.

Request
curl -X POST 'https://listingsapi.com/api/v4/locations/reviews/settings/edit' \  -H "Authorization: API $LISTINGSAPI_KEY" \  -H 'Content-Type: application/json' \  -d '{    "locationId": "TG9jYXRpb246MTgwMDI4OQ==",    "positiveInteractionThreshold": 4,    "siteUrls": [      {        "name": "maps.google.com",        "url": null      },      {        "name": "yelp.com",        "url": "https://www.yelp.com/biz/blue-bottle-coffee-oakland"      }    ]  }'