Get paginated list of distributors (Owner only)
Query parameters
-
Page number
Minimum value is
1. Default value is1. -
Items per page
Minimum value is
1, maximum value is200. Default value is20. -
Search term. For organizations (distributors, resellers, customers), searches across name, description, and all custom_data fields (vat, address, city, contact, email, phone, language, notes, etc.). For systems, also searches across ipv4_address and ipv6_address.
Minimum length is
1. -
Field to sort distributors by
Values are
name,description,created_at,updated_at,suspended_at, orcreator_name. -
Sort direction
Values are
ascordesc. Default value isasc. -
Filter organizations by status. Supports multiple values.
- enabled: not suspended and not deleted
- suspended: suspended but not deleted
- deleted: soft-deleted
When "deleted" is combined with other statuses, both deleted and non-deleted matching records are returned.
Values are
enabled,suspended, ordeleted. -
Filter organizations by creator user ID or creator organization ID (exact match). Each provided ID is checked against both the user_id and organization_id fields of the organization creator (custom_data.createdByUser). Supports multiple values for checkbox filtering. Allowed values come from GET /api/filters/{distributors|resellers|customers}.
Examples:
?created_by=kyfy0tlnlk3l- matches organizations created by user with ID kyfy0tlnlk3l?created_by=obhdyclbfx4t- matches organizations created by users in organization obhdyclbfx4t?created_by=kyfy0tlnlk3l&created_by=obhdyclbfx4t- matches organizations created by the user OR by users in the organization
-
Filter by owning organization Logto ID (custom_data.createdBy, the ownership key RBAC visibility walks). Supports multiple values; combine with include_hierarchy to cover a whole subtree. Results always stay within the caller's RBAC scope.
-
When true (and organization_id is provided), each organization_id is expanded to the organization plus all its descendants (a distributor's resellers and their customers, a reseller's customers) before filtering
Default value is
false. -
Which inline counters to compute for every row. They are not free, and they are not all equally expensive, so the caller asks for the tier it needs. Counters that are not requested are omitted from the response objects entirely.
- omitted: no counters. What an integration that only wants the rows should send - listing the organizations then costs a single indexed page read.
true: systems_count, customers_count, resellers_count and legacy_systems_count. These are the counters the portal lists render, and they are all indexed lookups.all: also applications_count. On the reseller list this is expensive - the organization set of a reseller row is the reseller plus its customers, a correlated subquery the planner cannot push into the applications index, so every row rescans all the certified applications. Expect seconds on a large tenant, and prefer GET /resellers/{id}/stats when you need the number for one organization.
Values are
trueorall.
curl \
--request GET 'https://my.nethesis.it/backend/api/distributors' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"code": 200,
"message": "distributors retrieved successfully",
"data": {
"distributors": [
{
"id": "4405ffd0-0aca-44ef-bae2-c8545bce94f4",
"logto_id": "akkbs6x2wo82",
"name": "ACME Distribution SpA",
"description": "Main distributor for Italian and Swiss markets",
"custom_data": {
"email": "contact@acme-distribution.com",
"contactPerson": "John Smith",
"region": "Italy"
},
"third_party_apps": [
"nethshop.nethesis.it",
"my.nethspot.com"
],
"suspended_at": "2026-05-04T09:42:00Z",
"suspended_by_org_id": "string",
"rebranding_enabled": false,
"rebranding_org_id": "string",
"created_by": {
"user_id": "aa15fcvgzw1y",
"username": "owner",
"name": "Nethesis Owner",
"email": "owner@nethesis.it",
"organization_id": "2wl3iixbc8ua",
"organization_name": "Owner",
"organization_type": "owner",
"on_behalf_of": true
},
"promoted_from": {
"level": "reseller",
"at": "2026-07-30T10:00:00Z",
"detached_from_organization_id": "akkbs6x2wo82",
"by": {
"user_id": "aa15fcvgzw1y",
"username": "owner",
"name": "Nethesis Owner",
"email": "owner@nethesis.it",
"organization_id": "2wl3iixbc8ua",
"organization_name": "Owner",
"organization_type": "owner",
"on_behalf_of": true
}
},
"systems_count": 32,
"resellers_count": 25,
"customers_count": 420,
"legacy_systems_count": 12,
"applications_count": 15
}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_count": 156,
"total_pages": 8,
"has_next": true,
"has_prev": false,
"next_page": 2,
"prev_page": 42,
"sort_by": "name",
"sort_direction": "asc"
}
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}