Update profile
curl --request PATCH \
--url https://api.atlas.kitchen/accounts/v1/profile \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"title": "Mr",
"marketing_consent": true
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/profile"
payload = {
"title": "Mr",
"marketing_consent": True
}
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({title: 'Mr', marketing_consent: true})
};
fetch('https://api.atlas.kitchen/accounts/v1/profile', 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/profile",
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([
'title' => 'Mr',
'marketing_consent' => true
]),
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/profile"
payload := strings.NewReader("{\n \"title\": \"Mr\",\n \"marketing_consent\": true\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/profile")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Mr\",\n \"marketing_consent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/profile")
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 \"title\": \"Mr\",\n \"marketing_consent\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "Richard Hendricks",
"title": "Mr",
"date_of_birth": null,
"email": "richard.hendricks@demo.kitchen",
"mobile_number": "+6581000001",
"is_mobile_verified": true,
"referral_code": "AT4101",
"marketing_consent": true
}{
"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>"
}
]
}Update profile
Send only the fields to change. date_of_birth can be set once; later values are ignored.
PATCH
/
profile
Update profile
curl --request PATCH \
--url https://api.atlas.kitchen/accounts/v1/profile \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"title": "Mr",
"marketing_consent": true
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/profile"
payload = {
"title": "Mr",
"marketing_consent": True
}
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({title: 'Mr', marketing_consent: true})
};
fetch('https://api.atlas.kitchen/accounts/v1/profile', 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/profile",
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([
'title' => 'Mr',
'marketing_consent' => true
]),
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/profile"
payload := strings.NewReader("{\n \"title\": \"Mr\",\n \"marketing_consent\": true\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/profile")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Mr\",\n \"marketing_consent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/profile")
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 \"title\": \"Mr\",\n \"marketing_consent\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "Richard Hendricks",
"title": "Mr",
"date_of_birth": null,
"email": "richard.hendricks@demo.kitchen",
"mobile_number": "+6581000001",
"is_mobile_verified": true,
"referral_code": "AT4101",
"marketing_consent": true
}{
"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>"
}
]
}Authorizations
Response
The updated profile
Was this page helpful?