curl --request PATCH \
--url https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"delivery_enabled": true,
"pickup_enabled": true,
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 0.5,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 1,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 1,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 2,
"uber_direct_pickup_notes_enabled": true,
"uber_direct_pickup_notes": "<string>"
}
'import requests
url = "https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings"
payload = {
"delivery_enabled": True,
"pickup_enabled": True,
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 0.5,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 1,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 1,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 2,
"uber_direct_pickup_notes_enabled": True,
"uber_direct_pickup_notes": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
delivery_enabled: true,
pickup_enabled: true,
postal_codes: [
{
postal_code: 1204,
minimum_order_amount: 25,
delivery_fee: {amount: 123, currency: '<string>'}
}
],
delivery_zones: [
{
id: 'zone-centre',
name: 'Centre-ville',
polygon: [{latitude: 46.20439, longitude: 6.14316}],
minimum_order_amount: 25,
delivery_fee: {amount: 123, currency: '<string>'}
}
],
fee_percentage: 0.5,
smart_parameters: {
menu_uplift: 0.15,
uber_commission: 0.3,
target_lift: 0.03,
coverage_fraction: 0.8
},
distance_ranges: [{up_to_km: 2, displayed_fee: 3.5, minimum_order_amount: 20}],
max_delivery_radius_in_km: 1,
max_delivery_fee: {amount: 123, currency: '<string>'},
min_order_amount: 1,
max_order_amount: 1,
collection_max_order_amount: 1,
max_items_number: 2,
uber_direct_pickup_notes_enabled: true,
uber_direct_pickup_notes: '<string>'
})
};
fetch('https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings', 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://server.chataigne.ai/v1/locations/{location_id}/delivery_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'delivery_enabled' => true,
'pickup_enabled' => true,
'postal_codes' => [
[
'postal_code' => 1204,
'minimum_order_amount' => 25,
'delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
]
]
],
'delivery_zones' => [
[
'id' => 'zone-centre',
'name' => 'Centre-ville',
'polygon' => [
[
'latitude' => 46.20439,
'longitude' => 6.14316
]
],
'minimum_order_amount' => 25,
'delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
]
]
],
'fee_percentage' => 0.5,
'smart_parameters' => [
'menu_uplift' => 0.15,
'uber_commission' => 0.3,
'target_lift' => 0.03,
'coverage_fraction' => 0.8
],
'distance_ranges' => [
[
'up_to_km' => 2,
'displayed_fee' => 3.5,
'minimum_order_amount' => 20
]
],
'max_delivery_radius_in_km' => 1,
'max_delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
],
'min_order_amount' => 1,
'max_order_amount' => 1,
'collection_max_order_amount' => 1,
'max_items_number' => 2,
'uber_direct_pickup_notes_enabled' => true,
'uber_direct_pickup_notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://server.chataigne.ai/v1/locations/{location_id}/delivery_settings"
payload := strings.NewReader("{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "delivery_settings",
"location_id": "<string>",
"delivery_enabled": true,
"pickup_enabled": true,
"provider": "handledByStore",
"fee_strategy": "postalCode",
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 123,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 123,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 123,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 123,
"delivery_verification_mode": "picture",
"uber_direct_pickup_notes_enabled": true,
"uber_direct_pickup_notes": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}Update delivery settings
curl --request PATCH \
--url https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"delivery_enabled": true,
"pickup_enabled": true,
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 0.5,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 1,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 1,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 2,
"uber_direct_pickup_notes_enabled": true,
"uber_direct_pickup_notes": "<string>"
}
'import requests
url = "https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings"
payload = {
"delivery_enabled": True,
"pickup_enabled": True,
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 0.5,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 1,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 1,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 2,
"uber_direct_pickup_notes_enabled": True,
"uber_direct_pickup_notes": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
delivery_enabled: true,
pickup_enabled: true,
postal_codes: [
{
postal_code: 1204,
minimum_order_amount: 25,
delivery_fee: {amount: 123, currency: '<string>'}
}
],
delivery_zones: [
{
id: 'zone-centre',
name: 'Centre-ville',
polygon: [{latitude: 46.20439, longitude: 6.14316}],
minimum_order_amount: 25,
delivery_fee: {amount: 123, currency: '<string>'}
}
],
fee_percentage: 0.5,
smart_parameters: {
menu_uplift: 0.15,
uber_commission: 0.3,
target_lift: 0.03,
coverage_fraction: 0.8
},
distance_ranges: [{up_to_km: 2, displayed_fee: 3.5, minimum_order_amount: 20}],
max_delivery_radius_in_km: 1,
max_delivery_fee: {amount: 123, currency: '<string>'},
min_order_amount: 1,
max_order_amount: 1,
collection_max_order_amount: 1,
max_items_number: 2,
uber_direct_pickup_notes_enabled: true,
uber_direct_pickup_notes: '<string>'
})
};
fetch('https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings', 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://server.chataigne.ai/v1/locations/{location_id}/delivery_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'delivery_enabled' => true,
'pickup_enabled' => true,
'postal_codes' => [
[
'postal_code' => 1204,
'minimum_order_amount' => 25,
'delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
]
]
],
'delivery_zones' => [
[
'id' => 'zone-centre',
'name' => 'Centre-ville',
'polygon' => [
[
'latitude' => 46.20439,
'longitude' => 6.14316
]
],
'minimum_order_amount' => 25,
'delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
]
]
],
'fee_percentage' => 0.5,
'smart_parameters' => [
'menu_uplift' => 0.15,
'uber_commission' => 0.3,
'target_lift' => 0.03,
'coverage_fraction' => 0.8
],
'distance_ranges' => [
[
'up_to_km' => 2,
'displayed_fee' => 3.5,
'minimum_order_amount' => 20
]
],
'max_delivery_radius_in_km' => 1,
'max_delivery_fee' => [
'amount' => 123,
'currency' => '<string>'
],
'min_order_amount' => 1,
'max_order_amount' => 1,
'collection_max_order_amount' => 1,
'max_items_number' => 2,
'uber_direct_pickup_notes_enabled' => true,
'uber_direct_pickup_notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://server.chataigne.ai/v1/locations/{location_id}/delivery_settings"
payload := strings.NewReader("{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.chataigne.ai/v1/locations/{location_id}/delivery_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_enabled\": true,\n \"pickup_enabled\": true,\n \"postal_codes\": [\n {\n \"postal_code\": 1204,\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"delivery_zones\": [\n {\n \"id\": \"zone-centre\",\n \"name\": \"Centre-ville\",\n \"polygon\": [\n {\n \"latitude\": 46.20439,\n \"longitude\": 6.14316\n }\n ],\n \"minimum_order_amount\": 25,\n \"delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n }\n }\n ],\n \"fee_percentage\": 0.5,\n \"smart_parameters\": {\n \"menu_uplift\": 0.15,\n \"uber_commission\": 0.3,\n \"target_lift\": 0.03,\n \"coverage_fraction\": 0.8\n },\n \"distance_ranges\": [\n {\n \"up_to_km\": 2,\n \"displayed_fee\": 3.5,\n \"minimum_order_amount\": 20\n }\n ],\n \"max_delivery_radius_in_km\": 1,\n \"max_delivery_fee\": {\n \"amount\": 123,\n \"currency\": \"<string>\"\n },\n \"min_order_amount\": 1,\n \"max_order_amount\": 1,\n \"collection_max_order_amount\": 1,\n \"max_items_number\": 2,\n \"uber_direct_pickup_notes_enabled\": true,\n \"uber_direct_pickup_notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "delivery_settings",
"location_id": "<string>",
"delivery_enabled": true,
"pickup_enabled": true,
"provider": "handledByStore",
"fee_strategy": "postalCode",
"postal_codes": [
{
"postal_code": 1204,
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"delivery_zones": [
{
"id": "zone-centre",
"name": "Centre-ville",
"polygon": [
{
"latitude": 46.20439,
"longitude": 6.14316
}
],
"minimum_order_amount": 25,
"delivery_fee": {
"amount": 123,
"currency": "<string>"
}
}
],
"fee_percentage": 123,
"smart_parameters": {
"menu_uplift": 0.15,
"uber_commission": 0.3,
"target_lift": 0.03,
"coverage_fraction": 0.8
},
"distance_ranges": [
{
"up_to_km": 2,
"displayed_fee": 3.5,
"minimum_order_amount": 20
}
],
"max_delivery_radius_in_km": 123,
"max_delivery_fee": {
"amount": 123,
"currency": "<string>"
},
"min_order_amount": 123,
"max_order_amount": 1,
"collection_max_order_amount": 1,
"max_items_number": 123,
"delivery_verification_mode": "picture",
"uber_direct_pickup_notes_enabled": true,
"uber_direct_pickup_notes": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "<string>",
"request_id": "req_8f2c…",
"param": "<string>",
"details": {}
}
}Authorizations
Location/organization API key.
Path Parameters
Body
PATCH body; omitted fields are preserved. Nullable fields can be set to null to clear/reset them.
handledByStore, uberDirect, chaskis postalCode uses the matching postal_codes entry; deliveryZone uses the matching polygon in delivery_zones; percentage charges the customer the fee_percentage share of the provider fee; customerPaysAll passes the full provider fee to the customer; restaurantPaysAll displays no delivery fee to the customer; smart calculates a distance-based customer fee using the smart pricing configuration; distanceRange uses the first matching bracket in distance_ranges.
postalCode, deliveryZone, percentage, customerPaysAll, restaurantPaysAll, smart, distanceRange Show child attributes
Show child attributes
Show child attributes
Show child attributes
0 <= x <= 1Show child attributes
Show child attributes
Show child attributes
Show child attributes
x >= 0Show child attributes
Show child attributes
x >= 0Maximum explicit delivery order subtotal. Null clears the location cap; provider-specific limits may still apply.
x >= 0Maximum click & collect order subtotal; null clears the pickup cap.
x >= 0x >= 1picture, pincode 280Response
The updated delivery settings.
delivery_settings The publicly manageable delivery provider, or null when delivery is managed outside the public API.
handledByStore, uberDirect, chaskis postalCode uses the matching postal_codes entry; deliveryZone uses the matching polygon in delivery_zones; percentage charges the customer the fee_percentage share of the provider fee; customerPaysAll passes the full provider fee to the customer; restaurantPaysAll displays no delivery fee to the customer; smart calculates a distance-based customer fee using the smart pricing configuration; distanceRange uses the first matching bracket in distance_ranges.
postalCode, deliveryZone, percentage, customerPaysAll, restaurantPaysAll, smart, distanceRange Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum explicit delivery order subtotal. Null removes the location cap; provider-specific limits may still apply.
x >= 0Maximum click & collect order subtotal; null disables the pickup cap.
x >= 0picture, pincode