List a customer's accounts
curl --request GET \
--url https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts"
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/customers/{customer_id}/accounts', 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/customers/{customer_id}/accounts",
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/customers/{customer_id}/accounts"
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/customers/{customer_id}/accounts")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts")
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{
"accounts": [
{
"account_id": "7C1F9A34-2D6B-4E58-8A03-B15E7D9C4620",
"account_type": "CREDITCARD"
}
]
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}{
"type": "CUSTOMER_NOT_FOUND_ERROR",
"message": "Customer not found for provided ID: CSMR-v1-123",
"param": "customer_id"
}Customers
List a customer's accounts
Lists the accounts a customer holds with your program, each with the
account_id needed to read it in detail and the type of product it is.
Scoped to the product your API key is issued for, so it never returns an
account a customer holds with another program. A customer who has no
account with your program returns 404.
Required scope: ACCOUNT_READ
GET
/
v2
/
customers
/
{customer_id}
/
accounts
List a customer's accounts
curl --request GET \
--url https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts"
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/customers/{customer_id}/accounts', 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/customers/{customer_id}/accounts",
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/customers/{customer_id}/accounts"
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/customers/{customer_id}/accounts")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/customers/{customer_id}/accounts")
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{
"accounts": [
{
"account_id": "7C1F9A34-2D6B-4E58-8A03-B15E7D9C4620",
"account_type": "CREDITCARD"
}
]
}{
"error": {
"type": "BAD_REQUEST_ERROR",
"message": "unsupported reward_type: INVALID, must be STATEMENT or DELAYED"
}
}{
"type": "CUSTOMER_NOT_FOUND_ERROR",
"message": "Customer not found for provided ID: CSMR-v1-123",
"param": "customer_id"
}Authorizations
basicAuthbearerAuth
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Path Parameters
The unique identifier for the Imprint customer
Example:
"2EE24580-B97B-4949-A65C-929CCB9B9B8D"
Response
The customer's accounts
Show child attributes
Show child attributes
⌘I