POST/api/v4/locations/reviews/respond

インタラクションに返信する

レビューまたはインタラクションの発生元プラットフォームに公開返信を投稿します。

API キーが必要です。ヘッダーの形式とキーのローテーションについては認証を参照してください。

パラメーター

ボディ

名前型必須説明
interactionIdstring必須UUID of the interaction to respond to. Take it from an interaction's `id` or `interactionId`, which are the same value. It is a plain UUID, with no numeric or Base64 Relay form.
responseContentstring必須Text content of the response to post.
respondedWithstring任意Response-template ID to attribute the reply to, if it was generated from a template.

リクエストの例

そのまま貼り付けられるボディです。プレースホルダーの ID と値をご自身のものに置き換えてください。

Request body
{  "interactionId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",  "responseContent": "Thank you for visiting Jenny Home: we're glad you enjoyed your experience!"}

レスポンス

200Response accepted and queued for posting. `data.respondToInteraction.interaction` holds the created response.
Response
{  "data": {    "respondToInteraction": {      "interaction": {        "id": "2090753a-ece6-4837-8336-8494ad308523",        "interactionId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",        "content": "Thank you for visiting Jenny Home: we're glad you enjoyed your experience!",        "interactionStatus": "CREATED",        "editedResponse": false      },      "errors": null    }  }}
401Unauthenticated, missing or invalid API key.

よくあるエラー

  • SY50121: Google Reviews accept only a single owner reply per review; a second response is rejected.

レビューまたはインタラクションの発生元プラットフォーム(Google、Facebook など)に返信を投稿します。返信は非同期で送信されます。interactionStatus は直ちに CREATED になり、プラットフォームが受信を確認すると COMPLETED または CONFIRMED に遷移します(FAILED になる場合もあります。返信ステータスのフローを参照してください)。

すべてのプラットフォームがオーナーからの返信に対応しているわけではありません。呼び出す前に、インタラクションオブジェクトの canRespond を確認してください。Google のレビューでは、レビュー1件につき返信は1件のみ受け付けられます(再度試みると SY50121 が返されます)。既存の返信を変更するには、新しい返信を投稿する代わりに返信を編集するを使用してください。

ユースケース:新しい5つ星レビューへの自動返信

満足しているレビュー投稿者に自動で感謝を伝えるには、ratingFilters=[5] と responseStatus=["PENDING"] を指定してインタラクションを一覧取得するをポーリングし、返された node のうち canRespond が true のものそれぞれについて、その id を interactionId として指定し、responseContent とともに POST します。

JSON
{  "interactionId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",  "responseContent": "Thank you for visiting Jenny Home: we're glad you enjoyed your experience!"}

投稿は非同期で行われるため、200 だけで成功と判断せず、IDを指定してインタラクションを取得するでインタラクションを再取得し、返信が COMPLETED/CONFIRMED に達したことを確認してください。

Request
curl -X POST 'https://listingsapi.com/api/v4/locations/reviews/respond' \  -H "Authorization: API $LISTINGSAPI_KEY" \  -H 'Content-Type: application/json' \  -d '{    "interactionId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",    "responseContent": "Thank you for visiting Jenny Home: we're glad you enjoyed your experience!"  }'