GET /v2/company/subscriptions

Overview

The subscriptions resource lists all the subscriptions (divisions) that are configured for the company. It also lists the available email from names and domains, the attributes required for targeting (Yesmail360), reporting and personalization. 

Resource URI

 https://api.yesmail.com/v2/company/subscriptions

HTTP Return Codes

Code Description
200 OK Returned when the company is live and authentication is valid.
401 Unauthorized Api-Key or Api-User headers are missing or invalid.
Response Payload: 
{
    "subscriptions": [
        {
            "name": "subscription 1",
            "usernames": [
                "user1",
                "user2"
            ],
            "domains": [
                "div1.domain1.com",
                "div1.domain2.com"
            ],
            "brandedLinkDomains": [
                "http://link.domain1.com"
            ],
            "targetingAttributes": [
                {
                    "name": "Subscription Status",
                    "type": "Advanced",
                    "required": "true"
                },
                {
                    "name": "Gender",
                    "type": "Selection",
                    "required": "false"
                }
            ],
            "reportingAttributes": [ 
                "Gender"
            ],
            "personalisationAttributes": [
                "Gender"
            ]
        },
        {
            "name": "subscription2",
            "usernames": [
                "username1",
                "username2"
            ],
            "domains": [
                "div2.domain1.com",
                "div2.domain2.com"
            ],
            "brandedLinkDomains": [
                "http://link.domain2.com"
            ],
            "targetingAttributes": [
                {
                    "name": "Subscription Status",
                    "type": "Advanced",
                    "required": "true"
                },
                {
                    "name": "Has Shopped",
                    "type": "Boolean",
                    "required": "false"
                }
            ],
            "reportingAttributes": [
                "Gender",
                "Has Shopped"
            ],
            "personalisationAttributes": [
                "Gender",
                "Has Shopped"
            ]
        }
    ]
}