---
search:
  tags:
    - Sync
    - POST
seo:
  description: >-
    Admin only. Settles a conflict by last_write_wins, client, server,…
    Reference for the POST /api/v1/sync/conflicts/{id}/resolve endpoint in the
    PharmaFlow API.
sidebar:
  label: Resolve a sync conflict
  badge: POST
title: Resolve a sync conflict
type: openapi-operation
---
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`

**Request body** (`application/json`, required)

- `strategy` (string, required)

Request body example:

```json
{
  "strategy": "string"
}
```

**Responses**

- `200` — Conflict resolved
- `400` — Body must contain strategy: last\_write\_wins, client, server or merge
- `401` — Not authenticated
- `403` — Caller is not an admin
- `404` — Conflict not found
- `409` — Conflict is already resolved, or a merge clash leaves fields both sides changed

Response example, 200:

```json
{
  "id": "string",
  "strategy": "string",
  "applied": true,
  "payload": {
    "property1": null,
    "property2": null
  }
}
```
