POST api/Customer

Create a new customer for a specific site owner. Required: CustomerName, AssignedToEmail. Returns: CustomerId

Request Information

URI Parameters

None.

Body Parameters

the Customer Model containing properties for populating a new Customer

CustomerModel
NameDescriptionTypeAdditional information
SiteOwnerId

integer

None.

AssignedToEmail

string

Required

Max length: 150

CustomerName

string

Required

Max length: 255

CompanyPhone

string

Max length: 20

CompanyMobile

string

Max length: 20

CompanyEmail

string

Max length: 150

LeadStatus

string

Max length: 150

RefCode

string

Max length: 200

Region

string

Max length: 150

Notes

string

Max length: 4000

Request Formats

application/json, text/json

Sample:
{
  "SiteOwnerId": 1,
  "AssignedToEmail": "sample string 1",
  "CustomerName": "sample string 2",
  "CompanyPhone": "sample string 3",
  "CompanyMobile": "sample string 4",
  "CompanyEmail": "sample string 5",
  "LeadStatus": "sample string 6",
  "RefCode": "sample string 7",
  "Region": "sample string 8",
  "Notes": "sample string 9"
}

application/xml, text/xml

Sample:
<CustomerModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExsalerateWebAPI.Models">
  <AssignedToEmail>sample string 1</AssignedToEmail>
  <CompanyEmail>sample string 5</CompanyEmail>
  <CompanyMobile>sample string 4</CompanyMobile>
  <CompanyPhone>sample string 3</CompanyPhone>
  <CustomerName>sample string 2</CustomerName>
  <LeadStatus>sample string 6</LeadStatus>
  <Notes>sample string 9</Notes>
  <RefCode>sample string 7</RefCode>
  <Region>sample string 8</Region>
  <SiteOwnerId>1</SiteOwnerId>
</CustomerModel>

application/x-www-form-urlencoded

Sample:
SiteOwnerId=1&CompanyName=MyNewCompany&AssignedToEmail=me@my.com&LeadStatus=Working

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.

Response Formats

text/plain

Sample:
1234