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_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_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_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_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_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_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_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_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"
}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
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_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_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_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_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_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_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_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_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"
}Authorizations
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
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"
The current transaction amount, if the session is currently executing a transaction. integer value in the min currency unit (cents for USD)
34000
The 3 char currency code of the amount in iso-4217
"USD"
A Customer's account history with the partner
Show child attributes
Show child attributes
The marketing source that referred the customer.
"web_signup"
The marketing medium that referred the customer.
"cpc"
The marketing campaign that referred the customer.
"spring_card_launch"
The specific creative or placement that referred the customer.
"hero_banner_v2"
The paid search keyword that referred the customer.
"rewards+credit+card"
The team or owner accountable for the campaign that produced this session.
"growth"
Where the application was physically initiated.
in_store_associate, in_store_kiosk, in_store_signage "in_store_kiosk"
Your own store or location code identifying where the application originated.
"STORE-4417"
Additional linking metadata
{ "store_number": "123" }
A set of key-value pairs attached to the customer. These values will be included in webhook event payloads for the partner to receive information about the customer.
Show child attributes
Show child attributes
{
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
Response
Customer session created successfully
Represents a session created on behalf of an Imprint customer
The unique ID Imprint assigns to the session.
"2EE24580-B97B-4949-A65C-929CCB9B9B8D"
Not to be logged or stored. Provide this one time use token to the Imprint SDK or other client side code to allow the customer access to edit their own account or apply
"QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg=="
the RFC-3339 timestamp when the client_secret will expire.
"2025-02-13T19:08:07.000Z"
Set of key-value pairs for storing additional information about the customer session.
{ "store_number": "123" }
A set of key-value pairs attached to the customer. These values will be included in webhook event payloads for the partner to receive information about the customer.
Show child attributes
Show child attributes
{
"loyalty_id": "840012345678",
"membership_tier": "gold"
}
The marketing source that referred the customer.
"web_signup"
The marketing medium that referred the customer.
"cpc"
The marketing campaign that referred the customer.
"spring_card_launch"
The specific creative or placement that referred the customer.
"hero_banner_v2"
The paid search keyword that referred the customer.
"rewards+credit+card"
The team or owner accountable for the campaign that produced this session.
"growth"
Where the application was physically initiated.
in_store_associate, in_store_kiosk, in_store_signage "in_store_kiosk"
Your own store or location code identifying where the application originated.
"STORE-4417"
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"
The current transaction amount, in the min currency unit (cents for USD)
34000
The 3 char currency code of the amount in iso-4217
"USD"
A Customer's account history with the partner
Show child attributes
Show child attributes