POST/api/v4/social/brands/update

Aggiorna un brand

Aggiorna il nome, il fuso orario, il sito web, le categorie, gli hashtag o la biografia di un brand social.

Richiede una chiave API. Consulta Autenticazione per il formato dell’header e la rotazione delle chiavi.

Parametri

Corpo

NomeTipoObbligatorioDescrizione
inputobjectobbligatorioWrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.profileIdstringobbligatorioUUID of the brand to update. This is the same value used as the `brandId` path token elsewhere.
input.profileNamestringfacoltativoNew display name.
input.timezoneobjectfacoltativoNew timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against.
input.businessIntentstringfacoltativoOne or two sentences describing what the business does.
input.categoriesarray of stringsfacoltativoBusiness categories. Replaces the stored list rather than merging into it.
input.siteUrlstringfacoltativoThe brand's website. Changing it queues a fresh read of the site.
input.logostringfacoltativoPublic https URL of the brand logo.
input.countryIsostringfacoltativoTwo-letter ISO country code.
input.biostringfacoltativoShort brand bio.
input.brandHashtagsarray of stringsfacoltativoReplaces the brand's hashtag list.
input.competitorHashtagsarray of stringsfacoltativoReplaces the competitor hashtag list.
input.contentPreferredLanguagestringfacoltativoPreferred language for generated content, e.g. `en`.

Richiesta di esempio

Corpo pronto da incollare. Sostituisci gli ID e i valori segnaposto con i tuoi.

Request body
{  "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.
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`).

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 restituisce HTTP 200 con success: false e il motivo in error.
  • 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, non brandId: brandId è sempre e solo un token del percorso URL.
  • categories, brandHashtags e competitorHashtags vengono sostituiti, non uniti, quando li invii. L'invio di [] svuota l'elenco.
  • La modifica di timezone influisce sul modo in cui vengono interpretati i valori futuri di scheduleDate / scheduleTime. I post già programmati mantengono l'istante determinato in precedenza; i loro orari non vengono ricalcolati. Recupera nuovamente il brand con GET /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.

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