---
search:
  tags:
    - Sync
    - GET
seo:
  description: >-
    Any signed in user. Returns a device's changes past since_rev, oldest first,
    cursor… Reference for the GET /api/v1/sync/pull endpoint in the PharmaFlow
    API.
sidebar:
  label: Pull changes since a revision
  badge: GET
title: Pull changes since a revision
type: openapi-operation
---
Any signed in user. Returns a device's changes past since_rev, oldest first, cursor max_rev. It is a delta feed, so a caller advances its cursor and repeats until max_rev stops moving.

`GET /api/v1/sync/pull`

**Responses**

- `200` — The delta and the new cursor
- `400` — device\_id is missing, since\_rev or limit is not a non-negative integer, or limit is below 1
- `401` — Not authenticated
- `403` — The device belongs to another branch, or the device has been revoked
- `404` — Unknown device

Response example, 200:

```json
{
  "changes": [
    {
      "rev": -9007199254740991,
      "origin_branch_id": "string",
      "entity": "string",
      "entity_id": "string",
      "operation": "string",
      "to_branch_id": "string",
      "payload": {
        "property1": null,
        "property2": null
      }
    }
  ],
  "max_rev": -9007199254740991
}
```
