This documentation is for the version 2 of the PUBLITRAC API of Publitrac . Please note that Publitrac PUBLITRAC V2 is in a BETA mode and every concern or problem should be adressed quickly to BETA stage and it evolves rapidly.
All issues and concerns should be addressed quickly with Michel Frigon (mfrigon@publipage.com).
...
Sommaire
Authentication
The authentification authentication is use used to obtain a valid token that your application will use to connect to each any routes of the API. The token has a self-refreshing TTL (time to live) of 15 minutes. This means that the token lives remains active until 15 minutes after your last call and past this point, you will need to authenticate it again.
Request
URL: /v2/auth/getToken ~ GET | |
---|---|
Header | |
Authorization | Api key received within the application of Publitrac (See settings) |
Accept | application/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 to create a new lead within PUBLITRAC. This version of the sync is a delayed one for performance purposes. The request is always accepted when submitted and the lead itself is processed later within our system. This allows a higher volume of calls towards our API when heavier loads happen.
Request
URL: /v2/lead/delayedSync ~ POST | |||
---|---|---|---|
Header | |||
Token | Token of authorization | ||
Accept | application/json | ||
Content | |||
| leadInfo represents the standard PUBLITRAC information that is required. The email is mandatory as we are using this as an identifier. 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) | |