Skip to Content
FeaturesOrders

Orders

Overview

The Orders feature manages the complete order lifecycle — from the moment a customer places an order through fulfillment, shipping, and delivery. It also handles cancellations, returns, refunds, and draft orders. Vendors can fulfill orders in full or split them into partial shipments, track packages, generate PDF invoices, and recover revenue from abandoned checkouts.

How It Works

Order Statuses

StatusDescription
UnfulfilledOrder placed, items not yet shipped
Partially FulfilledSome items shipped, others pending
FulfilledAll items shipped
CancelledOrder cancelled by vendor
ReturnedCustomer initiated a return
ArchivedOrder archived for record-keeping

Draft Orders

Draft orders let vendors create orders manually on behalf of customers — useful for phone orders, custom quotes, or B2B transactions. A draft order can be converted to a real order once payment is collected.

Abandoned Checkout Recovery

When a customer adds items to their cart but does not complete checkout, Siyahfy tracks this as an abandoned checkout. Vendors can configure automated email or WhatsApp recovery messages to bring customers back.

Key API Endpoints

Order Management

POST/api/createOrderAuth Required

Create a new order from the admin panel (manual order creation)

POST/api/getOrdersAuth Required

Get paginated list of orders with filters (status, date range, search)

GET/api/getOrderByVendor/:oid/:storeAuth Required

Get full details of a single order

PUT/api/updateorder/:order_idAuth Required

Update order details (notes, tags, customer info)

POST/api/edit-orderAuth Required

Edit order items, quantities, and pricing after order is placed

POST/api/orders/duplicateAuth Required

Duplicate an existing order as a new draft

POST/api/orders/archiveAuth Required

Archive one or more orders

DELETE/api/delete-ordersAuth Required

Permanently delete orders

Fulfillment

POST/api/fulfillOrderAuth Required

Fulfill order items and optionally send tracking notification to customer

POST/api/SplitFulfillmentAuth Required

Split an order into multiple shipments for partial fulfillment

POST/api/holdFulfillmentAuth Required

Place a fulfillment hold on an order

POST/api/releaseHoldAuth Required

Release a fulfillment hold

GET/api/getFulfillorderAuth Required

Get fulfillment details for an order

POST/api/fulfillordersCountAuth Required

Get count of orders by fulfillment status

POST/api/cancelFulfillmentAuth Required

Cancel a fulfillment and optionally restock items

POST/api/save-trackingAuth Required

Save tracking number and carrier info for a fulfilled order

Cancellation, Returns & Refunds

POST/api/orders/cancelAuth Required

Cancel an order with options to restock inventory and notify customer

POST/api/returnAuth Required

Process a return with return items, exchange items, and shipping label

POST/api/closereturnAuth Required

Close a return and set its final status (approved/declined)

POST/api/returnlabelAuth Required

Upload a return shipping label for a return request

GET/api/getFulfilledOrders/:oid/:storeAuth Required

Get fulfilled items for a specific order (used in return flow)

POST/api/saveRefundAuth Required

Process and save a refund for an order

Payments & Invoices

POST/api/collect-paymentAuth Required

Record a payment collection against an order

POST/api/invoice/download/:order_idAuth Required

Generate and download a PDF invoice for an order

POST/api/update-manual-order-statusAuth Required

Manually update order status (e.g., mark as delivered)

Draft Orders

POST/api/getdraftordersAuth Required

List all draft orders for a store

POST/api/manageDraftOrderAuth Required

Create or update a draft order

GET/api/draftOrder/:draft_id/:store

Get details of a specific draft order

DELETE/api/draft_order_deleteAuth Required

Delete a draft order

Abandoned Checkouts

GET/api/allabandoncheckouts/:storeAuth Required

List all abandoned checkouts for a store

POST/api/abandoned-checkout-settingsAuth Required

Configure abandoned checkout recovery settings (timing, templates)

POST/api/send-abandon-messagesAuth Required

Send recovery emails or WhatsApp messages for abandoned checkouts

Database Tables

TablePurpose
ordersMain order data — items, customer, totals, status, fulfillment, cancel/return details
draft_ordersDraft orders before conversion to real orders
abandon_checkoutsAbandoned checkout sessions with cart data and customer info
product_inventoryUpdated during fulfillment, cancellation, and returns for stock changes
inventory_itemsNew inventory system updated during order events
  • Products — Products referenced in order line items
  • Customers — Customer data attached to orders
  • Payments — Payment processing for order transactions
  • Shipping — Shipping rates and carrier tracking
  • Analytics — Order statistics and revenue reporting