Contact Cache Sync Repository
API Contract
REST
/api/v1/cache/sync
6 endpoints
GET
/api/v1/cache/sync/api/v1/cache/sync
List all cache sync records across organizations
Public
Response Example
{
"data": [
{
"id": "sync_00000010",
"org_id": "org_NOR_0042",
"contacts_synced": 312,
"notes_synced": 847,
"synced_at": "2026-03-26T06:00:00Z",
"status": "success"
},
{
"id": "sync_00000009",
"org_id": "org_NOR_0099",
"contacts_synced": 88,
"notes_synced": 201,
"synced_at": "2026-03-25T18:00:00Z",
"status": "success"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}
GET
/api/v1/cache/sync/api/v1/cache/sync/:id
Retrieve details of a specific sync operation
Public
Response Example
{
"id": "sync_00000010",
"org_id": "org_NOR_0042",
"contacts_synced": 312,
"notes_synced": 847,
"synced_at": "2026-03-26T06:00:00Z",
"status": "success",
"last_sync_timestamp": "2026-03-26T06:00:00Z"
}
POST
/api/v1/cache/sync/api/v1/cache/sync
Trigger a cache sync — upserts contacts and notes for an organisation
Public
Request Example
{
"org_id": "org_NOR_0042",
"contacts": [
{
"id": "cnt_00000112",
"name": "John Smith",
"email": "j.smith@bridgecorp.no",
"phone": "+47 901 23 456",
"org_name": "BridgeCorp AS",
"updated_at": "2026-03-25T14:00:00Z"
}
],
"notes": [
{
"id": "note_00000831",
"contact_id": "cnt_00000112",
"content": "Bridge project kick-off confirmed for April 2026.",
"author_name": "Marius Dahl",
"updated_at": "2026-03-15T11:00:00Z"
}
]
}
Response Example
{
"id": "sync_00000011",
"org_id": "org_NOR_0042",
"contacts_synced": 1,
"notes_synced": 1,
"contacts_inserted": 0,
"contacts_updated": 1,
"notes_inserted": 0,
"notes_updated": 1,
"status": "success",
"synced_at": "2026-03-26T09:30:00Z"
}
PUT
/api/v1/cache/sync/api/v1/cache/sync/:id
Retry or extend a failed or partial sync operation
Public
Request Example
{
"org_id": "org_NOR_0042",
"contacts": [],
"notes": [
{
"id": "note_00000900",
"contact_id": "cnt_00000200",
"content": "Follow-up scheduled for next Tuesday.",
"author_name": "Marius Dahl",
"updated_at": "2026-03-26T09:00:00Z"
}
]
}
Response Example
{
"id": "sync_00000011",
"org_id": "org_NOR_0042",
"notes_synced": 1,
"status": "success",
"updated_at": "2026-03-26T09:32:00Z"
}
DELETE
/api/v1/cache/sync/api/v1/cache/sync/:id
Clear the offline cache for the organisation associated with a sync record
Public
Response Example
{
"id": "sync_00000011",
"org_id": "org_NOR_0042",
"contacts_removed": 312,
"notes_removed": 848,
"cleared_at": "2026-03-26T09:35:00Z"
}
GET
/api/v1/cache/sync/api/v1/cache/sync/timestamp
Return the timestamp of the last successful sync for a given organisation
Public
Response Example
{
"org_id": "org_NOR_0042",
"last_sync_timestamp": "2026-03-26T06:00:00Z",
"sync_id": "sync_00000010",
"status": "success"
}