GET
/api/v4/locations/{locationId}/posts사업장의 게시물 가져오기
단일 사업장을 대상으로 하는 소셜 게시물 캠페인(공지, 이벤트, 혜택)을 한 페이지씩 반환합니다.
매개변수
경로
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
| locationId | string | 필수 | 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. |
쿼리
| 이름 | 유형 | 필수 | 설명 | 기본값 |
|---|---|---|---|---|
| page | integer | 선택 | 1-based page number for offset pagination. | 1 |
| perPage | integer | 선택 | Number of records per page. Must not exceed 50. | 10 |
응답
200A page of post campaigns for the location, under `data.postsByLocation`. `records` is empty when the location has no posts yet.
{ "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.
이 엔드포인트를 사용하면 단일 매장의 게시물 이력, 즉 해당 사업장이 포함된 모든 공지, 이벤트, 혜택 캠페인을 수명 주기 status 및 게시물별 참여 수치(views, clicks, reactions)와 함께 조회할 수 있습니다.
사용 사례: 캠페인 시작 전 점검. _Jenny Home_의 새 Google 게시물을 예약하기 전에 GET /locations/TG9jYXRpb246MTgwMDI4OQ==/posts를 호출하여 이미 게시된 게시물, 아직 SCHEDULED 상태인 게시물, 지난 공지의 성과를 확인합니다. 혜택을 구분하려면 각 레코드의 type을 확인합니다. 이 엔드포인트에는 서버 측 유형 필터가 없습니다.
주의 사항.
- 이 엔드포인트가 받는 인수는
page와perPage뿐입니다. 여기에는filters,sortFields,locationIds또는componentIdentifier매개변수가 없으며(이 매개변수들은 일괄 게시물 엔드포인트에 해당합니다), 이 중 하나를 보내면 거부되지 않고 무시됩니다. 반환된records의 필터링과 정렬은 자체 코드에서 수행합니다. - 이 경로에서
tag는tag is not a supported parameter for this query와 함께 즉시 거부됩니다. 태그를 통해 사업장 집합을 확인해야 하는 경우 일괄 게시물 엔드포인트를 사용합니다. perPage의 상한은 50이며, 더 큰 값을 지정하면per_page must not exceed 50과 함께 실패합니다.locationId는 목록/검색 엔드포인트에서 반환된 그대로 base64 커서(예:TG9jYXRpb246MTgwMDI4OQ==)로 전달하며, URL 인코딩하지 않습니다.- 페이지네이션은 오프셋 기반입니다.
page와perPage(기본값 10)를 사용하고,pageInfo.totalPages/pageInfo.totalRecords를 확인하여 중단 시점을 판단합니다. - 지속적으로 폴링하면 계정의 요청 속도 제한(HTTP 429)에 도달할 수 있으므로
Retry-After헤더를 준수합니다.
위 예시의 records 배열은 대표적인 예시입니다. 실제 시드 사업장(Jenny Home)에는 현재 소셜 게시물이 없으므로 실제 호출 시 pageInfo.totalRecords: 0과 함께 records: []가 반환됩니다.
관련: POST /posts로 게시물을 생성하거나, GET /posts/{postId}로 단일 캠페인을 가져오거나, GET /locations/{locationId}/bulk-posts로 일괄(여러 사업장) 캠페인 목록을 조회할 수 있으며, 마지막 엔드포인트는 filters와 sortFields를 지원하고 rollupSocialPosts 아래에 응답을 반환합니다.
Request
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/posts' \ -H "Authorization: API $LISTINGSAPI_KEY"