GET subscribers?view=schema

Overview

The subscriber profile is where personalization and targeting information is stored. GET subscribers?view=schema returns the standard attributes that are available in the userAttrs array for the specified Api-User (company).

For each attribute the name, type, and length are returned in the response payload. Selection and Multi-value attributes also return the defined values for those types. Caution: Date and Number have range values specified in the UI which are not show in the response payload nor are these ranges enforced when making an update to the usersAttrs array. Verify the range of Date and Number attributes in the UI before using them.

Standard Attributes:

  • String
  • Number
  • Date
  • Boolean
  • Selection
  • Mult-Value

Resource URI

GET https://api.yesmail.com/v2/subscribers?view=schema

Call Description

The GET subscribers?view=schema call returns the Users table attributes that are available in the userAttrs array for the specified Api-User.

HTTP Return Codes

Code

Description

200 OK

The request has succeeded.

401 Unauthorized

The request requires user authentication.  Invalid Api-User and/or Api-Key header value.
Response Payload: 
{
    "profile": {
        "userAttrs": [
            {
                "attributeName": "lastSuppressedTime",
                "dataType": "Date",
                "length": 7
            },
            {
                "attributeName": "prefersMobile",
                "dataType": "Number",
                "length": 1
            },
            {
                "attributeName": "eMail",
                "dataType": "String",
                "length": 255
            },
            {
                "attributeName": "emailFormat",
                "dataType": "String",
                "length": 38
            },
            {
                "attributeName": "firstName",
                "dataType": "String",
                "length": 255
            },
            {
                "attributeName": "lastName",
                "dataType": "String",
                "length": 255
            },
            {
                "attributeName": "deadEmailTime",
                "dataType": "Date",
                "length": 7
            },
            {
                "attributeName": "postalCode",
                "dataType": "String",
                "length": 12
            },
            {
                "attributeName": "Country Code",
                "dataType": "Multi-Value",
                "length": 2,
                "dataValues": [
                    "B",
                    "2",
                    "C",
                    "A",
                    "1",
                    "3"
                ]
            },
            {
                "attributeName": "Corporate Info",
                "dataType": "Selection",
                "length": 255,
                "dataValues": [
                    "CTO",
                    "Grunt",
                    "CEO"
                ]
            },
            {
                "attributeName": "customerid",
                "dataType": "Number",
                "length": 38
            },
            {
                "attributeName": "Gender",
                "dataType": "Boolean",
                "length": 1,
                "dataValues": [
                    "Female",
                    "Male"
                ]
            }
        ]
    }
}