Resolve Zone
Resolve a street address to the delivery zone it belongs to.
POST /promises/resolve-zoneRequest
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Content-Type | Yes | application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Full street address to resolve (e.g. "Rothschild Blvd 1, Tel Aviv") |
Examples
cURL
curl -X POST "https://api.courimax.com/api/promises/resolve-zone" \
-H "X-API-Key: cmx_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"address": "Rothschild Blvd 1, Tel Aviv"
}'
JavaScript (Fetch)
const response = await fetch('https://api.courimax.com/api/promises/resolve-zone', {
method: 'POST',
headers: {
'X-API-Key': 'cmx_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: 'Rothschild Blvd 1, Tel Aviv'
})
});
const result = await response.json();
console.log(result);
Python (Requests)
import requests
response = requests.post(
'https://api.courimax.com/api/promises/resolve-zone',
headers={
'X-API-Key': 'cmx_your_api_key',
'Content-Type': 'application/json'
},
json={
'address': 'Rothschild Blvd 1, Tel Aviv'
}
)
result = response.json()
print(result)
Response
Success (200 OK)
{
"zone": {
"id": "zone-uuid",
"name": "TLV-CENTER",
"slug": "tlv-center",
"organizationId": "org-uuid"
},
"coordinates": {
"lat": 32.0639,
"lng": 34.7742
},
"confidence": "high"
}
Response Fields
| Field | Type | Description |
|---|---|---|
zone | object | The matched delivery zone |
zone.id | string | Unique zone identifier |
zone.name | string | Human-readable zone name |
zone.slug | string | URL-safe zone identifier |
zone.organizationId | string | Organization that owns the zone |
coordinates | object | Geocoded coordinates for the address |
coordinates.lat | number | Latitude |
coordinates.lng | number | Longitude |
confidence | string | Match confidence: high, medium, or low |
Confidence Levels
The confidence field indicates how certain the system is that the resolved zone is correct:
| Level | Meaning | Recommended Action |
|---|---|---|
high | Address geocoded precisely and falls clearly inside a zone polygon | Use the zone directly |
medium | Address was geocoded but is near a zone boundary, or the geocoder returned an approximate location | Use with caution; consider manual verification for critical orders |
low | Address could not be precisely geocoded; the system matched to the nearest zone by proximity | Verify manually before relying on the result |
Error Responses
400 Bad Request - Missing or invalid address
{
"statusCode": 400,
"message": "address is required",
"error": "Bad Request"
}
404 Not Found - No zone covers this address
{
"statusCode": 404,
"message": "No delivery zone found for the given address",
"error": "Not Found"
}
401 Unauthorized - Missing or invalid API key
{
"statusCode": 401,
"message": "Missing X-API-Key header",
"error": "Unauthorized"
}
Use Cases
- Pre-flight zone check — determine the delivery zone before creating an order
- Address validation — confirm whether an address falls within your delivery area
- Dynamic pricing — adjust pricing or estimated delivery times based on zone
- Dashboard display — show customers which zone their address belongs to
Next Steps
- Export Zones - Export all configured zones
- Create Order - Create an order with zone information
- List Delivery Windows - Check availability in the resolved zone