curl --request POST \
--url 'https://sandbox.api.gohusky.net/checkOrderPrice?token=' \
--header 'Content-Type: application/json' \
--data '
{
"token": "4156165165165165165165165165165165165165165165165165165165165165",
"geocoding": true,
"return": true,
"destiny": {
"address": "Francisco Cabeda",
"lat": -30,
"lng": -50,
"streetNumber": "81",
"neighborhood": "Centro",
"city": "Santana do Livramento",
"state": "RS",
"country": "BR"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/checkOrderPrice?token="
payload = {
"token": "4156165165165165165165165165165165165165165165165165165165165165",
"geocoding": True,
"return": True,
"destiny": {
"address": "Francisco Cabeda",
"lat": -30,
"lng": -50,
"streetNumber": "81",
"neighborhood": "Centro",
"city": "Santana do Livramento",
"state": "RS",
"country": "BR"
}
}
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({
token: '4156165165165165165165165165165165165165165165165165165165165165',
geocoding: true,
return: true,
destiny: {
address: 'Francisco Cabeda',
lat: -30,
lng: -50,
streetNumber: '81',
neighborhood: 'Centro',
city: 'Santana do Livramento',
state: 'RS',
country: 'BR'
}
})
};
fetch('https://sandbox.api.gohusky.net/checkOrderPrice?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/checkOrderPrice?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([
'token' => '4156165165165165165165165165165165165165165165165165165165165165',
'geocoding' => true,
'return' => true,
'destiny' => [
'address' => 'Francisco Cabeda',
'lat' => -30,
'lng' => -50,
'streetNumber' => '81',
'neighborhood' => 'Centro',
'city' => 'Santana do Livramento',
'state' => 'RS',
'country' => 'BR'
]
]),
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/checkOrderPrice?token="
payload := strings.NewReader("{\n \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\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/checkOrderPrice?token=")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/checkOrderPrice?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 \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\n }\n}"
response = http.request(request)
puts response.read_body{
"price": "28.30",
"distance": 10.123
}{
"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."
}Cotação de entrega
Solicita a cotação de uma entrega. Retorna o valor e distância da entrega.
curl --request POST \
--url 'https://sandbox.api.gohusky.net/checkOrderPrice?token=' \
--header 'Content-Type: application/json' \
--data '
{
"token": "4156165165165165165165165165165165165165165165165165165165165165",
"geocoding": true,
"return": true,
"destiny": {
"address": "Francisco Cabeda",
"lat": -30,
"lng": -50,
"streetNumber": "81",
"neighborhood": "Centro",
"city": "Santana do Livramento",
"state": "RS",
"country": "BR"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/checkOrderPrice?token="
payload = {
"token": "4156165165165165165165165165165165165165165165165165165165165165",
"geocoding": True,
"return": True,
"destiny": {
"address": "Francisco Cabeda",
"lat": -30,
"lng": -50,
"streetNumber": "81",
"neighborhood": "Centro",
"city": "Santana do Livramento",
"state": "RS",
"country": "BR"
}
}
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({
token: '4156165165165165165165165165165165165165165165165165165165165165',
geocoding: true,
return: true,
destiny: {
address: 'Francisco Cabeda',
lat: -30,
lng: -50,
streetNumber: '81',
neighborhood: 'Centro',
city: 'Santana do Livramento',
state: 'RS',
country: 'BR'
}
})
};
fetch('https://sandbox.api.gohusky.net/checkOrderPrice?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/checkOrderPrice?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([
'token' => '4156165165165165165165165165165165165165165165165165165165165165',
'geocoding' => true,
'return' => true,
'destiny' => [
'address' => 'Francisco Cabeda',
'lat' => -30,
'lng' => -50,
'streetNumber' => '81',
'neighborhood' => 'Centro',
'city' => 'Santana do Livramento',
'state' => 'RS',
'country' => 'BR'
]
]),
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/checkOrderPrice?token="
payload := strings.NewReader("{\n \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\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/checkOrderPrice?token=")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/checkOrderPrice?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 \"token\": \"4156165165165165165165165165165165165165165165165165165165165165\",\n \"geocoding\": true,\n \"return\": true,\n \"destiny\": {\n \"address\": \"Francisco Cabeda\",\n \"lat\": -30,\n \"lng\": -50,\n \"streetNumber\": \"81\",\n \"neighborhood\": \"Centro\",\n \"city\": \"Santana do Livramento\",\n \"state\": \"RS\",\n \"country\": \"BR\"\n }\n}"
response = http.request(request)
puts response.read_body{
"price": "28.30",
"distance": 10.123
}{
"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."
}Rate limit
Este endpoint tem o limite:- 100 requisições por minuto.
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
Token do embarcador
"4156165165165165165165165165165165165165165165165165165165165165"
Define se a API deve geocodificar automaticamente o endereço informado
true
Define se a entrega terá retorno para a origem.
true = Retorno para a origem
false = Não tem retorno para a origem
true
Ponto de entrega
Show child attributes
Show child attributes
(Opcional) Ponto de coleta da entrega. Caso não seja informado, será usado o endereço cadastrado em nosso sistema para o embarcador.
Show child attributes
Show child attributes
Was this page helpful?

