Visits

Supported visit attributes:

AttributeTypeDescription
idnumberUnique identifier of the visit.
resource_typestringName of the resource type the visit is attached to. Possible values:lead, contact, prospect\_and\_customer
resource_idnumberIdentifier of the resource the visit is attached to.
creator_idnumberIdentifier of the user that created the visit.
visited_atstringDate and time when the visit took place in UTC (ISO8601 format).
created_atstringDate and time when the visit was attached in UTC (ISO8601 format).
summarystringSummary of the visit.
outcomeobjectOutcome of the visit (see below).
sales_rep_locationobjectSales representative location at the time of the visit. (see below)

Supported visit outcome attributes:

AttributeTypeDescription
idnumberUnique identifier of the visit outcome.
namestringName of the visit outcome.
has_original_name-deprecated (may be removed at any time)

Supported sales representative location attributes:

AttributeTypeDescription
latitudedecimalLatitude of the location.
longitudedecimalLongitude of the location.
verification_statusstringThe 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

Endpoints

Stream Visit

Read the stream of visit events.

See the Firehose Overview article for more details on request and response formats and parameters.

Action

GET /v3/visits/stream

Examples

Read the stream of visit events

GET /v3/visits/stream?position=tailAccept: application/jsonAuthorization: Bearer $ACCESS_TOKENUser-Agent: $CLIENT_NAME
HTTP/1.1 200 OK   Content-Type: application/json
{  "items": [    {      "data": {        "summary": "Spoke with Bob - he is interested in buying fancy stuff in upcoming month.",        "sales_rep_location": {          "latitude": 37.421998,          "verification_status": "verified",          "longitude": -122.084        },        "creator_id": 174401,        "resource_type": "lead",        "resource_id": 255413149,        "created_at": "2019-01-10T10:56:51Z",        "visited_at": "2019-01-10T10:56:49Z",        "id": 4128,        "outcome": {          "has_original_name": true,          "name": "Interested",          "id": 520        }      },      "meta": {        "event_cause": "interaction",        "sequence": 1,        "event_id": "inyzwQ26ToacCz-AStvG7A",        "event_type": "created",        "type": "visit",        "event_time": "2019-01-10T10:56:51Z"      }    }  ],  "meta": {    "links": {      "next": "https://api.getbase.com.com/v3/visits/stream?position=ZmlyZWhvc2UudmlzaXQuYnlfYWNjb3VudCwwLDIyMjg="    },    "position": "ZmlyZWhvc2UudmlzaXQuYnlfYWNjb3VudCwwLDIyMjg=",    "top": false  }}