Sommaire | ||
---|---|---|
|
...
Name | Description |
---|---|
method | The API method you want to call |
apikey | Your API Key |
username | Your username (Same as your PUBLITRAC login) *Note that we can provide you a specific user to use the API |
mot de passe | Your password (Same as your PUBLITRAC login) |
parameters | The number of parameters required depend on the method called. |
Syntaxe
https://app.publitrac.com/api?method=[Method Name]&apikey=[Your API Key]&username=[Your user]&password=[Your password]&[Your parameters (email, query, viewName, listName)]
Examples
Bloc de code | ||
---|---|---|
| ||
https://app.publitrac.com/api?method=getLeads&apikey=1234e567-890c-123e-4567-8901b234c56&username=MyUser&password=MyPassw0rd&query=<XML representation of your search> https://app.publitrac.com/api?method=getLead&apikey=1234e567-890c-123e-4567-8901b234c56&username=MyUser&password=MyPassw0rd&email=Email representing your search |
...
Url | https://app.publitrac.com/api |
Supported | POST |
Methode | executeCampaign |
Mandatory Parameters | method : executeCampaign apiKey : Your API Key username : Your username password : Your password query: The xml representation of the lead emails and campaign name. |
Optional Parameters | |
Remarks | The query object might contain many lead email addresses and many campaign names. If many leads with the same email addresses exist in the system, only the first lead created will be sent to the campaigns. Please note that all leads will be inserted into all campaigns defined and if one lead or one campaign does not exist, nothing will be processed. |
Examples
Bloc de code | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <request> <leads> <lead></lead> <lead></lead> </leads> <campaigns> <email>johnsmith@acme.com</email> <email>csage@ acme.com</email> <campaign> <name>Trade Show May</name> </campaign> </campaigns> </request> |
Bloc de code | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <response> <status>1100</status> <message>Execute campaigns on leads success.</message> </response> |
Add emails campaign
Create a complete email marketing campaign.
This method will automatically create an email, a list and a campaign. The leads will be added to the automation campaign and they will receive the email. If the campaign already exists, it will add the new leads to the campaign.
Url | https://app.publitrac.com/api |
Supported | POST |
Methode | addEmailCampaign |
Mandatory Parameters | method : addEmailCampaign apiKey : Your API Key username : Your username password : Your password query: The xml representation of the email information, and a list of leads. |
Optional Parameters | |
Remarks | A maximum of 50 leads per call can be provided. |
Examples
Bloc de code | ||||
---|---|---|---|---|
| ||||
?xml version="1.0" encoding="UTF-8"?> <request> <information> <name>Promotion January 2014</name> </information> <email> <fromName>PUBLITRAC</fromName> <fromEmail>no-reply@publipage.com</fromEmail> <subject>January Promotion</subject> <message> <html> <![CDATA[ <html><body> Hello <strong>{{FirstName;Default=}}</strong>.<br /><br /> There is a new promotion this year…<br /><br /><br /></body></html> ]]> </html> <text> <![CDATA[ Hello {{FirstName;Default=}}. There is a new promotion this year… ]]> </text> </message> <options> <sendAsSalesRep>false</sendAsSalesRep> </options> </email> <leads> <lead> <firstName>John</firstName> <lastName>Smith</lastName> <company>ACME</company> <phone>555-423-2453</phone> <email>jsmith@acme.com</email> <leadSource>New Production ABC</leadSource> <originalSource> New Production ABC</originalSource> <originalSourceType>Web</originalSourceType> <customFields> <GamePreferences>Action </Buyin> <GamePlayed>121 </Buyin> </customFields> </lead> <lead> <firstName>John</firstName> <lastName>Carmack</lastName> <company>ID Software</company> <phone>555-423-2453</phone> <email>jcarmack@idsoftware.ca</email> <leadSource>New Production ABC</leadSource> <originalSource> New Production ABC</originalSource> <originalSourceType>Web</originalSourceType> <customFields> <GamePreferences>Strategy </Buyin> <GamePlayed>23 </Buyin> </customFields> </lead> </leads> </request> |
Bloc de code | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <response> <status>2001</status> <message>Lead emails synchronization successfull.</message> </response> |
E-Commerce Transactions
Create a an e-commerce transaction.
Ancre | ||||
---|---|---|---|---|
|
Synchronise the sales history of your leads automatically from your web site. Each transaction data and each product will be kept in time and you can be updated as they evolve.
The sales history will be usable as:
- Create segmented list
- Activity on transactions information within automated campaigns
- Automated campaigns on transaction status and information
Url | |
Supported | POST |
Body Parameters (required) | transaction : json representation of the transaction token : Your account token email: yourLeadEmail@service.com |
Optional Parameters | |
Remarks | the transaction object has several required fields, refer to example transaction content to build your JSON object |
Examples
Bloc de code | ||||
---|---|---|---|---|
| ||||
{ "id": "1000", "token": "accountToken", "email": "yourleademail@service.com", "type": "buying", "total": "40", "tax": "12", "shipping": "air", "info": "my first transaction", "currency": "EUR", "items": [ { "id": "9991", "name": "Bunnies", "sku": "DD23444", "category": "Animals", "price": "10", "quantity": "1" }, { "id": "9992", "name": "Ball", "sku": "CC23444", "category": "Party Toys", "price": "10", "quantity": "1" }, { "id": "9993", "name": "Hammer", "sku": "BB23444", "category": "Tools", "price": "10", "quantity": "1" }, { "id": "9994", "name": "Pencils", "sku": "AA23444", "category": "Arts", "price": "10", "quantity": "1" } ] } |
Bloc de code | ||||
---|---|---|---|---|
| ||||
200 OK |
...