Visits

The Visits API provides a simple interface to retrieve visits.

Retrieve all visits

GET /v2/visits

Returns all visits available to the user, according to the parameters provided.

Parameters

NameRead OnlyTypeDescription
pagefalsenumberPage number to start from. Page numbering starts at 1 and omitting the page parameter will return the first page. Maximum page that can be returned is 100
per_pagefalsenumberNumber of records to return per page. Maximum per_page value is 100.
sort_byfalsestringA field to sort by. Default ordering is ascending. If you want to change the sort order to descending, append :desc to the filed e.g. sort_by=visited_at:desc. Possible values: id, visited_at
outcome_idfalsenumberID of the visit outcome to filter the visits.
creator_idfalsenumberUser ID that created the visit
resource_typefalsestringThe type of the resource the visit is attached to. Possible values: lead, contact
resource_idfalsenumberThe ID of the resource the visit is attached to. Requires the resource_type query param to be set as well.
rep_location_verification_statusfalsestringThe status of the location verification of the device that created the visit (sales representative). Possible values: verified, resource_location_too_far, location_unknown, location_services_disabled

Using cURL

curl -v -X GET https://api.getbase.com/v2/visits \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "items": [    {      "data": {        "id": 234,        "creator_id": 1345,        "outcome_id": 33,        "resource_type": "lead",        "resource_id": 899992,        "visited_at": "2018-05-09T07:30:16.000Z",        "resource_address": "4242 Fancy Feeway",        "rep_location_verification_status": "verified",        "summary": "Spoke with Bob - he is interested in buying fancy stuff in upcooming month",        "created_at": "2018-05-09T07:30:16.000Z",        "updated_at": "2018-05-09T07:30:16.000Z"      },      "meta": {        "type": "visit"      }    }  ],  "meta": {    "type": "collection",    "count": 1,    "links": {    }  }}