Retrieve contacts (including custom field values) within one or more tags with option to exclude contacts belonging to a subset of to-be-excluded tags (Called "lists" within the GUI application). 


System runs asynchronously in the background to allow retrieving payloads for larger tags. User has option of receiving notification of call completion and a link to download either the JSON or CSV file via email or by webhook.  


JSON Request Example:  


{
  "username": "johndoe",
  "usertoken": "abc123abc123abc123abc123abc123",
  "requesttype": "Tags",
  "requestmethod": "GetTagSubscribersAsync",
  "details": {
    "tag": ["{*include_tag_id*}", "{*include_tag_id*}"], /* required: at least one */
    "extag": ["{*exclude_tag_id*}", "{*exclude_tag_id*}"], /* optional */
    "status": "{*status: any|active|inactive|bounced|unsubscribed*}", /* optional: default any */
    "include_membership": "{*include_membership_boolean*}", /* optional: include tag membership */
    "customfields": ["{*customfield_name*}"], /* optional: multi, use 'all' for all */
    "format": "{*csv|json*}", /* optional: default json */
    "notify": { /* required */
      "type": "{*notification_type*}", /* required: email or webhook */
      "value": "{*notification_target*}" /* required: email-address or webhook-url */
    }
  }
}

   

"json_request"  element


Field NameDescription
usernameUsername used to login to Pinpointe
usertokenUnique token assigned to Pinpointe account
requesttypetag
requestmethodGetTagSubscribersAsync


"details" element

"tag"


Field NameDescription
tag
(Required)
ID of tag(s) to be searched. At least one required.  
extag
ID of optional tag(s) who contacts should be excluded from the search.
status
Select from the options provided to search for contacts with that status.


"include_membership" element


include_membership
(optional) 
PieSync requirement: Setting this element's value to true, 1 or yes results in the API call adding a list of all tags that a subscriber is in as part of the returned information for that subscriber.


"customfields" element


customfields (optional)User may retrieve a contact's custom field values by specifying the name(s) of the custom fields to be be returned, or by entering "all" as the parameter value.


"format" element


formatUser can select whether to receive the payload in either CSV or JSON format.


"notify" element


type (required)Method by which user wishes to be notified that the call has completed processing and what the link to the JSON file is: either "email" or "webhook"
value (required)If user selects notification via email, they must provide a valid email address which will receive the email notification. If user selects notification via webhook, they must provide a valid webhook URL to receive the payload, including the link to the JSON file. 



Successful Response:


"response" element


Field NameDescription
statusWill return SUCCESS if user was successfully added
dataIncludes sub-element count (the number of subscribers being returned); and subscribers, a list of email addresses and the respective data for each subscriber.


Example of returned data:


(Where user has selected "email-address" as notification method and provided an email address):




(Where user has selected "webhook-url" as notification method and provided a webhook URL):




Unsuccessful Response:


"response" element


Field NameDescription
statusWill return ERROR if unsuccessful
errormessageText explaining why request failed