POST api/Customer/InsertCustomer

Inserts a new customer.

Request Information

URI Parameters

None.

Body Parameters

CustomerPost
NameDescriptionTypeAdditional information
Name

(Required) Name

string

None.

Phones

(Optional) Phones

Collection of string

None.

Emails

(Optional) Emails

Collection of string

None.

Web

(Optional) Web page address

string

None.

Description

(Optional) Description

string

None.

Location

(Optional) Location

string

None.

StreetNo

(Optional) Street and number of descriptive

string

None.

PostalCode

(Optional) Postal code

string

None.

CountryCode

(Optional) Country code. The code is specified by three letters

string

None.

EmailDomains

(Optional) Email domains

Collection of string

None.

Disabled

If true the customer is disabled

boolean

None.

City

(Optional)The customer's city

string

None.

TimeZoneId

The time zone identifier (TimeZoneInfo.Id Property)

string

None.

CustomFields

The Custom Fields data.

Collection of CustomerCustomFieldData

None.

ExternalId

The External id.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "Company ltd.",
  "Phones": [
    "+420 123 456 789"
  ],
  "Emails": [
    "company@domain.com"
  ],
  "Web": "www.requestor.com",
  "Description": "Everything else",
  "Location": null,
  "StreetNo": "Street 25",
  "PostalCode": "111 11",
  "CountryCode": "CZE",
  "EmailDomains": [
    "requestor.com"
  ],
  "Disabled": false,
  "City": "Brno",
  "TimeZoneId": "Central Europe Standard Time",
  "CustomFields": null,
  "ExternalId": null
}

application/xml, text/xml

Sample:
<CustomerPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <City>Brno</City>
  <CountryCode>CZE</CountryCode>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures" i:nil="true" />
  <Description>Everything else</Description>
  <Disabled>false</Disabled>
  <EmailDomains xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>requestor.com</d2p1:string>
  </EmailDomains>
  <Emails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>company@domain.com</d2p1:string>
  </Emails>
  <ExternalId i:nil="true" />
  <Location i:nil="true" />
  <Name>Company ltd.</Name>
  <Phones xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>+420 123 456 789</d2p1:string>
  </Phones>
  <PostalCode>111 11</PostalCode>
  <StreetNo>Street 25</StreetNo>
  <TimeZoneId>Central Europe Standard Time</TimeZoneId>
  <Web>www.requestor.com</Web>
</CustomerPost>

Response Information

Resource Description

InsertCustomerResult
NameDescriptionTypeAdditional information
Id

Reference ID of the newly created customer

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1
}

application/xml, text/xml

Sample:
<InsertCustomerResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <Id>1</Id>
</InsertCustomerResult>