Create offline sync batch
POST/pos/offline-batches
Enqueues a batch of transactions captured by a POS terminal while it was offline. Provide the device identifier and the JSON array of transactions. The batch is placed in 'queued' status and will be reconciled either automatically or via the reconcile endpoint.
Request
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
device_id | string | Yes | Unique identifier for the POS terminal or device that captured the transactions while offline (e.g. a UUID or serial number). Max length: 120 |
transactions_json | string | Yes | JSON-encoded array of transaction objects. Each transaction should include at minimum an 'id', 'amount', 'timestamp', and 'payment_method' field. |
trace_id | string | No | Optional idempotency/trace identifier for this batch submission. Use a UUID to safely retry submissions without duplicating data. Max length: 120 |
Example
{
"device_id": "POS-TERMINAL-07",
"transactions_json": "[{\"id\":\"txn-001\",\"amount\":45.00,\"timestamp\":\"2026-04-07T14:23:00Z\",\"payment_method\":\"cash\"},{\"id\":\"txn-002\",\"amount\":120.50,\"timestamp\":\"2026-04-07T14:45:00Z\",\"payment_method\":\"card\"}]",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}
Responses
302 Redirect to the offline sync index after the batch is queued
422 Validation error — device_id and transactions_json are required
Content type application/json, any.
Example
{
"errors": {
"device_id": [
"The device id field is required."
],
"transactions_json": [
"The transactions json field is required."
]
}
}
401 Unauthenticated
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/pos/offline-batches" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"device_id": "POS-TERMINAL-07", "transactions_json": "[{\"id\":\"txn-001\",\"amount\":45.00,\"timestamp\":\"2026-04-07T14:23:00Z\",\"payment_method\":\"cash\"},{\"id\":\"txn-002\",\"amount\":120.50,\"timestamp\":\"2026-04-07T14:45:00Z\",\"payment_method\":\"card\"}]", "trace_id": "550e8400-e29b-41d4-a716-446655440000"}'