PUT api/Contact
Update a contact entry in Exsalerate, or if it doesn't exist create contact. This is an all or nothing update, meaning you can't do partial updates (patch). If you do not provide a property it will be set to empty. Contact is located by either refcode or name. Customer is located by either CustomerID or CustomerRefCode. Required: SiteOwnerId, CustomerId or CustomerRefCode, FirstName, LastName.
Request Information
URI Parameters
None.
Body Parameters
The Contact Model containing properties for updating or creating a Contact.
ContactModelName | Description | Type | Additional 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 |
|
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
{ "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
<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
SiteOwnerId=1&CustomerId=2&FirstName=Foo&LastName=Bar
Response Information
Resource Description
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |