Autocomplete address
curl --request GET \
--url https://store.salesive.com/api/v1/shipping-address/autocomplete \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/shipping-address/autocomplete"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/shipping-address/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/shipping-address/autocomplete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/shipping-address/autocomplete"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://store.salesive.com/api/v1/shipping-address/autocomplete")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/shipping-address/autocomplete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"suggestions": {
"results": [
{
"formatted": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"country_code": "<string>",
"lat": 123,
"lon": 123
}
]
}
}
}Shipping address
Autocomplete address
Get real-time address suggestions as users type to improve address entry experience.
GET
/
shipping-address
/
autocomplete
Autocomplete address
curl --request GET \
--url https://store.salesive.com/api/v1/shipping-address/autocomplete \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/shipping-address/autocomplete"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/shipping-address/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/shipping-address/autocomplete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/shipping-address/autocomplete"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://store.salesive.com/api/v1/shipping-address/autocomplete")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/shipping-address/autocomplete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"suggestions": {
"results": [
{
"formatted": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"country_code": "<string>",
"lat": 123,
"lon": 123
}
]
}
}
}Request
GET /shipping-address/autocomplete?text=No 1 Eugene&limit=5
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the customer token as Bearer <jwt>. |
x-shop-id | string | Identify the shop context. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Partial address text to search for. |
limit | integer | No | Maximum number of suggestions to return (default: 5). |
Successful response
{
"status": 200,
"success": true,
"message": "Address suggestions retrieved",
"data": {
"suggestions": {
"results": [
{
"formatted": "No 1 Eugene Oba Street, Enugu, Nigeria",
"address_line1": "No 1 Eugene Oba Street",
"address_line2": "Enugu, Enugu State",
"city": "Enugu",
"state": "Enugu State",
"postcode": "400251",
"country": "Nigeria",
"lat": 6.4216348975198825,
"lon": 7.483457659243914
},
{
"formatted": "Eugene Street, Enugu, Nigeria",
"address_line1": "Eugene Street",
"address_line2": "Enugu, Enugu State",
"city": "Enugu",
"state": "Enugu State",
"country": "Nigeria",
"lat": 6.4520,
"lon": 7.5120
}
]
}
}
}
Use this endpoint to provide address autocomplete as users type in address forms. It enhances user experience and reduces address entry errors.
Error response
{
"status": 400,
"success": false,
"message": "Search text is required",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Query Parameters
Partial address text to search for.
Maximum number of suggestions to return (default: 5).
Required range:
x >= 1Was this page helpful?
⌘I

