Skip to content

Distribution list e-mails insertion

Request

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
Path
codestringrequired

e-mail list code

Example:newsletters
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobject, non-emptyrequired
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"
      ]
    }
  }'

Responses

Created

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "emailsInserted": [], "emailsExisting": [], "emailsInvalid": [], "errorMessages": [] }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }