curl --request GET \
--url https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods \
--header 'Authorization: Bearer <token>'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods', 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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods",
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>"
],
]);
$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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
req, _ := http.NewRequest("GET", url, nil)
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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "<string>",
"delivery_fee": 500,
"estimated_delivery_time": 5040,
"active": true,
"delivers": true,
"observation": "<string>",
"driver_fee": 500,
"dynamic_price": {
"start_time": "<string>",
"end_time": "<string>",
"delivery_fee": 500,
"weekdays": [
"sunday"
]
},
"unavailable_period": {
"start_time": "<string>",
"end_time": "<string>",
"weekdays": [
"sunday"
]
},
"id": 123,
"city": "<string>",
"state": "<string>"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123
}
}Listar bairros
Use OAuth 2.0 com escopo store no token e na instalação. A loja vem da instalação. IDs de outra loja retornam 404. Limite de 300 requisições a cada 3 minutos. Campos internos como company_id, company_city_id, info_only_by_whatsapp e geometry são ignorados.
O bairro é consultado primeiro. Com mapa ligado, áreas que bloqueiam entrega são avaliadas antes das demais, pela menor position. A primeira que contém o endereço define a regra. Com mapa desligado, o cálculo usa faixas por distância depois do bairro.
Criar exige city e state. A correspondência do município é exata, sem diferenciar maiúsculas e acento. Se não existir, retorna 422 com cidade não encontrada. Quando necessário, cria o vínculo da cidade com a loja, que também aparece no portal. No PUT, campos de cidade omitidos preservam os atuais. Enviar city ou state repete a busca do município. Para editar campos comerciais de um bairro legado sem cidade, omita city e state.
active liga ou desliga a regra. delivers define se ela entrega ou bloqueia o endereço. unavailable_period configura indisponibilidade por horário. dynamic_price substitui a taxa dentro do horário configurado. null remove esses objetos. Omitir no PUT preserva e enviar substitui o objeto completo.
Lista em data e meta, em ordem crescente de ID. per_page acima de 100 é limitado a 100.
MCP: use list_delivery_neighborhoods com merchant_uuid. Exige a permissão delivery_pages e despacha esta mesma rota.
Paginação: page usa 1 e per_page usa 20 quando ausentes ou escalares inválidos. Valores acima do teto de per_page são limitados a 100. Objetos ou listas nesses parâmetros retornam 400.
curl --request GET \
--url https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods \
--header 'Authorization: Bearer <token>'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods', 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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods",
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>"
],
]);
$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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
req, _ := http.NewRequest("GET", url, nil)
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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "<string>",
"delivery_fee": 500,
"estimated_delivery_time": 5040,
"active": true,
"delivers": true,
"observation": "<string>",
"driver_fee": 500,
"dynamic_price": {
"start_time": "<string>",
"end_time": "<string>",
"delivery_fee": 500,
"weekdays": [
"sunday"
]
},
"unavailable_period": {
"start_time": "<string>",
"end_time": "<string>",
"weekdays": [
"sunday"
]
},
"id": 123,
"city": "<string>",
"state": "<string>"
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123
}
}Autorizações
Parâmetros de consulta
Esta página foi útil?
