Skip to main content
GET
/
shipping-address
/
coords-to-address
Convert coordinates to address
curl --request GET \
  --url https://store.salesive.com/api/v1/shipping-address/coords-to-address \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "address": {
      "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/coords-to-address?lat=6.4216348975198825&lng=7.483457659243914
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop context.

Query parameters

ParameterTypeRequiredDescription
latnumberYesLatitude coordinate.
lngnumberYesLongitude coordinate.

Successful response

{
  "status": 200,
  "success": true,
  "message": "Address resolved successfully",
  "data": {
    "address": {
      "results": [
        {
          "formatted": "Eugene Oba Street, Enugu 400251, Enugu State, Nigeria",
          "address_line1": "Eugene Oba Street",
          "address_line2": "Enugu 400251, Enugu State",
          "city": "Enugu",
          "state": "Enugu State",
          "postcode": "400251",
          "country": "Nigeria",
          "country_code": "ng",
          "lat": 6.4216348975198825,
          "lon": 7.483457659243914
        }
      ]
    }
  }
}
This endpoint uses the Geoapify reverse geocoding API to convert coordinates into a structured address format.

Error response

{
  "status": 400,
  "success": false,
  "message": "Latitude and longitude are required",
  "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Query Parameters

lat
number
required

Latitude coordinate.

lng
number
required

Longitude coordinate.

Response

Address resolved successfully.

status
integer
required
success
boolean
required
message
string
required
data
object
required