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