Preview and create delivery orders.
Opportunity
Smooth delivery operations are essential for customer satisfaction. The ability to preview a delivery order before it's created empowers businesses to confirm prices (including discounts and taxes), validate customer details, and ensure accurate addresses — all before the order is finalized. This leads to fewer errors, better transparency, and higher trust between your business and customers.
The endpoints covered below allow you to preview and create delivery orders in the IndicaOnline system, with detailed information about pricing, customer details, and delivery logistics.
Flow
Order Preview
To preview a delivery order, use the Preview delivery order endpoint:
https://api.indicaonline.com/open_api/v2.3/orders/delivery/preview
This endpoint lets you retrieve all relevant information about the order before confirming it, including customer details, pricing breakdown (with taxes, fees, and discounts), address validation and ability to modify item quantities or apply discounts.
Specify the required Body Parameters:
office_id: The ID of the office where the order is being processed.items: A list of items in the order, with detailed pricing and discount information.
Each Order Item requires the following fields:
product_id: The unique ID of the product.price: The price per gram based on the selected weight increment.quantity: The number of units ordered.charge_as: The selected charge measurement unit
You can also apply your own custom discounts:
Order Item Discount:
name: The name of the discount applied to the entire order.amount: The discount amount applied to the entire cart.method: The discount application method.
Cart Discount:
name: The name of the discount applied to the entire order.amount: The discount amount applied to the entire cart.method: The discount application method.
Add the required Delivery Info:
phone: Customer’s 10-digit phone number.address: The address the Customer wishes their order to be delivered to.
Should consist ofstate,city,street,zip,latitude,longitude
Optionally, you may add additional data about the order, such as:
note: Any order-related note.method: Delivery method (e.g., "doorstep", "curbside").
Once the request is submitted, you’ll receive a 200 response with a full breakdown of the order, including fees, taxes, applied discounts, and customer info.
{
"office_id": 1001,
"customer_id": 2002,
"items": [
{
"product_id": 3003,
"price": 25.00,
"quantity": "1",
"charge_as": "gram",
"discount": {
"name": "Holiday Special",
"amount": 5.00,
"method": "currency"
}
}
],
"cart_discount": {
"name": "VIP Cart Discount",
"amount": 2.00,
"method": "currency"
},
"note": "Leave at front door",
"method": "doorstep",
"phone": "1234567890",
"address": {
"state": "CA",
"city": "Los Angeles",
"street": "123 Main St Apt 4B",
"zip": "90001",
"latitude": "34.052235",
"longitude": "-118.243683"
}
}
Before the Preview Delivery Order endpoint is triggered, an order placed by your customer may look something like that:
After the Preview Delivery Order endpoint is triggered, the order data is updated:
Order Creation
To finalize a delivery order, use the Create delivery order endpoint:
https://api.indicaonline.com/open_api/v2.3/orders/delivery/create
This endpoint allows third parties to submit complete order details for delivery. Orders created via this endpoint are processed within IndicaOnline and appear in the Orders section of the Web interface.
Specify the required Body parameters:
office_id: The ID of the office where the order is being processed.customer_id: The ID of the customer placing the order.items: A list of items in the order, with detailed pricing and discount information.
Each Order Item requires the following fields:
product_id: The unique ID of the product.price: The price per gram based on the selected weight increment.quantity: The number of units ordered.charge_as: The selected charge measurement unit
You can also apply your own custom discounts:
Order Item Discount:
name: The name of the discount applied to the entire order.amount: The discount amount applied to the entire cart.method: The discount application method.
Cart Discount:
name: The name of the discount applied to the entire order.amount: The discount amount applied to the entire cart.method: The discount application method.
Add the required Delivery Info:
phone: Customer’s 10-digit phone number.address: The address the Customer wishes their order to be delivered to.
Should consist ofstate,city,street,zip,latitude,longitude
Optionally, you may add additional data about the order, such as:
note: Any order-related note.method: Delivery method (e.g., "doorstep", "curbside").
Once the order request is filled out with all required parameters, send the request to the endpoint to create the order, for example:
{
"office_id": 1001,
"customer_id": 2002,
"items": [
{
"product_id": 3003,
"price": 25.00,
"quantity": "1",
"charge_as": "gram",
"discount": {
"name": "Holiday Special",
"amount": 5.00,
"method": "currency"
}
}
],
"cart_discount": {
"name": "VIP Cart Discount",
"amount": 2.00,
"method": "currency"
},
"note": "Leave at front door",
"method": "doorstep",
"phone": "1234567890",
"address": {
"state": "CA",
"city": "Los Angeles",
"street": "123 Main St Apt 4B",
"zip": "90001",
"latitude": "34.052235",
"longitude": "-118.243683"
}
}
As a result, IndicaOnline will create an order and return a 201 response code, with the following response body:
{
"id": 5555,
"number": "ORD-DEL-2025",
"office_id": 1001,
"type": "delivery",
"source": "open_api",
"customer_id": 2002,
"items": [
{
"product_id": 3003,
"price": 25.00,
"quantity": "1",
"charge_as": "gram",
"discount": {
"type": "manual",
"name": "Holiday Special",
"amount": 5.00
}
}
],
"subtotal": 18.00,
"total": 22.50,
"order_status": "pending",
"payment_status": "unpaid",
"payment_methods": [],
"delivery": {
"method": "doorstep",
"shipment_status": "pending",
"phone": "1234567890",
"address": {
"state": "CA",
"city": "Los Angeles",
"street": "123 Main St Apt 4B",
"zip": "90001",
"latitude": "34.052235",
"longitude": "-118.243683"
},
"note": "Leave at front door"
},
"created_at": "2025-07-02 11:32:00"
}
As well, on IndicaOnline Web you will be able to see the created order under Inventory > Orders:

Updated 8 months ago
