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 schema 构建。线上的示例账户(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"