Inbound API Companies - TechnicheGroup/urgent-rest GitHub Wiki

Create Company

POST /companies/{tenant}

This method allows for the creation of a company, in Urgent a company can be one or all of the following types:

  • AssetManufacturer
  • AssetSeller
  • AssetServiceFirm

Requests

Example Minimum Request

{
  "Name": "ACME Inc",
  "EmailAddress": "[email protected]",
  "TelephoneNumber": "+44 (0) 1908 038 560",
  "AddressLine1": "Techniche EMEA Limited",
  "Country": "United Kingdom",
  "CompanyTypes": [
    "AssetManufacturer"
  ]
}

These properties are required and must be provided, in the case of CompanyTypes at least one type must be provided.

Example Full Request

{
  "Name": "ACME Inc",
  "EmailAddress": "[email protected]",
  "TelephoneNumber": "+44 (0) 1908 038 560",
  "AddressLine1": "Techniche EMEA Limited",
  "AddressLine2": "Studio C/2, Witan Studios",
  "AddressLine3": "324 Witan Gate West",
  "Town": "Milton Keynes",
  "County": "Buckinghamshire",
  "Country": "United Kingdom",
  "Postcode": "MK9 1EJ",
  "CompanyTypes": [
    "AssetManufacturer",
    "AssetSeller",
    "AssetServiceFirm"
  ]
}

Response Examples

Success Example

Indicates that the company was successfully created.

{
    "Messages": null
}

Failure Example

Indicates that the company was not created.

{
    "Messages": [
        {
            "Key": "BrokenRule_Company_MissingCompanyName",
            "Value": "Company Name is required"
        },
        {
            "Key": "BrokenRule_Company_MissingCompanyType",
            "Value": "Company Type is required"
        }
    ]
}