PUT api/v1/Contacts/{id}
Will update contact identified by id with specified information. If contact has been modified (concurrent update) since it has been retrieved then HTTP 409 will be returned with latest contact information. If another contact with same Email or Phone is found then HTTP 409 will be returned with latest contact information for specified contact. If no Store with PreferredStoreId exists then HTTP 409 will be returned.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
Id of contact to updata |
integer |
Required |
Body Parameters
New contact information
UpdateContactDtoName | Description | Type | Additional information |
---|---|---|---|
NewPassword |
New password that overwrites current user password |
string |
None. |
Version |
Concurency check attribute used by database engine. Must be set to exactly same value as was returned in ReadContactDto.Version |
Collection of byte |
Required |
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
{ "NewPassword": "sample string 1", "Version": "QEA=", "Email": "sample string 2", "PhoneCountryCode": "sample string 3", "Phone": "sample string 4", "FirstName": "sample string 5", "LastName": "sample string 6", "LimitMailsPermanently": true, "LimitMailsTemporarilyUntil": "2024-11-21T06:40:14.7818299+00:00", "PreferredStoreId": 1, "ContactCompanyId": 1, "LatestPermissionSource": "sample string 8" }
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Uppdate contact info
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:40:14.7818299+00:00", "RegistrationSource": "sample string 4", "RegistrationIp": "sample string 5", "LastModified": "2024-11-21T06:40:14.7818299+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:40:14.7818299+00:00", "PreferredStoreId": 1, "ContactCompanyId": 1, "LatestPermissionSource": "sample string 13" }