Localização de embarcador
curl --request POST \
--url 'https://sandbox.api.gohusky.net/nearestStore?token=' \
--header 'Content-Type: application/json' \
--data '
{
"orderInfo": {
"lat": -30.029819,
"lng": -51.229321,
"label": "Label opcional"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/nearestStore?token="
payload = { "orderInfo": {
"lat": -30.029819,
"lng": -51.229321,
"label": "Label opcional"
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({orderInfo: {lat: -30.029819, lng: -51.229321, label: 'Label opcional'}})
};
fetch('https://sandbox.api.gohusky.net/nearestStore?token=', 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://sandbox.api.gohusky.net/nearestStore?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderInfo' => [
'lat' => -30.029819,
'lng' => -51.229321,
'label' => 'Label opcional'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.gohusky.net/nearestStore?token="
payload := strings.NewReader("{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.gohusky.net/nearestStore?token=")
.header("Content-Type", "application/json")
.body("{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/nearestStore?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}"
response = http.request(request)
puts response.read_body{
"totalDistance": 123,
"area": "<string>"
}{
"status": 0,
"message": "O campo \"lat\" não foi informado"
}{
"success": 0,
"message": "Token inválido ou não autorizado"
}{
"success": 0,
"message": "Token não informado corretamente"
}{
"success": 0,
"message": "Método não permitido, consulte a documentação."
}Embarcadores
Localização de embarcador
Busca os embarcadores que atendem a uma determinada localização baseada nas coordenadas (latitude e longitude) informadas.
POST
/
nearestStore
Localização de embarcador
curl --request POST \
--url 'https://sandbox.api.gohusky.net/nearestStore?token=' \
--header 'Content-Type: application/json' \
--data '
{
"orderInfo": {
"lat": -30.029819,
"lng": -51.229321,
"label": "Label opcional"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/nearestStore?token="
payload = { "orderInfo": {
"lat": -30.029819,
"lng": -51.229321,
"label": "Label opcional"
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({orderInfo: {lat: -30.029819, lng: -51.229321, label: 'Label opcional'}})
};
fetch('https://sandbox.api.gohusky.net/nearestStore?token=', 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://sandbox.api.gohusky.net/nearestStore?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderInfo' => [
'lat' => -30.029819,
'lng' => -51.229321,
'label' => 'Label opcional'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.gohusky.net/nearestStore?token="
payload := strings.NewReader("{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.gohusky.net/nearestStore?token=")
.header("Content-Type", "application/json")
.body("{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/nearestStore?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderInfo\": {\n \"lat\": -30.029819,\n \"lng\": -51.229321,\n \"label\": \"Label opcional\"\n }\n}"
response = http.request(request)
puts response.read_body{
"totalDistance": 123,
"area": "<string>"
}{
"status": 0,
"message": "O campo \"lat\" não foi informado"
}{
"success": 0,
"message": "Token inválido ou não autorizado"
}{
"success": 0,
"message": "Token não informado corretamente"
}{
"success": 0,
"message": "Método não permitido, consulte a documentação."
}Authorizations
Token de autenticação via query parameter. Pode representar o ID público da operação (Operador Logístico) ou o ID público do embarcador (Restaurante, loja, farmácia).
Query Parameters
Especifica o ambiente para executar a requisição.
Define o tipo de autenticação:
true = Embarcador (Restaurante, Loja, Farmácia)
false = Operação (Operador Logístico)
Body
application/json
Show child attributes
Show child attributes
Was this page helpful?
⌘I

