curl --request GET \
--url https://dev.sbx.imprint.co/v2/customer_sessions/{session_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}', 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/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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
}
}{
"type": "SESSION_NOT_FOUND_ERROR",
"message": "Session not found for provided ID: cs_123",
"param": "session_id"
}Retrieve a session
curl --request GET \
--url https://dev.sbx.imprint.co/v2/customer_sessions/{session_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}', 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/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customer_sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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
}
}{
"type": "SESSION_NOT_FOUND_ERROR",
"message": "Session not found for provided ID: cs_123",
"param": "session_id"
}Authorizations
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Path Parameters
Response
Customer session retrieved 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