# Batch get reviews

Batches get reviews.

```http
POST https://api.pozy.ai/v1/accounts/{accountId}/gmb-reviews/batch
```

- Area: Google Business / Google Business Reviews
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Request body

Content type: `application/json`

- `locationNames`, array of string, required: At least 1 item. Up to 50 items. Each item: matches `^accounts/[^/]+/locations/[^/]+$`
- `pageSize`, integer: Default `50`. 1 to 50
- `pageToken`, string
- `orderBy`, string: One of `updateTime desc`, `rating`, `rating desc`. Default `updateTime desc`

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-reviews/batch" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "locationNames": [
    "Acme"
  ]
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-reviews/batch", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    locationNames: [
      "Acme"
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-reviews/batch",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "locationNames": [
            "Acme",
        ],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `accountId`, string
- `locationReviews`, array of object
  - `name`, string
  - `review`, object
- `nextPageToken`, string

```json
{
  "success": true,
  "accountId": "696e0b682d0a31188e7a2ba9",
  "locationReviews": [
    {
      "name": "Acme",
      "review": {}
    }
  ],
  "nextPageToken": "string"
}
```
