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

取得地點的大量貼文

傳回一頁包含單一地點的大量(多地點)貼文活動。

需要 API 金鑰。標頭格式與金鑰輪替請參閱驗證。

參數

路徑

名稱類型必填說明
locationIdstring必填Base64-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.

查詢

名稱類型必填說明預設值
pageinteger選填1-based page number for offset pagination.1
perPageinteger選填Number of records per page.—
filtersstring選填JSON-encoded SocialPostFiltersInput (e.g. by `type`, `status`, `creationDateRange`, `siteUrls`).—
sortFieldsstring選填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.—
locationIdsstring選填JSON-encoded array of location IDs to include alongside the path location.—
componentIdentifierstring選填Filter to campaigns created by a specific component/integration.—

回應

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.

大量貼文是指同時發布至多個地點的單一活動(透過 POST /bulk-posts 建立)。此端點會列出包含指定地點的大量活動,讓您從單一門市的角度查看多家門市的彙總資訊。回應結構與 GET /locations/{locationId}/posts 相同;此處的記錄只是涵蓋多個 locationIds。

使用案例:核對整個連鎖體系的活動發布情況。在所有門市推出「排燈節優惠」後,從任一門市呼叫 GET /locations/1800289/bulk-posts,以確認活動已發布至該門市、檢查共用的 contextInfo(優惠券代碼、折扣、條款),並讀取各網站的 publishDetails,以找出該地點的 FACEBOOK submissionError。

注意事項。

  • 與單一地點清單相同:分頁以位移量為基礎,使用 page/perPage,sortFields 是單一物件(不是陣列),而頻繁輪詢可能導致傳回 HTTP 429。
  • 每筆記錄中的 locationIds 都是該活動目標地點的完整集合,其中會包含路徑中指定的 ID 以外的其他 ID。

上方的 records 陣列為代表性範例。實際環境中的範例地點(Jenny Home)沒有任何大量活動,因此實際呼叫會傳回 records: [] 和 pageInfo.totalRecords: 0。

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