Send newsletter email

POST /company/companies/@id/newsletters/send

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int The ID of the company

Body

Pass the following properties via application/json or form encoding in the body of the request.

Field Type Description
shop_ids [Int] Send the newsletter to the customers of these shops
subject String Email subject
html String HTML from the email

Example request 1

POST /company/companies/19/newsletters/send HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.10.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 103
{
    "shop_ids": [
        17,
        15,
        14
    ],
    "subject": "...",
    "html": "..."
}

Response

Field Type Description
shop_ids [Int] Send the newsletter to the customers of these shops
subject String Email subject
html String HTML from the email
id Int ID
recipient_count Int To how many people was the newsletter sent
sent_at DateTime When the newsletter was sent

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 182

{
    "shop_ids": [
        18,
        12,
        10
    ],
    "subject": "...",
    "html": "...",
    "id": 18,
    "recipient_count": 13,
    "sent_at": "2019-01-31 12:00:00"
}
This is a development version Do not use this version in production
1.10.0 development