POST api/Contacts

Creates a contact

Request Information

URI Parameters

None.

Body Parameters

ContactRequestBase
NameDescriptionTypeAdditional information
BranchId

integer

None.

Name

string

Required

Max length: 128

Address1

string

Max length: 100

Address2

string

Max length: 100

Address3

string

Max length: 100

PostalCode

string

Max length: 10

Town

string

Max length: 50

CountryId

string

Required

Max length: 2

Email

string

Max length: 50

Phone

string

Max length: 50

Mobile

string

Max length: 50

BusinessPosition

string

Max length: 50

Note

string

None.

PreferredCultureId

string

Max length: 5

Identification

integer

None.

IsDefault

boolean

Required

UseCustomerAddress

boolean

Required

CustomerNo

integer

None.

GDPRConsentDate

Gets the date when the customer has given consent for data storage and processing.

date

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "BranchId": 1,
  "Name": "sample string 1",
  "Address1": "sample string 2",
  "Address2": "sample string 3",
  "Address3": "sample string 4",
  "PostalCode": "sample string 5",
  "Town": "sample string 6",
  "CountryId": "sample string 7",
  "Email": "sample string 8",
  "Phone": "sample string 9",
  "Mobile": "sample string 10",
  "BusinessPosition": "sample string 11",
  "Note": "sample string 12",
  "PreferredCultureId": "sample string 13",
  "Identification": 1,
  "IsDefault": true,
  "UseCustomerAddress": true,
  "CustomerNo": 1,
  "GDPRConsentDate": "12/21/2025 1:04:06 PM"
}

application/xml, text/xml

Sample:
<ContactRequestBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Business">
  <Address1>sample string 2</Address1>
  <Address2>sample string 3</Address2>
  <Address3>sample string 4</Address3>
  <BranchId>1</BranchId>
  <BusinessPosition>sample string 11</BusinessPosition>
  <CountryId>sample string 7</CountryId>
  <CustomerNo>1</CustomerNo>
  <Email>sample string 8</Email>
  <GDPRConsentDate>2025-12-21T13:04:06.9357285+00:00</GDPRConsentDate>
  <Identification>1</Identification>
  <IsDefault>true</IsDefault>
  <Mobile>sample string 10</Mobile>
  <Name>sample string 1</Name>
  <Note>sample string 12</Note>
  <Phone>sample string 9</Phone>
  <PostalCode>sample string 5</PostalCode>
  <PreferredCultureId>sample string 13</PreferredCultureId>
  <Town>sample string 6</Town>
  <UseCustomerAddress>true</UseCustomerAddress>
</ContactRequestBase>

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 'ContactRequestBase'.

Response Information

Resource Description

The contact id of the created contact

globally unique identifier

Response Formats

application/json, text/json

Sample:
"dbd195fe-b7e6-403d-8440-b11819b0cf33"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">dbd195fe-b7e6-403d-8440-b11819b0cf33</guid>