kustomer-client
    Preparing search index...

    Function getCompanies

    • Get companies Retrieves all companies. You can optionally filter this list by the company name or the unique external company ID.

      Any one of the following roles is required for this endpoint:

      Legacy Role Equivalent Permission Set Role
      org.user.company.read org.permission.company.read

      If you use both the externalId and filter query params, the request ignores both query params.

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      createdAt: string;
                      extenalId: string;
                      modifiedAt: string;
                      name: string;
                      tags: string[];
                      updatedAt: string;
                  };
                  id: string;
                  links: { self: string };
                  relationships: {
                      createdBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      modifiedBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              }[];
              links: {
                  first: string;
                  next: null
                  | string;
                  prev: null | string;
                  self: string;
              };
              meta: { page: number; pageSize: number };
          },
          unknown,
          ThrowOnError,
      >