POST/api/v4/locations/reviews/respond/edit

編輯互動的回覆

編輯先前針對評論或互動發布的業主回覆。

需要 API 金鑰。標頭格式與金鑰輪替請參閱驗證。

參數

請求主體

名稱類型必填說明
responseIdstring必填ID of the response to edit (the `id` from an interaction's `responses` array).
reviewIdstring必填ID of the interaction the response belongs to.
responseContentstring必填Updated text content of the response.
templateIdstring選填Response-template ID to re-attribute the edited reply to, if any.

請求範例

可直接貼上的請求主體。請將預留位置 ID 與值換成您自己的。

Request body
{  "reviewId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",  "responseId": "2090753a-ece6-4837-8336-8494ad308523",  "responseContent": "Thank you again: we've updated our reply to include our new store hours."}

回應

200Edit accepted and queued for re-submission. `data.editResponse` returns the identifiers.
Response
{  "data": {    "editResponse": {      "status": "true",      "reviewId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",      "responseId": "2090753a-ece6-4837-8336-8494ad308523"    }  }}
401Unauthenticated, missing or invalid API key.

更新現有業主回覆的內容。編輯後的回覆會以非同步方式重新提交至來源平台,其 interactionStatus 會回到 CREATED,並在平台確認更新後轉為 COMPLETED 或 CONFIRMED(請參閱回覆狀態流程)。

reviewId(互動)和 responseId(特定回覆)皆為必填。透過依 ID 取得互動或列出互動,從互動的 responses[].id 取得 responseId。

使用案例:修正已發布回覆中的錯字

當已發布的業主回覆有錯誤時,請直接編輯原回覆,而非封存後重新發布,這樣可在每則評論只允許一則回覆的平台(例如 Google)上保留該回覆。查詢互動的 responses 陣列,取得要修正之回覆的 id,然後執行 POST:

JSON
{  "reviewId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",  "responseId": "2090753a-ece6-4837-8336-8494ad308523",  "responseContent": "Thank you again: we've updated our reply to include our new store hours."}

status 為 "true" 表示編輯已獲接受;請輪詢依 ID 取得互動,確認更新後的回覆在來源網站上變為 CONFIRMED 狀態。

Request
curl -X POST 'https://listingsapi.com/api/v4/locations/reviews/respond/edit' \  -H "Authorization: API $LISTINGSAPI_KEY" \  -H 'Content-Type: application/json' \  -d '{    "reviewId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",    "responseId": "2090753a-ece6-4837-8336-8494ad308523",    "responseContent": "Thank you again: we've updated our reply to include our new store hours."  }'