Places
Address autocomplete and place lookup, fronted by Google Places. Reuse a `sessionToken` across consecutive autocomplete calls and the final details call to keep billing on a single Places session.
The session field is intentionally sessionToken (camelCase) on both endpoints. The server renames it from session_token via #[serde(rename = "sessionToken")].
POST /api/v1/places/autocomplete
Predictions for a partial address. Inputs shorter than 3 characters short-circuit to an empty predictions array without hitting the upstream provider.
Body
| Field | Type | Description |
|---|---|---|
input | string | User-typed query. Required. |
sessionToken | string | Caller-generated UUID; reuse it for the matching /details call. |
Request
curl -X POST https://api.cimplify.io/api/v1/places/autocomplete \
-H "X-Public-Key: pk_test_your_publishable_key" \
-H "Content-Type: application/json" \
-d '{
"input": "12 Independence",
"sessionToken": "5b1f9d80-2c70-4f2c-bf61-a0e6fa6b02a1"
}'Response
{
"success": true,
"data": {
"predictions": [
{
"place_id": "ChIJ…",
"description": "12 Independence Avenue, Accra, Ghana",
"main_text": "12 Independence Avenue",
"secondary_text": "Accra, Ghana"
}
]
}
}POST /api/v1/places/details
Resolve a place_id to a structured address, lat/lng, and viewport. Pass the same sessionToken used for the autocomplete call to share billing on a single Places session.
Body
| Field | Type | Description |
|---|---|---|
place_id | string | From predictions[].place_id. Required. |
sessionToken | string | Optional. Same token as the autocomplete request. |
Request
curl -X POST https://api.cimplify.io/api/v1/places/details \
-H "X-Public-Key: pk_test_your_publishable_key" \
-H "Content-Type: application/json" \
-d '{
"place_id": "ChIJ…",
"sessionToken": "5b1f9d80-2c70-4f2c-bf61-a0e6fa6b02a1"
}'Response
{
"success": true,
"data": {
"place_id": "ChIJ…",
"formatted_address": "12 Independence Avenue, Accra, Ghana",
"components": {
"street_address": "12 Independence Avenue",
"city": "Accra",
"region": "Greater Accra",
"country": "GH",
"postal_code": null
},
"location": { "lat": 5.5557, "lng": -0.1963 }
}
}Errors
-
500 INTERNAL: Places integration not configured for this environment (no Google credentials). -
503 SERVICE_UNAVAILABLE: upstream Places returned an error. -
Checkout Drop the resolved address into
address_infoon the checkout body.
FX
Indicative FX rates and lockable cross-currency quotes. Pass the resulting `quote_id` as `fx_quote_id` on `/checkout` to settle in a non-cart currency at the locked rate.
Uploads
Two-step presigned upload flow. `init` returns a short-lived URL the client PUTs the file bytes to directly; `confirm` finalises the upload and returns the canonical CDN URL.