cURL
curl --request GET 'https://api.integrateledger.com/v1/licenses' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.listLicenses({ customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.list_licenses(customer_id="user_123"){
"licenses": [
{
"planId": "<string>",
"parentPlanId": "<string>",
"seats": 123,
"includedSeats": 1,
"assigned": 1,
"available": 1,
"assignments": [
{
"slot": 123,
"entityId": "<string>"
}
]
}
]
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "insufficient_permissions",
"requiredScope": "customers:read",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "rate_limited",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}Licenses
List licenses
The customer’s seats, how many are assigned, and to whom.
GET
/
v1
/
licenses
cURL
curl --request GET 'https://api.integrateledger.com/v1/licenses' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.listLicenses({ customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.list_licenses(customer_id="user_123"){
"licenses": [
{
"planId": "<string>",
"parentPlanId": "<string>",
"seats": 123,
"includedSeats": 1,
"assigned": 1,
"available": 1,
"assignments": [
{
"slot": 123,
"entityId": "<string>"
}
]
}
]
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "insufficient_permissions",
"requiredScope": "customers:read",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "rate_limited",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}Returns the customer’s live licenses: for each seat plan, the parent plan selling it,
seats (the total, included seats counted), includedSeats, how many are assigned and available, and the assignments by slot. A license ends with its parent plan’s bill, and is then no longer listed.
Needs the Customers permission at Read.