v1Ressourcen/Locations/postFotos zu einem Standort hochladen
Fotos zu einem Standort hochladen
Fügt einem Standort ein oder mehrere Fotos in einer bestimmten Kategorie hinzu. Geben Sie jedes Bild als öffentliche https-URL (wird abgerufen und neu gehostet) oder als Base64-Bytes an. Es werden nur Bilder unterstützt (jpeg, png, gif, webp), je maximal 5 MB. Die Kategorie LOGO enthält ein einziges Logo — ein Upload zu LOGO ersetzt das aktuelle. Jede andere Kategorie wird ergänzt. Gespeicherte Fotos werden automatisch zur Veröffentlichung auf Google eingereiht.
post
locations:write/api/v1/locations/{id}/mediaQuery-Parameter
idstringerforderlich
Der Standort, dem Fotos hinzugefügt werden sollen.
Anfragetext
categorystring (COVER | PROFILE | LOGO | EXTERIOR | INTERIOR | PRODUCT | FOOD_AND_DRINK | MENU | AT_WORK | TEAMS | ROOMS | COMMON_AREA | ADDITIONAL)erforderlich
Die Fotokategorie, zu der hinzugefügt werden soll. LOGO ersetzt das aktuelle Logo; jede andere Kategorie wird ergänzt.
imagesarray of objecterforderlich
Ein oder mehrere hinzuzufügende Bilder. Jedes benötigt eine url oder base64.
urlstringoptional
Eine öffentliche https-URL zum Bild — sie wird abgerufen und neu gehostet.
base64stringoptional
Die Bild-Bytes als Base64 (ein data:-URL-Präfix wird akzeptiert). Verwenden Sie dies statt url, wenn Sie die Bytes vorliegen haben.
labelstringoptional
Optionale Bildunterschrift/Beschriftung für das Foto.
Antwort
dataobjectoptional
mediaByCategoryobjectoptional
Medienelemente gruppiert nach Kategorie (z. B. EXTERIOR, INTERIOR, FOOD_AND_DRINK, LOGO, TEAMS). Jedes Element hat eine url und optional ein label, ein kind (PHOTO oder VIDEO), eine source, ein starred-Flag und einen assetKey.
addedarray of objectoptional
Die tatsächlich hinzugefügten Fotos, jeweils mit der Kategorie, in der es gelandet ist, und seiner gehosteten URL.
categorystringoptional
urlstringoptional
Fehler
400Der Anfrage fehlt ein erforderlicher Parameter, oder sie ist anderweitig fehlerhaft.
401API-Schlüssel fehlt, ist ungültig, abgelaufen oder widerrufen.
403Dem Schlüssel fehlt die erforderliche Berechtigung, oder er ist für diesen Kunden/Standort nicht autorisiert.
404Die Ressource wurde nicht gefunden oder gehört nicht zu Ihrer Agentur.
422Der Anfrage fehlt ein erforderlicher Parameter, oder sie ist anderweitig fehlerhaft.
429Zu viele Anfragen. Versuchen Sie es nach der im Retry-After-Header angegebenen Anzahl Sekunden erneut.
post/api/v1/locations/{id}/media
Ihr API-Schlüssel
id *
Anfragetext*
{
"data": {
"mediaByCategory": {
"EXTERIOR": [
{
"url": "https://cdn.synup.com/media/1.jpg",
"source": "agent_upload"
}
]
},
"added": [
{
"category": "EXTERIOR",
"url": "https://cdn.synup.com/media/1.jpg"
}
]
}
}Anleitungen, die diesen Endpunkt verwenden
- Business Listings API: Complete Developer GuideHow a business listings API works and how to create, update, sync and monitor locations across Google, Apple, Bing and directories with the Synup API.
- How to Manage Business Listings ProgrammaticallyKeep business listings accurate from your own system with the Synup API. Covers change detection, idempotent updates, hours, photos and sync reporting.
- Upload Business Photos via APIAdd photos to a location by category with the Synup API, from a public URL or base64, and avoid uploading the same image twice on a schedule.
- How to Connect and Manage Google Business Profiles via APIConnect a Google Business Profile to a location, match the account's listings, keep the profile in sync and handle reconnects with the Synup API.