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.

مثال على الطلب

نص جاهز للصق. استبدل المعرّفات والقيم النموذجية بقيمك.

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 (الرد المحدد). احصل على responseId من responses[].id الخاص بالتفاعل عبر جلب التفاعلات حسب المعرّفات أو عرض قائمة التفاعلات.

حالة استخدام: تصحيح خطأ مطبعي في رد منشور

عندما يتضمن رد منشور للمالك خطأً، عدّله مباشرةً بدلًا من أرشفته وإعادة نشره، فهذا يحافظ على الرد في المنصات (مثل 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"، فهذا يعني أن التعديل قد قُبل؛ استعلم دوريًا عبر جلب التفاعلات حسب المعرّفات للتأكد من وصول الرد المحدّث إلى 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."  }'