/api/v4/social/brands/updateMettre à jour une marque
Met à jour le nom, le fuseau horaire, le site web, les catégories, les hashtags ou la biographie d'une marque sur les réseaux sociaux.
Paramètres
Corps
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
| input | object | obligatoire | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.profileId | string | obligatoire | UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere. |
| input.profileName | string | facultatif | New display name. |
| input.timezone | object | facultatif | New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against. |
| input.businessIntent | string | facultatif | One or two sentences describing what the business does. |
| input.categories | array of strings | facultatif | Business categories. Replaces the stored list rather than merging into it. |
| input.siteUrl | string | facultatif | The brand's website. Changing it queues a fresh read of the site. |
| input.logo | string | facultatif | Public https URL of the brand logo. |
| input.countryIso | string | facultatif | Two-letter ISO country code. |
| input.bio | string | facultatif | Short brand bio. |
| input.brandHashtags | array of strings | facultatif | Replaces the brand's hashtag list. |
| input.competitorHashtags | array of strings | facultatif | Replaces the competitor hashtag list. |
| input.contentPreferredLanguage | string | facultatif | Preferred language for generated content, e.g. `en`. |
Exemple de requête
Corps prêt à coller. Remplacez les identifiants et valeurs d’exemple par les vôtres.
{ "input": { "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "siteUrl": "https://jennyhomeandco.example", "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"] }}Réponses
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`).
Modifie une marque existante. La marque est identifiée par input.profileId dans le corps de la requête, et non par un paramètre de chemin, ce qui explique pourquoi la route se limite à POST /social/brands/update.
Cas d'utilisation : maintenir la marque à jour avec votre propre CRM. Lorsqu'un client renomme son entreprise ou déplace son site, répercutez le changement ici pour que l'en-tête de la marque et les suggestions de l'éditeur restent exacts. La modification de siteUrl met également en file d'attente une nouvelle lecture du site, afin que les suggestions prennent en compte le nouveau contenu sans appel supplémentaire.
Remarques.
- Le corps de la requête doit être encapsulé dans un objet
input. - Vérifiez
success, et non le statut HTTP. Une mise à jour rejetée renvoieHTTP 200avecsuccess: falseet le motif danserror. - Seul
profileIdest obligatoire. Tous les autres champs sont facultatifs, ce qui permet les mises à jour partielles : envoyez uniquement les champs que vous modifiez et les autres resteront inchangés. Le champ d'identification est iciprofileId, et nonbrandId—brandIdest toujours utilisé uniquement comme élément du chemin de l'URL. categories,brandHashtagsetcompetitorHashtagssont remplacés, et non fusionnés, lorsque vous les envoyez. L'envoi de[]vide la liste.- La modification de
timezoneaffecte la façon dont les futures valeurs descheduleDate/scheduleTimesont interprétées. Les publications déjà programmées conservent l'instant déterminé lors de leur programmation ; leur horaire n'est pas recalculé. Récupérez à nouveau la marque avecGET /social/brands/{brandId}pour confirmer.
Opération d'écriture : non exécutée sur le compte réel. La requête et la réponse présentées sont construites à partir du schéma de l'API.
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" ] } }'