Skip to main content

Resolve Zone

Resolve a street address to the delivery zone it belongs to.

POST /promises/resolve-zone

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key
Content-TypeYesapplication/json

Body Parameters

ParameterTypeRequiredDescription
addressstringYesFull 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

FieldTypeDescription
zoneobjectThe matched delivery zone
zone.idstringUnique zone identifier
zone.namestringHuman-readable zone name
zone.slugstringURL-safe zone identifier
zone.organizationIdstringOrganization that owns the zone
coordinatesobjectGeocoded coordinates for the address
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
confidencestringMatch confidence: high, medium, or low

Confidence Levels

The confidence field indicates how certain the system is that the resolved zone is correct:

LevelMeaningRecommended Action
highAddress geocoded precisely and falls clearly inside a zone polygonUse the zone directly
mediumAddress was geocoded but is near a zone boundary, or the geocoder returned an approximate locationUse with caution; consider manual verification for critical orders
lowAddress could not be precisely geocoded; the system matched to the nearest zone by proximityVerify 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