Aller directement à la fin des métadonnées
Aller au début des métadonnées

Vous regardez une version antérieure (v. /wiki/spaces/SUP/pages/95343423/API+V2+-+Documentation--) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 6) afficher la version suivante »

This documentation is for the version 2 of the API of Publitrac. Please note that Publitrac V2 is in BETA and will rapidely evolve.

Every concerns or problems should be adressed quickly to Michel Frigon (mfrigon@publipage.com).

Authentification

The authentification is use to obtain a valid token that your application will use to connect to each routes of the API. The token has a self-refreshing TTL (time to live) of 15 minutes. This means that the token lives 15 minutes after your last call and past this point, you will need to authenticate again.

Request

URL: /auth/getToken
Header
AuthorizationApi key received within the application of Publitrac (See settings)
Acceptapplication/json
Content
No content for this one

Response

Header
No non-standard header
Content

{

"token" : "djs4fdn4dJTer489!"

"ttl" : "900"

}


Token to be used for further calls
Time to live of the token in seconds. (By default will be 900, i.e. 15 minutes)

Synchronize a lead


The goal of this API endpoint is to add information to a lead or create a new lead within the system of Publitrac. This version of the sync is a delayed one for performance purposes. The responses is always accepted, as the lead itself is processed within our system a little later. This allows the ends use a higher volumes of call towards our API's when heavier loads happens.

Request

URL: /lead/delayedSync
Header
TokenToken of authorization
Acceptapplication/json
Content
{ 
     "leadInfo": {
         "email" : "john.doe@provider.com"
         "crmLeadId": 12387,
         "jobTitle": "Awesome Programmer",
         "firstName": "John",
         "lastName": "Doe"
     },
     "leadCustomField": {
         "customField1": "Value",
         "customField2": "Value2"
     }
}



leadInfo represent the standard Publitrac informations that required. The email is mandatory as we are using this as a identifier
(this will change in a short future). Each field details is available here: List and description of all lead fields





LeadCustomFields is an associative array (fieldName => value) of the customField you want to edit/update/add in your lead.

Response

Header
No non-standard header
Content

{

'status' : 'success',

'code' : 200

}


Message of status (See next table)
Code of response (See next table)

  • Aucune étiquette