API - Targeted Letter Activity Data

 ActivityType - TARGETED_LETTER

There are two main components of the Targeted Letter detail:

  • Letters
  • Targets that received the letter

The returned payload will provide this information within a hierarchical structure that starts with the letters attribute of the payload.

In addition to the Base Detail, the following will be returned: 

FieldDescriptionDetail
letters Contains the list of letters that were send Array of Letter objects, and there will always be at least 1

 

Letters Object

FieldDescriptionDetail
name Name of the letter 64 characters in length
subject Subject of the letter 255 characters in length
message Body of the letter Blob of text
additionalComment Optional comment written by the supporter Blob of text
messageWasModified Flag to indicate if the supporter modified the message Either True or False
targets Contains the list of targets that were send that letter Array of Target objects and each letter will contain at least 1

 

Targets Object

FieldDescriptionDetailOptional
targetId The unique ID of the target 36 character UUID false
targetName Name of the target 64 characters false
targetTitle Title of the Target 128 characters false
politicalParty Poliical party of the target

128 characters

  • Only applicable to US Federal, State, and County legislators
true
targetType Type of the target

64 characters

Will be one of

  • Federal Executive
  • Federal Senate
  • Federal House
  • State Executive
  • State Senate
  • State House
  • US County
  • US Municipality
  • Custom Target
false
state State which the target resides Full state name true
districtId District Id of the target 32 characters true
districtName District Name 128 Characters true
role The role of the target 128 Characters true
department The department of the target 128 Characters true


Targeted Letter Example Output:

    {
           "header":{"processingTime":26,"serverId":"serverId"},
           "payload":{
                       "total":1,"offset":0,"count":1,
                       activities":[{"activityId":"5b566e5b-ed17-473e-ad82-f5998baece83",
                            "activityFormName":"Activity Name",
                            "activityFormId":"a88e7431-2afe-4e01-86e7-951465ace7e8",
                            "supporterId":"3bf7f4bb-7f9d-4a10-b90e-43ed4a2ab807",
                            "activityDate":"2016-05-26T14:00:57.716Z",
                            "activityType":"TARGETED_LETTER",
                            "lastModified":"2016-05-26T14:00:57.717Z",
                            "letters":[{"name":"Letter 1", "subject":"subject", "message":"message", "additionalComment":"additionalComment",
                                            "subjectWasModified":false,"messageWasModified":true,
                                            "targets":[{"targetId":"6c4da70a-3e4c-4d3d-b757-bcc20bcc2570","targetName":"target name",
                                                            "targetTitle":"target title","politicalParty":"party", "targetType":"target type","state":"New York",
                                                            "districtId":"districtId","districtName":"district name","role":"role","department":"department"
                                                          }]
                                          }]
                     }]
           }
    }
Have more questions? Submit a request
Powered by Zendesk