PUT api/2.0/crm/contact/company/{companyid} This function requires authentication

Description

Updates the selected company with the parameters specified in the request.

Parameters
Name Description Type Example
companyid
sent in url
Company ID number 1234
companyName
sent in body
New company name string some text
about
sent in body
New company description text
optional
string some text
shareType
sent in body
New company privacy: 0 - not shared, 1 - shared for reading/writnig, 2 - shared for reading only None, ReadWrite, Read none
managerList
sent in body
New list of company managers
optional
Collection of guids
collection
9924256A-739C-462b-AF15-E652A3B1B6EB
customFieldList
sent in body
New custom field list
optional
Dictionary(key:int, value:string)
collection
[{"Key": 0,"Value": "some text"}]
Example
PUT api/2.0/crm/contact/company/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "companyName": "some text",
  "about": "some text",
  "shareType": "none",
  "managerList": [
    "9924256A-739C-462b-AF15-E652A3B1B6EB"
  ],
  "customFieldList": [
    {
      "Key": 0,
      "Value": "some text"
    }
  ]
}
Returns

Company

Example Response

application/json

{
  "status": 0,
  "response": {
    "CompanyName": "Food and Culture Project",
    "Persons": [
      {
        "SmallFotoUrl": "url to foto",
        "MediumFotoUrl": "url to foto",
        "DisplayName": "Tadjeddine Bachir",
        "IsCompany": false,
        "AccessList": [
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "DisplayName": "Mike Zanyatski",
            "Title": "Manager",
            "AvatarSmall": "url to small avatar",
            "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
          }
        ],
        "IsPrivate": true,
        "IsShared": false,
        "ShareType": 0,
        "Currency": {
          "Title": "Chinese Yuan",
          "Symbol": "¥",
          "Abbreviation": "CNY",
          "CultureName": "CN",
          "IsConvertable": true,
          "IsBasic": false
        },
        "CanEdit": true,
        "CanDelete": true,
        "id": 1234
      }
    ],
    "PersonsCount": 33,
    "id": 1234,
    "SmallFotoUrl": "url to foto",
    "MediumFotoUrl": "url to foto",
    "DisplayName": "Tadjeddine Bachir",
    "IsCompany": false,
    "AccessList": [
      {
        "Id": "00000000-0000-0000-0000-000000000000",
        "DisplayName": "Mike Zanyatski",
        "Title": "Manager",
        "AvatarSmall": "url to small avatar",
        "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
      }
    ],
    "IsPrivate": true,
    "IsShared": false,
    "ShareType": 0,
    "Currency": {
      "Title": "Chinese Yuan",
      "Symbol": "¥",
      "Abbreviation": "CNY",
      "CultureName": "CN",
      "IsConvertable": true,
      "IsBasic": false
    },
    "CanEdit": true,
    "CanDelete": true,
    "Addresses": [
      {
        "Street": "Lubanas st. 125a-25",
        "City": "",
        "State": "",
        "Zip": "LV-1021",
        "Country": "Latvia",
        "Category": 0,
        "CategoryName": "Home",
        "IsPrimary": true
      }
    ],
    "CreateBy": {
      "Id": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Mike Zanyatski",
      "Title": "Manager",
      "AvatarSmall": "url to small avatar",
      "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
    },
    "Created": "2020-12-08T17:37:04.5916406Z",
    "About": "About",
    "Industry": "Industry",
    "ContactStatus": {
      "id": 1234,
      "Title": "Title",
      "Description": "Description",
      "Color": "#a7fc00",
      "SortOrder": 1
    },
    "ContactType": {
      "id": 1234,
      "Title": "Title",
      "Description": "Description",
      "Color": "#a7fc00",
      "SortOrder": 1
    },
    "CommonData": [
      {
        "InfoType": 1,
        "Category": 0,
        "Data": "support@onlyoffice.com",
        "CategoryName": "Home",
        "IsPrimary": true,
        "id": 1234
      }
    ],
    "CustomFields": [
      {
        "EntityId": 14523423,
        "Label": "Birthdate",
        "FieldValue": "2020-12-08T17:37:04.5916406Z",
        "FieldType": 5,
        "Position": 10,
        "Mask": "",
        "id": 1234
      }
    ],
    "Tags": [
      "Tag1",
      "Tag2"
    ],
    "TaskCount": 1,
    "HaveLateTasks": true
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <CompanyName>Food and Culture Project</CompanyName>
    <Persons>
      <SmallFotoUrl>url to foto</SmallFotoUrl>
      <MediumFotoUrl>url to foto</MediumFotoUrl>
      <DisplayName>Tadjeddine Bachir</DisplayName>
      <IsCompany>False</IsCompany>
      <AccessList>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <DisplayName>Mike Zanyatski</DisplayName>
        <Title>Manager</Title>
        <AvatarSmall>url to small avatar</AvatarSmall>
        <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
      </AccessList>
      <IsPrivate>True</IsPrivate>
      <IsShared>False</IsShared>
      <ShareType>0</ShareType>
      <Currency>
        <Title>Chinese Yuan</Title>
        <Symbol>¥</Symbol>
        <Abbreviation>CNY</Abbreviation>
        <CultureName>CN</CultureName>
        <IsConvertable>True</IsConvertable>
        <IsBasic>False</IsBasic>
      </Currency>
      <CanEdit>True</CanEdit>
      <CanDelete>True</CanDelete>
      <id>1234</id>
    </Persons>
    <PersonsCount>33</PersonsCount>
    <id>1234</id>
    <SmallFotoUrl>url to foto</SmallFotoUrl>
    <MediumFotoUrl>url to foto</MediumFotoUrl>
    <DisplayName>Tadjeddine Bachir</DisplayName>
    <IsCompany>False</IsCompany>
    <AccessList>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <DisplayName>Mike Zanyatski</DisplayName>
      <Title>Manager</Title>
      <AvatarSmall>url to small avatar</AvatarSmall>
      <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
    </AccessList>
    <IsPrivate>True</IsPrivate>
    <IsShared>False</IsShared>
    <ShareType>0</ShareType>
    <Currency>
      <Title>Chinese Yuan</Title>
      <Symbol>¥</Symbol>
      <Abbreviation>CNY</Abbreviation>
      <CultureName>CN</CultureName>
      <IsConvertable>True</IsConvertable>
      <IsBasic>False</IsBasic>
    </Currency>
    <CanEdit>True</CanEdit>
    <CanDelete>True</CanDelete>
    <Addresses>
      <Street>Lubanas st. 125a-25</Street>
      <City />
      <State />
      <Zip>LV-1021</Zip>
      <Country>Latvia</Country>
      <Category>0</Category>
      <CategoryName>Home</CategoryName>
      <IsPrimary>True</IsPrimary>
    </Addresses>
    <CreateBy>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <DisplayName>Mike Zanyatski</DisplayName>
      <Title>Manager</Title>
      <AvatarSmall>url to small avatar</AvatarSmall>
      <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
    </CreateBy>
    <Created>2020-12-08T17:37:04.5916406Z</Created>
    <About>About</About>
    <Industry>Industry</Industry>
    <ContactStatus>
      <id>1234</id>
      <Title>Title</Title>
      <Description>Description</Description>
      <Color>#a7fc00</Color>
      <SortOrder>1</SortOrder>
    </ContactStatus>
    <ContactType>
      <id>1234</id>
      <Title>Title</Title>
      <Description>Description</Description>
      <Color>#a7fc00</Color>
      <SortOrder>1</SortOrder>
    </ContactType>
    <CommonData>
      <InfoType>1</InfoType>
      <Category>0</Category>
      <Data>support@onlyoffice.com</Data>
      <CategoryName>Home</CategoryName>
      <IsPrimary>True</IsPrimary>
      <id>1234</id>
    </CommonData>
    <CustomFields>
      <EntityId>14523423</EntityId>
      <Label>Birthdate</Label>
      <FieldValue>2020-12-08T17:37:04.5916406Z</FieldValue>
      <FieldType>5</FieldType>
      <Position>10</Position>
      <Mask />
      <id>1234</id>
    </CustomFields>
    <Tags>Tag1</Tags>
    <Tags>Tag2</Tags>
    <TaskCount>1</TaskCount>
    <HaveLateTasks>True</HaveLateTasks>
  </response>
</result>