POST api/Contact

Create a new Contact for a customer. Required: SiteOwnerId, CustomerId, FirstName, LastName.

Request Information

URI Parameters

None.

Body Parameters

The Contact Model containing properties for populating a new contact

ContactModel
NameDescriptionTypeAdditional information
SiteOwnerId

integer

Required

CustomerId

integer

None.

CustomerRefCode

string

None.

Firstname

string

Required

Max length: 150

Lastname

string

Required

Max length: 150

Phone

string

Max length: 20

Mobile

string

Max length: 20

Email

string

Max length: 150

Position

string

Max length: 250

Relationship

string

Max length: 250

RefCode

string

Max length: 200

Request Formats

application/json, text/json

Sample:
{
  "SiteOwnerId": 1,
  "CustomerId": 2,
  "CustomerRefCode": "sample string 3",
  "Firstname": "sample string 4",
  "Lastname": "sample string 5",
  "Phone": "sample string 6",
  "Mobile": "sample string 7",
  "Email": "sample string 8",
  "Position": "sample string 9",
  "Relationship": "sample string 10",
  "RefCode": "sample string 11"
}

application/xml, text/xml

Sample:
<ContactModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExsalerateWebAPI.Models">
  <CustomerId>2</CustomerId>
  <CustomerRefCode>sample string 3</CustomerRefCode>
  <Email>sample string 8</Email>
  <Firstname>sample string 4</Firstname>
  <Lastname>sample string 5</Lastname>
  <Mobile>sample string 7</Mobile>
  <Phone>sample string 6</Phone>
  <Position>sample string 9</Position>
  <RefCode>sample string 11</RefCode>
  <Relationship>sample string 10</Relationship>
  <SiteOwnerId>1</SiteOwnerId>
</ContactModel>

application/x-www-form-urlencoded

Sample:
SiteOwnerId=1&CustomerId=2&FirstName=Foo&LastName=Bar

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.