REST Email Marketing API Documentation

DOCUMENTS — RETRIEVE

Get data about one specific document.

HTTP VERB

Get

URL

/API/Rest/Documents/Retrieve

ARGUMENTS

documentName

Required permission

ViewDocument

ERRORS

No Permission
Invalid document name
Database error
Unknown error

RETURNS

A structure with the document fields:

{"documentName":"test","documentId":12,"documentText":null,"documentHtml":"\u003cp\u003eDear\u0026nbsp;[-EmailAddress-]\u003c/p\u003e\u003cp\u003e\u0026nbsp;\u003c/p\u003e\u003cp\u003e You might be interested in the following link:\u0026nbsp;\u003ca href=\"http://www.google.com\"\u003eGoogle\u003c/a\u003e\u003c/p\u003e\u003cp\u003eAnother one of interest could be:\u0026nbsp;\u003ca href=\"https://www.goolara.com\"\u003eGoolara email marketing\u003c/a\u003e\u003c/p\u003e\u003cp\u003e\u0026nbsp;\u003c/p\u003e\u003cp\u003eSincerely,\u003c/p\u003e\u003cp\u003e\u0026nbsp; \u003c/p\u003e\u003cp\u003eExample.com\u003c/p\u003e","charsetId":20127,"delimiterStart":"[-","delimiterEnd":"-]","headerFrom":"\"Example News\" \u003cnews@example.com\u003e","headerTo":"[-NameEmail-]", "subject":"News for you!","bodyLanguageId":1033,"replyTo":"\"Example News\" \u003cnews@example.com\u003e","additionalHeaders":{},"priority":5,"trackedLinks":["http://www.google.com","https://www.goolara.com"], "recipientLoggingLevel":"E","unsubscribeTopic":"Example Corporate Mailings","detectOpens":true,"virtualIpGroup":"Main"}

EXAMPLE

Get the data for documents that match the criteria.

string url = "http://example.com/api/rest/Documents/Retrieve?accountName=acme&login=ApiUser&documentName=JunkMe";

try
{
	System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
	request.Headers.Add("Password", "34teh6i6j565ydw4h");
	using (System.Net.WebResponse response = request.GetResponse())
		using (Stream responseStream = response.GetResponseStream())
			using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
				System.Console.WriteLine(reader.ReadToEnd());
}
catch (System.Net.WebException ex)
{
	System.Diagnostics.Debug.Fail(ex.Message);
}
							
# encoding: utf-8
require 'rest-client'
require 'json'

url = 'http://www.example.com/api/rest/Documents/Retrieve?accountName=acme&login=ApiUser&documentName=TestDoc'
response = RestClient.get(url, "", {:Password => "sfhdf6df5fdy"})
puts response
						
import requests

url = "http://www.example.com/api/rest/Documents/Retrieve?accountName=acme&login=ApiUser&documentName=TestDoc";
headers = {'password':'sfhdf6df5fdy'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
	print resp.text
						

http://www.example.com/api/rest/Documents/Retrieve ?accountName=acme &login=ApiUser &password=fsdfsdfw4sef &documentName=TestDoc

As a user of Goolara Symphonie, the REST API is free and included in the latest version of the software. If you have any questions about using Symphonie’s REST API, feel free to contact us.