List Customer Subscriptions
Return every subscription attached to a customer, regardless of state or provider.
URL
GET /api/c2a/subscription/{customerUrn}
Request Parameters
| Name | Type | Description |
|---|---|---|
customerUrn | string | Path parameter, required. Azotte customer URN. |
Response Parameters
Wraps IEnumerable<CustomerSubscriptionInfoDto>.
| Name | Type | Description |
|---|---|---|
result | array (CustomerSubscriptionInfoDto[]) | All subscriptions for the customer. |
result[].bundleName | string | Display name of the bundle. |
result[].bundleSku | string | Tenant-side SKU. |
result[].bundleUrn | string | Azotte bundle URN. |
result[].state | string (EnSubscriptionState) | Trial, Active, PastDue, Canceled, Reactivated, Expired. |
result[].startDate | string (date-time) | Subscription start. |
result[].endDate | string (date-time) | Period end / cancel-at-period-end target. |
result[].orderIdentifier | string | Use in cancel/request and reactivate. |
result[].originalOrderIdentifier | string | Root order id for replaced subscriptions. |
result[].initialAssignmentType | string (EnSubscriptionAssignmentType) | How the subscription was first attached. |
result[].subscriptionChannelName | string | Resolved channel display name. |
result[].subscriptionChannel | string (EnSubscriptionChannelProviderFamily) | Azotte, InappPlayStore, InappAppStore, ExternalPartner. |
result[].options.canCancel | boolean | Whether cancel/request is allowed right now. |
result[].options.canReplace | boolean | Whether Replace offer flow is allowed. |
status | object (AzotteStatus) | Operation status envelope. |
Sample Response
{
"result": [
{
"bundleName": "Pro Monthly",
"bundleSku": "PRO-M-1",
"bundleUrn": "bn.00.42",
"state": "Active",
"startDate": "2026-04-25T00:00:00Z",
"endDate": "2026-05-25T00:00:00Z",
"orderIdentifier": "or_01J3X...",
"subscriptionChannel": "Azotte",
"options": { "canCancel": true, "canReplace": true }
}
],
"status": { "messageCode": "SUCCESS" }
}
Sample Codes
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
curl --location 'https://acme.sandbox.azotte.com/api/v1/c2a/subscription/cu.00.482' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789'
const customerUrn = 'cu.00.482';
const res = await fetch(`https://acme.sandbox.azotte.com/api/v1/c2a/subscription/${customerUrn}`, {
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 customerUrn = 'cu.00.482';
const { body } = await request(
`https://acme.sandbox.azotte.com/api/v1/c2a/subscription/${customerUrn}`,
{
headers: {
'x-tn': 'e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f',
'x-api-key': 'sk_dev_acme_sample_123456789'
}
}
);
console.log(await body.json());
import requests
customer_urn = "cu.00.482"
res = requests.get(
f"https://acme.sandbox.azotte.com/api/v1/c2a/subscription/{customer_urn}",
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;
String customerUrn = "cu.00.482";
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://acme.sandbox.azotte.com/api/v1/c2a/subscription/" + customerUrn))
.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");
string customerUrn = "cu.00.482";
var res = await http.GetAsync(
$"https://acme.sandbox.azotte.com/api/v1/c2a/subscription/{customerUrn}");
Console.WriteLine(await res.Content.ReadAsStringAsync());
<?php
$customerUrn = 'cu.00.482';
$ch = curl_init("https://acme.sandbox.azotte.com/api/v1/c2a/subscription/{$customerUrn}");
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() {
customerUrn := "cu.00.482"
url := "https://acme.sandbox.azotte.com/api/v1/c2a/subscription/" + customerUrn
req, _ := http.NewRequest("GET", url, 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))
}