---
name: fetch-provider-updates
description: Retrieve changed dental location and provider records from Intelibly's Provider Information Updates API (GET /api/changes, JSON Lines) using a cursor timestamp, or understand the daily SFTP JSONL alternative. Use when an Intelibly partner needs to sync updated location or provider data.
---

# Fetch provider and location updates from Intelibly

Source documentation (public): https://developer.intelibly.com/partner-api/provider-updates-api.md
The documentation notes it is subject to frequent changes; check it for the current version.

## Credentials and security

- All requests must be authenticated with a partner API token: `Authorization: Bearer <your_api_token>`. Tokens are issued by Intelibly to each partner; contact your Intelibly Provider Relations representative. The token determines which partner's data you can access, so no partner ID goes in the URL.
- Never embed the token in prompts, shared code, client-side apps or public repositories. Read it from an environment variable or a secrets manager. Use HTTPS only.

## Request

```
GET https://app.intelibly.com/api/changes?cursor=<ISO8601 UTC timestamp>
Authorization: Bearer $INTELIBLY_API_TOKEN
```

- `cursor` (optional, string): ISO 8601 UTC timestamp, for example `2026-10-01T00:00:00Z`. Returns all location and provider records changed since that time, in chronological order. If omitted, returns changes since the last known sync.

Status codes: `200` success; `400` invalid cursor format; `401` missing or invalid token; `500` server error or processing issue.

## Response: JSON Lines

Each line is one JSON object with `type` of `location` or `provider`. Process each line independently; do not parse the whole response into memory at once.

Example (fictional data):

```
{"type":"location","location":{"id":101,"name":"Sample Family Dental","street":"100 Example St.","city":"San Antonio","state":"TX","zip":"78229","partners_internal_id":"LOC-0001","updated_at":"2026-10-01T07:22:30Z","inserted_at":"2026-01-15T10:00:00Z"}}
{"type":"provider","provider":{"id":205,"name":"Dr. Jordan Sample","npi_number":"1234567893","bio":"General dentist.","partners_internal_id":"PROV-0001","updated_at":"2026-10-01T07:23:45Z","inserted_at":"2026-01-15T10:05:00Z"}}
```

Location fields: `id` (int, Intelibly internal ID), `name`, `street`, `city`, `state` (abbreviation), `zip`, `partners_internal_id` (partner's identifier), `updated_at`, `inserted_at` (UTC timestamps).
Provider fields: `id` (int), `name` (full name), `npi_number`, `bio` (short biography), `partners_internal_id`, `updated_at`, `inserted_at`.

## Cursor handling

1. On the first run, pick a starting timestamp (or omit `cursor` to get changes since the last known sync).
2. Process every line; track the latest `updated_at` you saw.
3. Store that timestamp and send it as `cursor` on the next poll.

## Alternative: daily SFTP delivery

Instead of polling, Intelibly can upload change files daily to the partner's own SFTP server.
- Files are JSONL in the same structure as the API response, UTF-8, named `<partner_id>_updates_<timestamp>.jsonl`; the remote path is configured per partner.
- Each file contains only records updated since the last run; timestamp cursors prevent duplicate deliveries, and files are removed from Intelibly's servers after successful delivery.
- The partner provides Intelibly with SFTP credentials (username, plus password or SSH key). Arrange this through your Intelibly contact.
