POST/api/v4/social/brands/update

تحديث علامة تجارية

يُحدّث اسم علامة تجارية على وسائل التواصل الاجتماعي أو منطقتها الزمنية أو موقعها الإلكتروني أو فئاتها أو وسومها أو نبذتها التعريفية.

يتطلب مفتاح API. راجع المصادقة لمعرفة تنسيق الترويسة وتدوير المفاتيح.

المعلمات

النص الأساسي

الاسمالنوعمطلوبالوصف
inputobjectمطلوبWrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.profileIdstringمطلوبUUID of the brand to update. This is the same value used as the `brandId` path token elsewhere.
input.profileNamestringاختياريNew display name.
input.timezoneobjectاختياريNew timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against.
input.businessIntentstringاختياريOne or two sentences describing what the business does.
input.categoriesarray of stringsاختياريBusiness categories. Replaces the stored list rather than merging into it.
input.siteUrlstringاختياريThe brand's website. Changing it queues a fresh read of the site.
input.logostringاختياريPublic https URL of the brand logo.
input.countryIsostringاختياريTwo-letter ISO country code.
input.biostringاختياريShort brand bio.
input.brandHashtagsarray of stringsاختياريReplaces the brand's hashtag list.
input.competitorHashtagsarray of stringsاختياريReplaces the competitor hashtag list.
input.contentPreferredLanguagestringاختياريPreferred language for generated content, e.g. `en`.

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

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

Request body
{  "input": {    "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902",    "profileName": "Jenny Home & Co.",    "siteUrl": "https://jennyhomeandco.example",    "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"]  }}

الاستجابات

200Brand updated. The full brand is returned.
Response
{  "data": {    "updateSocialProfile": {      "success": true,      "error": null,      "socialProfile": {        "id": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902",        "profileName": "Jenny Home & Co.",        "archived": false,        "logo": null,        "profileLogo": null,        "siteUrl": "https://jennyhomeandco.example",        "countryIso": "US",        "bio": "Handmade furniture for real homes.",        "businessIntent": "A family-run home furnishings store selling handmade furniture and textiles.",        "categories": ["Furniture Store", "Home Goods"],        "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"],        "competitorHashtags": [],        "connectedChannelCount": 3,        "timezone": {          "label": "(GMT-05:00) Eastern Time",          "tzCode": "America/New_York",          "name": "Eastern Standard Time",          "utc": "-05:00"        },        "contentPreferredLanguage": "en"      }    }  }}
200Validation failed. The status is still 200: read `success`.
Response
{  "data": {    "updateSocialProfile": {      "success": false,      "error": {        "message": "SY95046: Unknown timezone",        "code": "SY95046",        "contextInfo": null      },      "socialProfile": null    }  }}
401Unauthenticated, missing or invalid API key.
404No brand with that ID on this account (`SY95043`).

يُعدّل علامة تجارية موجودة. تُحدَّد العلامة التجارية بواسطة input.profileId في جسم الطلب، وليس بواسطة معامل في المسار، ولهذا يكون المسار POST /social/brands/update بلا معاملات.

حالة استخدام: إبقاء العلامة التجارية متزامنة مع نظام إدارة علاقات العملاء لديك. عندما يغيّر عميل اسم نشاطه التجاري أو ينقل موقعه الإلكتروني، اعكس التغيير هنا لتظل ترويسة العلامة التجارية واقتراحات محرّر المنشورات دقيقة. يؤدي تغيير siteUrl أيضًا إلى وضع قراءة جديدة للموقع في قائمة الانتظار، لتستفيد الاقتراحات من النص الجديد دون أي استدعاء إضافي.

ملاحظات.

  • يجب تغليف جسم الطلب داخل كائن input.
  • تحقّق من success، وليس من حالة HTTP. عند رفض التحديث، تُعاد HTTP 200 مع success: false والسبب في error.
  • الحقل profileId وحده مطلوب. جميع الحقول الأخرى اختيارية، لذا يمكن إجراء تحديثات جزئية: أرسل فقط الحقول التي تغيّرها، وستبقى بقية الحقول دون تغيير. حقل التعريف هنا هو profileId، وليس brandId — إذ إن brandId لا يُستخدم إلا بوصفه رمزًا في مسار URL.
  • تُستبدَل قيم categories وbrandHashtags وcompetitorHashtags بالكامل عند إرسالها، ولا تُدمج. يؤدي إرسال [] إلى إفراغ القائمة.
  • يؤثر تغيير timezone في كيفية تفسير قيم scheduleDate / scheduleTime المستقبلية. تحتفظ المنشورات المجدولة بالفعل باللحظة الزمنية التي حُدِّدت لها؛ ولا تُعاد جدولة أوقاتها. استرجع بيانات العلامة التجارية باستخدام GET /social/brands/{brandId} للتأكد.

عملية كتابة: لم تُنفَّذ على الحساب الفعلي. أُنشئ الطلب والاستجابة المعروضان استنادًا إلى مخطط API.

Request
curl -X POST 'https://listingsapi.com/api/v4/social/brands/update' \  -H "Authorization: API $LISTINGSAPI_KEY" \  -H 'Content-Type: application/json' \  -d '{    "input": {      "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902",      "profileName": "Jenny Home & Co.",      "siteUrl": "https://jennyhomeandco.example",      "brandHashtags": [        "jennyhome",        "handmadefurniture",        "shoplocal"      ]    }  }'