get https://api.zenskar.com/entitlements/customers_balances
Retrieve customer entitlement balances with comprehensive filtering, sorting, and pagination.
Filter by:
- Customer: customer, customer__in (filter by specific customer IDs).
- Entitlement: entitlement, entitlement__in (filter by specific entitlement IDs).
- Contract: contract_id, contract_id__in (filter by contract IDs - useful for contract-specific entitlements).
- Quantities: quantity, quantity_used with range filters (gt, gte, lt, lte, neq).
- Dates: created_at, active_from with range filters for time-based filtering.
- Status: Use quantity__gt=0 to show only active balances, or quantity_used__lt=quantity to show available balances.
Enrichment options (populate parameter):
- customer: Include customer name and email details.
- contract: Include contract name for entitlements granted by contracts.
- product: Include product name for product-specific entitlements.
- invoice: Include invoice number for invoice-generated entitlements.
- Multiple: Use comma-separated values like 'customer,contract,product,invoice' for full enrichment.
Pagination & sorting:
- limit: page size (1-100, default 50).
- cursor: pass 'next' from previous response to paginate.
- sort_key: field to sort by (id, created_at, quantity, quantity_used, active_from, expiry_at).
- sort_type: 'asc' or 'desc' (default 'asc').
- search: text search across entitlement names and descriptions.
Common use cases:
- Contract entitlements: Use contract_id filter to get all entitlements for a specific contract.
- Customer overview: Use customer filter with populate=contract,product for complete customer entitlement view.
- Low balance alerts: Use quantity__gt=0 and quantity_used__gte with percentage calculations.
- Expiring entitlements: Use expiry_at__lt with future date to find soon-to-expire entitlements.