Order import (ERP)
Admin and TenantAdmin can submit orders from an ERP system. The feature exists only in the API, not in the field app.
| Method | Path | Roles | Description |
|---|---|---|---|
POST | /api/erp/import-pull | Admin, TenantAdmin | Pulls pending orders from the tenant's configured ERP connector and returns a summary (created, updated, rejected duplicates). |
POST | /api/erp/orders | Admin, TenantAdmin | Receives an order from ERP as JSON. 201 = new order, 200 = existing ERP order updated, 409 = the order number already exists as a manually created order. |
POST | /api/erp/orders/import-file | Admin, TenantAdmin | Imports orders from a comma-separated (CSV) file. The whole file is rejected with 400 if any row is malformed. |