# Mobile Sync Contract Draft

## Morning Download

Request:

```json
{
  "surveyor_id": 42,
  "clientnumbers": [1001, 1002],
  "device_id": "android-device-id",
  "last_sync_at": "2026-05-16T07:30:00Z"
}
```

Response:

```json
{
  "clients": [],
  "locations": [],
  "items": [],
  "form_templates": [],
  "reference_data": []
}
```

## Offline Upload

Request:

```json
{
  "device_id": "android-device-id",
  "new_items": [],
  "updated_items": [],
  "reports": [],
  "media": []
}
```

Response:

```json
{
  "accepted": true,
  "item_map": {
    "local-item-abc": 123456
  },
  "report_map": {
    "local-report-def": 987654
  },
  "errors": []
}
```

New offline items must keep their local ID until the server returns a real `itemnumber`.
