Source: https://developers.woosmap.com/api-reference/zones-api/get-zones-zone_id/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Get Zone from ID



# Get Zone from ID

 GET 
https://api.woosmap.com/zones/{zone\_id}

Used to retrieve a zone from his `zone_id`

### Authorization

[`private_key`](#authorization-woosmap-platform-api-reference-privateapikeyauth)
apiKeyquery

A Private key generated specifically to authenticate API requests on server side. Required for Data management API. See how to [register a Private API Key](https://developers.woosmap.com/api-reference/authentication/#registering-a-woosmap-private-api-key).

### Path Parameters

[`zone_id`](#path-zone-id)
stringrequired

ID of the zone to get

Example:`ZoneA`

### Response

200application/json

Zone successfully retrieved

[`zone_id`](#resp-200-zone-id)
stringrequired

A textual identifier that uniquely identifies a Zone.

Example:`ZoneA`

[`description`](#resp-200-description)
string

Textual description of your Zone

Example:`Delivery Zone for Store A`

[`store_id`](#resp-200-store-id)
stringrequired

A textual identifier that uniquely identifies an Asset. It must matches the following regexp `[A-Za-z0-9]+`

Example:`STORE_ID_12345`

[`polygon`](#resp-200-polygon)
stringrequired

Zone geometry polygon as **Well Known Text**. WKT defines how to represent geometry of one object (cf. [https://en.wikipedia.org/wiki/Well-known\_text](https://en.wikipedia.org/wiki/Well-known_text)). Your zones could be complex and multipart polygons.

Example:`POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))`

[`types`](#resp-200-types)
string[]

Contains an array of types describing the Zone.

Example:

```json
[
  "delivery",
  "san_francisco_west"
]
```

[`status`](#resp-200-status)
string

the status as string

Example:`ok`

### Errors

#401

Unauthorized. Incorrect authentication credentials.

 

`application/json`

[`detail`](#err-401-detail)
string

Details for the credentials error

Example:`Incorrect authentication credentials. Please check or use a valid API Key`

#403

Forbidden. This Woosmap API is not enabled for this project.

 

`application/json`

[`detail`](#err-403-detail)
string

Details for the forbidden error message

Example:`This Woosmap API is not enabled for this project.`

#404

Not Found - `zone_id` do not exist.

 

```shell
curl -L 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'
```

```javascript
const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

```python
import requests

url = "https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

```json
{
  "store_id": "STORE_ID_123456",
  "zone_id": "ZoneA",
  "polygon": "POLYGON ((-122.496116 37.7648181, -122.4954079 37.751518, -122.4635648 37.7530788, -122.4618481 37.7514501, -122.4601315 37.7521288, -122.4565266 37.7513144, -122.4540375 37.7566755, -122.4528359 37.7583041, -122.4515485 37.7595934, -122.4546384 37.774656, -122.4718903 37.7731635, -122.472577 37.772485, -122.4755811 37.7725529, -122.4791001 37.7723493, -122.4793576 37.7713995, -122.4784993 37.769839, -122.4783276 37.7680071, -122.4774693 37.766718, -122.4772118 37.7652931, -122.496116 37.7648181))",
  "types": [
    "delivery"
  ],
  "description": "Delivery Zone for Store A",
  "status": "ok"
}
```

```json
{
  "detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
```

```json
{
  "detail": "This Woosmap API is not enabled for this project."
}
```
