This endpoint allows you to add new e-mail addresses to the distribution list identified by its code. In the response you will receive structured info about the result of the insertion. In the emailsInserted
key there will be a list of e-mails successfully inserted, in the emailsExisting key, there will be a list of skipped e-mails, because there were already in the list. In the
emailsInvalid key, there will be a list of invalid e-mails (wrong format or non-existing MX domain record) and finally in the errorMessages key, there will be a list of error messages
generated for invalid e-mails.
Security
shoptetAccessToken or shoptetPrivateApiToken
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/mailing-lists/{code}
- https://api.myshoptet.comhttps://api.myshoptet.com/api/mailing-lists/{code}
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X POST \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/mailing-lists/newsletters \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"emails": [
"john.doe@example.com"
]
}
}'Response
{ "data": { "emailsInserted": [ … ], "emailsExisting": [ … ], "emailsInvalid": [ … ], "errorMessages": [ … ] }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }