Reconcile offline sync batch
POST/pos/offline-batches/{id}/reconcile
Applies conflict resolution to a queued offline batch. Specify how many transactions were accepted or rejected, the conflict resolution strategy, and any per-conflict override details. Each conflict in the conflicts_json array is resolved individually. The batch status advances to 'reconciled'.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The integer ID of the OfflineBatch to reconcile. Example: |
Request body
Content type application/json.
| Field | Type | Required | Description |
|---|---|---|---|
accepted | integer | No | Number of transactions accepted from the batch. Minimum: 0 |
rejected | integer | No | Number of transactions rejected due to conflicts. Minimum: 0 |
strategy | string | No | Conflict resolution strategy to apply. 'server_wins' discards the device version; 'device_wins' overwrites the server record; 'manual' requires per-conflict resolution in conflicts_json. One of: |
conflicts_json | string | No | JSON-encoded array of conflict resolution objects. Each object must contain a 'transaction_id' and a 'resolution' field ('accept' or 'reject'). |
Example
{
"accepted": 2,
"rejected": 0,
"strategy": "manual",
"conflicts_json": "[]"
}
Responses
302 Redirect to the offline sync index after reconciliation
404 Offline batch not found
422 Validation error on reconciliation fields
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/pos/offline-batches/{id}/reconcile" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"accepted": 2, "rejected": 0, "strategy": "manual", "conflicts_json": "[]"}'