curl --request POST \
--url https://dev.sbx.imprint.co/v2/customer_sessions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"metadata": {
"store_number": "123"
},
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/customer_sessions"
payload = {
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"metadata": { "store_number": "123" },
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partner_customer_id: 'PARTNER_USER_456',
transaction_amount: 34000,
transaction_currency: 'USD',
customer_history: {
email: 'customer@example.com',
phone: '+14155552671',
first_name: 'John',
last_name: 'Doe',
preferred_language: 'en',
address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
},
account_tenure: 13,
ltv_amount: 34000,
ltv_currency: 'USD',
loyalty_tier: 'GOLD',
account_created_at: '2025-02-13T19:08:07.000Z',
transaction_count: 100
},
source: 'web_signup',
utm_medium: 'cpc',
utm_channel: 'paid_social',
utm_campaign: 'spring_card_launch',
utm_content: 'hero_banner_v2',
utm_term: 'rewards+credit+card',
utm_owner: 'growth',
application_origin: 'in_store_kiosk',
origin_location_id: 'STORE-4417',
metadata: {store_number: '123'},
customer_metadata: {loyalty_id: '840012345678', membership_tier: 'gold'}
})
};
fetch('https://dev.sbx.imprint.co/v2/customer_sessions', 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://dev.sbx.imprint.co/v2/customer_sessions",
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([
'partner_customer_id' => 'PARTNER_USER_456',
'transaction_amount' => 34000,
'transaction_currency' => 'USD',
'customer_history' => [
'email' => 'customer@example.com',
'phone' => '+14155552671',
'first_name' => 'John',
'last_name' => 'Doe',
'preferred_language' => 'en',
'address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
],
'account_tenure' => 13,
'ltv_amount' => 34000,
'ltv_currency' => 'USD',
'loyalty_tier' => 'GOLD',
'account_created_at' => '2025-02-13T19:08:07.000Z',
'transaction_count' => 100
],
'source' => 'web_signup',
'utm_medium' => 'cpc',
'utm_channel' => 'paid_social',
'utm_campaign' => 'spring_card_launch',
'utm_content' => 'hero_banner_v2',
'utm_term' => 'rewards+credit+card',
'utm_owner' => 'growth',
'application_origin' => 'in_store_kiosk',
'origin_location_id' => 'STORE-4417',
'metadata' => [
'store_number' => '123'
],
'customer_metadata' => [
'loyalty_id' => '840012345678',
'membership_tier' => 'gold'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://dev.sbx.imprint.co/v2/customer_sessions"
payload := strings.NewReader("{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://dev.sbx.imprint.co/v2/customer_sessions")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customer_sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2EE24580-B97B-4949-A65C-929CCB9B9B8D",
"client_secret": "QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg==",
"expires_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"store_number": "123"
},
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
}
}{
"path": "/v2/customers",
"details": [
"email: must be a well-formed email address"
],
"error": "Bad Request",
"status": 400,
"timestamp": "2025-01-20T18:18:22.923+00:00"
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}Create a new customer session
Creates a new session for a customer with a client_secret that can be passed to the SDK, providing client access to modify their own profile, card, or card/loan application. If required, a new customer will be created to attach this session to. Customer history can be attached to this session and will be included in the customer’s profile if created, or attached to the application the customer creates during the session
Supports partner-scoped API keys without an x-imprint-merchant-key header if you have only one brand.
curl --request POST \
--url https://dev.sbx.imprint.co/v2/customer_sessions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"metadata": {
"store_number": "123"
},
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
}
'import requests
url = "https://dev.sbx.imprint.co/v2/customer_sessions"
payload = {
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"metadata": { "store_number": "123" },
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partner_customer_id: 'PARTNER_USER_456',
transaction_amount: 34000,
transaction_currency: 'USD',
customer_history: {
email: 'customer@example.com',
phone: '+14155552671',
first_name: 'John',
last_name: 'Doe',
preferred_language: 'en',
address: {
street_line1: '123 Main St',
street_line2: 'Apt 4B',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'USA'
},
account_tenure: 13,
ltv_amount: 34000,
ltv_currency: 'USD',
loyalty_tier: 'GOLD',
account_created_at: '2025-02-13T19:08:07.000Z',
transaction_count: 100
},
source: 'web_signup',
utm_medium: 'cpc',
utm_channel: 'paid_social',
utm_campaign: 'spring_card_launch',
utm_content: 'hero_banner_v2',
utm_term: 'rewards+credit+card',
utm_owner: 'growth',
application_origin: 'in_store_kiosk',
origin_location_id: 'STORE-4417',
metadata: {store_number: '123'},
customer_metadata: {loyalty_id: '840012345678', membership_tier: 'gold'}
})
};
fetch('https://dev.sbx.imprint.co/v2/customer_sessions', 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://dev.sbx.imprint.co/v2/customer_sessions",
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([
'partner_customer_id' => 'PARTNER_USER_456',
'transaction_amount' => 34000,
'transaction_currency' => 'USD',
'customer_history' => [
'email' => 'customer@example.com',
'phone' => '+14155552671',
'first_name' => 'John',
'last_name' => 'Doe',
'preferred_language' => 'en',
'address' => [
'street_line1' => '123 Main St',
'street_line2' => 'Apt 4B',
'city' => 'San Francisco',
'state' => 'CA',
'postal_code' => '94105',
'country' => 'USA'
],
'account_tenure' => 13,
'ltv_amount' => 34000,
'ltv_currency' => 'USD',
'loyalty_tier' => 'GOLD',
'account_created_at' => '2025-02-13T19:08:07.000Z',
'transaction_count' => 100
],
'source' => 'web_signup',
'utm_medium' => 'cpc',
'utm_channel' => 'paid_social',
'utm_campaign' => 'spring_card_launch',
'utm_content' => 'hero_banner_v2',
'utm_term' => 'rewards+credit+card',
'utm_owner' => 'growth',
'application_origin' => 'in_store_kiosk',
'origin_location_id' => 'STORE-4417',
'metadata' => [
'store_number' => '123'
],
'customer_metadata' => [
'loyalty_id' => '840012345678',
'membership_tier' => 'gold'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://dev.sbx.imprint.co/v2/customer_sessions"
payload := strings.NewReader("{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://dev.sbx.imprint.co/v2/customer_sessions")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customer_sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partner_customer_id\": \"PARTNER_USER_456\",\n \"transaction_amount\": 34000,\n \"transaction_currency\": \"USD\",\n \"customer_history\": {\n \"email\": \"customer@example.com\",\n \"phone\": \"+14155552671\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"preferred_language\": \"en\",\n \"address\": {\n \"street_line1\": \"123 Main St\",\n \"street_line2\": \"Apt 4B\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\",\n \"country\": \"USA\"\n },\n \"account_tenure\": 13,\n \"ltv_amount\": 34000,\n \"ltv_currency\": \"USD\",\n \"loyalty_tier\": \"GOLD\",\n \"account_created_at\": \"2025-02-13T19:08:07.000Z\",\n \"transaction_count\": 100\n },\n \"source\": \"web_signup\",\n \"utm_medium\": \"cpc\",\n \"utm_channel\": \"paid_social\",\n \"utm_campaign\": \"spring_card_launch\",\n \"utm_content\": \"hero_banner_v2\",\n \"utm_term\": \"rewards+credit+card\",\n \"utm_owner\": \"growth\",\n \"application_origin\": \"in_store_kiosk\",\n \"origin_location_id\": \"STORE-4417\",\n \"metadata\": {\n \"store_number\": \"123\"\n },\n \"customer_metadata\": {\n \"loyalty_id\": \"840012345678\",\n \"membership_tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2EE24580-B97B-4949-A65C-929CCB9B9B8D",
"client_secret": "QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg==",
"expires_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"store_number": "123"
},
"customer_metadata": {
"loyalty_id": "840012345678",
"membership_tier": "gold"
},
"source": "web_signup",
"utm_medium": "cpc",
"utm_channel": "paid_social",
"utm_campaign": "spring_card_launch",
"utm_content": "hero_banner_v2",
"utm_term": "rewards+credit+card",
"utm_owner": "growth",
"application_origin": "in_store_kiosk",
"origin_location_id": "STORE-4417",
"partner_customer_id": "PARTNER_USER_456",
"transaction_amount": 34000,
"transaction_currency": "USD",
"customer_history": {
"email": "customer@example.com",
"phone": "+14155552671",
"first_name": "John",
"last_name": "Doe",
"preferred_language": "en",
"address": {
"street_line1": "123 Main St",
"street_line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "USA"
},
"account_tenure": 13,
"ltv_amount": 34000,
"ltv_currency": "USD",
"loyalty_tier": "GOLD",
"account_created_at": "2025-02-13T19:08:07.000Z",
"transaction_count": 100
}
}{
"path": "/v2/customers",
"details": [
"email: must be a well-formed email address"
],
"error": "Bad Request",
"status": 400,
"timestamp": "2025-01-20T18:18:22.923+00:00"
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}Authorizations
Body
The unique identifier for the customer in the partner's system.
Compared byte-for-byte, so PARTNER_USER_456 and partner_user_456 are
two different customers. Send the same casing everywhere or a later
lookup silently returns no match.
Restricted to printable ASCII (\x20–\x7E) rather than arbitrary
UTF-8: the value is propagated between internal services as an HTTP/2
header, which cannot carry non-ASCII bytes. The bound is published
rather than discovered.
1 - 128^[\x20-\x7E]+$"PARTNER_USER_456"
Where the application originated. Free-form, so campaign and channel origins can be introduced without an API change. In-store applications use one of in_store_associate, in_store_kiosk, or in_store_signage; a server-verified in-store application overrides whatever value you supply.
"in_store_kiosk"
Response
Customer session created successfully
Represents a session created on behalf of an Imprint customer
Where the application originated. Free-form, so campaign and channel origins can be introduced without an API change. In-store applications use one of in_store_associate, in_store_kiosk, or in_store_signage; a server-verified in-store application overrides whatever value you supply.
"in_store_kiosk"
The unique identifier for the customer in the partner's system.
Compared byte-for-byte, so PARTNER_USER_456 and partner_user_456 are
two different customers. Send the same casing everywhere or a later
lookup silently returns no match.
Restricted to printable ASCII (\x20–\x7E) rather than arbitrary
UTF-8: the value is propagated between internal services as an HTTP/2
header, which cannot carry non-ASCII bytes. The bound is published
rather than discovered.
1 - 128^[\x20-\x7E]+$"PARTNER_USER_456"