---
title: "Get all companies"
method: POST
path: "/api/connector/v1/companies/getAll"
tags: ["Companies"]
---

# Get all companies

`POST /api/connector/v1/companies/getAll`

## Request

- Base URL: `https://api.mews.com`
- URL: `https://api.mews.com/api/connector/v1/companies/getAll`
- Auth: none declared

Returns all company profiles of the enterprise, possibly filtered by identifiers, names or other filters.
Note this operation uses [Pagination](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/) and supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property).

## Request body

- CompanyFilterParameters
  - `ClientToken` string, required: Token identifying the client application.
  - `AccessToken` string, required: Access token of the client application.
  - `Client` string, required: Name and version of the client application.
  - `Limitation` Limitation, required: Limitation on the quantity of data returned.
    - `Count` integer, required
    - `Cursor` string, uuid, nullable
  - `ChainIds` string[], nullable: Unique identifiers of `Chain`. If not specified, the operation returns data for all chains within scope of the Access Token.
  - `MotherCompanyIds` string[], nullable: Unique identifiers of mother `Company`.
  - `CreatedUtc` TimeFilterInterval: When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `UpdatedUtc` TimeFilterInterval: When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `TimeFilter` 'Created' | 'Updated', nullable
  - `StartUtc` string, date-time, nullable
  - `EndUtc` string, date-time, nullable
  - `Ids` string[], nullable: Unique identifiers of [Companies](https://mews-systems.gitbook.io/connector-api/operations/#company).
  - `ExternalIdentifiers` string[], nullable: Identifiers of [Company](https://mews-systems.gitbook.io/connector-api/operations/#company) from external system.
  - `Names` string[], nullable: Names of [Companies](https://mews-systems.gitbook.io/connector-api/operations/#company).
  - `ActivityStates` ActivityStates[], nullable: Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted records will be returned.

## Response `200`

OK

- CompanyResult
  - `Companies` Company[], required: The company profiles of the enterprise.
    - `Id` string, uuid, required: Unique identifier of the company.
    - `ChainId` string, uuid, required: Unique identifier of the chain.
    - `Name` string, required: Name of the company.
    - `MotherCompanyId` string, uuid, nullable: Unique identifier of mother company.
    - `InvoicingEmail` string, email, nullable: Email for issuing invoices to the company.
    - `WebsiteUrl` string, uri, nullable: The website url of the company.
    - `InvoiceDueInterval` string, nullable: The maximum time, when the invoice has to be be paid in ISO 8601 duration format.
    - `Options` CompanyOptions, required: Options of the company.
      - `Invoiceable` boolean: Whether the company is invoiceable or not.
      - `AddFeesToInvoices` boolean: Whether the company has an additional fee applied for invoicing or not.
      - `AddTaxDeductedPaymentToInvoices` boolean: Whether tax-deducted payments should be automatically added to invoices.
    - `CreditRating` CreditRating, required: Credit rating to define creditworthiness of the company.
      - `Basic` 'CreditOk' | 'PaymentRequiredUpfront' | 'LocalDecisionRequired': CreditOk (Company can book services.) PaymentRequiredUpfront (Company must pay upfront.) LocalDecisionRequired (Requires local approval.)
    - `Department` string, nullable: The internal segmentation of a company, e.g. sales department.
    - `DunsNumber` string, nullable: The Dun & Bradstreet unique 9-digit DUNS number.
    - `ReferenceIdentifier` string, nullable: External system identifier - custom identifier used by an external system such as an external database.
    - `AccountingCode` string, nullable: Accounting code of the company.
    - `AdditionalTaxIdentifier` string, nullable: Additional tax identifier of the company.
    - `BillingCode` string, nullable: Billing code of the company.
    - `Contact` string, nullable: Other contact details, such as telephone, email or similar.
    - `ContactPerson` string, nullable: Contact person of the company.
    - `ElectronicInvoiceIdentifier` string, nullable: Electronic invoice identifier of the company.
    - `Identifier` string, nullable: Fiscal or legal identifier of the company.
    - `Iata` string, nullable: Iata of the company.
    - `IsActive` boolean, required: Whether the company is still active.
    - `Notes` string, nullable: Additional notes.
    - `Number` integer, required: Unique number of the company (max 19 digits).
    - `TaxIdentifier` string, nullable: Tax identification number of the company.
    - `Telephone` string, tel, nullable: Contact telephone number.
    - `CreatedUtc` string, date-time, nullable: Date of [Company](https://mews-systems.gitbook.io/connector-api/operations/#company) creation date and time.
    - `UpdatedUtc` string, date-time, nullable: Date of [Company](https://mews-systems.gitbook.io/connector-api/operations/#company) last update date and time.
    - `Address` OldAddress
      - `Id` string, uuid: Unique identifier of the address.
      - `Line1` string, nullable: First line of the address.
      - `Line2` string, nullable: Second line of the address.
      - `City` string, nullable: The city.
      - `PostalCode` string, nullable: Postal code.
      - `CountryCode` string, nullable: ISO 3166-1 code of the `Country`.
      - `CountrySubdivisionCode` string, nullable: ISO 3166-2 code of the administrative division, e.g. `DE-BW`.
      - `Latitude` number, double, nullable: The latitude.
      - `Longitude` number, double, nullable: The longitude.
    - `AddressId` string, uuid, nullable: Unique identifier of the company [Address](https://mews-systems.gitbook.io/connector-api/operations/addresses/#account-address).
    - `MergeTargetId` string, uuid, nullable: Unique identifier of the account (Customer) to which this company is linked.
    - `TaxIdentificationNumber` string, nullable
    - `ExternalIdentifier` string, nullable: Identifier of company from external system.
  - `Cursor` string, uuid, nullable: Unique identifier of the last and hence oldest company item returned. This can be used in [Limitation](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/#limitation) in a subsequent request to fetch the next batch of older companies. If [Limitation](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/#limitation) is specified in the request message, then Cursor will always be included in the response message; this is true even when using Extents set to false so that no actual data is returned.

## Other responses

- `204`: Server has successfully fulfilled the request and there is no additional information to send back.
- `400`: Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
- `401`: Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
- `403`: Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
- `408`: Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see [Request timeouts](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
- `429`: Error caused by too many requests sent in a given amount of time. Response contains `Retry-After` header indicating how long the user agent should wait before making a follow-up request. For more information, see [Request limits](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
- `500`: Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our [documentation repository](https://github.com/MewsSystems/gitbook-connector-api).

---

[API](https://skmtc.dev/mews/apis/connector-api.md) · [All operations](https://skmtc.dev/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mews/apis/connector-api/revisions/d02162631aaa?raw)
