Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Resolve a sync conflict

Admin only. Settles a conflict by last_write_wins, client, server, or merge, and logs who. A merge needs both sides to differ, and a resolved conflict is not overwritten.

POST/api/v1/sync/conflicts/{id}/resolve
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Path parameters
idstringrequired

The conflict being settled.

Request body
requiredapplication/json
strategystringrequired
Responses
200

Conflict resolved

idstringrequired
strategystringrequired
appliedbooleanrequired
payloadobject | nullrequired
Show properties
Any of:
object
object
null
null
400

Body must contain strategy: last_write_wins, client, server or merge

detailstringrequired
401

Not authenticated

detailstringrequired
403

Caller is not an admin

detailstringrequired
404

Conflict not found

detailstringrequired
409

Conflict is already resolved, or a merge clash leaves fields both sides changed

detailstringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/sync/conflicts/string/resolve' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "strategy": "string"
}'
Response
{
  "id": "string",
  "strategy": "string",
  "applied": true,
  "payload": {
    "property1": null,
    "property2": null
  }
}