Skip to main content
GET
/
api
/
v2
/
order
Retrieve Orders
curl --request GET \
  --url https://api.example.com/api/v2/order \
  --header 'Authorization: <authorization>'
{
  "id": 123,
  "order_ref_no": "<string>",
  "user_id": 123,
  "order_status": 123,
  "display_name": "<string>",
  "payment_method": 123,
  "total": 123,
  "sub_total": 123,
  "shipping_charge": 123,
  "discount": 123,
  "coupon_discount": 123,
  "cashback_used": 123,
  "tss_money_used": 123,
  "tss_points_used": 123,
  "gift_voucher_value": 123,
  "exclusive_discount": 123,
  "is_exclusive": 123,
  "courier_id": 123,
  "flag_id": 123,
  "created_at": {},
  "updated_at": {},
  "show_feedback": 123,
  "cart": "<string>",
  "products.items": [
    {}
  ],
  "products.items[].prod_id": 123,
  "products.items[].parent_prod_id": 123,
  "products.items[].product": "<string>",
  "products.items[].quantity": 123,
  "products.items[].price": 123,
  "products.items[].images": [
    {}
  ],
  "products.items[].size": "<string>",
  "products.items[].category": "<string>"
}

Overview

Retrieve all orders for the authenticated user, including order details, product information, and order status. The endpoint returns orders sorted by most recent first, excluding draft orders (status 0) and invalid orders (status 17).

Authentication

This endpoint requires user authentication via the auth_required decorator.
Authorization
string
required
Bearer token for authenticated user session

Response

Returns an array of order objects:
id
integer
Unique order ID
order_ref_no
string
Human-readable order reference number (e.g., “M123456”, “W789012”)
user_id
integer
ID of the user who placed the order
order_status
integer
Current order status ID. See Order Status Values
display_name
string
User-friendly status name (e.g., “Order Placed”, “Shipped”, “Delivered”)
payment_method
integer
Payment method used:
  • 0 - Prepaid/Online
  • 1 - Cash on Delivery (COD)
  • 3 - TSS Money
total
decimal
Order total amount in rupees
sub_total
decimal
Subtotal before discounts and charges
shipping_charge
decimal
Shipping charges applied
discount
decimal
Total discount applied
coupon_discount
decimal
Discount from coupon code
cashback_used
decimal
Cashback amount applied to order
tss_money_used
decimal
TSS Money (wallet) amount used
tss_points_used
decimal
TSS Points redeemed for discount
gift_voucher_value
decimal
Gift voucher amount applied
exclusive_discount
decimal
Exclusive membership discount amount
is_exclusive
integer
Whether order was placed by exclusive member (1 = yes, 0 = no)
courier_id
integer
Assigned courier partner ID
flag_id
integer
Priority flag ID for special handling
created_at
datetime
Timestamp when order was created
updated_at
datetime
Timestamp of last update
show_feedback
integer
Whether to show feedback form (1 = show, 0 = don’t show)
cart
string
JSON string containing cart data with products and address. See Cart Structure

Order Status Values

The order_status field can have the following values:
Status IDDisplay NameDescription
0DraftOrder not yet placed (excluded from results)
1Order PlacedOrder confirmed and placed
2ProcessingOrder being processed
3DeliveredOrder successfully delivered
4CancelledOrder cancelled
5On HoldOrder temporarily on hold
6PackedOrder packed and ready to ship
7ShippedOrder shipped
8Out for DeliveryOrder out for delivery
9Failed DeliveryDelivery attempt failed
15RTO (Return to Origin)Order returned to warehouse
17InvalidInvalid order (excluded from results)
28RTO In TransitReturn shipment in transit
29RTO DeliveredReturn shipment delivered to warehouse
30Return InitiatedCustomer return initiated
31Return Picked UpReturn pickup completed
32Return In TransitReturn shipment in transit
33Return ReceivedReturn received at warehouse
34Reverse Pickup TerminatedReturn pickup cancelled

Cart Structure

The cart field contains a JSON object with:
products.items
array
Array of product objects in the order
products.items[].prod_id
integer
Product variant ID
products.items[].parent_prod_id
integer
Parent product ID
products.items[].product
string
Product name
products.items[].quantity
integer
Quantity ordered
products.items[].price
decimal
Unit price
products.items[].images
array
Product image URLs
products.items[].size
string
Product size/variant
products.items[].category
string
Product category

Example Response

[
  {
    "id": 123456,
    "order_ref_no": "M123456",
    "user_id": 789,
    "order_status": 3,
    "display_name": "Delivered",
    "payment_method": 0,
    "total": 1299.00,
    "sub_total": 1499.00,
    "shipping_charge": 0.00,
    "discount": 200.00,
    "coupon_discount": 150.00,
    "cashback_used": 0.00,
    "tss_money_used": 50.00,
    "tss_points_used": 0.00,
    "gift_voucher_value": 0.00,
    "exclusive_discount": 0.00,
    "is_exclusive": 0,
    "courier_id": 5,
    "flag_id": 1,
    "created_at": "2024-03-15T10:30:00",
    "updated_at": "2024-03-20T14:45:00",
    "show_feedback": 1,
    "cart": "{\"products\":{\"items\":[{\"prod_id\":45678,\"parent_prod_id\":12345,\"product\":\"Graphic T-Shirt\",\"quantity\":1,\"price\":799.00,\"size\":\"M\",\"category\":\"Topwear\"}]}}"
  },
  {
    "id": 123455,
    "order_ref_no": "M123455",
    "user_id": 789,
    "order_status": 7,
    "display_name": "Shipped",
    "payment_method": 1,
    "total": 899.00,
    "sub_total": 899.00,
    "shipping_charge": 0.00,
    "discount": 0.00,
    "coupon_discount": 0.00,
    "cashback_used": 0.00,
    "tss_money_used": 0.00,
    "tss_points_used": 0.00,
    "gift_voucher_value": 0.00,
    "exclusive_discount": 100.00,
    "is_exclusive": 1,
    "courier_id": 3,
    "flag_id": 18,
    "created_at": "2024-03-18T15:20:00",
    "updated_at": "2024-03-19T09:30:00",
    "show_feedback": 0,
    "cart": "{\"products\":{\"items\":[{\"prod_id\":56789,\"parent_prod_id\":23456,\"product\":\"Polo T-Shirt\",\"quantity\":1,\"price\":899.00,\"size\":\"L\",\"category\":\"Topwear\"}]}}"
  }
]

Additional Endpoints

Get Order Details with Product Status

GET /api/v2/ordernew
GET /api/v3/order
Returns orders with detailed product-level status information.

Get Order Line Items

GET /api/v2/orderhasproducts/{orderId}
GET /api/v3/orderhasproducts/{orderId}
Retrieve detailed line items (has_products) for a specific order.

Get Orders with Date Filter

GET /api/v2/contact-us-orders
Retrieve orders with date range filtering for customer support.

Notes

  • Orders are returned in descending order by ID (most recent first)
  • Draft orders (status 0) and invalid orders (status 17) are automatically excluded
  • The show_feedback field indicates whether the order is eligible for feedback
  • Cart JSON is rebuilt from order data if not stored with the order
  • All monetary values are in INR (Indian Rupees)
  • Timestamps are in UTC format

Build docs developers (and LLMs) love