GeocodingaddressoperationId validate_commit
POST/v1/validate/commit
Validate an address, seal a receipt, and optionally record the accepted correction as feedback for traffic learning.
Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.
Explained in Validating an address and Decisions and receipts.
Example
Validate the address a user accepted, and seal it.
curl -X POST "https://api.oslew.com/v1/validate/commit" \
-H "Authorization: Bearer $GEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Avenida Insurgentes Sur 1602, Crédito Constructor, 03940 Ciudad de México","selected_rank":1}'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.validate_commit(
{
"text": "Avenida Insurgentes Sur 1602, Crédito Constructor, 03940 Ciudad de México",
"selected_rank": 1,
},
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.validate_commit({
text: "Avenida Insurgentes Sur 1602, Crédito Constructor, 03940 Ciudad de México",
selected_rank: 1,
});HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 293
ratelimit-reset: 1
{
"verdict": "partial",
"formatted": "1602 AVENIDA INSURGENTES SUR, Ciudad de México, 03940, MX",
"components": [
{
"name": "house_number",
"input": "1602",
"matched": "1602",
"quality": "exact"
},
{
"name": "street",
"input": "Avenida Insurgentes Sur",
"matched": "AVENIDA INSURGENTES SUR",
"quality": "exact"
},
{
"name": "locality",
"input": "Crédito Constructor",
"matched": "Ciudad de México",
"quality": "partial"
},
{
"name": "region",
"input": null,
"matched": null,
"quality": "missing"
},
{
"name": "postcode",
"input": "03940 Ciudad de México",
"matched": "03940",
"quality": "partial"
},
{
"name": "country",
"input": null,
"matched": "MX",
"quality": "missing"
}
],
"lat": 19.364069672979937,
"lon": -99.18198831998704,
"precision": "rooftop",
"confidence": 0.25609756,
"candidates": 25,
"why": "matched AVENIDA INSURGENTES SUR 1602 (an address point) among 25 candidates; locality \"Crédito Constructor\" contradicts the match (\"Ciudad de México\"); postcode \"03940 Ciudad de México\" contradicts the match (\"03940\"); country inferred as \"MX\"",
"epoch": 30,
"release": "2026-08-19.0",
"receipt": {
"epoch": 30,
"release": "2026-08-19.0",
"payload_sha256": "5ad2ed3344fa7133d5380a3fff17f9484b02087567b655d76982055291abda55",
"alg": "sha256"
},
"took_us": 2084
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Body
application/json, required.
countrystringhouse_numberstringlocalitystringpostcodestringregionstringselected_rankinteger≥ 1streetstringtextstring
Responses
200 — Validation plus receipt.
candidatesintegerrequiredcomponentsobject[]requiredinputstring | nullrequiredmatchedstring | nullrequirednamestringrequiredqualityMatchQualityrequiredexact | fuzzy | partial | missing
confidencenumberrequiredformattedstringrequiredlatnumber | nullrequiredlonnumber | nullrequiredprecisionPrecision | nullrequiredWhat the position locates, finest first.rooftopis an address point with a house number, as its source recorded it — never a building footprint we snapped to, which would contaminate the permissive bundle.interpolatedis a point placed between the two recorded numbers that bracket the one asked for, which is what Google callsRANGE_INTERPOLATED.streetis an address row with no number to place along it.precision_mcarries the honest radius alongside: the label says what was matched, the metres say how wrong it can be.rooftop | interpolated | address | street | postcode | locality | region | country | poitook_usintegerrequiredverdictstringrequiredconfirmed | corrected | partial | unconfirmedwhystringrequiredepochintegerManifest epoch this answer was served from.receiptReceiptWhich store answered and a digest of what it answered, to keep beside a stored result. Signed only when the operator sets GEO_RECEIPT_SECRET.algstringrequiredsha256, orsha256-keyedwhen signed.sha256 | sha256-keyedepochintegerrequiredManifest epoch the answer came from.payload_sha256stringrequiredSHA-256 hex of the canonical payload.releasestringrequiredData release string.signaturestringSHA-256 hex of the operator's receipt secret, a zero byte and the payload; present only when the operator setGEO_RECEIPT_SECRET, and checkable only by them.
releasestringData release string.
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | Neither text nor street given. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.