/api/v4/social/brands/updateActualizar una marca
Actualiza el nombre, la zona horaria, el sitio web, las categorías, los hashtags o la biografía de una marca en redes sociales.
Parámetros
Cuerpo
| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| input | object | obligatorio | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.profileId | string | obligatorio | UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere. |
| input.profileName | string | opcional | New display name. |
| input.timezone | object | opcional | New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against. |
| input.businessIntent | string | opcional | One or two sentences describing what the business does. |
| input.categories | array of strings | opcional | Business categories. Replaces the stored list rather than merging into it. |
| input.siteUrl | string | opcional | The brand's website. Changing it queues a fresh read of the site. |
| input.logo | string | opcional | Public https URL of the brand logo. |
| input.countryIso | string | opcional | Two-letter ISO country code. |
| input.bio | string | opcional | Short brand bio. |
| input.brandHashtags | array of strings | opcional | Replaces the brand's hashtag list. |
| input.competitorHashtags | array of strings | opcional | Replaces the competitor hashtag list. |
| input.contentPreferredLanguage | string | opcional | Preferred language for generated content, e.g. `en`. |
Solicitud de ejemplo
Cuerpo listo para pegar. Sustituye los ID y valores de ejemplo por los tuyos.
{ "input": { "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "siteUrl": "https://jennyhomeandco.example", "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"] }}Respuestas
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`).
Edita una marca existente. La marca se identifica mediante input.profileId en el cuerpo, no mediante un parámetro de ruta, por lo que la ruta es simplemente POST /social/brands/update.
Caso de uso: mantener la marca sincronizada con tu propio CRM. Cuando un cliente cambie el nombre de su empresa o traslade su sitio web, refleja el cambio aquí para que el encabezado de la marca y las sugerencias del editor sigan siendo precisos. Cambiar siteUrl también pone en cola una nueva lectura del sitio, de modo que las sugerencias incorporan el nuevo texto sin necesidad de ninguna llamada adicional.
Notas.
- El cuerpo de la solicitud debe estar envuelto en un objeto
input. - Comprueba
success, no el estado HTTP. Una actualización rechazada devuelveHTTP 200consuccess: falsey el motivo enerror. - Solo
profileIdes obligatorio. Todos los demás campos son opcionales, por lo que se permiten actualizaciones parciales: envía solo los campos que estés cambiando y el resto permanecerá sin cambios. El campo identificador aquí esprofileId, nobrandId;brandIdsolo se utiliza como token de la ruta de una URL. categories,brandHashtagsycompetitorHashtagsse reemplazan, no se combinan, cuando los envías. Enviar[]vacía la lista.- Cambiar
timezoneafecta a cómo se interpretan los valores futuros descheduleDate/scheduleTime. Las publicaciones ya programadas conservan el instante que se determinó para ellas; no se reajusta su horario. Vuelve a consultar la marca conGET /social/brands/{brandId}para confirmarlo.
Operación de escritura: no se ha ejecutado en la cuenta real. La solicitud y la respuesta que se muestran se han elaborado a partir del esquema de la 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" ] } }'