GET/api/v4/locations/{locationId}/bulk-posts

Recupera i post in blocco per una sede

Restituisce una pagina di campagne di post in blocco (per più sedi) che includono una singola sede.

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

Parametri

Percorso

NomeTipoObbligatorioDescrizione
locationIdstringobbligatorioBase64-encoded location cursor / global ID (e.g. `TG9jYXRpb246MTgwMDI4OQ==`). Pass it unchanged, do not URL-encode it. The base64 cursor always resolves; the raw numeric database ID also works on this endpoint, but the base64 form is the portable choice across the API.

Query

NomeTipoObbligatorioDescrizionePredefinito
pageintegerfacoltativo1-based page number for offset pagination.1
perPageintegerfacoltativoNumber of records per page.—
filtersstringfacoltativoJSON-encoded SocialPostFiltersInput (e.g. by `type`, `status`, `creationDateRange`, `siteUrls`).—
sortFieldsstringfacoltativoJSON-encoded sort object `{ "field": "created_at", "order": "Descending" }`. `field` is one of name, type, status, created_at, schedule_start_date, schedule_end_date, client_name, clicks, views, shares.—
locationIdsstringfacoltativoJSON-encoded array of location IDs to include alongside the path location.—
componentIdentifierstringfacoltativoFilter to campaigns created by a specific component/integration.—

Risposte

200A page of bulk campaigns that include the location. `records` is empty when no bulk campaign has targeted it.
Response
{  "data": {    "rollupSocialPosts": {      "records": [        {          "id": "U29jaWFsUG9zdDo1MTA4OA==",          "name": "Diwali Offer - All Stores",          "status": "SUCCESS",          "type": "OFFER",          "createdAt": "2026-06-20",          "scheduledStartDate": "2026-06-22",          "scheduledEndDate": "2026-07-06",          "views": 4210,          "clicks": 318,          "shares": 12,          "reactions": 87,          "comments": 4,          "sites": ["GOOGLE", "FACEBOOK"],          "message": [            { "site": "GOOGLE", "message": "Festive savings across all our stores this week." },            { "site": "FACEBOOK", "message": "Festive savings across all our stores this week!" }          ],          "cta": [            { "type": { "value": "GET_OFFER", "label": "Get offer" }, "url": "https://jennyhome.example/diwali", "site": "GOOGLE", "tinyUrl": "https://tiny.cc/jh-diwali" }          ],          "contextInfo": {            "couponCode": "DIWALI25",            "redeemUrl": "https://jennyhome.example/diwali",            "termsConditions": "Valid in-store only. Cannot be combined with other offers.",            "title": "25% off storewide",            "discount": "25%",            "startDay": "2026-06-22",            "endDay": "2026-07-06"          },          "mediaUrl": [            { "url": "https://cdn.listingsapi.com/posts/51088/diwali.jpg", "site": "GOOGLE", "type": "IMAGE" }          ],          "publishDetails": [            { "site": "GOOGLE", "status": "PUBLISHED", "createdDate": "2026-06-20", "publishedDate": "2026-06-22", "submissionError": null },            { "site": "FACEBOOK", "status": "PUBLISHED", "createdDate": "2026-06-20", "publishedDate": "2026-06-22", "submissionError": null }          ],          "postLinks": [            { "site": "GOOGLE", "link": "https://www.google.com/maps/place/?post=51088" }          ],          "locationIds": [1800289, 1800290, 1800291],          "clientName": "Jenny Home"        }      ],      "locationDetails": [        {          "id": "TG9jYXRpb246MTgwMDI4OQ==",          "name": "Jenny Home",          "street": "600 Congress Ave, Suite 200",          "city": "Austin",          "postalCode": "78701",          "countryIso": "US",          "stateIso": "TX",          "stateName": "Texas",          "storeId": null        }      ],      "pageInfo": {        "totalPages": 1,        "hasNextPage": false,        "hasPreviousPage": false,        "totalRecords": 1      }    }  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

Un post in blocco è una campagna pubblicata su più sedi contemporaneamente (creata tramite POST /bulk-posts). Questo endpoint elenca le campagne in blocco che includono la sede specificata, così puoi visualizzare i riepiloghi relativi a più negozi dalla prospettiva di un singolo negozio. La struttura della risposta è identica a quella di GET /locations/{locationId}/posts; i record qui si estendono semplicemente a più locationIds.

Caso d'uso: riconciliare una pubblicazione estesa a tutta la catena. Dopo aver lanciato un'"Offerta Diwali" in tutti i negozi, chiama GET /locations/1800289/bulk-posts da un negozio qualsiasi per confermare che la campagna lo abbia raggiunto, esamina il campo condiviso contextInfo (codice coupon, sconto, condizioni) e leggi il campo publishDetails per ciascun sito per individuare un FACEBOOK submissionError per quella sede.

Aspetti da tenere presenti.

  • Come per l'elenco relativo a una singola sede: la paginazione è basata su offset tramite page/perPage, sortFields è un singolo oggetto (non un array) e un polling intensivo può restituire HTTP 429.
  • Il campo locationIds di ogni record contiene l'insieme completo delle sedi a cui era destinata la campagna, quindi conterrà anche ID diversi da quello nel percorso.

L'array records riportato sopra è rappresentativo. La sede di esempio nell'ambiente reale (Jenny Home) non ha campagne in blocco, quindi una chiamata reale restituisce records: [] con pageInfo.totalRecords: 0.

Request
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/bulk-posts' \  -H "Authorization: API $LISTINGSAPI_KEY"