/api/v4/social/brands/updateAggiorna un brand
Aggiorna il nome, il fuso orario, il sito web, le categorie, gli hashtag o la biografia di un brand social.
Parametri
Corpo
| Nome | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
| input | object | obbligatorio | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.profileId | string | obbligatorio | UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere. |
| input.profileName | string | facoltativo | New display name. |
| input.timezone | object | facoltativo | New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against. |
| input.businessIntent | string | facoltativo | One or two sentences describing what the business does. |
| input.categories | array of strings | facoltativo | Business categories. Replaces the stored list rather than merging into it. |
| input.siteUrl | string | facoltativo | The brand's website. Changing it queues a fresh read of the site. |
| input.logo | string | facoltativo | Public https URL of the brand logo. |
| input.countryIso | string | facoltativo | Two-letter ISO country code. |
| input.bio | string | facoltativo | Short brand bio. |
| input.brandHashtags | array of strings | facoltativo | Replaces the brand's hashtag list. |
| input.competitorHashtags | array of strings | facoltativo | Replaces the competitor hashtag list. |
| input.contentPreferredLanguage | string | facoltativo | Preferred language for generated content, e.g. `en`. |
Richiesta di esempio
Corpo pronto da incollare. Sostituisci gli ID e i valori segnaposto con i tuoi.
{ "input": { "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "siteUrl": "https://jennyhomeandco.example", "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"] }}Risposte
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`).
Modifica un brand esistente. Il brand viene identificato tramite input.profileId nel corpo della richiesta, non tramite un parametro del percorso: per questo la rotta è semplicemente POST /social/brands/update.
Caso d'uso: mantenere il brand allineato al tuo CRM. Quando un cliente cambia il nome della propria attività o sposta il proprio sito, riporta qui la modifica affinché l'intestazione del brand e i suggerimenti dell'editor rimangano accurati. La modifica di siteUrl mette inoltre in coda una nuova lettura del sito, così i suggerimenti recepiscono i nuovi testi senza ulteriori chiamate.
Note.
- Il corpo della richiesta deve essere racchiuso in un oggetto
input. - Controlla
success, non lo stato HTTP. Un aggiornamento rifiutato restituisceHTTP 200consuccess: falsee il motivo inerror. - Solo
profileIdè obbligatorio. Tutti gli altri campi sono facoltativi, quindi sono possibili aggiornamenti parziali: invia solo i campi che stai modificando e gli altri rimarranno invariati. Il campo identificativo qui èprofileId, nonbrandId:brandIdè sempre e solo un token del percorso URL. categories,brandHashtagsecompetitorHashtagsvengono sostituiti, non uniti, quando li invii. L'invio di[]svuota l'elenco.- La modifica di
timezoneinfluisce sul modo in cui vengono interpretati i valori futuri discheduleDate/scheduleTime. I post già programmati mantengono l'istante determinato in precedenza; i loro orari non vengono ricalcolati. Recupera nuovamente il brand conGET /social/brands/{brandId}per confermare.
Operazione di scrittura: non eseguita sull'account reale. La richiesta e la risposta mostrate sono costruite a partire dallo schema dell'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" ] } }'