Skip to content
Docs

Search the docs

    Română

    Backend and sync conventions

    The rules the app and its backend follow so that work done with no signal arrives once, in order.

    On this page

    The app and its backend follow a few rules, so that a job finished with no signal arrives once, in order, and with the answer the phone expects.

    The queue on the phone

    • A finished job is written to a queue on the phone before anything is sent, with signal or without, so one path serves both.
    • The queue sends the oldest item first and one item at a time.
    • An attempt that fails keeps its item at the front and adds one to its count of attempts. The next attempt waits for signal.

    The request

    Each item carries an operationId that the phone chooses when the job is finished. The same item is always sent with the same operationId.

    One finished delivery in the queue

    {
      "operationId": "8b3f0c52-7d4e-4a19-9e6a-2c1d5f7a9b30",
      "delivery": "LIV-2026-01842",
      "receivedBy": "Carmen Diaconu",
      "checks": [
        "counted",
        "packaging",
        "invoice-copy"
      ],
      "finishedAt": "2026-11-23T07:12:00Z"
    }

    The answer

    AnswerMeaningWhat the app does
    202The operation is stored. A repeat of the same operationId gets the first outcome again.The item leaves the queue and the job shows as sent.
    409The record changed since the phone read it.The item is not sent again. The job shows the reason and the next item goes on.
    422A field was refused, and the answer names it.The job opens on that field so the person can correct it, and the item waits for the correction.
    No answerThe signal dropped or the server did not reply.The item stays first in the queue and is sent again with the same operationId.

    Conflicts

    Two people may change the same record. For each field we agree with you, in the workshop, who wins: the latest change, the office or the person on site.