curl --request GET \
--url https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_areas \
--header 'Authorization: Bearer <token>'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_areas"
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_areas', 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_areas",
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_areas"
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_areas")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_areas")
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"
]
},
"shape": "radius",
"latitude": 0,
"longitude": 0,
"radius_meters": 123,
"position": 1073741823,
"points": [
{
"latitude": 123,
"longitude": 123
}
],
"id": 123
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123
}
}Listar áreas
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.
Crie apenas círculos com shape radius, latitude, longitude e radius_meters. Sem position, a área entra no fim. Polígonos existentes retornam shape polygon e points com o desenho completo. Números salvos como texto são convertidos. Se o desenho não puder ser lido, points é null. No PUT do polígono, reenviar points igual ao GET é aceito. Alterar points ou shape retorna 422. Campos comerciais e position continuam editáveis e a exclusão é permitida.
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_areas 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_areas \
--header 'Authorization: Bearer <token>'import requests
url = "https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_areas"
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_areas', 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_areas",
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_areas"
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_areas")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integracao.sandbox.cardapioweb.com/api/partner/v1/merchant/delivery_areas")
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"
]
},
"shape": "radius",
"latitude": 0,
"longitude": 0,
"radius_meters": 123,
"position": 1073741823,
"points": [
{
"latitude": 123,
"longitude": 123
}
],
"id": 123
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123,
"total_pages": 123
}
}Autorizações
Parâmetros de consulta
Esta página foi útil?
