$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

 

Returns a list of available templates

Method parameters

  • string GetTemplates(string accessKey, intlistID)
    • accessKey: access key obtained using the LoginFromId method
    • listID: ID of the list within which the newsletter has to be created. Lists and corresponding IDs can be obtained calling the GetLists Method

If error code=0, the message will contain a list of available templates.

Sample GetTemplates response

<GetTemplatesResult>
    <errorCode>0</errorCode>
    <errorDescription></errorDescription>
    <list>
        <listID>1</listID>
        <listName>DEMO</listName>
        <templates>
            <template>
                <templateID>2976</templateID>
                <templateSubject>Blu banner 6 sezioni vert.</templateSubject>
                <templateLink>Link to preview image</templateLink>
            </template>
            <template>
                <templateID>2977</templateID>
                <templateSubject>Rosso unica sezione 3img.</templateSubject>
                <templateLink></templateLink>
            </template>
        </templates>
    </list>
</GetTemplatesResult> 

Ruby Example

# Refer to https://mailup.atlassian.net/wiki/display/mailupapi/MailUp+RubyGem for gem information.
require 'mailup'
m = MailUp::Send.new('username', 'password')
m.get_templates(:listId => 1)
# => "<GetTemplatesResult><errorCode>0</errorCode><errorDescription></errorDescription><list><listID>0</listID><listName></listName><templates></templates></list></GetTemplatesResult>"



  • No labels