Visits

Supported visit attributes:

Attribute Type Description
id number Unique identifier of the visit.
resource_type string Name of the resource type the visit is attached to. Possible values:lead,contact,prospect\_and\_customer
resource_id number Identifier of the resource the visit is attached to.
creator_id number Identifier of the user that created the visit.
visited_at string Date and time when the visit took place in UTC (ISO8601 format).
created_at string Date and time when the visit was attached in UTC (ISO8601 format).
summary string Summary of the visit.
outcome object Outcome of the visit (see below).
sales_rep_location object Sales representative location at the time of the visit. (see below)

Supported visit outcome attributes:

Attribute Type Description
id number Unique identifier of the visit outcome.
name string Name of the visit outcome.
has_original_name - deprecated(may be removed at any time)

Supported sales representative location attributes:

Attribute Type Description
latitude decimal Latitude of the location.
longitude decimal Longitude of the location.
verification_status string The 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 theFirehose Overviewarticle 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.1200OKContent-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}}