cURL
curl --request GET 'https://api.integrateledger.com/v1/entities?customerId=user_123' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.listEntities({ customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.list_entities(customer_id="user_123"){
"items": [
{
"entityId": "<string>",
"customerId": "<string>",
"name": "<string>",
"allowanceCredits": 123,
"capCredits": 1,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"hasMore": true,
"nextCursor": 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."
}{
"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."
}{
"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."
}{
"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."
}Entities
List a customer's entities
Page through a customer’s entities and their settings.
GET
/
v1
/
entities
cURL
curl --request GET 'https://api.integrateledger.com/v1/entities?customerId=user_123' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.listEntities({ customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.list_entities(customer_id="user_123"){
"items": [
{
"entityId": "<string>",
"customerId": "<string>",
"name": "<string>",
"allowanceCredits": 123,
"capCredits": 1,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"hasMore": true,
"nextCursor": 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."
}{
"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."
}{
"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."
}{
"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 entities, oldest first, with their settings but not their balances; get one for its balance.
limit is at most 100 (default 25). When hasMore is true, pass nextCursor as cursor for the next page. Deleted entities aren’t listed.
Needs the Customers permission at Read.