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

Bir konumun toplu gönderilerini getirin

Belirli bir konumu içeren toplu (çok konumlu) gönderi kampanyalarını sayfalanmış olarak döndürür.

API anahtarı gerektirir. Başlık biçimi ve anahtar yenileme için Kimlik doğrulama bölümüne bakın.

Parametreler

Yol

AdTürZorunluAçıklama
locationIdstringzorunluBase64-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.

Sorgu

AdTürZorunluAçıklamaVarsayılan
pageintegeristeğe bağlı1-based page number for offset pagination.1
perPageintegeristeğe bağlıNumber of records per page.—
filtersstringisteğe bağlıJSON-encoded SocialPostFiltersInput (e.g. by `type`, `status`, `creationDateRange`, `siteUrls`).—
sortFieldsstringisteğe bağlıJSON-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.—
locationIdsstringisteğe bağlıJSON-encoded array of location IDs to include alongside the path location.—
componentIdentifierstringisteğe bağlıFilter to campaigns created by a specific component/integration.—

Yanıtlar

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.

Toplu gönderi, aynı anda birçok konumda yayınlanan tek bir kampanyadır (POST /bulk-posts aracılığıyla oluşturulur). Bu endpoint, belirtilen konumu içeren toplu kampanyaları listeler; böylece çok mağazalı kampanyaların özetlerini tek bir mağazanın bakış açısından görebilirsiniz. Yanıt yapısı GET /locations/{locationId}/posts ile aynıdır; buradaki kayıtlar yalnızca birden fazla locationIds kapsar.

Kullanım örneği: zincir genelindeki bir kampanya dağıtımını kontrol edin. Tüm mağazalarda bir "Diwali Teklifi" başlattıktan sonra, kampanyanın herhangi bir mağazaya ulaştığını doğrulamak için o mağazadan GET /locations/1800289/bulk-posts çağrısı yapın, paylaşılan contextInfo içeriğini (kupon kodu, indirim, koşullar) inceleyin ve o konumdaki bir FACEBOOK submissionError durumunu tespit etmek için site başına publishDetails değerini okuyun.

Dikkat edilmesi gerekenler.

  • Tek konumlu listeyle aynı kurallar geçerlidir: sayfalama page/perPage aracılığıyla offset tabanlıdır, sortFields tek bir nesnedir (dizi değildir) ve çok sık sorgulama HTTP 429 döndürülmesine neden olabilir.
  • Her kayıttaki locationIds, kampanyanın hedeflediği konumların tamamını içerir; bu nedenle path içindeki kimliğin ötesinde kimlikler de içerir.

Yukarıdaki records dizisi temsilidir. Canlı ortamdaki örnek konumun (Jenny Home) toplu kampanyası yoktur; bu nedenle gerçek bir çağrı, pageInfo.totalRecords: 0 ile birlikte records: [] döndürür.

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