curl --request POST \
--url https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Centro",
"city": "Fortaleza",
"state": "CE",
"delivery_fee": 5,
"estimated_delivery_time": 40
}
'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
payload = {
"name": "Centro",
"city": "Fortaleza",
"state": "CE",
"delivery_fee": 5,
"estimated_delivery_time": 40
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Centro',
city: 'Fortaleza',
state: 'CE',
delivery_fee: 5,
estimated_delivery_time: 40
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Centro',
'city' => 'Fortaleza',
'state' => 'CE',
'delivery_fee' => 5,
'estimated_delivery_time' => 40
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
payload := strings.NewReader("{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"code": 4220,
"message": "<string>",
"details": "<string>",
"errors": {}
}Criar bairro
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.
Limite de criação pela Partner e pelo MCP de 300 bairros, incluindo registros do portal. Edição e exclusão continuam disponíveis ao atingir o limite.
Nome obrigatório com até 120 caracteres, taxa e taxa do entregador de 0 a 1.000, prazo opcional inteiro de 0 a 10.080 minutos e observação de até 500 caracteres. Registros antigos fora desses limites falham ao salvar.
MCP: use create_delivery_neighborhood com merchant_uuid. Exige a permissão delivery_pages e despacha esta mesma rota.
curl --request POST \
--url https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Centro",
"city": "Fortaleza",
"state": "CE",
"delivery_fee": 5,
"estimated_delivery_time": 40
}
'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
payload = {
"name": "Centro",
"city": "Fortaleza",
"state": "CE",
"delivery_fee": 5,
"estimated_delivery_time": 40
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Centro',
city: 'Fortaleza',
state: 'CE',
delivery_fee: 5,
estimated_delivery_time: 40
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Centro',
'city' => 'Fortaleza',
'state' => 'CE',
'delivery_fee' => 5,
'estimated_delivery_time' => 40
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods"
payload := strings.NewReader("{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_neighborhoods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Centro\",\n \"city\": \"Fortaleza\",\n \"state\": \"CE\",\n \"delivery_fee\": 5,\n \"estimated_delivery_time\": 40\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"code": 4220,
"message": "<string>",
"details": "<string>",
"errors": {}
}Autorizações
Corpo
Resposta
Sucesso.
Esta página foi útil?
