GET
/api/v4/bulk-posts/{postId}依 ID 取得大量貼文
傳回單一大量(多地點)貼文活動,包含其內容、各地點的發布狀態及互動分析資料。
參數
路徑
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| postId | string | 必填 | Base64-encoded bulk post ID (the `id` returned by POST /bulk-posts or listed by GET /locations/{locationId}/bulk-posts). |
回應
200The campaign's content, per-location publish details, and analytics.
{ "data": { "socialPostView": { "socialPostId": "U29jaWFsUG9zdDo1MTA4OA==", "socialPostInfo": { "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] }, "publishedLocationsCount": 3, "socialPostAnalyticsBySite": [ { "site": "GOOGLE", "views": 3120, "clicks": 240, "reactions": 61, "shares": 0, "comments": 0 }, { "site": "FACEBOOK", "views": 1090, "clicks": 78, "reactions": 26, "shares": 12, "comments": 4 } ], "socialPostAnalyticsByLocationId": [ { "locationId": 1800289, "siteStats": [ { "site": "GOOGLE", "status": "PUBLISHED", "views": 1040, "clicks": 80, "reactions": 20, "shares": 0, "comments": 0 }, { "site": "FACEBOOK", "status": "PUBLISHED", "views": 360, "clicks": 26, "reactions": 9, "shares": 4, "comments": 1 } ] } ] } }}401Unauthenticated, missing or invalid API key.
這是 GET /posts/{postId} 的大量版本。對於一次發布至多個地點的活動,它會傳回相同的 SocialPostView 結構,因此 publishedLocationsCount 大於 1,且 socialPostAnalyticsByLocationId 包含每家門市各自的一筆資料。
使用案例:追蹤整個連鎖體系的發布進度。透過 POST /bulk-posts 向所有門市發布節慶優惠後,輪詢 GET /bulk-posts/{postId},直到 socialPostInfo.status 為 SUCCESS。接著讀取 socialPostAnalyticsByLocationId,查看哪些門市帶來最多點擊,並檢查 publishDetails(以及各地點的 siteStats.status),找出網站傳回 ERROR 的門市。
注意事項。
postId是大量建立呼叫或大量清單所傳回、經 Base64 編碼的id,並非原始整數。socialPostAnalyticsBySite彙總活動中所有地點的資料;socialPostAnalyticsByLocationId則按門市細分相同的資料。
此範例根據 API 結構描述建構。實際環境中的範例帳戶(Jenny Home)沒有大量活動,因此沒有可用於擷取的實際 ID;未知或無效的 ID 會傳回 {"data":null,"errors":[{"message":"An error occurred processing your request."}]}。
Request
curl -X GET 'https://listingsapi.com/api/v4/bulk-posts/<postId>' \ -H "Authorization: API $LISTINGSAPI_KEY"