Skip to content

Add company

POST
/api/connector/v1/companies/add

Adds a new company. Note this operation supports Portfolio Access Tokens.

CompanyAddParameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
ChainId

Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.

string format: uuid
nullable
Name
required

Name of the company.

string
>= 1 characters
MotherCompanyId

Unique identifier of the mother company.

string format: uuid
nullable
InvoicingEmail

Email for issuing invoices to the company.

string format: email
nullable
WebsiteUrl

The website url of the company.

string format: uri
nullable
InvoiceDueInterval

The maximum time, when the invoice has to be be paid in ISO 8601 duration format.

string
nullable
Options
required
Company Options Parameters

Options of the company.

object
Invoiceable

Whether the company is invoiceable or not.

boolean
AddFeesToInvoices

Whether the company has an additional fee applied for invoicing or not.

boolean
AddTaxDeductedPaymentToInvoices

Whether tax-deducted payments should be automatically added to invoices.

boolean
CreditRating
Credit rating parameters

Credit rating to define creditworthiness of the company.

object
Basic

Indicates the credit status of a company.

CreditOk (Company can book services.)

PaymentRequiredUpfront (Company must pay upfront.)

LocalDecisionRequired (Requires local approval.)

string
Allowed values: CreditOk PaymentRequiredUpfront LocalDecisionRequired
Department

The internal segmentation of a company, e.g. sales department.

string
nullable
DunsNumber

The Dun & Bradstreet unique 9-digit DUNS number.

string
nullable
ReferenceIdentifier

External system identifier - custom identifier used by an external system such as an external database.

string
nullable
AccountingCode

Accounting code of the company.

string
nullable
AdditionalTaxIdentifier

Additional tax identifer of the company.

string
nullable
BillingCode

Billing code of the company.

string
nullable
Contact

Other contact details, such as telephone, email or similar.

string
nullable
ContactPerson

Contact person of the company.

string
nullable
Identifier

Fiscal or legal identifier of the company.

string
nullable
Iata

Iata of the company.

string
nullable
Notes

Notes of the company.

string
nullable
TaxIdentifier

Tax identification number of the company.

string
nullable
Telephone

Contact telephone number.

string format: tel
nullable
Address
Address parameters

New address details.

object
Line1

First line of the address.

string
nullable
Line2

Second line of the address.

string
nullable
City

The city.

string
nullable
PostalCode

Postal code.

string format: postal-code
nullable
CountryCode

ISO 3166-1 code of the Country.

string
nullable
CountrySubdivisionCode

ISO 3166-2 code of the administrative division, e.g. DE-BW

string
nullable
ExternalIdentifier

Identifier of the company from external system.

string
nullable <= 255 characters
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ChainId": "1df21f06-0cfc-4960-9c58-a3bf1261663e",
"Name": "Mews",
"Options": {
"Invoiceable": true,
"AddFeesToInvoices": true
},
"MotherCompanyId": null,
"Identifier": null,
"TaxIdentifier": null,
"AdditionalTaxIdentifier": null,
"BillingCode": null,
"AccountingCode": null,
"Address": null,
"InvoiceDueInterval": "P2DT23H",
"Telephone": "111-222-333",
"ContacPerson": "SamplePerson",
"Contact": "ContactInfo",
"Notes": "Note1",
"Iata": "PAO",
"Department": "Sales",
"DunsNumber": "987654321",
"CreditRating": {
"Basic": "CreditOk"
},
"ExternalIdentifier": "1234",
"ReferenceIdentifier": "a58ff7cb-77e3-495a-bd61-aecf00a3f19d",
"WebsiteUrl": "https://www.mews.com"
}

OK

CompanyResult
object
Companies
required

The company profiles of the enterprise.

Array<object>
Company
object
Id
required

Unique identifier of the company.

string format: uuid
ChainId
required

Unique identifier of the chain.

string format: uuid
Name
required

Name of the company.

string
>= 1 characters
MotherCompanyId

Unique identifier of mother company.

string format: uuid
nullable
InvoicingEmail

Email for issuing invoices to the company.

string format: email
nullable
WebsiteUrl

The website url of the company.

string format: uri
nullable
InvoiceDueInterval

The maximum time, when the invoice has to be be paid in ISO 8601 duration format.

string
nullable
Options
required
Company Options

Options of the company.

object
Invoiceable

Whether the company is invoiceable or not.

boolean
AddFeesToInvoices

Whether the company has an additional fee applied for invoicing or not.

boolean
AddTaxDeductedPaymentToInvoices

Whether tax-deducted payments should be automatically added to invoices.

boolean
CreditRating
required
Credit Rating

Credit rating to define creditworthiness of the company.

object
Basic

Indicates the credit status of a company.

CreditOk (Company can book services.)

PaymentRequiredUpfront (Company must pay upfront.)

LocalDecisionRequired (Requires local approval.)

string
Allowed values: CreditOk PaymentRequiredUpfront LocalDecisionRequired
Department

The internal segmentation of a company, e.g. sales department.

string
nullable
DunsNumber

The Dun & Bradstreet unique 9-digit DUNS number.

string
nullable
ReferenceIdentifier

External system identifier - custom identifier used by an external system such as an external database.

string
nullable
AccountingCode

Accounting code of the company.

string
nullable
AdditionalTaxIdentifier

Additional tax identifier of the company.

string
nullable
BillingCode

Billing code of the company.

string
nullable
Contact

Other contact details, such as telephone, email or similar.

string
nullable
ContactPerson

Contact person of the company.

string
nullable
ElectronicInvoiceIdentifier

Electronic invoice identifier of the company.

string
nullable
Identifier

Fiscal or legal identifier of the company.

string
nullable
Iata

Iata of the company.

string
nullable
IsActive
required

Whether the company is still active.

boolean
Notes

Additional notes.

string
nullable
Number
required

Unique number of the company.

integer format: int64
TaxIdentifier

Tax identification number of the company.

string
nullable
Telephone

Contact telephone number.

string format: tel
nullable
CreatedUtc

Date of Company creation date and time.

string format: date-time
nullable
UpdatedUtc

Date of Company last update date and time.

string format: date-time
nullable
Address
Address
object
Id

Unique identifier of the address.

string format: uuid
Line1

First line of the address.

string
nullable
Line2

Second line of the address.

string
nullable
City

The city.

string
nullable
PostalCode

Postal code.

string
nullable
CountryCode

ISO 3166-1 code of the Country.

string
nullable
CountrySubdivisionCode

ISO 3166-2 code of the administrative division, e.g. DE-BW.

string
nullable
Latitude

The latitude.

number format: double
nullable
Longitude

The longitude.

number format: double
nullable
AddressId

Unique identifier of the company Address.

string format: uuid
nullable
MergeTargetId

Unique identifier of the account (Customer) to which this company is linked.

string format: uuid
nullable
TaxIdentificationNumber
string
nullable
ExternalIdentifier

Identifier of company from external system.

string
nullable <= 255 characters
Cursor

Unique identifier of the last and hence oldest company item returned. This can be used in Limitation in a subsequent request to fetch the next batch of older companies. If 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.

string format: uuid
nullable
Example
{
"Companies": [
{
"Id": "a58ff7cb-77e3-495a-bd61-aecf00a3f19d",
"ChainId": "1df21f06-0cfc-4960-9c58-a3bf1261663e",
"Name": "Sample Company 1",
"IsActive": true,
"Number": 11,
"Identifier": null,
"TaxIdentifier": null,
"AdditionalTaxIdentifier": null,
"ElectronicInvoiceIdentifier": null,
"InvoiceDueInterval": "P2DT23H",
"AccountingCode": null,
"MotherCompanyId": null,
"CreatedUtc": "2022-07-11T09:56:54Z",
"UpdatedUtc": "2022-07-11T09:56:54Z",
"AddressId": "bab7441c-4b82-43bc-8001-ab0400a346ec",
"BillingCode": null,
"Iata": "PAO",
"Telephone": "111-222-333",
"InvoicingEmail": "sample1@mews.com",
"ContacPerson": "Sample Person 1",
"Contact": "Contact Info 1",
"Notes": "Note 1",
"Options": {
"Invoiceable": true,
"AddFeesToInvoices": true
},
"Department": "Sales",
"DunsNumber": "123456789",
"CreditRating": {
"Basic": "PaymentRequiredUpfront"
},
"ReferenceIdentifier": "da34b396-77e3-495a-bd61-aecf00a3f19d",
"WebsiteUrl": "https://www.mewssystems.com",
"ExternalIdentifier": "company0001"
},
{
"Id": "da34b396-41f7-47f6-8847-aecf00a3f19e",
"ChainId": "5fcd1933-22f2-40b9-84da-7db04cbecec2",
"Name": "Sample Company 2",
"IsActive": true,
"Number": 12,
"Identifier": null,
"TaxIdentifier": null,
"AdditionalTaxIdentifier": null,
"ElectronicInvoiceIdentifier": null,
"InvoiceDueInterval": "P2DT23H",
"AccountingCode": null,
"MotherCompanyId": null,
"CreatedUtc": "2022-07-11T09:56:54Z",
"UpdatedUtc": "2022-07-11T09:56:54Z",
"AddressId": null,
"BillingCode": null,
"Iata": "PAO",
"Telephone": "111-222-333",
"InvoicingEmail": "sample2@mews.com",
"ContacPerson": "Sample Person 2",
"Contact": "Contact Info 2",
"Notes": "Note 2",
"Options": {
"Invoiceable": true,
"AddFeesToInvoices": false
},
"Department": "Accounting",
"DunsNumber": "987654321",
"CreditRating": {
"Basic": "CreditOk"
},
"ReferenceIdentifier": "a58ff7cb-77e3-495a-bd61-aecf00a3f19d",
"WebsiteUrl": "https://www.mews.com",
"ExternalIdentifier": "company0002"
}
],
"Cursor": "da34b396-41f7-47f6-8847-aecf00a3f19e"
}

Server has successfully fulfilled the request and there is no additional information to send back.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable