Add company
POST /api/connector/v1/companies/add
Adds a new company. Note this operation supports Portfolio Access Tokens.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.
Name of the company.
Unique identifier of the mother company.
Email for issuing invoices to the company.
The website url of the company.
The maximum time, when the invoice has to be be paid in ISO 8601 duration format.
Options of the company.
object
Whether the company is invoiceable or not.
Whether the company has an additional fee applied for invoicing or not.
Whether tax-deducted payments should be automatically added to invoices.
Credit rating to define creditworthiness of the company.
object
Indicates the credit status of a company.
CreditOk (Company can book services.)
PaymentRequiredUpfront (Company must pay upfront.)
LocalDecisionRequired (Requires local approval.)
The internal segmentation of a company, e.g. sales department.
The Dun & Bradstreet unique 9-digit DUNS number.
External system identifier - custom identifier used by an external system such as an external database.
Accounting code of the company.
Additional tax identifer of the company.
Billing code of the company.
Other contact details, such as telephone, email or similar.
Contact person of the company.
Fiscal or legal identifier of the company.
Iata of the company.
Notes of the company.
Tax identification number of the company.
Contact telephone number.
New address details.
object
First line of the address.
Second line of the address.
The city.
Postal code.
ISO 3166-1 code of the Country.
ISO 3166-2 code of the administrative division, e.g. DE-BW
Identifier of the company from external system.
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"}
Responses
Section titled “ Responses ”OK
object
The company profiles of the enterprise.
object
Unique identifier of the company.
Unique identifier of the chain.
Name of the company.
Unique identifier of mother company.
Email for issuing invoices to the company.
The website url of the company.
The maximum time, when the invoice has to be be paid in ISO 8601 duration format.
Options of the company.
object
Whether the company is invoiceable or not.
Whether the company has an additional fee applied for invoicing or not.
Whether tax-deducted payments should be automatically added to invoices.
Credit rating to define creditworthiness of the company.
object
Indicates the credit status of a company.
CreditOk (Company can book services.)
PaymentRequiredUpfront (Company must pay upfront.)
LocalDecisionRequired (Requires local approval.)
The internal segmentation of a company, e.g. sales department.
The Dun & Bradstreet unique 9-digit DUNS number.
External system identifier - custom identifier used by an external system such as an external database.
Accounting code of the company.
Additional tax identifier of the company.
Billing code of the company.
Other contact details, such as telephone, email or similar.
Contact person of the company.
Electronic invoice identifier of the company.
Fiscal or legal identifier of the company.
Iata of the company.
Whether the company is still active.
Additional notes.
Unique number of the company.
Tax identification number of the company.
Contact telephone number.
Date of Company creation date and time.
Date of Company last update date and time.
object
Unique identifier of the address.
First line of the address.
Second line of the address.
The city.
Postal code.
ISO 3166-1 code of the Country
.
ISO 3166-2 code of the administrative division, e.g. DE-BW
.
The latitude.
The longitude.
Unique identifier of the company Address.
Unique identifier of the account (Customer) to which this company is linked.
Identifier of company from external system.
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.
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.
object
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).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
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.
object
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
object
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.
object
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.