---
title: "Add company"
method: POST
path: "/api/connector/v1/companies/add"
tags: ["Companies"]
---

# Add company

`POST /api/connector/v1/companies/add`

Adds a new company. Note this operation supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property).

## Request body

- CompanyAddParameters
  - `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.
  - `ChainId` string, uuid, nullable — Unique identifier of the chain. Required when using [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property), ignored otherwise.
  - `Name` string, required — Name of the company.
  - `MotherCompanyId` string, uuid, nullable — Unique identifier of the 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` CompanyOptionsParameters, 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` CreditRatingParameters — 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 identifer 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.
  - `Identifier` string, nullable — Fiscal or legal identifier of the company.
  - `Iata` string, nullable — Iata of the company.
  - `Notes` string, nullable — Notes of the company.
  - `TaxIdentifier` string, nullable — Tax identification number of the company.
  - `Telephone` string, tel, nullable — Contact telephone number.
  - `Address` AddressParameters — New address details.
    - `Line1` string, nullable — First line of the address.
    - `Line2` string, nullable — Second line of the address.
    - `City` string, nullable — The city.
    - `PostalCode` string, postal-code, 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
  - `ExternalIdentifier` string, nullable — Identifier of the company from external system.

## 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.net/mews/apis/connector-api.md) · [All operations](https://skmtc.net/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mews/connector-api/versions/81933a8ff730/schema)
