Create single contact
const url = 'https://api-crm-staging.divinea.com/api/v3/contacts';const options = { method: 'POST', headers: {APIKey: '<APIKey>', 'Content-Type': 'application/json'}, body: '{"acceptedMarketing":true,"acceptedPrivacyTerms":true,"acceptedProfiling":true,"cap":"00100","city":"Rome","contactType":"example","country":"example","countryISO":"IT","dateOfBirth":"1980-01-01","email":"example","emails":[{"email":"john.doe@gmail.com","type":"master"}],"firstName":"John","languageISO":"EN","lastName":"Doe","manualMarketing":false,"masterEmail":{"email":"john.doe@gmail.com","master":true,"type":"master"},"phoneNumber":"example","phoneNumbers":[{"phone":"+1234567890","type":"master"}],"province":"RM","unsubscribed":false,"wineryID":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-crm-staging.divinea.com/api/v3/contacts \ --header 'APIKey: <APIKey>' \ --header 'Content-Type: application/json' \ --data '{ "acceptedMarketing": true, "acceptedPrivacyTerms": true, "acceptedProfiling": true, "cap": "00100", "city": "Rome", "contactType": "example", "country": "example", "countryISO": "IT", "dateOfBirth": "1980-01-01", "email": "example", "emails": [ { "email": "john.doe@gmail.com", "type": "master" } ], "firstName": "John", "languageISO": "EN", "lastName": "Doe", "manualMarketing": false, "masterEmail": { "email": "john.doe@gmail.com", "master": true, "type": "master" }, "phoneNumber": "example", "phoneNumbers": [ { "phone": "+1234567890", "type": "master" } ], "province": "RM", "unsubscribed": false, "wineryID": "example" }'Authorizations
Sezione intitolata “Authorizations”Request Body
Sezione intitolata “Request Body”Contact
Contact data transfer object
object
Accepted Marketing
Example
trueAccepted Privacy Terms
Example
trueAccepted Profiling
Example
truePostal Code / CAP
Example
00100City name
Example
RomeCountry name
Country ISO
Example
ITDate of Birth
Example
1980-01-01Emails
Email object for a contact
object
Email address
Example
john.doe@gmail.comType of email
Example
masterExample
[ { "email": "john.doe@gmail.com", "type": "master" }]First Name
Example
JohnLanguage ISO code
Example
ENLast Name
Example
DoePrivacy Manual flagged by winery (has a signed paper)
Example
falseEmail object for a contact
object
Email address
Example
john.doe@gmail.comType of email
Example
masterPhone Numbers
Phone object for a contact
object
Phone number
Example
+1234567890Type of phone
Example
masterExample
[ { "phone": "+1234567890", "type": "master" }]Province name
Example
RMPrivacy Unsubscribed
Example
falseWinery ID associated with the contact
Responses
Sezione intitolata “Responses”OK
Contact data transfer object
object
Accepted Marketing
Example
trueAccepted Privacy Terms
Example
trueAccepted Profiling
Example
truePostal Code / CAP
Example
00100City name
Example
RomeCountry name
Country ISO
Example
ITDate of Birth
Example
1980-01-01Emails
Email object for a contact
object
Email address
Example
john.doe@gmail.comType of email
Example
masterExample
[ { "email": "john.doe@gmail.com", "type": "master" }]First Name
Example
JohnLanguage ISO code
Example
ENLast Name
Example
DoePrivacy Manual flagged by winery (has a signed paper)
Example
falseEmail object for a contact
object
Email address
Example
john.doe@gmail.comType of email
Example
masterPhone Numbers
Phone object for a contact
object
Phone number
Example
+1234567890Type of phone
Example
masterExample
[ { "phone": "+1234567890", "type": "master" }]Province name
Example
RMPrivacy Unsubscribed
Example
falseWinery ID associated with the contact