Order History
This API is offering to get list of Orders placed by respective Customer.
GET
{{Base_url}}/rest/V1/orders?searchCriteria[filterGroups][][filters][][field]=customer_email&searchCriteria[filterGroups][0][filters][0][value]=qa@zrpl.co.in&searchCriteria[pageSize]=1&searchCriteria[currentPage]=1
Endpoint URL
{{Base_url}}/rest/V1/orders
This is the base endpoint for retrieving orders in Magento. It allows filtering and pagination via the searchCriteria
query parameters.
Query Parameters
searchCriteria[filterGroups][][filters][][field]=customer_email
Specifies that the filtering will be based on the
customer_email
field in the orders database.This means the search is looking for orders associated with a specific customer email.
searchCriteria[filterGroups][0][filters][0][value]=qa@zrpl.co.in
Provides the value for the
customer_email
filter.In this case, it is looking for orders linked to the email
qa@zrpl.co.in
.
searchCriteria[pageSize]=1
Sets the number of results to be displayed per page.
Here, only 2 orders will be retrieved per page.
searchCriteria[currentPage]=1
Specifies the current page of results to retrieve.
Here, it retrieves the first page of results.
curl --location --globoff '{{Base_url}}/rest/V1/orders?searchCriteria[filterGroups][][filters][][field]=customer_email&searchCriteria[filterGroups][0][filters][0][value]=qa%40zrpl.co.in&searchCriteria[pageSize]=1&searchCriteria[currentPage]=1' \
--header 'Authorization: Bearer eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjU1LCJ1dHlwaWQiOjIsImlhdCI6MTczNzcyMDg3NiwiZXhwIjoxNzM3NzI0NDc2fQ.Bu80d5d39qw91uBqf4r9X1TU9upa7x-eSNl8ENslm_E' \
--header 'Cookie: PHPSESSID=6t4unirh1unu87ef0stp2sv3kv; private_content_version=5ab80b7def0c212f723edead3c971a19'
Response
{
"items": [
{
"applied_rule_ids": "101",
"base_currency_code": "INR",
"base_discount_amount": -76,
"base_grand_total": 3876,
"base_discount_tax_compensation_amount": 0,
"base_shipping_amount": 0,
"base_shipping_discount_amount": 0,
"base_shipping_discount_tax_compensation_amnt": 0,
"base_shipping_incl_tax": 0,
"base_shipping_tax_amount": 0,
"base_subtotal": 3800,
"base_subtotal_incl_tax": 3800,
"base_tax_amount": 0,
"base_total_due": 3876,
"base_to_global_rate": 1,
"base_to_order_rate": 1,
"billing_address_id": 350158,
"coupon_code": "DISCOUNT2UPI",
"created_at": "2024-03-06 07:49:05",
"customer_email": "qa@zrpl.co.in",
"customer_firstname": "qa",
"customer_group_id": 1,
"customer_is_guest": 0,
"customer_lastname": "qa",
"customer_note_notify": 1,
"discount_amount": -76,
"discount_description": "UPI 2%",
"entity_id": 178786,
"global_currency_code": "INR",
"grand_total": 3876,
"discount_tax_compensation_amount": 0,
"increment_id": "14000001973",
"is_virtual": 0,
"order_currency_code": "INR",
"protect_code": "5734e86159040e611731aae4144e3a3b",
"quote_id": 555332,
"remote_ip": "10.1.0.163",
"shipping_amount": 0,
"shipping_description": "Included in Price - Free",
"shipping_discount_amount": 0,
"shipping_discount_tax_compensation_amount": 0,
"shipping_incl_tax": 0,
"shipping_tax_amount": 0,
"state": "canceled",
"status": "canceled",
"store_currency_code": "INR",
"store_id": 14,
"store_name": "ZEPP SPP\nZEPP-SPP\nZEPP Store view",
"store_to_base_rate": 0,
"store_to_order_rate": 0,
"subtotal": 3800,
"subtotal_incl_tax": 3800,
"tax_amount": 0,
"total_due": 3876,
"total_item_count": 1,
"total_qty_ordered": 1,
"updated_at": "2024-03-06 07:59:30",
"weight": 0,
"x_forwarded_for": "122.166.57.220",
"items": [
{
"amount_refunded": 0,
"applied_rule_ids": "101",
"base_amount_refunded": 0,
"base_discount_amount": 76,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 7999,
"base_price": 3800,
"base_price_incl_tax": 3800,
"base_row_invoiced": 0,
"base_row_total": 3724,
"base_row_total_incl_tax": 3724,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2024-03-06 07:49:05",
"discount_amount": 76,
"discount_invoiced": 0,
"discount_percent": 2,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 180027,
"name": "JBL Tune 230NC TWS Active Noise Cancellation Earbuds with Mic",
"no_discount": 0,
"order_id": 178786,
"original_price": 7999,
"price": 3800,
"price_incl_tax": 3800,
"product_id": 3866,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 80405,
"row_invoiced": 0,
"row_total": 3724,
"row_total_incl_tax": 3724,
"row_weight": 0,
"sku": "JBLTUNE230NCTWS",
"store_id": 14,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2024-03-06 07:49:05",
"extension_attributes": {
"itemized_taxes": []
}
}
],
"billing_address": {
"address_type": "billing",
"city": "hyderabad",
"country_id": "IN",
"customer_address_id": 13874,
"email": "qa@zrpl.co.in",
"entity_id": 350158,
"firstname": "qa",
"lastname": "qa",
"parent_id": 178786,
"postcode": "500084",
"region": "Telangana",
"region_code": "TG",
"region_id": 564,
"street": [
"Hyderabad"
],
"telephone": "1234567890"
},
"payment": {
"account_status": null,
"additional_information": [
"Cashfree"
],
"amount_authorized": 3876,
"amount_ordered": 3876,
"base_amount_authorized": 3876,
"base_amount_ordered": 3876,
"base_shipping_amount": 0,
"cc_exp_year": "0",
"cc_last4": null,
"cc_ss_start_month": "0",
"cc_ss_start_year": "0",
"entity_id": 178721,
"method": "cashfree",
"parent_id": 178786,
"shipping_amount": 0
},
"status_histories": [
{
"comment": "Authorized amount of ₹3,876.00.",
"created_at": "2024-03-06 07:49:05",
"entity_id": 375946,
"entity_name": "order",
"is_customer_notified": null,
"is_visible_on_front": 0,
"parent_id": 178786,
"status": "processing"
}
],
"extension_attributes": {
"shipping_assignments": [
{
"shipping": {
"address": {
"address_type": "shipping",
"city": "hyderabad",
"country_id": "IN",
"customer_address_id": 13874,
"email": "qa@zrpl.co.in",
"entity_id": 350157,
"firstname": "qa",
"lastname": "qa",
"parent_id": 178786,
"postcode": "500084",
"region": "Telangana",
"region_code": "TG",
"region_id": 564,
"street": [
"Hyderabad"
],
"telephone": "1234567890"
},
"method": "flatrate_flatrate",
"total": {
"base_shipping_amount": 0,
"base_shipping_discount_amount": 0,
"base_shipping_discount_tax_compensation_amnt": 0,
"base_shipping_incl_tax": 0,
"base_shipping_tax_amount": 0,
"shipping_amount": 0,
"shipping_discount_amount": 0,
"shipping_discount_tax_compensation_amount": 0,
"shipping_incl_tax": 0,
"shipping_tax_amount": 0
}
},
"items": [
{
"amount_refunded": 0,
"applied_rule_ids": "101",
"base_amount_refunded": 0,
"base_discount_amount": 76,
"base_discount_invoiced": 0,
"base_discount_tax_compensation_amount": 0,
"base_original_price": 7999,
"base_price": 3800,
"base_price_incl_tax": 3800,
"base_row_invoiced": 0,
"base_row_total": 3724,
"base_row_total_incl_tax": 3724,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"created_at": "2024-03-06 07:49:05",
"discount_amount": 76,
"discount_invoiced": 0,
"discount_percent": 2,
"free_shipping": 0,
"discount_tax_compensation_amount": 0,
"is_qty_decimal": 0,
"is_virtual": 0,
"item_id": 180027,
"name": "JBL Tune 230NC TWS Active Noise Cancellation Earbuds with Mic",
"no_discount": 0,
"order_id": 178786,
"original_price": 7999,
"price": 3800,
"price_incl_tax": 3800,
"product_id": 3866,
"product_type": "simple",
"qty_canceled": 0,
"qty_invoiced": 0,
"qty_ordered": 1,
"qty_refunded": 0,
"qty_shipped": 0,
"quote_item_id": 80405,
"row_invoiced": 0,
"row_total": 3724,
"row_total_incl_tax": 3724,
"row_weight": 0,
"sku": "JBLTUNE230NCTWS",
"store_id": 14,
"tax_amount": 0,
"tax_invoiced": 0,
"tax_percent": 0,
"updated_at": "2024-03-06 07:49:05",
"extension_attributes": {
"itemized_taxes": []
}
}
]
}
],
"payment_additional_info": [
{
"key": "method_title",
"value": "Cashfree"
}
],
"applied_taxes": [],
"item_applied_taxes": [],
"converting_from_quote": false,
"taxes": [],
"additional_itemized_taxes": [],
"mw_earn_points_data": "{\"1\":37.24}"
}
}
],
"search_criteria": {
"filter_groups": [
{
"filters": [
{
"field": "customer_email",
"value": "qa@zrpl.co.in",
"condition_type": "eq"
}
]
}
],
"page_size": 1,
"current_page": 1
},
"total_count": 885
}
Root Level
items
A list of orders retrieved based on the search criteria.
search_criteria
Defines the filters and parameters used to search for orders.
total_count
The total number of orders matching the search criteria.
Inside items
(Order-Level Attributes)
items
(Order-Level Attributes)applied_rule_ids
IDs of promotion rules applied to the order.
base_currency_code
Base currency for the order (
INR
= Indian Rupee).
base_discount_amount
Discount applied to the order in base currency. (Negative value indicates a discount.)
base_grand_total
Final order total in base currency, including all discounts and taxes.
base_discount_tax_compensation_amount
Compensation for taxes adjusted due to discounts, in base currency.
base_shipping_amount
Shipping charges for the order in base currency.
base_shipping_discount_amount
Discount applied to shipping, in base currency.
base_shipping_incl_tax
Total shipping cost inclusive of taxes in base currency.
base_tax_amount
Total tax applied to the order in base currency.
base_subtotal
Subtotal of the order (product prices without tax or discounts) in base currency.
base_subtotal_incl_tax
Subtotal of the order, inclusive of taxes, in base currency.
base_total_due
Remaining amount to be paid for the order in base currency.
base_to_global_rate
/base_to_order_rate
Conversion rates between the base, global, and order currency.
billing_address_id
ID of the billing address associated with the order.
coupon_code
Applied coupon code for the order.
created_at
/updated_at
Order creation and last updated timestamps.
customer_email
/customer_firstname
/customer_lastname
Customer’s email and name.
customer_group_id
ID representing the group to which the customer belongs (e.g., retail, wholesale).
customer_is_guest
Indicates if the order was placed by a guest (0 = registered, 1 = guest).
discount_amount
Total discount applied to the order (same as
base_discount_amount
, in order currency).
discount_description
Description of the discount applied (e.g., "UPI 2%").
entity_id
Unique identifier for the order.
global_currency_code
/order_currency_code
/store_currency_code
Currency codes for global, order, and store contexts.
grand_total
Final total amount for the order in order currency.
increment_id
Order number, often used for display purposes.
is_virtual
Indicates if the order contains virtual products only (1 = yes, 0 = no).
quote_id
Associated shopping cart ID for the order.
remote_ip
IP address from which the order was placed.
shipping_description
Description of the shipping method used.
state
/status
Current state and status of the order (e.g.,
canceled
,processing
).
subtotal
/subtotal_incl_tax
Subtotal amount (excluding and including tax) in order currency.
tax_amount
Total tax applied to the order in order currency.
total_due
Outstanding amount in order currency.
total_item_count
Number of unique items in the order.
total_qty_ordered
Total quantity of all products in the order.
weight
Combined weight of all products in the order.
x_forwarded_for
Proxy IP address if the order was placed via a proxy server.
Nested Levels
Inside items -> items
(Order Items)
amount_refunded
Amount refunded for the item.
base_price
/price
Unit price of the item in base currency and order currency.
base_row_total
/row_total
Total price for the item (unit price × quantity) in base and order currency.
discount_percent
Percentage discount applied to the item.
name
Name of the product.
product_id
/sku
Product ID and SKU.
qty_ordered
Quantity of the item ordered.
original_price
Original price of the product before any discounts.
tax_percent
/tax_amount
Tax percentage and tax amount applied to the item.
Inside items -> billing_address
address_type
Type of address (e.g.,
billing
).
city
/postcode
/region
Billing address city, postal code, and region.
street
Street address (as a list for multi-line addresses).
telephone
Customer’s phone number.
Inside items -> payment
method
Payment method used (e.g.,
cashfree
).
amount_authorized
/amount_ordered
Authorized and total order amounts.
additional_information
Additional data related to the payment method (e.g.,
"Cashfree"
).
Inside items -> status_histories
status
Historical statuses of the order (e.g.,
processing
).
comment
Comments or notes on the status update.
Inside items -> extension_attributes
shipping_assignments
Details about shipping, including the shipping address and method.
payment_additional_info
Additional information about payment (e.g.,
"method_title": "Cashfree"
).
mw_earn_points_data
Earned points data in loyalty programs.
Last updated