Integrations & connections

Many teams start with file import. When you are ready to connect a POS, ERP, or internal tool, owners and administrators use Settings → Integrations to create keys and webhook endpoints your partners can call.

In the app (for administrators)

You need owner or admin access to these screens. If you do not see them, ask someone who manages your Mihwar organization.

  1. Open Integrations

  2. Create an API key (if needed)

    Generate a key for your IT partner to use with automated feeds. Copy it once and store it in a secure place—Mihwar may not show the full secret again.
  3. Rotate or revoke

    If a key is exposed, revoke it here and create a new one. Share the new key only through secure channels.
  4. Webhooks (optional)

    If your system should be notified when orders change status, add the HTTPS URL your team provides and follow any verification steps shown in the product. Your IT partner sets up the receiver on the other side.

For your IT team or integration partner

Technical specifications are not required for day-to-day ordering. Share the link below with someone who implements APIs for your organization.

Order-lines ingestion (API key)

POST /api/integrations/v1/ingestion/order-lines inserts historical quantities for existing SKUs. Each request creates an ImportBatch (response includes importBatchId) so ML date expansion matches UI imports. Optional body field externalSourceId is stored on the batch for ERP correlation.

Idempotency: send header Idempotency-Key on retries so the same payload is not applied twice. The server caches the first successful response per org + key.

ERP alignment (Odoo-oriented draft)

Demand definition: use confirmed customer orders or consumption moves that match how you already import into Mihwar (ordered qty + calendar date). Push-first: Odoo (or middleware) calls Mihwar when batches close; map SKUs to InventoryItem.sku, pass orderDate as the period anchor (day/week/month consistent with periodKind). Idempotency: derive Idempotency-Key from Odoo export id + batch window so replays are safe.