Getting Started
Storefront APIs
Platform Essentials
Retrieve all orders
list customers all orders
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"orders": [
{
"order_number": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"status": "draft",
"payment_status": "pending",
"payment_success_date": "2023-11-07T05:31:56Z",
"has_refund": true,
"on_subscription": true,
"grand_total": 123,
"loyalty_point_redeemed": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"order_items_count": 123,
"order_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"on_offer": true,
"on_promotion": true,
"on_subscription": true,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"free_quantity": 123,
"is_free_item": true,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"customer_note": "<string>",
"loyalty_point_earned": 123,
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total_records": 252,
"total_pages": 26,
"previous_page": null,
"next_page": 2,
"limit": 10
}
}
}
Authorizations
Access token
Query Parameters
page number of pagination list
x >= 1
no of rows per page
x >= 1
JSON string format: {"field1":"asc", "field2":"desc"}
"{\"country\":\"asc\",\"city\":\"asc\",\"population\":\"desc\"}"
array of string
user id
Response
order list model
Unique number associated with the order.
Date and time when the order was placed.
Current status of the order (e.g., "pending," "processing," "shipped," etc.).
draft
, awaiting_approval
, confirmed
, partially_scheduled
, awaiting_shipment
, shipped
, partially_shipped
, undelivered
, partially_undelivered
, return_to_origin
, partially_return_to_origin
, complete
, partially_delivered
, cancelled
Current payment status of the order (e.g., "pending," "success," "failed").
pending
, success
, failed
, partially_paid
Date and time when the payment for the order was successfully processed.
Indicates whether the order has a refund associated with it or not.
Indicates whether the order includes subscription items.
Total amount for the order, including all items, taxes, and discounts.
Number of loyalty points redeemed in the order.
Amount of credit balance used in the order.
Amount remaining to be paid for the order.
Total count of items included in the order.
"GST"
"GST"
pagination metadata structure
{
"total_records": 252,
"total_pages": 26,
"previous_page": null,
"next_page": 2,
"limit": 10
}
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/orders \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"orders": [
{
"order_number": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"status": "draft",
"payment_status": "pending",
"payment_success_date": "2023-11-07T05:31:56Z",
"has_refund": true,
"on_subscription": true,
"grand_total": 123,
"loyalty_point_redeemed": 123,
"credit_balance_used": 123,
"to_be_paid": 123,
"order_items_count": 123,
"order_items": [
{
"product_id": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"sku": "<string>",
"on_offer": true,
"on_promotion": true,
"on_subscription": true,
"subscription_plan": "<string>",
"subscription_interval": 123,
"subscription_frequency": "<string>",
"quantity": 123,
"free_quantity": 123,
"is_free_item": true,
"selling_price": 123,
"listing_price": 123,
"promotion_discount_amount": 123,
"coupon_discount_amount": 123,
"tax_type": "GST",
"tax_rate": 123,
"tax_amount": 123,
"shipping_additional_cost": 123
}
],
"customer_note": "<string>",
"loyalty_point_earned": 123,
"currency": {
"name": "<string>",
"code": "<string>",
"symbol": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"total_records": 252,
"total_pages": 26,
"previous_page": null,
"next_page": 2,
"limit": 10
}
}
}