Skip to content

CLI ​

Python SDK

Installed with pip install "aiotic-sdk[cli]". Reads AIOTIC_* from the environment or .env.

CommandWhat it does
aiotic initWrite .env (with a generated receive-endpoint key) and service.py
aiotic doctorCheck base URL, keys, /healthcheck, /system-status, and that customers/products/mappings exist; exit 1 on problems
aiotic orders list [--size 20] [--page 1]Newest orders with status, PO number, customer, erp_ref
aiotic orders get <request_id>Full JSON of one order
aiotic orders upload <files…> [--request-id] [--no-wait]Upload one order (all files = one order) and wait for it to land
aiotic orders send <request_id>POST /erp/send; prints the ERP reference or the ERP's error
aiotic orders watch [--interval 15] [--state watch.db]Print status transitions as JSON lines
aiotic sync customers|products|mappings --from file.csv|.json [--dry-run] [--force] [--concurrency 4]Upsert from a file; only changed records are sent
aiotic sync reconcile [--customers a.csv] [--products b.csv] [--mappings c.csv] [--no-delete-missing] [--allow-empty]Diff-based safety net; an empty file deletes nothing unless --allow-empty is given
aiotic sync bootstrap-stateSeed fingerprints from what AIOTIC already holds
aiotic serve [--port 9000] [--reload]Run service.py (or the built-in demo service)
aiotic mock [--port 8080] [--erp-url … --erp-key …] [--processing-speed 3]Run a mock AIOTIC tenant
aiotic versionSDK version

CSV columns follow the API field names (number,name,address,postal_code,city,vat_number,email,phone_number,contact_person,coc_number,home_page; item_number,language_code,description,remark; customer_number,customer_item_number,item_number,language_code). Comma or semicolon separated, UTF-8 with or without a byte order mark. Files are validated before anything is sent: a header row without duplicate names, the required columns per kind, the same number of fields in every row, correct quoting (an unterminated quote is an error, not a repair), and for JSON a list of records or {"items": [...]} without duplicate keys; anything else is a usage error (exit code 2), never an empty or reshaped data set.

Exit codes ​

0 success · 1 a check or a sync record failed, or a reconcile refused an empty data set · 2 configuration missing or an invalid input file.

Automation examples ​

bash
# nightly reconciliation from ERP exports (cron)
0 2 * * * cd /srv/aiotic && ./export.sh && aiotic sync reconcile --customers out/customers.csv --products out/products.csv --mappings out/mappings.csv >> sync.log 2>&1

# readiness check in a deployment pipeline
aiotic doctor || exit 1

Revision 28-051026-58cfad3 · API v1.0.0 · AIOTIC is a product of DevOps Company.