POST
/api/v4/locations/reviews/respond/edit编辑互动回复
编辑先前针对评价或互动发布的商家回复。
参数
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| responseId | string | 必填 | ID of the response to edit (the `id` from an interaction's `responses` array). |
| reviewId | string | 必填 | ID of the interaction the response belongs to. |
| responseContent | string | 必填 | Updated text content of the response. |
| templateId | string | 可选 | Response-template ID to re-attribute the edited reply to, if any. |
请求示例
可直接粘贴的请求体。请将占位 ID 和值替换为您自己的。
{ "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.
{ "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。
使用场景:修正已上线回复中的错别字
当已发布的商家回复存在错误时,请直接编辑该回复,而不是将其归档后重新发布,这样可以在每条评价仅允许 1 条回复的平台(例如 Google)上保留该回复。查找互动的 responses 数组,获取需要修正的回复的 id,然后执行 POST:
{ "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." }'