Portal records
A portal record stores information about a web portal browsing session.
Warning
This API is not finalized yet.
Fields
- class PortalRecord
- action: integer
The action performed by the visitor.
0 = no action
1 = online payment
2 = payment promise
3 = already paid
4 = dispute
5 = form
6 = callback
7 = custom choice
8 = confirmation
9 = link
10 = chat assistant
- campaign: integer
The campaign the job belongs to.
- custom_choice: string
The custom choice.
- dispute_reason: string
The reason of the dispute.
- duration: string
The browsing duration (in seconds).
- id: integer
The portal record’s unique ID.
- job: integer
The portal record’s job.
- payment_date: date
The date at which the payment was made or will be made.
- payment_method: string
The method used for payment.
card = Credit or debit card
cash = Cash
check = Check
transfer = Bank transfer
debit = Bank direct debit
other = Other
- portal: integer
The portal record’s portal.
- reference: string
Your reference for this job (e.g. customer ID), which must be unique within the campaign.
- team: integer
The portal record’s team.
- timestamp: datetime
The portal record’s date and time.
API
- GET /j/portal_records
Retrieves the list of portal records.
You must specify a start date and an end date.
Example request:
GET /j/portal_records?start=2015-01-06T00:00:00Z&end=2015-01-07T00:00:00Z&team=1 HTTP/1.1 Authorization: Bearer 0a1b2c3d4e5f
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "action": 1, "campaign": 1, "custom_choice": null, "dispute_reason": null, "duration": 10, "id": 1, "job": 1, "payment_date": "2013-02-25", "payment_method": "card", "portal": 1, "reference": "123456", "team": 1, "timestamp": "2013-02-25T09:21:14Z" } ]
- Request Headers:
Authorization – OAuth token to authenticate
- Query Parameters:
end (datetime) – An end date and time.
start (datetime) – A start date and time.
team (integer) – An optional team ID.
- Response JSON Array of Objects:
action (integer) – The action performed by the visitor.
campaign (integer) – The campaign the job belongs to.
custom_choice (string) – The custom choice.
dispute_reason (string) – The reason of the dispute.
duration (string) – The browsing duration (in seconds).
id (integer) – The portal record’s unique ID.
job (integer) – The portal record’s job.
payment_date (date) – The date at which the payment was made or will be made.
payment_method (string) – The method used for payment.
portal (integer) – The portal record’s portal.
reference (string) – Your reference for this job (e.g. customer ID), which must be unique within the campaign.
team (integer) – The portal record’s team.
timestamp (datetime) – The portal record’s date and time.
- Status Codes:
200 OK – no error
400 Bad Request – for instance a required field is missing
403 Forbidden – you tried to access a forbidden resource, check you provided a valid OAuth token