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_emailSpecifies that the filtering will be based on the
customer_emailfield 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.inProvides the value for the
customer_emailfilter.In this case, it is looking for orders linked to the email
qa@zrpl.co.in.
searchCriteria[pageSize]=1Sets the number of results to be displayed per page.
Here, only 2 orders will be retrieved per page.
searchCriteria[currentPage]=1Specifies 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
}
{
"message": "The consumer isn't authorized to access %resources.",
"parameters": {
"resources": "Magento_Sales::actions_view"
}
}Root Level
itemsA list of orders retrieved based on the search criteria.
search_criteriaDefines the filters and parameters used to search for orders.
total_countThe total number of orders matching the search criteria.
Inside items (Order-Level Attributes)
items (Order-Level Attributes)applied_rule_idsIDs of promotion rules applied to the order.
base_currency_codeBase currency for the order (
INR= Indian Rupee).
base_discount_amountDiscount applied to the order in base currency. (Negative value indicates a discount.)
base_grand_totalFinal order total in base currency, including all discounts and taxes.
base_discount_tax_compensation_amountCompensation for taxes adjusted due to discounts, in base currency.
base_shipping_amountShipping charges for the order in base currency.
base_shipping_discount_amountDiscount applied to shipping, in base currency.
base_shipping_incl_taxTotal shipping cost inclusive of taxes in base currency.
base_tax_amountTotal tax applied to the order in base currency.
base_subtotalSubtotal of the order (product prices without tax or discounts) in base currency.
base_subtotal_incl_taxSubtotal of the order, inclusive of taxes, in base currency.
base_total_dueRemaining amount to be paid for the order in base currency.
base_to_global_rate/base_to_order_rateConversion rates between the base, global, and order currency.
billing_address_idID of the billing address associated with the order.
coupon_codeApplied coupon code for the order.
created_at/updated_atOrder creation and last updated timestamps.
customer_email/customer_firstname/customer_lastnameCustomer’s email and name.
customer_group_idID representing the group to which the customer belongs (e.g., retail, wholesale).
customer_is_guestIndicates if the order was placed by a guest (0 = registered, 1 = guest).
discount_amountTotal discount applied to the order (same as
base_discount_amount, in order currency).
discount_descriptionDescription of the discount applied (e.g., "UPI 2%").
entity_idUnique identifier for the order.
global_currency_code/order_currency_code/store_currency_codeCurrency codes for global, order, and store contexts.
grand_totalFinal total amount for the order in order currency.
increment_idOrder number, often used for display purposes.
is_virtualIndicates if the order contains virtual products only (1 = yes, 0 = no).
quote_idAssociated shopping cart ID for the order.
remote_ipIP address from which the order was placed.
shipping_descriptionDescription of the shipping method used.
state/statusCurrent state and status of the order (e.g.,
canceled,processing).
subtotal/subtotal_incl_taxSubtotal amount (excluding and including tax) in order currency.
tax_amountTotal tax applied to the order in order currency.
total_dueOutstanding amount in order currency.
total_item_countNumber of unique items in the order.
total_qty_orderedTotal quantity of all products in the order.
weightCombined weight of all products in the order.
x_forwarded_forProxy IP address if the order was placed via a proxy server.
Nested Levels
Inside items -> items (Order Items)
amount_refundedAmount refunded for the item.
base_price/priceUnit price of the item in base currency and order currency.
base_row_total/row_totalTotal price for the item (unit price × quantity) in base and order currency.
discount_percentPercentage discount applied to the item.
nameName of the product.
product_id/skuProduct ID and SKU.
qty_orderedQuantity of the item ordered.
original_priceOriginal price of the product before any discounts.
tax_percent/tax_amountTax percentage and tax amount applied to the item.
Inside items -> billing_address
address_typeType of address (e.g.,
billing).
city/postcode/regionBilling address city, postal code, and region.
streetStreet address (as a list for multi-line addresses).
telephoneCustomer’s phone number.
Inside items -> payment
methodPayment method used (e.g.,
cashfree).
amount_authorized/amount_orderedAuthorized and total order amounts.
additional_informationAdditional data related to the payment method (e.g.,
"Cashfree").
Inside items -> status_histories
statusHistorical statuses of the order (e.g.,
processing).
commentComments or notes on the status update.
Inside items -> extension_attributes
shipping_assignmentsDetails about shipping, including the shipping address and method.
payment_additional_infoAdditional information about payment (e.g.,
"method_title": "Cashfree").
mw_earn_points_dataEarned points data in loyalty programs.
Last updated