> For the complete documentation index, see [llms.txt](https://api.senderwiz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.senderwiz.com/customer/countries/get-all-zones-of-a-country.md).

# Get All Zones of a Country

### 🗺️ Get All Zones of a Country

Use this endpoint to fetch paginated state or region data for a selected country.

***

#### 🔹 HTTP Request

```http
GET API-URL/countries/COUNTRY-ID/zones
```

***

#### 🔸 URL Segments

| Segment      | Required | Description                       |
| ------------ | -------- | --------------------------------- |
| `COUNTRY-ID` | Yes      | Country ID to retrieve zones for. |

***

#### 🧾 Query Parameters

| Parameter  | Default | Description                 |
| ---------- | ------- | --------------------------- |
| `page`     | 1       | Current page to retrieve.   |
| `per_page` | 10      | Items per page to retrieve. |

***

#### 🔐 Authorization Header

```
X-API-KEY: your-api-key-here
```

***

#### 💻 PHP Example

```php
// get country zones
$response = $endpoint->getZones(COUNTRY-ID, $pageNumber = 1, $perPage = 10);

// DISPLAY RESPONSE
echo '<hr /><pre>';
print_r($response->body);
echo '</pre>';
```

***

#### 📦 Sample JSON Response

```json
{
  "status": "success",
  "data": {
    "count": "65",
    "total_pages": 7,
    "current_page": 1,
    "next_page": 2,
    "prev_page": null,
    "records": [
      {
        "zone_id": "5101",
        "name": "Alabama",
        "code": "AL"
      },
      {
        "zone_id": "5102",
        "name": "Alaska",
        "code": "AK"
      },
      {
        "zone_id": "5103",
        "name": "American Samoa",
        "code": "AS"
      },
      {
        "zone_id": "5104",
        "name": "Arizona",
        "code": "AZ"
      },
      {
        "zone_id": "5105",
        "name": "Arkansas",
        "code": "AR"
      },
      {
        "zone_id": "5106",
        "name": "Armed Forces Africa",
        "code": "AF"
      },
      {
        "zone_id": "5107",
        "name": "Armed Forces Americas",
        "code": "AA"
      },
      {
        "zone_id": "5108",
        "name": "Armed Forces Canada",
        "code": "AC"
      },
      {
        "zone_id": "5109",
        "name": "Armed Forces Europe",
        "code": "AE"
      },
      {
        "zone_id": "5110",
        "name": "Armed Forces Middle East",
        "code": "AM"
      }
    ]
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api.senderwiz.com/customer/countries/get-all-zones-of-a-country.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
