Skip to main content
All order endpoints require authentication.

Create or update order

POST /pos-api/v1/orders/create
Creates a new order or updates an existing one. Order creation is idempotent — sending the same pos_reference returns the existing order.

Key fields

The pos_reference field is the idempotency key. Duplicate submissions with the same reference are safe and return the existing order.

Reserve NCF

POST /pos-api/v1/orders/reserve-ncf
Reserves a fiscal number (NCF) for the order. Required for Dominican tax compliance before finalizing.

Hub batch sync

POST /pos-api/v1/hub/batch-sync
Used by the sync hub to forward completed orders upstream to Odoo. Accepts an array of order snapshots.

Hub order finalization

POST /pos-api/v1/hub/finalize
Called by the sync hub when a terminal completes payment. Receives a full order snapshot (lines, totals, payment lines) and runs the complete Odoo fiscal pipeline (create_from_ui) inside a database savepoint.

Behaviors

Response

Audit

Each hub finalization is logged as a hub_finalize event in the nu_restaurant_pos.order_audit model.