Salta ai contenuti

Create single contact (upsert: updates if email lowercase already exists for winery)

POST
/v2/contacts
curl --request POST \
--url https://api-crm-staging.divinea.com/api/v2/contacts \
--header 'APIKey: <APIKey>' \
--header 'Content-Type: application/json' \
--data '{ "acceptedMarketing": true, "acceptedPrivacyTerms": true, "acceptedProfiling": true, "contactType": "MASTER", "countryIso": "IT", "email": "john.doe@gmail.com", "firstName": "John", "lastName": "Doe", "manualMarketing": false, "otherData": {}, "phoneNumber": "+39 123456789", "unsubscribed": false }'

Contact

Media typeapplication/json
ContactDTO
object
acceptedMarketing

Accepted Marketing

boolean
Example
true
acceptedPrivacyTerms

Accepted Privacy Terms

boolean
Example
true
acceptedProfiling

Accepted Profiling

boolean
Example
true
contactType
required

Contact Type - At least one contact and one MASTER. The other ones can be saved if SECONDARY

string
Example
MASTER
countryIso
required

Country ISO

string
Example
IT
email
required

Email

string
Example
john.doe@gmail.com
firstName
required

First Name

string
Example
John
lastName
required

Last Name

string
Example
Doe
manualMarketing

Privacy Manual flagged by winery (has a signed paper)

boolean
Example
false
otherData

Other data to be safe

object
Example
{}
phoneNumber
required

Phone Number

string
Example
+39 123456789
unsubscribed

Privacy Unsubscribed

boolean
Example
false

OK

Media type*/*
ContactDTO
object
acceptedMarketing

Accepted Marketing

boolean
Example
true
acceptedPrivacyTerms

Accepted Privacy Terms

boolean
Example
true
acceptedProfiling

Accepted Profiling

boolean
Example
true
contactType
required

Contact Type - At least one contact and one MASTER. The other ones can be saved if SECONDARY

string
Example
MASTER
countryIso
required

Country ISO

string
Example
IT
email
required

Email

string
Example
john.doe@gmail.com
firstName
required

First Name

string
Example
John
lastName
required

Last Name

string
Example
Doe
manualMarketing

Privacy Manual flagged by winery (has a signed paper)

boolean
Example
false
otherData

Other data to be safe

object
Example
{}
phoneNumber
required

Phone Number

string
Example
+39 123456789
unsubscribed

Privacy Unsubscribed

boolean
Example
false