One to One

Description

The one to one interface is used to trigger direct single deliveries to single recipients. **Resource Location** .../interface/common/one2OneCreate.php Base URL https://response.pure360.com/ Custom Version http://{~customDomain~} **HTTP Method** POST | GET

Data Parameters

key value usage
userName
"test"
login username
password
"password123"
login password
profileName
"Marketing"
Target Profile
message_SYS_dataPolicy
"discard"
Retention policy for the message ("discard" for One to Ones)
message_contentType
"EMAIL"
  "SMS"
The One to One interface needs to know this to determine what form of validation to perform on the recipient's details (email or mobile validation) and which person record to retrieve.
toAddress
"test@test.com"
Recipient email address or mobile number.
message_messageName
"August_Deals"
The name of an existing message in the system to use for this one2one delivery, used by the process and not stored on the one2one entity.
The following are used if the message_messageName is not supplied. The message will ONLY be used for this delivery and will NOT be stored on the platform. It is used by the process and not the entity.
message_bodyPlain
or
message_bodyPlain_base64
"Header
---------
Email to {~first_name~}" or "base64 encoded version of the same string of text if specified"
Content to place in the PLAIN part of the message
message_bodyHtml
or
message_bodyHtml_base64
<h1>Header</h1><br />
Email to {~first_name~} or "base64 encoded version of the same string of html if specified"
Content to place in the HTML part of the message
message_bodySms
or
message_bodySms_base64
"Text to {~first_name~}"

or
base64 encoded version of the same string of text if specified
Content to place in the body part of the message
message_subject
"April Deals"
The subject line to appear in the message sent. Note that the subject line will be converted into the character set of the message on sending.
message_templateName
"email-msg-default_centered"
The name of the template into which the body content will be placed. The custom templates must have been already added to the platform for usage. To get a new template added contact either the customer success manager for the account, or the pure360 support team for more information
If no value is provided for this field, then the Default template is used. If there is only 1 template present on the profile, then that template will be the default. When you have more than 1 template, you can choose to auto set which will be the default.
Please see EMAIL FACADE or SMS FACADE for more details
message_languageCode
"en_GB.ISO8859-15"
Language code for this message.
If omitted: Profile default language code used for this message.
message_trackHtmlInd
"Y"
Indicates whether to enable tracking of links within the html body, this will feedback these events into the platform one to one reports.
If omitted : Will default to "Y"
message_trackPlainInd
"Y"
Indicates whether to enable tracking of links within the plain text body, this will feedback these events into the platform one 2 one reports.
If omitted : Will default to "N"
multipartInd (SMS Only)
"Y"
Indicates whether the SMS being sent is a single message or spread over multiple messages (exceeding 160 characters).
If omitted : Defaults to "N"
deliveryDtTm
"12/09/2014 10:22:05"
The datetime that this delivery will be sent out (dd/mm/yyyy hh:mm:ss)
customData[fieldname]
"customData[first_name] = bob"
Populate merge fields within the content of the message (i.e. customData[firstname]=value)
attachmentName
"exampleAttachment"
Name of the attachment to add to the one to one send (a reference name - not the path)
attachment
[BASE 64 STRING]
The file itself encoded as a base64 string
json
true
Sets the return type from an OK string, to a JSON containing the response. If the "status" key has an "OK" value a sibling key, "bus_entity_campaign_one2one_key", will accompany this containing the delivery details (see below for details)

Response

Type code content : string
Success 200
"OK"
If json boolean provided in the request
{
    "bus_entity_campaign_one2one_key":    
    {
        "deliveryReportId": 6265599,
        "deliveryId": 6263800,
        "beanName": "bus_entity_campaign_one2one"
    },
    "status":"OK"
 }
Error 200
"Error : Error Message"
If json boolean provided in the request
{
    "status": "Error : Error Message\n"
}

Examples


Email One to One Examples

**Example - Curl - Sending a One 2 One**
curl --data "userName=test&password=123456&profileName=Marketing&toAddress=test@pure360.com&message_messageName=August_2014_deals&message_trackHtmlInd=Y&message_trackPlainInd=Y&deliveryDtTm=01/10/2014 00:01:02&customData[first_name]=bob" 'http://paint.pure360.com/interface/common/one2OneCreate.php'
This CURL request uses the login "test" and the password for this, it specifies the profile that contains the target message and it sends the message called "August_2014_deals" to the address "[test@pure360.com](mailto:test@pure360.com)" with the tracking enabled for this message. It is scheduled to be sent on the 1st of october 2014 at 1 minute 2 seconds past midnight.
A One 2 One can also be sent using an HTML form.

The example below can be used to send a One 2 One email that already exists on a profile, without any custom field data:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  Email: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Name: <input type="text" name="message_messageName" /><br/>
  <input type="submit" />
  </form>

The example below can be used to send a One 2 One email that already exists on a profile, with custom field data:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  Email: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Name: <input type="text" name="message_messageName" /><br/>
  Custom Field: <input type="text" name="customData[FirstName]" value="Bob" /><br/>
  <input type="submit" />
  </form>

The example below can be used to create and send a new plaintext One 2 One email:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="EMAIL"/>
  Email: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Body: <input type="text" name="message_bodyPlain" /><br/>
  Message Subject Line: <input type="text" name="message_subject" /><br/>
  <input type="submit" />
  </form>

The example below can be used to create and send a new plaintext One 2 One email that does not include Pure360's default unsubscribe link :

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="EMAIL"/>
  <input type="hidden" name="message_templateName" value="email-msg-blank"/>
  Email: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Body: <input type="text" name="message_bodyPlain" /><br/>
  Message Subject Line: <input type="text" name="message_subject" /><br/>
  <input type="submit" />
  </form>

The example below can be used to create and send a new HTML One 2 One email:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="EMAIL"/>
  Email: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Body HTML: <input type="text" name="message_bodyHTML" value="<p>This is a test html message</p>" /><br/>
  Message Body Plain: <input type="text" name="message_bodyPlain" value="This is a test html message" /><br/>
  Message Subject Line: <input type="text" name="message_subject" /><br/>
  <input type="submit" />
  </form>



SMS One to One Examples

The example below can be used to send a One 2 One SMS that already exists on a profile, without any custom field data:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="SMS"/>
  Mobile Number: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Name: <input type="text" name="message_messageName" /><br/>
  <input type="submit" />
  </form>

The example below can be used to send a One 2 One SMS that already exists on a profile, with custom field data:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="SMS"/>
  Mobile Number: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Name: <input type="text" name="message_messageName" /><br/>
  Custom Field: <input type="text" name="customData[FirstName]" value="Bob" /><br/>
  <input type="submit" />
  </form>

The example below can be used to create and send a new One 2 One SMS:

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="SMS"/>
  Mobile Number: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Body: <input type="text" name="message_bodySms" /><br/>
  Message Subject Line: <input type="text" name="message_subject" /><br/>
  <input type="submit" />
  </form>

The example below can be used to send a One 2 One SMS using a known SMS template.
You will only ever need to use this if you have multiple custom templates.
(Note: the format for the template name is usually sms-msg-yourtemplate, e.g. sms-msg-exampleTemplate).

  <form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="hidden" name="userName" value="" />
  <input type="hidden" name="password" value="" />
  <input type="hidden" name="message_contentType" value="SMS"/>
  Mobile Number: <input type="text" name="toAddress" /><br/>
  Profile Name: <input type="text" name="profileName" /><br/>
  Message Body: <input type="text" name="message_bodySms" /><br/>
  Message Template Name: <input type="text" name="message_templateName" value="sms-msg-exampleTemplate" /><br/>
  <input type="submit" />
  </form>

The example below can be used to send a One 2 One SMS, falling bback to the profile's default SMS template, supplying your own body content and receiving the response in json

(Note: the format for the template name is usually sms-msg-yourtemplate, e.g. sms-msg-exampleTemplate).

<form method="post" action="http://response.pure360.com/interface/common/one2OneCreate.php?">
  <input type="text" name="userName" value="" />
  <input type="text" name="password" value="" /><br/>
  profile: <input type="text" name="profileName" value="" /><br/>
  mobile: <input type="text" name="toAddress" value="" /><br/>
  message_contentType: <input type="text" name="message_contentType" value="SMS" /><br/>
  multipartInd <input type="checkbox" name="multipartInd" value="Y" /><br/>
  JSON <input type="checkbox" name="json" value="true" checked /><br/>
  <!-- message name: <input type="text" name="message_messageName" value="" /><br/> -->
  message_bodySms: <input type="text" name="message_bodySms" value="sms wrapper" /><br/>
  <input type="submit" />
</form>