Sign up
curl --request POST \
--url https://api.atlas.kitchen/accounts/v1/signup \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"name": "Grace Tan",
"email": "grace.tan@example.com",
"mobile_number": "+6581230045",
"marketing_consent": true,
"use_error_code": true
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/signup"
payload = {
"name": "Grace Tan",
"email": "grace.tan@example.com",
"mobile_number": "+6581230045",
"marketing_consent": True,
"use_error_code": True
}
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Channel-Id': '<api-key>',
'X-Session-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Grace Tan',
email: 'grace.tan@example.com',
mobile_number: '+6581230045',
marketing_consent: true,
use_error_code: true
})
};
fetch('https://api.atlas.kitchen/accounts/v1/signup', 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/signup",
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([
'name' => 'Grace Tan',
'email' => 'grace.tan@example.com',
'mobile_number' => '+6581230045',
'marketing_consent' => true,
'use_error_code' => 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/signup"
payload := strings.NewReader("{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.atlas.kitchen/accounts/v1/signup")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/signup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}"
response = http.request(request)
puts response.read_body{
"is_mobile_verified": false,
"last_otp_delivery_mode": "whatsapp",
"masked_email": "g********@e**********",
"masked_mobile_number": "*******0045"
}{
"type": "Unauthorized",
"message": "You did not provide valid credentials for this request. Please check your request and try again.",
"details": [
{
"field": "session_id",
"message": "Check if the session ID is set correctly in the X-Session-Id header."
}
]
}{
"type": "User Exists",
"message": "An account with this email or mobile number already exists. Log in instead.",
"details": [
{
"field": "user",
"message": "EMAIL_TAKEN"
}
]
}Sign up
Creates the diner and sends them a login code. Then call Log in with that code. The diner’s account is created when they log in for the first time, and they join the merchant’s point program then.
POST
/
signup
Sign up
curl --request POST \
--url https://api.atlas.kitchen/accounts/v1/signup \
--header 'Content-Type: application/json' \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>' \
--data '
{
"name": "Grace Tan",
"email": "grace.tan@example.com",
"mobile_number": "+6581230045",
"marketing_consent": true,
"use_error_code": true
}
'import requests
url = "https://api.atlas.kitchen/accounts/v1/signup"
payload = {
"name": "Grace Tan",
"email": "grace.tan@example.com",
"mobile_number": "+6581230045",
"marketing_consent": True,
"use_error_code": True
}
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Channel-Id': '<api-key>',
'X-Session-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Grace Tan',
email: 'grace.tan@example.com',
mobile_number: '+6581230045',
marketing_consent: true,
use_error_code: true
})
};
fetch('https://api.atlas.kitchen/accounts/v1/signup', 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/signup",
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([
'name' => 'Grace Tan',
'email' => 'grace.tan@example.com',
'mobile_number' => '+6581230045',
'marketing_consent' => true,
'use_error_code' => 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/signup"
payload := strings.NewReader("{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.atlas.kitchen/accounts/v1/signup")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/accounts/v1/signup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Grace Tan\",\n \"email\": \"grace.tan@example.com\",\n \"mobile_number\": \"+6581230045\",\n \"marketing_consent\": true,\n \"use_error_code\": true\n}"
response = http.request(request)
puts response.read_body{
"is_mobile_verified": false,
"last_otp_delivery_mode": "whatsapp",
"masked_email": "g********@e**********",
"masked_mobile_number": "*******0045"
}{
"type": "Unauthorized",
"message": "You did not provide valid credentials for this request. Please check your request and try again.",
"details": [
{
"field": "session_id",
"message": "Check if the session ID is set correctly in the X-Session-Id header."
}
]
}{
"type": "User Exists",
"message": "An account with this email or mobile number already exists. Log in instead.",
"details": [
{
"field": "user",
"message": "EMAIL_TAKEN"
}
]
}Authorizations
Body
application/json
Was this page helpful?