POST api/Contact/Save

Passing in a 0 value for c.Id will create a new record, while a c.Id > 0 will update an existing record if a match exists

Request Information

URI Parameters

None.

Body Parameters

ContactInfos
NameDescriptionTypeAdditional information
Id

integer

None.

Region

integer

None.

Name

string

None.

Title

string

None.

Phone

string

None.

Email

string

None.

CompanyId

integer

None.

LinkedIn

string

None.

ProfilePublic

boolean

None.

Website

string

None.

Address

string

None.

City

string

None.

State

string

None.

ZipCode

string

None.

Country

string

None.

SortOrder

integer

None.

Request Formats

application/json, text/json, text/html

Sample:
{
  "Id": 1,
  "Region": 2,
  "Name": "sample string 3",
  "Title": "sample string 4",
  "Phone": "sample string 5",
  "Email": "sample string 6",
  "CompanyId": 7,
  "LinkedIn": "sample string 8",
  "ProfilePublic": true,
  "Website": "sample string 10",
  "Address": "sample string 11",
  "City": "sample string 12",
  "State": "sample string 13",
  "ZipCode": "sample string 14",
  "Country": "sample string 15",
  "SortOrder": 16
}

application/xml, text/xml

Sample:
<ContactInfos xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NiceAPI.Managers">
  <Address>sample string 11</Address>
  <City>sample string 12</City>
  <CompanyId>7</CompanyId>
  <Country>sample string 15</Country>
  <Email>sample string 6</Email>
  <Id>1</Id>
  <LinkedIn>sample string 8</LinkedIn>
  <Name>sample string 3</Name>
  <Phone>sample string 5</Phone>
  <ProfilePublic>true</ProfilePublic>
  <Region>2</Region>
  <SortOrder>16</SortOrder>
  <State>sample string 13</State>
  <Title>sample string 4</Title>
  <Website>sample string 10</Website>
  <ZipCode>sample string 14</ZipCode>
</ContactInfos>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ContactInfos'.

Response Information

Resource Description

new id of newly created record or id of record updated

integer

Response Formats

application/json, text/json, text/html

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>