Skip to content

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

NameTypeRequiredDescription
idintegerYes

The integer ID of the OfflineBatch to reconcile.

Example: 7

Request body

Content type application/json.

FieldTypeRequiredDescription
acceptedintegerNo

Number of transactions accepted from the batch.

Minimum: 0

rejectedintegerNo

Number of transactions rejected due to conflicts.

Minimum: 0

strategystringNo

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: "server_wins", "device_wins", "manual" · Default: "manual"

conflicts_jsonstringNo

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": "[]"}'
Loading