> ## Documentation Index
> Fetch the complete documentation index at: https://docs.satyakod.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Online and offline checking

> Choose, per batch, whether codes are checked by Satyakod, by your own systems without internet, or both.

Every batch says where its codes are checked. You choose it in **New batch → Where codes are
checked**, and it decides which codes the batch can print.

| Mode | Checked by | Can print | Gives up |
| - | - | - | - |
| **Online** | Satyakod, when the code is scanned | GS1 DataMatrix, GS1 QR (Digital Link), Private Code | Nothing; needs internet at scan time |
| **Offline** | Your own scanners and systems, without internet | Code 128, DataMatrix or QR with the serial only; GS1 DataMatrix | The consumer verdict page, clone and region alerts, scan history, loyalty and warranty (unless you upload scans later) |
| **Online and offline** | Your systems in the plant or warehouse, Satyakod everywhere else | GS1 DataMatrix, GS1 QR, or the serial-only codes | Nothing |

> [!NOTE]
>
> Private Codes are always checked online: only Satyakod's servers read them, so no other scanner can.

## Choosing a mode

* **Consumer-facing products**: *Online*. Phones open the verdict page, and every scan feeds
  clone detection, alerts and the monthly report.
* **Parts tracked through your own plant, warehouse or service network**: *Offline* with a
  serial-only Code 128 or DataMatrix. Your line scanners read the serial, your MES or ERP checks it,
  and nothing depends on a connection. See [Factory and warehouse scanners](https://docs.satyakod.com/integrations/factory-scanners.md).
* **Both at once**: *Online and offline*. For example a GS1 DataMatrix your warehouse reads offline
  at receiving, which consumers and partners verify online.

## How offline checking works

A serial carries its batch number, its index in the batch and a 4-byte signature
([format](https://docs.satyakod.com/concepts/serial-numbers.md)). For offline batches, an admin downloads the batch's
**verification key** and loads it into your system, which can then check any serial of that batch
with a few lines of code. See [Offline verification](https://docs.satyakod.com/integrations/offline-verification.md).

Scans made offline can be uploaded later with [`POST /v1/verify/offline`](https://docs.satyakod.com/api-reference/verify-offline).
Satyakod checks each as of the moment it was made, so clone detection, alerts and scan history
catch up.

## Signed codes

Any batch printed as GS1 QR, QR or DataMatrix can also have **signed codes** (New batch → Code
symbology → *Signed codes*). Each code then holds a link with an Ed25519 signature
(`?sig=<fingerprint>.<signature>`) made with your workspace's code-signing key. The public half of
that key is published, so anyone can check a signed code with no connection and no secret: the
Satyakod app keeps the public keys and gives a verdict offline, marked *checked offline*, which is
confirmed with Satyakod once the phone is back online.

* **Use it when** people check products where there's no signal (rural retail, basements,
  warehouses) and you don't want to hand verification keys to their devices.
* **What it proves**: the code was issued by you. Like any offline check, it can't see copies of a
  genuine code; Satyakod's clone detection does that once the scan is uploaded.
* **Trade-off**: the code carries about 100 more characters, so it prints a little larger.

To check one in your own software, fetch the keys from `https://<your verify domain>/v/signed-keys`
and verify the signature over `satyakod-signed-code-v1|<fingerprint>|<serial>` with the key whose
`fingerprint` matches.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.