Skip to main content
GET
/
location
Find Merchant Locations
curl --request GET \
  --url https://api.satsuma.ai/location \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.satsuma.ai/location"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.satsuma.ai/location', 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://api.satsuma.ai/location",
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: <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://api.satsuma.ai/location"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<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://api.satsuma.ai/location")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.satsuma.ai/location")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "<string>",
      "merchant_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "address": {
        "street_number": "<string>",
        "street_name": "<string>",
        "street_address": "<string>",
        "street_address_detail": "<string>",
        "city": "<string>",
        "region": "<string>",
        "postal_code": "<string>",
        "country": "<string>"
      },
      "phone_number": "<string>"
    }
  ],
  "messages": [
    {
      "context": "<string>",
      "text": "<string>",
      "data": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

API Key authentication

Query Parameters

query
string

Free-text search query to match against location names, addresses, merchant names, or location identifiers api.merchant.search.field.query.description

Example:

"Whole Foods Market"

type
enum<string>[]

List of location types to filter search results. Restricts search to specified location types only. Types include Store (retail locations) and Warehouse (fulfillment centers). api.merchant.search.field.type.description

api.merchant.search.field.type.description

Available options:
Store,
Warehouse
size
integer<int32>
default:25

Maximum number of locations to return in a single response. Used for pagination control api.merchant.search.field.size.description

Required range: 1 <= x <= 100
Example:

25

page
integer<int32>
default:1

Page number for paginated results, starting from 1. Used with 'size' parameter for pagination api.merchant.search.field.page.description

Required range: x >= 1
Example:

1

latitude
number<double>
required

Geographic latitude coordinate for proximity search. Must be a valid latitude between -90 and 90 degrees api.search.field.latitude.description

Required range: -90 <= x <= 90
Example:

37.7749

longitude
number<double>
required

Geographic longitude coordinate for proximity search. Must be a valid longitude between -180 and 180 degrees api.search.field.longitude.description

Required range: -180 <= x <= 180
Example:

-122.4194

distance
string
default:10mi

Search radius distance from the provided coordinates. Format: number followed by unit (mi for miles, km for kilometers) api.search.field.distance.description

Pattern: ^[0-9]+(mi|km)$
Example:

"10mi"

Response

200 - application/json

OK

data
object[]
messages
object[]