Fetch Customer Information
Look up the Azotte projection of a customer by either side of the identity link.
URL
GET /api/c2a/customer/info
Request Parameters
| Name | Type | Description |
|---|---|---|
urn | string | Query parameter, conditional. Azotte CustomerUrn. Provide either urn or exId. If both supplied, urn takes precedence. |
exId | string | Query parameter, conditional. Tenant ExternalIdentifier. Provide either urn or exId. |
Response Parameters
FetchCustomerInfoResponse wraps AzotteCustomerSnapShot — read-optimised projection containing identity, addresses, privacy state, subscription summary counts, and CustomerOptions.
| Name | Type | Description |
|---|---|---|
result | object (AzotteCustomerSnapShot) | Snapshot record. |
result.customerUrn | string | Azotte URN. |
result.externalIdentifier | string | Tenant ExternalId. |
result.email | string | Email. |
result.status | string | Operational status. |
result.options | object (CustomerOptions) | Caller-facing rules. |
result.options.availableChannels | string[] | Payment channels available to this customer. |
result.options.canSavePaymentMethod | boolean | Whether the customer can tokenize a card. |
status | object (AzotteStatus) | Operation status envelope. |
Sample Response
{
"result": {
"customerUrn": "cu.00.482",
"externalIdentifier": "crm-9981273",
"email": "jane.doe@example.com",
"status": "Active",
"options": {
"availableChannels": ["CARD", "SEPA"],
"canSavePaymentMethod": true
}
},
"status": { "messageCode": "SUCCESS" }
}
Sample Codes
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
curl --location --request GET \
'https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789'
const res = await fetch('https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482', {
method: 'GET',
headers: {
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
}
});
console.log(await res.json());
import { request } from 'undici';
const { body } = await request(
'https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482',
{
method: 'GET',
headers: {
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
}
}
);
console.log(await body.json());
import requests
res = requests.get(
'https://acme.sandbox.azotte.com/api/v1/c2a/customer/info',
params={'urn': 'cu.00.482'},
headers={
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789',
},
)
print(res.json())
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482"))
.header("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
.header("x-api-key", "sk_dev_acme_sample_123456789")
.GET()
.build();
HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f");
http.DefaultRequestHeaders.Add("x-api-key", "sk_dev_acme_sample_123456789");
var res = await http.GetAsync(
"https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482");
Console.WriteLine(await res.Content.ReadAsStringAsync());
<?php
$ch = curl_init('https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key: sk_dev_acme_sample_123456789',
],
]);
echo curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET",
"https://acme.sandbox.azotte.com/api/v1/c2a/customer/info?urn=cu.00.482", nil)
req.Header.Set("x-tn", "e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f")
req.Header.Set("x-api-key", "sk_dev_acme_sample_123456789")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}