Get All Organizations
Introduction
This article explains how you can utilize the "List all Organizations" API to retrieve a list of organizations based on various query and filtering parameters. Unlike "List all Resellers" and "List all Customers" APIs, “List all Organizations” operates as a POST request, enabling you to perform more complex queries.
List all Organizations API is not linked to the “distributor id” or “reseller id” and thus its response is not determined by the selected organization, but rather by the permissions you have to organizations on the Platform.
You can use this API as a standalone API to retrieve all organizations to which you This article will guide you through the payload structure, available filters, and the response structure of the API.
Payload Example:
{
"Page": 0,
"PageSize": 10,
"Query": "query",
"Filters": [
{
"Field": "Vendors",
"Filters": [
"09e185ee-5ff5-461b-abe6-d15a5577175b"
],
"SortDirection": "asc"
},
{
"Field": "Providers",
"Filters": [
"10af2105-29c4-44eb-851e-b2d8dfe76f1b",
"cbc5af23-1d1f-43bd-8aa2-f3dd420cd7f8",
"f48a2164-fffc-472f-afe0-1f0a06cdd58e",
"e43390f9-005e-4e9b-a7c9-727bf35161be"
],
"SortDirection": "asc"
},
{
"Field": "Consumers",
"Filters": [
"f48a2164-ffac-472f-afe0-1f2a02cdd58e",
"cbc2af43-1d1f-42bd-8aa2-f1db440cd7f8",
"e23390f9-005e-4e9b-a7c9-127bf35161be",
"4f39fd25-ca29-2ba7-95f5-f044e9364299"
],
"SortDirection": "asc"
}
]
}
Payload Description:
- Page (integer): The page number of results to retrieve.
- PageSize (integer): The number of items to be displayed per page.
- Query (string): A query string used to search for specific organizations based on keywords.
- Filters (array): An array of filter objects to narrow down the results further.
Filter Object Structure:
Each filter object in the "Filters" array contains the following parameters:
- Field (string): The field you want to filter on. Possible values are "Vendors," "Providers," and "Consumers." The filters rely on organization IDs. You can use the following APIs to return the organization IDs ("Key") by using an organization name as a parameter:
- Filters (array): An array of IDs representing the specific entities you want to filter by.
- SortDirection (string): The sorting direction for the results, either "asc" (ascending) or "desc" (descending).
Response Example:
{
"Total": 228056,
"Items": [
{
"Id": "00000000-0000-0000-0000-000000000000",
"ShortName": "APIOrganization",
"FullName": "API Organization LTD",
"TenantId": "00000000-0000-0000-0000-000000000002",
"OrganizationStatus": "Active",
"Types": [
"Customer"
],
"ExternalId": "00000000-0000-0000-0000-000000000002",
"Segment": "Segment 1",
"Subscriptions": 10,
"CountryName": "Germany"
}
]
}
Response Description:
Total (integer): The total number of organizations that match the query and filters.
Items (array): An array of organization objects, each containing the following attributes:
- Id (string): The unique identifier of the organization.
- ShortName (string): The short name of the organization.
- FullName (string): The full name of the organization.
- TenantId: The tenant ID associated with the organization.
- OrganizationStatus (string): The status of the organization (e.g., "Active," "Suspended", "New").
- Types (array): An array of organization types (e.g., "Vendor," "Reseller". "Customer").
- ExternalId (string): An external identifier for the organization.
- Segment (string): The segment or category the organization belongs to.
- Subscriptions (integer): The number of subscriptions associated with the organization.
- CountryName (string): The name of the country the organization is located in.
Add comment
Please sign in to leave a comment.