Follow

Get Email Labels

The Get Email Labels command allows you to view a list of Email Campaign Labels of a specific type in your Account. Each Email Campaign Type has a get command which requires the following arguments: Command, Realm, Password and Output Format.

api_web?r=myrealm&p=mypass&c=getemailcategories&output_format=csv

The command to Get Email Categories is 'getemailcategories', the realm is 'myrealm', the password is 'mypass', and the format of the returned data is 'csv', returning a list of all Email Categories in the Account, including the default Categories.  

Similarly, you can Get Email Phases and Get Email Types. 

Example

Using 'getemailcategories' with all commands and arguments:

api_web?r=myrealm&p=mypass&c=getemailcategories&output_format=csv_tab&headers=1

Successful results return:

"ID" "Category" "Description"
"35" "Anniversary" "Emails sent to celebrate milestones in the relationship with the brand"
"34" "Birthday" "Emails sent to a subscriber to wish them a birthday message"
"36" "Reengagement" "Emails sent to inactive subscribers to get them to reengage with the email channel"
"38" "Survey" "Email sent to customers to solicit feedback"
"33" "Welcome Series" "Emails sent to new subscribers to welcome, educate, and increase engagement"
"37" "Winback" "Emails sent to lapsed customers to get them to convert"

Results

The Get Email Labels command outputs either the results of the search or a FAILURE message. 

Success

The command does not explicitly return a Success code.  Instead, it outputs the ID, Name, and Description of each Label.  Use the Output Format argument to return the results in an alternate format.

Failure

The command will fail if an Output Format is not specified or invalid data is defined. The result format is:

FAILURE: [Reason]

Arguments

This command supports the following arguments:

Name Req? Description Argument
Command Yes

Defines the command to use.

Email Phase: getemailphases
Email Type: getemailtypes
Email Category: getemailcategories

cmd=[getemailphases, getemailtypes, getemailcategories]

c=[getemailphases, getemailtypes, getemailcategories]

Realm Yes Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password Yes Authentication code for API access. This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Output Format Yes

To specify the format of the list output, use one of two arguments.

csv=1

OR

output_format=[xml,json,csv,csv_tab,csv_pipe]

Header  

To define the data with a label, use the Header argument.  This argument does not affect the XML or JSON output formats.

headers=[0,1]

DEFAULT==0

 

*Feature released in v12.06.0

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk