Required permission: | CMPermission |
POST | /CampaignMonitor/{email}/Summary |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CMListResponse:
id: Optional[str] = None
name: Optional[str] = None
status: Optional[str] = None
segments: Optional[List[str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CMSummaryResponse:
email: Optional[str] = None
is_optin: bool = False
is_ebr: bool = False
is_express_consent: Optional[str] = None
is_suppressed: bool = False
last_consent_source: Optional[str] = None
last_consent_date: Optional[datetime.datetime] = None
last_event_date: Optional[datetime.datetime] = None
last_reframe_purchase_date: Optional[datetime.datetime] = None
lists: Optional[List[CMListResponse]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CMSummaryRequest:
email: Optional[str] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /CampaignMonitor/{email}/Summary HTTP/1.1
Host: data.regent-college.edu
Accept: application/json
Content-Type: application/json
Content-Length: length
{"email":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"email":"String","is_optin":false,"is_ebr":false,"is_express_consent":"String","is_suppressed":false,"last_consent_source":"String","last_consent_date":"0001-01-01T00:00:00.0000000","last_event_date":"0001-01-01T00:00:00.0000000","last_reframe_purchase_date":"0001-01-01T00:00:00.0000000","lists":[{"id":"String","name":"String","status":"String","segments":["String"]}]}