skip to Main Content

5050API (on apiary.io):

  • Persoo Admin API – for the account configuration and visitor’s history view
  • Persoo RTP API – for getting recommendations and offers, live visitor profiles (full browsing history is available through a unique request)

Apiary has it’s advantages for testing requests. You don’t have to use curl or other tools, if you don’t want to. Just fill your authorization data in Apiary, and you can test live request there.

Examples of RTP API calls

For serving recommendations

the workflow method workflow – reporting visitor’s data and recommendations. This method is used by the browser when rendering recommendations, but can be used directly as well.

Returns JSON.

  • data – event-related data. E.g. IDs of recommended products for each scenario or custom  data for each visitor profile requested.
  • functionCalls – calling JS functions. Usually in the sense of “render a box in location X with the HTML code Y” or “report a custom variable into Google Analytics”…
  • exceptions – exceptions that happened on the server when processing the event and given workflow (it’s possible to define custom variables and functions, which are often the cause of the exception).
  • debug – debugging info if the debug mode is on.

Example:

You report a pageview in the request, and get back a list of product IDs for all scenarios for that page.

More detailed info on workflows can be found here:

Notes to calling RTP API:

  • There are two modes available:
    1. Either the visitorID is given (that identifies the browser), in which case the request does not have to be authorised,
    2. Or we work with a specific profile, that needs to be identified with an e-mail, userID etc. In this case, we have to pass an auth token to prove that we have the right to access this data.
  • Take note that the RTP requests need a referrer to know who is calling, and for which URL the recommendations are given. It won’t respond without a referrer.

For enriching a lead

The mehod getVisitorDetail

returns

  • Basic Visitor Profile info (basic metrics, IDs, tags…)
  • All transactions related to the Visitor
  • Browsing history organised into sessions

See example on apiary (bottom right), or:

Note about calling the Admin API:

  • We need to authorize through a helper method /login, which sets the cookie for a domain adminapi.persoo.cz, and authorizes all future requests (until the cookie expires – each request refreshes the cookie)
Back To Top
×Close search
Search