Update address
curl --request PATCH \
--url https://api.atlas.kitchen/accounts/v1/addresses/{id} \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"notes": "Call on arrival",
"default": false
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/addresses/{id}"
payload = {
"notes": "Call on arrival",
"default": False
}
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Channel-Id': '<api-key>',
'X-Session-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: 'Call on arrival', default: false})
};
fetch('https://api.atlas.kitchen/accounts/v1/addresses/{id}', 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://api.atlas.kitchen/accounts/v1/addresses/{id}",
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([
'notes' => 'Call on arrival',
'default' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Channel-Id: <api-key>",
"X-Session-Id: <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://api.atlas.kitchen/accounts/v1/addresses/{id}"
payload := strings.NewReader("{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Channel-Id", "<api-key>")
req.Header.Add("X-Session-Id", "<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://api.atlas.kitchen/accounts/v1/addresses/{id}")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/addresses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 3,
"line1": "5 Straits View",
"line2": "#12-01",
"postal_code": "018935",
"notes": "Call on arrival",
"longitude": 103.8536,
"latitude": 1.2789,
"default": false
}{
"type": "Unauthorized",
"message": "You did not provide valid credentials for this request. Please check your request and try again.",
"details": [
{
"field": "login",
"message": "You have to be logged in to process this request."
}
]
}{
"type": "Forbidden",
"message": "You do not have permission to process this request. Please check your credentials or contact support if the issue persists.",
"details": [
{
"field": "mobile_number",
"message": "Your mobile number is not verified. Verify your mobile number first before managing your account."
}
]
}{
"type": "Invalid Parameter",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "Invalid Parameter",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}Update address
Send only the fields to change. Send default: true to make this the default address, or default: false to stop it being the default. null counts as false. Leave default out to keep it as it is.
PATCH
/
addresses
/
{id}
Update address
curl --request PATCH \
--url https://api.atlas.kitchen/accounts/v1/addresses/{id} \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"notes": "Call on arrival",
"default": false
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/addresses/{id}"
payload = {
"notes": "Call on arrival",
"default": False
}
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Channel-Id': '<api-key>',
'X-Session-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: 'Call on arrival', default: false})
};
fetch('https://api.atlas.kitchen/accounts/v1/addresses/{id}', 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://api.atlas.kitchen/accounts/v1/addresses/{id}",
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([
'notes' => 'Call on arrival',
'default' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Channel-Id: <api-key>",
"X-Session-Id: <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://api.atlas.kitchen/accounts/v1/addresses/{id}"
payload := strings.NewReader("{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Channel-Id", "<api-key>")
req.Header.Add("X-Session-Id", "<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://api.atlas.kitchen/accounts/v1/addresses/{id}")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/addresses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Call on arrival\",\n \"default\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 3,
"line1": "5 Straits View",
"line2": "#12-01",
"postal_code": "018935",
"notes": "Call on arrival",
"longitude": 103.8536,
"latitude": 1.2789,
"default": false
}{
"type": "Unauthorized",
"message": "You did not provide valid credentials for this request. Please check your request and try again.",
"details": [
{
"field": "login",
"message": "You have to be logged in to process this request."
}
]
}{
"type": "Forbidden",
"message": "You do not have permission to process this request. Please check your credentials or contact support if the issue persists.",
"details": [
{
"field": "mobile_number",
"message": "Your mobile number is not verified. Verify your mobile number first before managing your account."
}
]
}{
"type": "Invalid Parameter",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "Invalid Parameter",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Body
application/json
Was this page helpful?