List companies
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/instance/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/instance/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"count": 123,
"results": [
{
"id": 123,
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"period_spend_eur": "<string>",
"dpo_email": "jsmith@example.com",
"max_users": -1,
"login_method": "password",
"tier": "free"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Companies
List companies
This endpoint allows users to list companies based on their permissions.
Access levels:
- SysAdmin/Account Manager/DPO Admin: Can view all companies
- Company Admin: Can view their own company only
- Company DPO: Read-only access to their own company
- User: No access
Supports pagination and search functionality.
GET
/
api
/
v3
/
instance
/
companies
List companies
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/instance/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/instance/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"count": 123,
"results": [
{
"id": 123,
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"period_spend_eur": "<string>",
"dpo_email": "jsmith@example.com",
"max_users": -1,
"login_method": "password",
"tier": "free"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}{
"id": null,
"code": 403,
"error": "insufficient_permissions",
"detail": "You do not have permission to perform this action.",
"doc_url": "https://developers.lighton.ai/errors#insufficient_permissions"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter companies by metered usage. true returns only companies with at least one recorded usage event; false returns companies with none.
Page number (default: 1)
Filter by company name (case-insensitive)
Commercial tier for this company. Drives entitlements and billing posture.
free- Freepay-as-you-go- Pay-as-you-gobusiness- Business
Available options:
business, free, pay-as-you-go Response
List of companies with DRF pagination (count, next, previous, results)