/api/v4/posts/{postId}Bir gönderiyi alın
İçeriği, site başına yayınlanma durumu ve etkileşim analizleriyle birlikte tek bir sosyal medya gönderisi kampanyası döndürür.
Parametreler
Yol
| Ad | Tür | Zorunlu | Açıklama |
|---|---|---|---|
| postId | string | zorunlu | Base64-encoded social post ID (e.g. from the `id` field of a posts list, or the `socialPost.id` returned by POST /posts). |
Yanıtlar
200The post's content, publish details, and analytics.
{ "data": { "socialPostView": { "socialPostId": "U29jaWFsUG9zdDo0NDEyMg==", "socialPostInfo": { "id": "U29jaWFsUG9zdDo0NDEyMg==", "name": "Summer Hours Update", "status": "SUCCESS", "type": "ANNOUNCEMENT", "createdAt": "2026-06-28", "scheduledStartDate": "2026-06-28", "scheduledEndDate": "2026-07-28", "views": 128, "clicks": 14, "shares": 0, "reactions": 3, "comments": 1, "sites": ["GOOGLE"], "message": [ { "site": "GOOGLE", "message": "We have extended our summer hours! Open until 9pm on weekdays." } ], "cta": [ { "type": { "value": "LEARN_MORE", "label": "Learn more" }, "url": "https://jennyhome.example/hours", "site": "GOOGLE", "tinyUrl": "https://tiny.cc/jh-hours" } ], "contextInfo": null, "mediaUrl": [ { "url": "https://cdn.listingsapi.com/posts/44122/summer.jpg", "site": "GOOGLE", "type": "IMAGE" } ], "publishDetails": [ { "site": "GOOGLE", "status": "PUBLISHED", "createdDate": "2026-06-28", "publishedDate": "2026-06-28", "submissionError": null } ], "postLinks": [ { "site": "GOOGLE", "link": "https://www.google.com/maps/place/?post=44122" } ], "locationIds": [1800289] }, "publishedLocationsCount": 1, "socialPostAnalyticsBySite": [ { "site": "GOOGLE", "views": 128, "clicks": 14, "reactions": 3, "shares": 0, "comments": 1 } ], "socialPostAnalyticsByLocationId": [ { "locationId": 1800289, "siteStats": [ { "site": "GOOGLE", "status": "PUBLISHED", "views": 128, "clicks": 14, "reactions": 3, "shares": 0, "comments": 1 } ] } ] } }}401Unauthenticated, missing or invalid API key.
Kimliğine göre bir gönderi kampanyasını getirir; her site için mesaj ve CTA, ekli medya, her sitedeki canlı yayınlanma durumu (publishDetails) ve hem siteye göre (socialPostAnalyticsBySite) hem de konuma göre (socialPostAnalyticsByLocationId) ayrılmış etkileşim verileri buna dahildir.
Kullanım senaryosu: yayın sonrası doğrulama. POST /posts ile bir duyuru oluşturduktan hemen sonra, döndürülen socialPost.id değerini alın ve socialPostInfo.status değeri INPROGRESS değerinden SUCCESS değerine geçene kadar GET /posts/{postId} uç noktasını düzenli aralıklarla sorgulayın. Bir sitede işlem başarısız olursa publishDetails[].submissionError nedenini içerir ve publishDetails[].status, ERROR değerini gösterir.
Kullanım senaryosu: etkileşim kontrol paneli. Tek konumlu bir gönderide, konumun tamamını yeniden listelemeden görüntüleme ve tıklama sayıları açısından bir Google-Facebook karşılaştırması oluşturmak için socialPostAnalyticsBySite alanını okuyun.
Notlar.
postId, ham bir tam sayı değil, gönderi listesindeidolarak veya oluşturma yanıtındasocialPost.idolarak sunulan, Base64 ile kodlanmış kimliktir.- Çok konumlu (toplu) bir kampanyayı getirmek için aynı yapıyı
publishedLocationsCount > 1ile döndürenGET /bulk-posts/{postId}kullanın.
Bu örnek, API şemasından oluşturulmuştur. Canlı ortamdaki başlangıç verileri hesabında (Jenny Home) hiç gönderi bulunmadığından, getirme işleminde kullanılabilecek gerçek bir gönderi kimliği yoktu; bilinmeyen veya geçersiz bir kimlik {"data":null,"errors":[{"message":"An error occurred processing your request."}]} döndürür.
curl -X GET 'https://listingsapi.com/api/v4/posts/<postId>' \ -H "Authorization: API $LISTINGSAPI_KEY"