Retrieves a marketing consent by its details. Required fields:
details.type
.details.email
OR details.phone
.Note: Due to the ongoing development of our new documentation portal, the query parameter is not displaying as expected. Use the details
object located in the marketing consent object in the request. You can also see the code example for reference.
You can only call this method when authenticated as a Wix app or Wix user identity.
The communication channel of the marketing consent.
Language of the page
The requested marketing consent.
Details about whether the subject of the marketing consent is eligible to receive marketing messages.
curl -X GET \
https://www.wixapis.com/marketing-consent/v1/marketing-consent/get-by \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"details": {
"type": "EMAIL",
"email": "yourtest@test.com"
}
}'
{
"marketingConsent": {
"id": "830c41d3-5bd6-4bd2-a8db-762de4c00c2c",
"revision": "1",
"details": {
"type": "EMAIL",
"phone": "yourtest@test.com"
},
"state": "CONFIRMED",
"lastConfirmationActivity": {
"source": "IN_PERSON",
"description": "Confirmed by Jack.",
"updated_date": "2021-07-22T00:00:00Z",
"optInLevel": "SINGLE_CONFIRMATION"
},
"extendedFields": {},
"created_date": "2022-11-16T14:07:50.150Z",
"updated_date": "2022-11-16T14:07:50.150Z"
},
"communicationEligibility": {
"grated": true,
"revokeConfirmationLink": "https://some.domain/_manage-consent/unsubscribe?token=JWE.eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiZkhJbFA4M1cifQ.3s9htG9Q_DJGbZ6s2qKIo350XNMxzxujkRE2Vi6DMU3IEyHqTHjVyQ.LQXW1jqTYB1lb6Y3aBOong.8O6yjksDWq0GMQGbDj7LARMRYQdTEgLty8kupvByr8SVgS5ClRN5ID5sXE1gH7wgORJUEKOwUossD06C5PujK87In6OF3dXWR4dpED0cLEWWS8v9FHzMC-1CTaOvsh6n8m4oNGqKkw9Lfg0LY4ZLjjlM72q_A07UQ9igGZXyX7Y3VFZqVsbUjp8mnbVWTOhVbnAthVLp9Yd5y2RZUVNwwuUaLuVHW-EE9hHyka69lOeSAntBP0Ntxx8zv9-if96p0ynifLMXuFQjeCD711gg2w.qL-xWjmUZS1HPHIeN8MaPA",
"reason": ""
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.