POST api/2.0/crm/contact/person This function requires authentication

Description

Creates a person with the parameters (first name, last name, description, etc.) specified in the request.

Parameters
Name Description Type Example
firstName
sent in body
First name string some text
lastName
sent in body
Last name string some text
jobTitle
sent in body
Job title
optional
string some text
companyId
sent in body
Company ID
optional
number 1234
about
sent in body
Person description text
optional
string some text
shareType
sent in body
Person privacy: 0 - not shared, 1 - shared for reading/writing, 2 - shared for reading only None, ReadWrite, Read none
managerList
sent in body
List of person managers
optional
Collection of guids
collection
9924256A-739C-462b-AF15-E652A3B1B6EB
customFieldList
sent in body
Custom field list
optional
Dictionary(key:int, value:string)
collection
[{"Key": 0,"Value": "some text"}]
photo
sent in body
Contact photo (upload using multipart/form-data)
optional
Files for adding using multipart/form-data
collection
N/A
Example
POST api/2.0/crm/contact/person
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "firstName": "some text",
  "lastName": "some text",
  "jobTitle": "some text",
  "companyId": 1234,
  "about": "some text",
  "shareType": "none",
  "managerList": [
    "9924256A-739C-462b-AF15-E652A3B1B6EB"
  ],
  "customFieldList": [
    {
      "Key": 0,
      "Value": "some text"
    }
  ],
  "photo": []
}
Returns

Person

Example Response

application/json

{
  "status": 0,
  "response": {
    "FirstName": "Tadjeddine",
    "LastName": "Bachir",
    "Company": {
      "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
    },
    "Title": "Programmer",
    "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>
    <FirstName>Tadjeddine</FirstName>
    <LastName>Bachir</LastName>
    <Company>
      <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>
    </Company>
    <Title>Programmer</Title>
    <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>