# Search Companies by filters Search Companies by filters. It will return related companies only. Only Service token can request companies data without relation. If a retailer has a SFM model, it will return companies with Active contracts only. Endpoint: POST /api/companies/filters Version: 1.0 Security: Bearer ## Query parameters: - `CompanyLegalName` (string) - `CompanyDisplayName` (string) - `CompanyAddress1` (string) - `CompanyAddress2` (string) - `CompanyPostalCode` (string) - `CompanyCity` (string) - `CompanyDuns` (string) - `CompanyCountry` (string) - `CompanyActivityId` (integer) - `TestCompany` (boolean) - `IsTraceOne` (boolean) - `IsEnabled` (boolean) - `IsDisabled` (boolean) - `IsSuspended` (boolean) - `HasADuns` (boolean) - `RelatedOwnerCompanyId` (string) If RelatedOwnerCompanyId is completed, RelatedAssociatedCompanyId must remain empty. (Otherwise, result will always be empty.) - `RelatedAssociatedCompanyId` (string) If RelatedAssociatedCompanyId is completed, RelatedOwnerCompanyId must remain empty. (Otherwise, result will always be empty.) - `IncludePrivate` (boolean) Set to True to include Private Companies in the result. False by default. - `SearchText` (string) Search in company display name, legal name, postal code, city, state, external name and external identifier. - `SearchName` (string) Search in company display name, external name and external identifier. - `CompanyType` (string) - `IsCompanyRelationStatusEnabled` (boolean) - `OnlyWithoutContacts` (boolean) - `ContactUserId` (string) - `ContactResponsibilityId` (string) - `RelatedCategoryId` (string) - `RelatedCategoryItemId` (string) - `Skip` (integer) - `Take` (integer) Max 1000 records are allowed. Default value is 100. ## Request fields (application/json-patch+json): - `companyIds` (array,null) - `applicationTypeIds` (array,null) ## Response 200 fields (application/json): - `companies` (array,null) - `companies.companyRelationExternalIdentifier` (string,null) - `companies.companyRelationExternalName` (string,null) - `companies.isCompanyRelationStatusEnabled` (boolean,null) - `companies.contacts` (array,null) - `companies.contacts.userId` (string) - `companies.contacts.responsibilityId` (string) - `companies.companyRelationCategories` (array,null) - `companies.companyRelationCategories.categoryId` (string) - `companies.companyRelationCategories.categoryItemId` (string) - `companies.companyId` (string) - `companies.seCompanyId` (string,null) - `companies.companyLegalName` (string,null) - `companies.companyDisplayName` (string,null) - `companies.companyAddress1` (string,null) - `companies.companyAddress2` (string,null) - `companies.companyPostalCode` (string,null) - `companies.companyCity` (string,null) - `companies.companyCountry` (string,null) - `companies.companyLogoUrl` (string,null) - `companies.companyActivityId` (integer) - `companies.companyStatus` (string,null) - `companies.applicationTypeIds` (array,null) - `companies.companyState` (string,null) - `companies.companyPhone` (string,null) - `companies.companyFax` (string,null) - `companies.companyEmail` (string,null) - `companies.companyIdentifiers` (array,null) - `companies.companyIdentifiers.typeId` (string) - `companies.companyIdentifiers.value` (string,null) - `companies.companyCategories` (array,null) - `companies.companyRevenue` (string,null) - `companies.companyCurrency` (string,null) - `companies.companySize` (string,null) - `companies.companyCreationDate` (string,null) - `companies.companyProductionCapacity` (string,null) - `companies.companyDeliveryAddress1` (string,null) - `companies.companyDeliveryAddress2` (string,null) - `companies.companyDeliveryPostalCode` (string,null) - `companies.companyDeliveryCity` (string,null) - `companies.companyDeliveryCountry` (string,null) - `companies.companyDeliveryState` (string,null) - `companies.seExternalCode` (string,null) - `companies.companyType` (string,null) - `companies.registeredOwnerCompanyId` (string,null) - `companies.testCompany` (boolean) - `companies.createdAt` (string,null) - `companies.modifiedAt` (string,null) - `companies.lastStatusUpdatedDate` (string,null) - `companies.targetSuspendDate` (string,null) - `companies.emergencyPhones` (array,null) - `companies.registeredCapital` (string,null) - `companies.legalStatusCode` (string,null) - `skipAndTakeQueryStats` (object,null) - `skipAndTakeQueryStats.totalCount` (integer) - `skipAndTakeQueryStats.currentCount` (integer) ## Response 400 fields (application/json): - `error` (string,null) - `errorCodes` (array,null) - `errorCode` (string,null) ## Response 403 fields (application/json): - `error` (string,null) - `errorCodes` (array,null) - `errorCode` (string,null) ## Response 404 fields (application/json): - `error` (string,null) - `errorCodes` (array,null) - `errorCode` (string,null)