Get a customer
curl --request GET \
--url https://api-staging.bsa.ai/v1/customers/external/{customer_external_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.bsa.ai/v1/customers/external/{customer_external_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://api-staging.bsa.ai/v1/customers/external/{customer_external_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: Bearer <token>"
],
]);
$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://api-staging.bsa.ai/v1/customers/external/{customer_external_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCustomers
Get a customer
Fetch a single customer by externalId (recommended) or LMS id.
GET
/
v1
/
customers
/
external
/
{customer_external_id}
Get a customer
curl --request GET \
--url https://api-staging.bsa.ai/v1/customers/external/{customer_external_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.bsa.ai/v1/customers/external/{customer_external_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://api-staging.bsa.ai/v1/customers/external/{customer_external_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: Bearer <token>"
],
]);
$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://api-staging.bsa.ai/v1/customers/external/{customer_external_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.bsa.ai/v1/customers/external/{customer_external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyTwo equivalent forms. Prefer the externalId form — it lets you read a
customer by the reference you already store, with no client-side mapping
to a numeric LMS id. See Addressing a customer.
Path parameters
string
required
The customer’s partner-supplied externalId (the value you sent on
create). On the alternative
/v1/customers/{customer_id} form, this is
the numeric LMS id instead.Examples
# By externalId (recommended)
curl -sf "$BASE/v1/customers/external/ext-ada-001" \
-H "Authorization: Bearer $TOKEN"
# Same effect, by LMS id
curl -sf "$BASE/v1/customers/42" \
-H "Authorization: Bearer $TOKEN"
Response
200 OK returns the full customer object.
Errors
| Code | When |
|---|---|
not_found | No customer exists with that externalId or id |
invalid_argument | customer_id is not a valid numeric identifier (only applies to the LMS-id form) |
⌘I

