companiesAdd a new company if it not exists. To call this, you need to have the right to add contact of 090300.

Add a new company if it not exists. To call this, you need to have the right to add contact of 090300.

curl -X POST "https://api.example.com/restapi/v1/companies" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "John Doe",
  "name2": "John Doe",
  "email": "user@example.com",
  "department": "example_string",
  "position": "example_string",
  "street": "example_string",
  "houseNumber": "example_string",
  "addition": "example_string",
  "zip": "example_string",
  "city": "New York",
  "state": "example_string",
  "country": "USA",
  "phone": {
    "id": 123,
    "type": "example_string",
    "countryCode": "USA",
    "areaCode": "example_string",
    "number": "example_string"
  },
  "fax": {
    "id": 123,
    "type": "example_string",
    "countryCode": "USA",
    "areaCode": "example_string",
    "number": "example_string"
  },
  "mobile": {
    "id": 123,
    "type": "example_string",
    "countryCode": "USA",
    "areaCode": "example_string",
    "number": "example_string"
  },
  "addressType": 42,
  "isDefaultAddress": true,
  "categoryId": 123
}'
[
  {
    "id": 123,
    "name": "John Doe",
    "name2": "John Doe",
    "contactCategoriesId": [
      123
    ],
    "email": "user@example.com",
    "defaultAddress": [
      {
        "id": 123,
        "addressType": 42,
        "parentContact": "example_string",
        "parentContactId": 123,
        "isDefault": true,
        "position": "example_string",
        "department": "example_string",
        "street": "example_string",
        "houseNumber": "example_string",
        "addition": "example_string",
        "zip": "example_string",
        "city": "New York",
        "state": "example_string",
        "country": "USA",
        "emails": [
          {
            "id": 123,
            "email": "user@example.com"
          }
        ],
        "phones": [
          {
            "id": 123,
            "type": "example_string",
            "countryCode": "USA",
            "areaCode": "example_string",
            "number": "example_string"
          }
        ]
      }
    ],
    "defaultPhone": {
      "id": 123,
      "type": "example_string",
      "countryCode": "USA",
      "areaCode": "example_string",
      "number": "example_string"
    },
    "defaultFax": {
      "id": 123,
      "type": "example_string",
      "countryCode": "USA",
      "areaCode": "example_string",
      "number": "example_string"
    },
    "defaultMobile": {
      "id": 123,
      "type": "example_string",
      "countryCode": "USA",
      "areaCode": "example_string",
      "number": "example_string"
    },
    "allAddress": [
      {
        "id": 123,
        "addressType": 42,
        "parentContact": "example_string",
        "parentContactId": 123,
        "isDefault": true,
        "position": "example_string",
        "department": "example_string",
        "street": "example_string",
        "houseNumber": "example_string",
        "addition": "example_string",
        "zip": "example_string",
        "city": "New York",
        "state": "example_string",
        "country": "USA",
        "emails": [
          {
            "id": 123,
            "email": "user@example.com"
          }
        ],
        "phones": [
          {
            "id": 123,
            "type": "example_string",
            "countryCode": "USA",
            "areaCode": "example_string",
            "number": "example_string"
          }
        ]
      }
    ]
  }
]
POST
/companies
POST
Base URLstring

Target server for requests. Edit to use your own host.

Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Responses

idinteger
namestring
name2string
contactCategoriesIdinteger[]
emailstring
defaultAddressarray
defaultPhoneobject
defaultFaxobject
defaultMobileobject
allAddressarray