Store
Nearest store
Gets information about the nearest store based on the order delivery address
GET
/
stores
/
available
cURL
curl --request GET \
--url https://api3.trycents.com/api/v1/common/stores/available \
--header 'Authorization: Bearer <token>' \
--header 'fwdorigin: <fwdorigin>'import requests
url = "https://api3.trycents.com/api/v1/common/stores/available"
headers = {
"fwdorigin": "<fwdorigin>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {fwdorigin: '<fwdorigin>', Authorization: 'Bearer <token>'}
};
fetch('https://api3.trycents.com/api/v1/common/stores/available', 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://api3.trycents.com/api/v1/common/stores/available",
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>",
"fwdorigin: <fwdorigin>"
],
]);
$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://api3.trycents.com/api/v1/common/stores/available"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("fwdorigin", "<fwdorigin>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api3.trycents.com/api/v1/common/stores/available")
.header("fwdorigin", "<fwdorigin>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api3.trycents.com/api/v1/common/stores/available")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["fwdorigin"] = '<fwdorigin>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 98,
"businessId": 3,
"name": "ZDD store ES",
"address": "40 Wooster St",
"state": "NY",
"city": "New York",
"zipCode": "10013",
"phoneNumber": "709094080",
"location": {
"lat": 37.7741914,
"lng": -122.4931805
}
}{
"error": "Invalid token."
}{
"error": "Available store not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
DISPATCH_API Query Parameters
ID of business
ID of place from google format
⌘I
cURL
curl --request GET \
--url https://api3.trycents.com/api/v1/common/stores/available \
--header 'Authorization: Bearer <token>' \
--header 'fwdorigin: <fwdorigin>'import requests
url = "https://api3.trycents.com/api/v1/common/stores/available"
headers = {
"fwdorigin": "<fwdorigin>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {fwdorigin: '<fwdorigin>', Authorization: 'Bearer <token>'}
};
fetch('https://api3.trycents.com/api/v1/common/stores/available', 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://api3.trycents.com/api/v1/common/stores/available",
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>",
"fwdorigin: <fwdorigin>"
],
]);
$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://api3.trycents.com/api/v1/common/stores/available"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("fwdorigin", "<fwdorigin>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api3.trycents.com/api/v1/common/stores/available")
.header("fwdorigin", "<fwdorigin>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api3.trycents.com/api/v1/common/stores/available")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["fwdorigin"] = '<fwdorigin>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 98,
"businessId": 3,
"name": "ZDD store ES",
"address": "40 Wooster St",
"state": "NY",
"city": "New York",
"zipCode": "10013",
"phoneNumber": "709094080",
"location": {
"lat": 37.7741914,
"lng": -122.4931805
}
}{
"error": "Invalid token."
}{
"error": "Available store not found"
}