POST api/v1/Contacts
Will create new contact with specified information. If contact with same Name or same Phone number exists then HTTP 409 will be returned. If no Store with PreferredStoreId exists then HTTP 409 will be returned.
Request Information
URI Parameters
None.
Body Parameters
Contact information
CreateContactDtoName | Description | Type | Additional information |
---|---|---|---|
RegistrationDateTime |
Date and time of registration. In most cases should be set to current time. |
date |
None. |
RegistrationSource |
Registration source for the new contact, should be set to whatever reffered new contact. Registration source could be birthday campaign |
string |
Required String length: inclusive between 0 and 50 |
RegistrationIp |
Registartion IPv4 for contact. Should be formatted like this: 127.0.0.1 |
string |
String length: inclusive between 0 and 16 |
RegistrationStoreId |
Store responsible for creating the contact |
integer |
None. |
Contact Email, must be unique within account |
string |
String length: inclusive between 0 and 250 |
|
PhoneCountryCode |
Contact Phone country code, must not be included in Phone |
string |
String length: inclusive between 0 and 10 |
Phone |
Contact Phone, must be unique withn account |
string |
String length: inclusive between 0 and 20 |
FirstName |
First name of contact |
string |
String length: inclusive between 0 and 50 |
LastName |
Last name of contact |
string |
String length: inclusive between 0 and 50 |
LimitMailsPermanently |
Limit sending of emails to contact permanently |
boolean |
None. |
LimitMailsTemporarilyUntil |
Limit sending of emails to contact temporarily until specified date and time |
date |
None. |
PreferredStoreId |
Id of preferred store |
integer |
None. |
ContactCompanyId |
ContactCompanyId if the Contact is associated with a Company. Null if the contact is not associated with a ContactCompany |
integer |
None. |
LatestPermissionSource |
Source that was specified when latest permission was set. |
string |
None. |
Request Formats
application/json, text/json
{ "RegistrationDateTime": "2024-11-21T06:24:04.0980817+00:00", "RegistrationSource": "sample string 1", "RegistrationIp": "sample string 2", "RegistrationStoreId": 1, "Email": "sample string 3", "PhoneCountryCode": "sample string 4", "Phone": "sample string 5", "FirstName": "sample string 6", "LastName": "sample string 7", "LimitMailsPermanently": true, "LimitMailsTemporarilyUntil": "2024-11-21T06:24:04.0980817+00:00", "PreferredStoreId": 1, "ContactCompanyId": 1, "LatestPermissionSource": "sample string 9" }
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Newly created contact
ReadContactDtoName | Description | Type | Additional information |
---|---|---|---|
Id |
Id of contact uniquely identifying withing database. |
integer |
None. |
Secret |
Contact secret that uniquely identifies contact without disclosing any of its private information that is hard to guess. Used for example in links to identify which contact clicked the link. http://example.com/?s={Secret} |
string |
Required |
RegistrationDateTime |
Date and time of contact registration |
date |
Required |
RegistrationSource |
Registration source that was specified when creating contact |
string |
Required String length: inclusive between 0 and 50 |
RegistrationIp |
Registration IPv4 address that was specified when creating contact |
string |
Required String length: inclusive between 0 and 16 |
LastModified |
Date and time of last modification of contact in database |
date |
Required |
Version |
Concurency check attribute used by database engine. Pass this value to update contact object when performing PUT (update) action. |
Collection of byte |
Required |
RegistrationStoreId |
Store responsible for creating the contact |
integer |
None. |
Contact Email, must be unique within account |
string |
String length: inclusive between 0 and 250 |
|
PhoneCountryCode |
Contact Phone country code, must not be included in Phone |
string |
String length: inclusive between 0 and 10 |
Phone |
Contact Phone, must be unique withn account |
string |
String length: inclusive between 0 and 20 |
FirstName |
First name of contact |
string |
String length: inclusive between 0 and 50 |
LastName |
Last name of contact |
string |
String length: inclusive between 0 and 50 |
LimitMailsPermanently |
Limit sending of emails to contact permanently |
boolean |
None. |
LimitMailsTemporarilyUntil |
Limit sending of emails to contact temporarily until specified date and time |
date |
None. |
PreferredStoreId |
Id of preferred store |
integer |
None. |
ContactCompanyId |
ContactCompanyId if the Contact is associated with a Company. Null if the contact is not associated with a ContactCompany |
integer |
None. |
LatestPermissionSource |
Source that was specified when latest permission was set. |
string |
None. |
Response Formats
application/json, text/json
{ "Id": 1, "Secret": "sample string 2", "RegistrationDateTime": "2024-11-21T06:24:04.0980817+00:00", "RegistrationSource": "sample string 4", "RegistrationIp": "sample string 5", "LastModified": "2024-11-21T06:24:04.0980817+00:00", "Version": "QEA=", "RegistrationStoreId": 1, "Email": "sample string 7", "PhoneCountryCode": "sample string 8", "Phone": "sample string 9", "FirstName": "sample string 10", "LastName": "sample string 11", "LimitMailsPermanently": true, "LimitMailsTemporarilyUntil": "2024-11-21T06:24:04.0980817+00:00", "PreferredStoreId": 1, "ContactCompanyId": 1, "LatestPermissionSource": "sample string 13" }