User sync
curl --request POST \
--url https://api.atlas.kitchen/admin/v1/users/sync \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Merchant-Id: <api-key>' \
--data '
{
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": true,
"title": "<string>",
"external_user_id": "<string>",
"external_user_type": "<string>",
"is_guest": true,
"should_identify_guest": true
}
'import requests
url = "https://api.atlas.kitchen/admin/v1/users/sync"
payload = {
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": True,
"title": "<string>",
"external_user_id": "<string>",
"external_user_type": "<string>",
"is_guest": True,
"should_identify_guest": True
}
headers = {
"X-Api-Key": "<api-key>",
"X-Merchant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<api-key>',
'X-Merchant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '<string>',
mobile_number: '<string>',
name: '<string>',
date_of_birth: '2023-12-25',
marketing_consent: true,
title: '<string>',
external_user_id: '<string>',
external_user_type: '<string>',
is_guest: true,
should_identify_guest: true
})
};
fetch('https://api.atlas.kitchen/admin/v1/users/sync', 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/admin/v1/users/sync",
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([
'email' => '<string>',
'mobile_number' => '<string>',
'name' => '<string>',
'date_of_birth' => '2023-12-25',
'marketing_consent' => true,
'title' => '<string>',
'external_user_id' => '<string>',
'external_user_type' => '<string>',
'is_guest' => true,
'should_identify_guest' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Merchant-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/admin/v1/users/sync"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Merchant-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.post("https://api.atlas.kitchen/admin/v1/users/sync")
.header("X-Api-Key", "<api-key>")
.header("X-Merchant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/admin/v1/users/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Merchant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": true,
"title": "<string>",
"external_user_links": [
{
"external_user_id": "<string>",
"external_user_type": "<string>"
}
]
}{
"type": "<string>",
"message": "<string>",
"error_hash": {}
}Upserts a user by email or mobile number. For non-guests, creates an Account and UserAccount relationship. External user links are immutable once created.
POST
/
users
/
sync
User sync
curl --request POST \
--url https://api.atlas.kitchen/admin/v1/users/sync \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Merchant-Id: <api-key>' \
--data '
{
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": true,
"title": "<string>",
"external_user_id": "<string>",
"external_user_type": "<string>",
"is_guest": true,
"should_identify_guest": true
}
'import requests
url = "https://api.atlas.kitchen/admin/v1/users/sync"
payload = {
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": True,
"title": "<string>",
"external_user_id": "<string>",
"external_user_type": "<string>",
"is_guest": True,
"should_identify_guest": True
}
headers = {
"X-Api-Key": "<api-key>",
"X-Merchant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<api-key>',
'X-Merchant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '<string>',
mobile_number: '<string>',
name: '<string>',
date_of_birth: '2023-12-25',
marketing_consent: true,
title: '<string>',
external_user_id: '<string>',
external_user_type: '<string>',
is_guest: true,
should_identify_guest: true
})
};
fetch('https://api.atlas.kitchen/admin/v1/users/sync', 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/admin/v1/users/sync",
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([
'email' => '<string>',
'mobile_number' => '<string>',
'name' => '<string>',
'date_of_birth' => '2023-12-25',
'marketing_consent' => true,
'title' => '<string>',
'external_user_id' => '<string>',
'external_user_type' => '<string>',
'is_guest' => true,
'should_identify_guest' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Merchant-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/admin/v1/users/sync"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Merchant-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.post("https://api.atlas.kitchen/admin/v1/users/sync")
.header("X-Api-Key", "<api-key>")
.header("X-Merchant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/admin/v1/users/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Merchant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"mobile_number\": \"<string>\",\n \"name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"marketing_consent\": true,\n \"title\": \"<string>\",\n \"external_user_id\": \"<string>\",\n \"external_user_type\": \"<string>\",\n \"is_guest\": true,\n \"should_identify_guest\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "<string>",
"mobile_number": "<string>",
"name": "<string>",
"date_of_birth": "2023-12-25",
"marketing_consent": true,
"title": "<string>",
"external_user_links": [
{
"external_user_id": "<string>",
"external_user_type": "<string>"
}
]
}{
"type": "<string>",
"message": "<string>",
"error_hash": {}
}Authorizations
Your API key provided during onboarding. Example c2fb5ae6ea99c37d...
Your numeric merchant ID. Example 1
Body
application/json
Was this page helpful?
⌘I