Subscriber Management - Phiction/etapi GitHub Wiki
Add
Required parameters
:email
:list_id
Optional parameters
:account_id
: if:using_s4
:values
(value keys should be spelled exactly how they are in ExactTarget)
etapi_session.subscriber_add(
:email => '[email protected]',
:list_id => 12345, # optional if api_method == :soap
:account_id => 67890 # optional if :using_s4,
:values => {
"First Name" => "Test",
"Last Name" => "User",
"Full Name" => "Test User",
"Custom" => "Value"
}
)
=> 1234567890 # subscriber_id
Delete
Required parameters
:subscriber_id
etapi_session.subscriber_delete(
:subscriber_id => 0123456789
)
=> true
Remove From List
Required parameters
:list_id
:email
etapi_session.subscriber_remove_from_list(
:list_id => 12345,
:email => '[email protected]'
)
=> true
Edit
Required parameters
:subscriber_id
Optional parameters
:account_id
: if:using_s4
:values
(value keys should be spelled exactly how they are in ExactTarget)
etapi_session.subscriber_edit(
:subscriber_id => 0123456789,
:values => {
"First Name" => "API",
"Last Name" => "User",
"Full Name" => "API User",
"Email Address" => "[email protected]",
"Custom" => "Value"
}
)
=> true
Edit From List
Required parameters
:email
:list_id
Optional parameters
:account_id
: if:using_s4
:values
(value keys should be spelled exactly how they are in ExactTarget)
etapi_session.subscriber_edit_from_list(
:email => "[email protected]",
:list_id => 12345,
:values => {
"First Name" => "API",
"Last Name" => "User",
"Full Name" => "API User",
"Email Address" => "[email protected]",
"Custom" => "Value"
}
)
=> true
Unsubscribe From Master List
Required parameters
:email
etapi_session.subscriber_unsubscribe_master(
:email => "[email protected]"
)
=> true
Retrieve
Required parameters
:subscriber_id
etapi_session.subscriber_retrieve(
:subscriber_id => 0123456789
)
=> {
"Status" => "Active",
"Email__Type" => "HTML",
"Email__Address" => "[email protected]",
"Last__Name" => "",
"list_name" => "Test List",
"listid" => "01234",
"Address" => "",
"User__Defined" => "",
"Full__Name" => "Subscriber Retrieve",
"First__Name" => "",
"subid" => "0123456789"
}