Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
api-automation [2017/01/20 09:25]
ben
api-automation [2017/01/20 12:47]
ben [Get All Autoresponders]
Line 60: Line 60:
 \\ \\
  
-===== Add Contact to Autoresponder ​=====+===== Get All Autoresponders ​=====
  
-This endpoint is used to add Contact to an Autoresponder. +This endpoint is used to get list of all the [[automation|Autoresponders]] ​in your Sentori ​Account.
- +
-Can be used as a way to send an Email to a Contact from an external system: create an Autoresponder ​in Sentori ​that has a single Send Email step.+
  
  
 ==== Endpoint ==== ==== Endpoint ====
  
-|URI|<​nowiki>​https://​api.sentoriapp.com/​v2.0/​automation/​{AutomationExternalID}/​addcontact/​{Contact EmailAddress}/</​nowiki>​| +|URI|<​nowiki>​https://​api.sentoriapp.com/​v2.0/​automation/​autoresponders/</​nowiki>​| 
-|Method|POST|+|Method|GET|
  
- 
- 
-==== Request Body ==== 
- 
-JSON data in the Request Body can be used to provide additional values to merge into any Emails in the Autoresponder. 
- 
-When preparing the Emails to use in your Autoresponder,​ you can manually enter "​Transaction Data" Mergefields into the Email content where you'd like to merge in values from this JSON data. 
- 
-The syntax for Transaction Data Mergefields is <​nowiki>​{{trx:​MergefieldName}}</​nowiki>​ and "​MergefieldName"​ must exactly match the name in the JSON data.  You can also include a default value which is used if either the property isn't found in the JSON data or its value is blank, e.g. <​nowiki>​{{trx:​DiscountCode default=n/​a}}</​nowiki>​ 
- 
-The JSON data must describe a single "​flat"​ object (i.e. one consisting only of name/value pairs as shown in the example below), it cannot be an array. 
- 
-|Example Email Content|<​code>​Order Confirmation 
-Item: {{trx:​ProductName}} 
-Price: {{trx:​ProductPrice}} 
-Date: {{trx:​PurchaseDate}} 
-Discount Code: {{trx:​DiscountCode default=n/​a}}</​code>​| 
- 
-|Example JSON Request Body|<​code javascript>​{ 
- "​ProductName":"​46inch LCD Television",​ 
- "​ProductPrice":"​£429.99",​ 
- "​PurchaseDate":"​31st August 2016" 
-}</​code>​| 
- 
-|Example Merged Content|<​code>​Order Confirmation 
-Item: 46inch LCD Television 
-Price: £429.99 
-Date: 31st August 2016 
-Discount Code: n/​a</​code>​| 
  
  
 ==== Response ==== ==== Response ====
  
-|HTTP Status|Description|Response Body+|Field| Type|Description | 
-|400|Bad Request|<code javascript>​{ +|ExternalIDstringID of the Mailing List.| 
- "​Code":"​-1",​ +|Name|string| Name of the Mailing List.
- "​Message":"​Invalid JSON found in Request Body." +|Description| string| Description of the Mailing List.|
-}</​code>​+
  
-For other response codessee the [[api-errors|Error List]].+|Example|<​code javascript>​ 
 +
 +
 + "​ExternalID":​ "​ABCD1234"​, 
 + "​Name":​ "New signups",​ 
 + "​Description":​ "Send new signups some initial offers."​ 
 + }, 
 +
 + "​ExternalID":​ "​ABCD1235",​ 
 + "​Name":​ "10 step course",​ 
 + "​Description":​ "​Send ​the 10 emails about the course each week.
 +
 +
 +</​code>​|