Criação de embarcador
curl --request POST \
--url 'https://sandbox.api.gohusky.net/createStore?token=' \
--header 'Content-Type: application/json' \
--data '
{
"basicInfo": {
"name": "Embarcador Teste",
"phone": "51323366656",
"user": "loja.1tes3t2e@lojateste.com",
"pass": "1234",
"label": "Teste",
"active": true
},
"address": {
"street": "Rua dos Andradas, 1234",
"comp": "Sala 1201",
"lat": -45.4648,
"lng": -45.5468,
"neighborhood": "Centro Histórico",
"city": "Porto Alegre",
"state": "Rio Grande do Sul",
"country": "Brasil"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/createStore?token="
payload = {
"basicInfo": {
"name": "Embarcador Teste",
"phone": "51323366656",
"user": "loja.1tes3t2e@lojateste.com",
"pass": "1234",
"label": "Teste",
"active": True
},
"address": {
"street": "Rua dos Andradas, 1234",
"comp": "Sala 1201",
"lat": -45.4648,
"lng": -45.5468,
"neighborhood": "Centro Histórico",
"city": "Porto Alegre",
"state": "Rio Grande do Sul",
"country": "Brasil"
}
}
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({
basicInfo: {
name: 'Embarcador Teste',
phone: '51323366656',
user: 'loja.1tes3t2e@lojateste.com',
pass: '1234',
label: 'Teste',
active: true
},
address: {
street: 'Rua dos Andradas, 1234',
comp: 'Sala 1201',
lat: -45.4648,
lng: -45.5468,
neighborhood: 'Centro Histórico',
city: 'Porto Alegre',
state: 'Rio Grande do Sul',
country: 'Brasil'
}
})
};
fetch('https://sandbox.api.gohusky.net/createStore?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/createStore?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([
'basicInfo' => [
'name' => 'Embarcador Teste',
'phone' => '51323366656',
'user' => 'loja.1tes3t2e@lojateste.com',
'pass' => '1234',
'label' => 'Teste',
'active' => true
],
'address' => [
'street' => 'Rua dos Andradas, 1234',
'comp' => 'Sala 1201',
'lat' => -45.4648,
'lng' => -45.5468,
'neighborhood' => 'Centro Histórico',
'city' => 'Porto Alegre',
'state' => 'Rio Grande do Sul',
'country' => 'Brasil'
]
]),
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/createStore?token="
payload := strings.NewReader("{\n \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\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/createStore?token=")
.header("Content-Type", "application/json")
.body("{\n \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/createStore?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 \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": 1,
"message": "Solicitação recebida com sucesso!",
"token": "4156165165165165165165165165165165165165165165165165165165165165"
}{
"status": 400,
"message": "É necessário informar nome do embarcador para cadastro."
}{
"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
Criar Embarcador
Cria um embarcador no sistema.
POST
/
createStore
Criação de embarcador
curl --request POST \
--url 'https://sandbox.api.gohusky.net/createStore?token=' \
--header 'Content-Type: application/json' \
--data '
{
"basicInfo": {
"name": "Embarcador Teste",
"phone": "51323366656",
"user": "loja.1tes3t2e@lojateste.com",
"pass": "1234",
"label": "Teste",
"active": true
},
"address": {
"street": "Rua dos Andradas, 1234",
"comp": "Sala 1201",
"lat": -45.4648,
"lng": -45.5468,
"neighborhood": "Centro Histórico",
"city": "Porto Alegre",
"state": "Rio Grande do Sul",
"country": "Brasil"
}
}
'import requests
url = "https://sandbox.api.gohusky.net/createStore?token="
payload = {
"basicInfo": {
"name": "Embarcador Teste",
"phone": "51323366656",
"user": "loja.1tes3t2e@lojateste.com",
"pass": "1234",
"label": "Teste",
"active": True
},
"address": {
"street": "Rua dos Andradas, 1234",
"comp": "Sala 1201",
"lat": -45.4648,
"lng": -45.5468,
"neighborhood": "Centro Histórico",
"city": "Porto Alegre",
"state": "Rio Grande do Sul",
"country": "Brasil"
}
}
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({
basicInfo: {
name: 'Embarcador Teste',
phone: '51323366656',
user: 'loja.1tes3t2e@lojateste.com',
pass: '1234',
label: 'Teste',
active: true
},
address: {
street: 'Rua dos Andradas, 1234',
comp: 'Sala 1201',
lat: -45.4648,
lng: -45.5468,
neighborhood: 'Centro Histórico',
city: 'Porto Alegre',
state: 'Rio Grande do Sul',
country: 'Brasil'
}
})
};
fetch('https://sandbox.api.gohusky.net/createStore?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/createStore?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([
'basicInfo' => [
'name' => 'Embarcador Teste',
'phone' => '51323366656',
'user' => 'loja.1tes3t2e@lojateste.com',
'pass' => '1234',
'label' => 'Teste',
'active' => true
],
'address' => [
'street' => 'Rua dos Andradas, 1234',
'comp' => 'Sala 1201',
'lat' => -45.4648,
'lng' => -45.5468,
'neighborhood' => 'Centro Histórico',
'city' => 'Porto Alegre',
'state' => 'Rio Grande do Sul',
'country' => 'Brasil'
]
]),
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/createStore?token="
payload := strings.NewReader("{\n \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\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/createStore?token=")
.header("Content-Type", "application/json")
.body("{\n \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.gohusky.net/createStore?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 \"basicInfo\": {\n \"name\": \"Embarcador Teste\",\n \"phone\": \"51323366656\",\n \"user\": \"loja.1tes3t2e@lojateste.com\",\n \"pass\": \"1234\",\n \"label\": \"Teste\",\n \"active\": true\n },\n \"address\": {\n \"street\": \"Rua dos Andradas, 1234\",\n \"comp\": \"Sala 1201\",\n \"lat\": -45.4648,\n \"lng\": -45.5468,\n \"neighborhood\": \"Centro Histórico\",\n \"city\": \"Porto Alegre\",\n \"state\": \"Rio Grande do Sul\",\n \"country\": \"Brasil\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": 1,
"message": "Solicitação recebida com sucesso!",
"token": "4156165165165165165165165165165165165165165165165165165165165165"
}{
"status": 400,
"message": "É necessário informar nome do embarcador para cadastro."
}{
"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
Response
Requisição processada com sucesso
Qualquer valor diferente de 1 indica que ocorreu um erro na criação do embarcador. Em caso de erro, valide o campo message para mais detalhes.
Example:
1
Mensagem de retorno da solicitação
Example:
"Solicitação recebida com sucesso!"
Token do embarcador criado
Example:
"4156165165165165165165165165165165165165165165165165165165165165"
Was this page helpful?
⌘I

