---
title: "One location reading while a checked-in Sales Coach visit is open"
description: "Sent by the rep's phone about every 2 minutes after a VERIFIED check-in, until the response says stop_tracking. Uses the same 150 m / 100 m accuracy rule as check-in. Two readings in a row outside the circle record a departure (at the first one). Leaving before the workspace minimum emails managers \"Left early\" and returns ask_leave_reason; staying past the maximum emails \"Running long\". Only the distance is stored, never the phone's coordinates. Flag-gated with check-in (FIELD_SALES_GEOFENCED_CHECKIN).\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Conversations

`POST /api/field-sales/appointments/{id}/presence`

Sent by the rep's phone about every 2 minutes after a VERIFIED check-in, until the response says stop_tracking. Uses the same 150 m / 100 m accuracy rule as check-in. Two readings in a row outside the circle record a departure (at the first one). Leaving before the workspace minimum emails managers "Left early" and returns ask_leave_reason; staying past the maximum emails "Running long". Only the distance is stored, never the phone's coordinates. Flag-gated with check-in (FIELD_SALES_GEOFENCED_CHECKIN).

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `id` (`post/api/field-sales/appointments/id/presence.path.id`; string, required)
  - format `uuid`

## Request body

_Required._

- `latitude` (`post/api/field-sales/appointments/id/presence.latitude`; number, required)
- `longitude` (`post/api/field-sales/appointments/id/presence.longitude`; number, required)
- `accuracy_meters` (`post/api/field-sales/appointments/id/presence.accuracy_meters`; number, required)
- `captured_at` (`post/api/field-sales/appointments/id/presence.captured_at`; string, required)
  - format `date-time`

## Example request

```json
{
  "latitude": 0,
  "longitude": 0,
  "accuracy_meters": 0,
  "captured_at": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/field-sales/appointments/<id>/presence' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "latitude": 0,
  "longitude": 0,
  "accuracy_meters": 0,
  "captured_at": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/field-sales/appointments/<id>/presence';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    latitude: 0,
    longitude: 0,
    accuracy_meters: 0,
    captured_at: '2019-08-24T14:15:22Z'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/field-sales/appointments/<id>/presence"

payload = {
    "latitude": 0,
    "longitude": 0,
    "accuracy_meters": 0,
    "captured_at": "2019-08-24T14:15:22Z"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

{ success, presence: { state, distance_meters, minutes_on_site, departed_at, left_early, ask_leave_reason, running_long, next_visit_at?, stop_tracking, next_reading_seconds } }

### 409

No verified check-in for this visit, or the visit window has closed — { stop_tracking: true }


Source: https://developer.channelautomations.com/api/post-api-field-sales-appointments-id-presence/index.md
