Introduction

APIKey is used to authenticate and identity account info.

Send

Description:

This is used to send an email out. Loop your email lists and call this method as well.

Parameters:

Type Max Len Required
EmailAcct: GUID 36 Yes
ToFirstName: String 500 No
ToLastName: String 500 No
ToEmailAddress: String 1000 Yes
FromFirstName: String 500 No
FromLastName: String 500 No
FromEmailAddress: String 1000 Yes
CCEmailAddress: String 1000 No
BCCEmailAddress: String 1000 No
Subject: String 1000 Yes
SendOnDate: Date n/a No
HTMLBody: String Yes
TextBody: String No
ReferenceCode: String 100 No

Example:

//url
'/api/emailservice/send/[[API KEY HERE]]'
//parameters
EmailAcct = '[[YOUR EMAILACCT HERE]]'
ToFirstName = 'cparker@snapfitness.com'
FromFirstName = 'chanhassen@snapfitness.com'
HTMLBody = 'cody'' test body'
Subject = 'cody test subject

Result:

{
    meta: {
        responseCode:{
            code: 'EMAIL13'
            ,description: 'Email is prepared for sending.'
        }
        , serviceStatus: 'Success'
    }
    , result:{
       emailLogID:123
    }
}

Merge

Description:

Merge a template and optional send it out once it merges. Returns the merged text back.

Parameters:

Type Max Len Required
EmailAcct: GUID 36 Yes
ToFirstName: String 500 No
ToLastName: String 500 No
ToEmailAddress: String 1000 Yes
FromFirstName: String 500 No
FromLastName: String 500 No
FromEmailAddress: String 1000 Yes
CCEmailAddress: String 1000 No
BCCEmailAddress: String 1000 No
Subject: String 1000 Yes
SendOnDate: Date n/a No
Defaults to now to be sent out immediately.
HTMLBody: String No
TextBody: String No
ReferenceCode: String 100 No
ShouldSend: Bit 5 No
Defaults to false.
ExtraDataJson: String No
TemplateKey: GUID 36 Yes

Example:

//url
'/api/emailservice/merge/[[API KEY HERE]]'
//parameters
EmailAcct = '[[YOUR EMAILACCT HERE]]'
ToFirstName = 'cparker@snapfitness.com'
FromFirstName = 'chanhassen@snapfitness.com'
HTMLBody = '[[someJson]] test body'
Subject = 'cody test subject
TemplateKey = [[YOUR TEMPLATE KEY HERE]]
ExtraDataJson = "{ someJson:'jsonvalue'}"

Result:

{
    meta: {
        responseCode:{
            code: 'A01'
            ,description: 'Accept'
        }
        , serviceStatus: 'Success'
    }
    , result:{
       emailLogID:123
        ,HTMLBody:'jsonvalue test body'
        ,TextBody:''
        ,Subject:''
    }
}