Save customer information to cart and appointments
curl --request POST \
--url https://api.opencals.com/storefront/cart/checkout/save-customer \
--header 'Content-Type: application/json' \
--header 'X-Cart-Id: <x-cart-id>' \
--data '
{
"customer": {
"customerId": "123e4567-e89b-12d3-a456-426614174004"
}
}
'import requests
url = "https://api.opencals.com/storefront/cart/checkout/save-customer"
payload = { "customer": { "customerId": "123e4567-e89b-12d3-a456-426614174004" } }
headers = {
"X-Cart-Id": "<x-cart-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Cart-Id': '<x-cart-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer: {customerId: '123e4567-e89b-12d3-a456-426614174004'}})
};
fetch('https://api.opencals.com/storefront/cart/checkout/save-customer', 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.opencals.com/storefront/cart/checkout/save-customer",
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([
'customer' => [
'customerId' => '123e4567-e89b-12d3-a456-426614174004'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Cart-Id: <x-cart-id>"
],
]);
$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.opencals.com/storefront/cart/checkout/save-customer"
payload := strings.NewReader("{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Cart-Id", "<x-cart-id>")
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.opencals.com/storefront/cart/checkout/save-customer")
.header("X-Cart-Id", "<x-cart-id>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/cart/checkout/save-customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Cart-Id"] = '<x-cart-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}"
response = http.request(request)
puts response.read_body{
"customerId": "<string>"
}Checkout
Save customer information to cart and appointments
POST
/
storefront
/
cart
/
checkout
/
save-customer
Save customer information to cart and appointments
curl --request POST \
--url https://api.opencals.com/storefront/cart/checkout/save-customer \
--header 'Content-Type: application/json' \
--header 'X-Cart-Id: <x-cart-id>' \
--data '
{
"customer": {
"customerId": "123e4567-e89b-12d3-a456-426614174004"
}
}
'import requests
url = "https://api.opencals.com/storefront/cart/checkout/save-customer"
payload = { "customer": { "customerId": "123e4567-e89b-12d3-a456-426614174004" } }
headers = {
"X-Cart-Id": "<x-cart-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Cart-Id': '<x-cart-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer: {customerId: '123e4567-e89b-12d3-a456-426614174004'}})
};
fetch('https://api.opencals.com/storefront/cart/checkout/save-customer', 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.opencals.com/storefront/cart/checkout/save-customer",
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([
'customer' => [
'customerId' => '123e4567-e89b-12d3-a456-426614174004'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Cart-Id: <x-cart-id>"
],
]);
$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.opencals.com/storefront/cart/checkout/save-customer"
payload := strings.NewReader("{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Cart-Id", "<x-cart-id>")
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.opencals.com/storefront/cart/checkout/save-customer")
.header("X-Cart-Id", "<x-cart-id>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/cart/checkout/save-customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Cart-Id"] = '<x-cart-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"customerId\": \"123e4567-e89b-12d3-a456-426614174004\"\n }\n}"
response = http.request(request)
puts response.read_body{
"customerId": "<string>"
}Last modified on July 26, 2026
Was this page helpful?
⌘I