/api/v4/social/brands/updateBir markayı güncelleyin
Bir sosyal medya markasının adını, saat dilimini, web sitesini, kategorilerini, hashtag'lerini veya biyografisini günceller.
Parametreler
Gövde
| Ad | Tür | Zorunlu | Açıklama |
|---|---|---|---|
| input | object | zorunlu | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.profileId | string | zorunlu | UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere. |
| input.profileName | string | isteğe bağlı | New display name. |
| input.timezone | object | isteğe bağlı | New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against. |
| input.businessIntent | string | isteğe bağlı | One or two sentences describing what the business does. |
| input.categories | array of strings | isteğe bağlı | Business categories. Replaces the stored list rather than merging into it. |
| input.siteUrl | string | isteğe bağlı | The brand's website. Changing it queues a fresh read of the site. |
| input.logo | string | isteğe bağlı | Public https URL of the brand logo. |
| input.countryIso | string | isteğe bağlı | Two-letter ISO country code. |
| input.bio | string | isteğe bağlı | Short brand bio. |
| input.brandHashtags | array of strings | isteğe bağlı | Replaces the brand's hashtag list. |
| input.competitorHashtags | array of strings | isteğe bağlı | Replaces the competitor hashtag list. |
| input.contentPreferredLanguage | string | isteğ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.
{ "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.
{ "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`.
{ "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
inputnesnesinin içine alınmalıdır. - HTTP durumunu değil,
successdeğerini kontrol edin. Reddedilen bir güncelleme,success: falseveerroriçindeki gerekçeyle birlikteHTTP 200döndürür. - Yalnızca
profileIdzorunludur. 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ı alanbrandIddeğil,profileIdalanıdır;brandIdyalnızca bir URL yolu belirtecidir. categories,brandHashtagsvecompetitorHashtagsalanlarını gönderdiğinizde mevcut değerlerle birleştirilmezler, mevcut değerlerin yerini alırlar.[]göndermek listeyi temizler.timezonedeğerini değiştirmek, gelecektekischeduleDate/scheduleTimedeğerlerinin nasıl yorumlanacağını etkiler. Önceden zamanlanmış gönderiler, belirlenmiş gönderim anlarını korur; zamanları yeniden ayarlanmaz. Doğrulamak içinGET /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.
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" ] } }'