POST/api/v4/social/brands/update

Bir markayı güncelleyin

Bir sosyal medya markasının adını, saat dilimini, web sitesini, kategorilerini, hashtag'lerini veya biyografisini günceller.

API anahtarı gerektirir. Başlık biçimi ve anahtar yenileme için Kimlik doğrulama bölümüne bakın.

Parametreler

Gövde

AdTürZorunluAçıklama
inputobjectzorunluWrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.profileIdstringzorunluUUID of the brand to update. This is the same value used as the `brandId` path token elsewhere.
input.profileNamestringisteğe bağlıNew display name.
input.timezoneobjectisteğe bağlıNew timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against.
input.businessIntentstringisteğe bağlıOne or two sentences describing what the business does.
input.categoriesarray of stringsisteğe bağlıBusiness categories. Replaces the stored list rather than merging into it.
input.siteUrlstringisteğe bağlıThe brand's website. Changing it queues a fresh read of the site.
input.logostringisteğe bağlıPublic https URL of the brand logo.
input.countryIsostringisteğe bağlıTwo-letter ISO country code.
input.biostringisteğe bağlıShort brand bio.
input.brandHashtagsarray of stringsisteğe bağlıReplaces the brand's hashtag list.
input.competitorHashtagsarray of stringsisteğe bağlıReplaces the competitor hashtag list.
input.contentPreferredLanguagestringisteğe bağlıPreferred language for generated content, e.g. `en`.

Örnek istek

Yapıştırmaya hazır gövde. Yer tutucu kimlikleri ve değerleri kendi değerlerinizle değiştirin.

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

Yanıtlar

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`).

Mevcut bir markayı düzenler. Marka, bir yol parametresiyle değil, gövdedeki input.profileId ile belirtilir; bu nedenle rota düz bir POST /social/brands/update biçimindedir.

Kullanım senaryosu: markayı kendi CRM sisteminizle uyumlu tutmak. Bir müşteri işletmesinin adını değiştirdiğinde veya sitesini taşıdığında, marka başlığının ve gönderi oluşturucunun önerilerinin doğru kalması için değişikliği buraya yansıtın. siteUrl değerinin değiştirilmesi, sitenin yeniden okunmasını da kuyruğa ekler; böylece öneriler, başka bir çağrıya gerek kalmadan yeni metni kullanır.

Notlar.

  • İstek gövdesi bir input nesnesinin içine alınmalıdır.
  • HTTP durumunu değil, success değerini kontrol edin. Reddedilen bir güncelleme, success: false ve error içindeki gerekçeyle birlikte HTTP 200 döndürür.
  • Yalnızca profileId zorunludur. Diğer tüm alanlar isteğe bağlıdır; dolayısıyla kısmi güncellemeler desteklenir: yalnızca değiştirdiğiniz alanları gönderin, geri kalanlar olduğu gibi bırakılır. Buradaki tanımlayıcı alan brandId değil, profileId alanıdır; brandId yalnızca bir URL yolu belirtecidir.
  • categories, brandHashtags ve competitorHashtags alanlarını gönderdiğinizde mevcut değerlerle birleştirilmezler, mevcut değerlerin yerini alırlar. [] göndermek listeyi temizler.
  • timezone değerini değiştirmek, gelecekteki scheduleDate / scheduleTime değerlerinin nasıl yorumlanacağını etkiler. Önceden zamanlanmış gönderiler, belirlenmiş gönderim anlarını korur; zamanları yeniden ayarlanmaz. Doğrulamak için GET /social/brands/{brandId} ile markayı yeniden okuyun.

Yazma işlemi: canlı hesapta yürütülmemiştir. Gösterilen istek ve yanıt, API şemasından oluşturulmuştur.

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"      ]    }  }'