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

Bir konumun gönderilerini getirin

Tek bir konumu hedefleyen sosyal medya gönderisi kampanyalarının (duyurular, etkinlikler, teklifler) bir sayfasını 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. Must not exceed 50.10

Yanıtlar

200A page of post campaigns for the location, under `data.postsByLocation`. `records` is empty when the location has no posts yet.
Response
{  "data": {    "postsByLocation": {      "records": [        {          "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],          "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.

Tek bir mağazanın gönderi geçmişini, yani konumu içeren tüm duyuru, etkinlik ve teklif kampanyalarını, yaşam döngüsü status ve gönderi başına etkileşim sayaçlarıyla (views, clicks, reactions) birlikte almak için bu uç noktayı kullanın.

Kullanım senaryosu: kampanya öncesi denetim. Jenny Home için yeni bir Google gönderisi planlamadan önce, hangi gönderilerin zaten yayında olduğunu, hangilerinin hâlâ SCHEDULED durumunda olduğunu ve son duyurunun nasıl performans gösterdiğini görmek için GET /locations/TG9jYXRpb246MTgwMDI4OQ==/posts çağrısı yapın. Teklifleri ayırt etmek için her kayıttaki type alanını okuyun; bu uç noktada sunucu tarafında tür filtresi yoktur.

Dikkat edilmesi gerekenler.

  • Bu uç noktanın aldığı tek bağımsız değişkenler page ve perPage'dir. Burada filters, sortFields, locationIds veya componentIdentifier parametresi yoktur (bunlar toplu gönderiler uç noktasına aittir) ve bunlardan biri gönderildiğinde reddedilmez, yok sayılır. Döndürülen records verilerini kendi kodunuzda filtreleyin ve sıralayın.
  • tag bu rotada doğrudan tag is not a supported parameter for this query ile reddedilir. Bir etiketten konum kümesini belirlemeniz gerektiğinde toplu gönderiler uç noktasını kullanın.
  • perPage en fazla 50 olabilir; daha büyük bir değer per_page must not exceed 50 ile başarısız olur.
  • locationId değerini, listeleme/arama uç noktalarının döndürdüğü biçimi aynen koruyarak base64 imleci (e.g. TG9jYXRpb246MTgwMDI4OQ==) olarak iletin, URL kodlaması uygulamayın.
  • Sayfalama, ofset tabanlıdır: page ve perPage (varsayılan 10) kullanın ve ne zaman duracağınızı belirlemek için pageInfo.totalPages / pageInfo.totalRecords değerlerini okuyun.
  • Sürekli sorgulama, hesabın istek hızı sınırına ulaşabilir (HTTP 429); Retry-After üst bilgisini dikkate alın.

Yukarıdaki örnekteki records dizisi temsilîdir. Canlı ortamdaki başlangıç konumunun (Jenny Home) şu anda sosyal medya gönderisi yoktur, bu nedenle gerçek bir çağrı pageInfo.totalRecords: 0 ile birlikte records: [] döndürür.

İlgili: POST /posts ile gönderi oluşturun, GET /posts/{postId} ile tek bir kampanyayı getirin veya filters ve sortFields parametrelerini kabul eden ve yanıtı rollupSocialPosts altında döndüren GET /locations/{locationId}/bulk-posts ile toplu (birden çok konumu kapsayan) kampanyaları listeleyin.

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