POST api/Contact?user={user}

Create a contact

Request Information

URI Parameters

NameDescriptionTypeAdditional information
user

Optional user handle - if empty logged in user will be used

string

None.

Body Parameters

Details of new contact

NewContact
NameDescriptionTypeAdditional information
LastName

Last name

string

Required

FirstName

First name

string

Required

Address

Address line 1

string

Required

City

string

Required

Pc

Postal code

string

Required

Cc

ISO 2 character country code

string

Required

MailAddress

Email address

string

Required

IsIndividual

Contact is an individual

boolean

Required

Password

string

Matching regular expression pattern: ^(?=.*[A-Za-z])(?=.*[^A-Za-z0-9])(?=.*\d).*$

String length: inclusive between 8 and 20

Birthday

Date of birth

date

None.

PlaceOfBirth

Place of birth

string

Matching regular expression pattern: ^(?![Ff][Rr]$)[a-zA-Z]{2}$|(^([0-9]{2}|[0-9]{5}|2A|2B)\s*,\s*[a-zA-Z\s\-\x27]{2,}.?$)

Siren

string

None.

Intracom

string

None.

Mark

string

None.

Passport

string

None.

Identitycard

string

None.

Duns

string

None.

AssoWaldec

Association WALDEC number

string

None.

AssoCreDate

Association create date

date

None.

AssoDecDate

Association declaration date

date

None.

AssoPubPage

integer

None.

AssoPubAnnounce

integer

None.

LocalNumber

string

None.

ExternalId

string

None.

NexusCat

Nexus category

string

Matching regular expression pattern: C12|C31|C32

NexusPurpose

Nexus purpose

string

Matching regular expression pattern: P1|P2|P3|P4|P5

CaLegalType

Canadien legal type

string

None.

CaTradeMark

boolean

None.

Status

Status 0 - inactive, 1 - active

integer

Matching regular expression pattern: 0|1

Handle

Contact handle

string

None.

Entity

Entity type, 1 organization, 2 individual

integer

None.

OrgName

Organization name

string

Matching regular expression pattern: [A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&@[\]\/^_`|}{]{1,150}

String length: inclusive between 1 and 150

Address2

Address line 2

string

Matching regular expression pattern: ^(?![A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*\b([bB][pP]|[cC][eE][dD][eE][xX])\b)[A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*$

String length: inclusive between 1 and 250

Sp

string

Matching regular expression pattern: [A-Za-z0-9 \.\-!#$%'()*+,:;=?@[\]\/^_`|}{]{0,80}

String length: inclusive between 1 and 80

Phone

Phone number

string

Matching regular expression pattern: \+[0-9]{1,3}\.[0-9]{1,15}

Fax

Fax number

string

Matching regular expression pattern: \+[0-9]{1,3}\.[0-9]{1,15}

groupePrixID

Price group id

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "LastName": "sample string 1",
  "FirstName": "sample string 2",
  "Address": "sample string 3",
  "City": "sample string 4",
  "Pc": "sample string 5",
  "Cc": "sample string 6",
  "MailAddress": "sample string 7",
  "IsIndividual": true,
  "Password": "sample string 8",
  "Birthday": "2025-04-04T00:06:17.6786868+02:00",
  "PlaceOfBirth": "sample string 9",
  "Siren": "sample string 10",
  "Intracom": "sample string 11",
  "Mark": "sample string 12",
  "Passport": "sample string 13",
  "Identitycard": "sample string 14",
  "Duns": "sample string 15",
  "AssoWaldec": "sample string 16",
  "AssoCreDate": "2025-04-04T00:06:17.6786868+02:00",
  "AssoDecDate": "2025-04-04T00:06:17.6786868+02:00",
  "AssoPubPage": 1,
  "AssoPubAnnounce": 1,
  "LocalNumber": "sample string 17",
  "ExternalId": "sample string 18",
  "NexusCat": "sample string 19",
  "NexusPurpose": "sample string 20",
  "CaLegalType": "sample string 21",
  "CaTradeMark": true,
  "Status": 1,
  "Handle": "sample string 22",
  "Entity": 23,
  "OrgName": "sample string 24",
  "Address2": "sample string 25",
  "Sp": "sample string 26",
  "Phone": "sample string 27",
  "Fax": "sample string 28",
  "groupePrixID": 1.0
}

application/xml, text/xml

Sample:
<NewContact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Contact">
  <Address i:nil="true" />
  <Address2>sample string 25</Address2>
  <Cc i:nil="true" />
  <City i:nil="true" />
  <Entity>23</Entity>
  <Fax>sample string 28</Fax>
  <FirstName i:nil="true" />
  <Handle>sample string 22</Handle>
  <LastName i:nil="true" />
  <MailAddress i:nil="true" />
  <OrgName>sample string 24</OrgName>
  <Pc i:nil="true" />
  <Phone>sample string 27</Phone>
  <Sp>sample string 26</Sp>
  <groupePrixID>1</groupePrixID>
  <AssoCreDate>2025-04-04T00:06:17.6786868+02:00</AssoCreDate>
  <AssoDecDate>2025-04-04T00:06:17.6786868+02:00</AssoDecDate>
  <AssoPubAnnounce>1</AssoPubAnnounce>
  <AssoPubPage>1</AssoPubPage>
  <AssoWaldec>sample string 16</AssoWaldec>
  <Birthday>2025-04-04T00:06:17.6786868+02:00</Birthday>
  <CaLegalType>sample string 21</CaLegalType>
  <CaTradeMark>true</CaTradeMark>
  <Duns>sample string 15</Duns>
  <ExternalId>sample string 18</ExternalId>
  <Identitycard>sample string 14</Identitycard>
  <Intracom>sample string 11</Intracom>
  <IsIndividual i:nil="true" />
  <LocalNumber>sample string 17</LocalNumber>
  <Mark>sample string 12</Mark>
  <NexusCat>sample string 19</NexusCat>
  <NexusPurpose>sample string 20</NexusPurpose>
  <Passport>sample string 13</Passport>
  <Password>sample string 8</Password>
  <PlaceOfBirth>sample string 9</PlaceOfBirth>
  <Siren>sample string 10</Siren>
  <Status>1</Status>
  <Address>sample string 3</Address>
  <Cc>sample string 6</Cc>
  <City>sample string 4</City>
  <FirstName>sample string 2</FirstName>
  <IsIndividual>true</IsIndividual>
  <LastName>sample string 1</LastName>
  <MailAddress>sample string 7</MailAddress>
  <Pc>sample string 5</Pc>
</NewContact>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

A contact object on success
Collection of errors on failure
Return codes
200 - ok
300 - ambiguous
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
650 - OrgName is mandatory for non - individuals
651 - Postcode and city don't match

Contact
NameDescriptionTypeAdditional information
Name

Contact name (firstname surname for individual else orgname)

string

None.

Birthday

Date of birth

date

None.

PlaceOfBirth

Place of birth

string

None.

CleTitulaire

Registry contact password

string

None.

Siren

string

None.

Intracom

string

None.

Mark

string

None.

Passport

string

None.

Identitycard

string

None.

Duns

string

None.

AssoWaldec

Association WALDEC number

string

None.

AssoCreDate

Association create date

date

None.

AssoDecDate

Association declaration date

date

None.

AssoPubPage

integer

None.

AssoPubAnnounce

integer

None.

LocalNumber

string

None.

ExternalId

string

None.

IsActive

boolean

None.

Account

decimal number

None.

AuthorizedBank

decimal number

None.

VerifyAutoRenew

When false the autorenews pass without account verification. Default is true

boolean

None.

HasTva

Is the contact subject to tva

boolean

None.

RateTva

The tva rate for this contact

decimal number

None.

Extension

List of extension

Collection of Object_Extension

None.

Handle

Contact handle

string

None.

Entity

Entity type, 1 organization, 2 individual

integer

None.

OrgName

Organization name

string

Matching regular expression pattern: [A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&@[\]\/^_`|}{]{1,150}

String length: inclusive between 1 and 150

LastName

Last name

string

Matching regular expression pattern: [A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&@[\]\/^_`|}{]{1,150}

String length: inclusive between 1 and 150

FirstName

First name

string

Matching regular expression pattern: [A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&@[\]\/^_`|}{]{1,150}

String length: inclusive between 1 and 150

Address

Address line 1

string

Matching regular expression pattern: ^(?![A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*\b([bB][pP]|[cC][eE][dD][eE][xX])\b)[A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*$

String length: inclusive between 1 and 250

Address2

Address line 2

string

Matching regular expression pattern: ^(?![A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*\b([bB][pP]|[cC][eE][dD][eE][xX])\b)[A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*$

String length: inclusive between 1 and 250

City

string

Matching regular expression pattern: ^(?![A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*\b([bB][pP]|[cC][eE][dD][eE][xX])\b)[A-Za-z0-9áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒß \.!#$%'()*+,:;=\-?&[\]\/^_`|}{]*$

String length: inclusive between 1 and 150

Pc

Post code

string

Matching regular expression pattern: [ a-zA-Z0-9._/-]{1,30}

String length: inclusive between 1 and 30

Cc

ISO 2 char country code

string

Matching regular expression pattern: [A-Za-z]{2}

String length: inclusive between 2 and 2

Sp

string

Matching regular expression pattern: [A-Za-z0-9 \.\-!#$%'()*+,:;=?@[\]\/^_`|}{]{0,80}

String length: inclusive between 1 and 80

Phone

Phone number

string

Matching regular expression pattern: \+[0-9]{1,3}\.[0-9]{1,15}

Fax

Fax number

string

Matching regular expression pattern: \+[0-9]{1,3}\.[0-9]{1,15}

MailAddress

Email address

string

Matching regular expression pattern: [0-9a-zA-Z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-zA-Z][A-Z0-9a-z-]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,20})

String length: inclusive between 1 and 200

groupePrixID

Price group id

decimal number

None.

Response Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Birthday": "2025-04-04T00:06:17.709422+02:00",
  "PlaceOfBirth": "sample string 2",
  "CleTitulaire": "sample string 3",
  "Siren": "sample string 4",
  "Intracom": "sample string 5",
  "Mark": "sample string 6",
  "Passport": "sample string 7",
  "Identitycard": "sample string 8",
  "Duns": "sample string 9",
  "AssoWaldec": "sample string 10",
  "AssoCreDate": "2025-04-04T00:06:17.709422+02:00",
  "AssoDecDate": "2025-04-04T00:06:17.709422+02:00",
  "AssoPubPage": 1,
  "AssoPubAnnounce": 1,
  "LocalNumber": "sample string 11",
  "ExternalId": "sample string 12",
  "IsActive": true,
  "Account": 14.0,
  "AuthorizedBank": 15.0,
  "VerifyAutoRenew": true,
  "HasTva": true,
  "RateTva": 18.1,
  "Extension": [
    {
      "Id": 1,
      "Key": "sample string 2",
      "Value": "sample string 3"
    },
    {
      "Id": 1,
      "Key": "sample string 2",
      "Value": "sample string 3"
    }
  ],
  "Handle": "sample string 19",
  "Entity": 20,
  "OrgName": "sample string 21",
  "LastName": "sample string 22",
  "FirstName": "sample string 23",
  "Address": "sample string 24",
  "Address2": "sample string 25",
  "City": "sample string 26",
  "Pc": "sample string 27",
  "Cc": "sample string 28",
  "Sp": "sample string 29",
  "Phone": "sample string 30",
  "Fax": "sample string 31",
  "MailAddress": "sample string 32",
  "groupePrixID": 1.0
}

application/xml, text/xml

Sample:
<Contact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Contact">
  <Address>sample string 24</Address>
  <Address2>sample string 25</Address2>
  <Cc>sample string 28</Cc>
  <City>sample string 26</City>
  <Entity>20</Entity>
  <Fax>sample string 31</Fax>
  <FirstName>sample string 23</FirstName>
  <Handle>sample string 19</Handle>
  <LastName>sample string 22</LastName>
  <MailAddress>sample string 32</MailAddress>
  <OrgName>sample string 21</OrgName>
  <Pc>sample string 27</Pc>
  <Phone>sample string 30</Phone>
  <Sp>sample string 29</Sp>
  <groupePrixID>1</groupePrixID>
  <Account>14</Account>
  <AssoCreDate>2025-04-04T00:06:17.709422+02:00</AssoCreDate>
  <AssoDecDate>2025-04-04T00:06:17.709422+02:00</AssoDecDate>
  <AssoPubAnnounce>1</AssoPubAnnounce>
  <AssoPubPage>1</AssoPubPage>
  <AssoWaldec>sample string 10</AssoWaldec>
  <AuthorizedBank>15</AuthorizedBank>
  <Birthday>2025-04-04T00:06:17.709422+02:00</Birthday>
  <CleTitulaire>sample string 3</CleTitulaire>
  <Duns>sample string 9</Duns>
  <Extension>
    <Object_Extension>
      <Id>1</Id>
      <Key>sample string 2</Key>
      <Value>sample string 3</Value>
    </Object_Extension>
    <Object_Extension>
      <Id>1</Id>
      <Key>sample string 2</Key>
      <Value>sample string 3</Value>
    </Object_Extension>
  </Extension>
  <ExternalId>sample string 12</ExternalId>
  <HasTva>true</HasTva>
  <Identitycard>sample string 8</Identitycard>
  <Intracom>sample string 5</Intracom>
  <IsActive>true</IsActive>
  <LocalNumber>sample string 11</LocalNumber>
  <Mark>sample string 6</Mark>
  <Name>sample string 1</Name>
  <Passport>sample string 7</Passport>
  <PlaceOfBirth>sample string 2</PlaceOfBirth>
  <RateTva>18.1</RateTva>
  <Siren>sample string 4</Siren>
  <VerifyAutoRenew>true</VerifyAutoRenew>
</Contact>