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

  1. 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.

  2. 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.

  3. searchCriteria[pageSize]=1

    • Sets the number of results to be displayed per page.

    • Here, only 2 orders will be retrieved per page.

  4. searchCriteria[currentPage]=1

    • Specifies the current page of results to retrieve.

    • Here, it retrieves the first page of results.

Response

Root Level

  1. items

    • A list of orders retrieved based on the search criteria.

  2. search_criteria

    • Defines the filters and parameters used to search for orders.

  3. total_count

    • The total number of orders matching the search criteria.


Inside items (Order-Level Attributes)

  1. applied_rule_ids

    • IDs of promotion rules applied to the order.

  2. base_currency_code

    • Base currency for the order (INR = Indian Rupee).

  3. base_discount_amount

    • Discount applied to the order in base currency. (Negative value indicates a discount.)

  4. base_grand_total

    • Final order total in base currency, including all discounts and taxes.

  5. base_discount_tax_compensation_amount

    • Compensation for taxes adjusted due to discounts, in base currency.

  6. base_shipping_amount

    • Shipping charges for the order in base currency.

  7. base_shipping_discount_amount

    • Discount applied to shipping, in base currency.

  8. base_shipping_incl_tax

    • Total shipping cost inclusive of taxes in base currency.

  9. base_tax_amount

    • Total tax applied to the order in base currency.

  10. base_subtotal

    • Subtotal of the order (product prices without tax or discounts) in base currency.

  11. base_subtotal_incl_tax

    • Subtotal of the order, inclusive of taxes, in base currency.

  12. base_total_due

    • Remaining amount to be paid for the order in base currency.

  13. base_to_global_rate / base_to_order_rate

    • Conversion rates between the base, global, and order currency.

  14. billing_address_id

    • ID of the billing address associated with the order.

  15. coupon_code

    • Applied coupon code for the order.

  16. created_at / updated_at

    • Order creation and last updated timestamps.

  17. customer_email / customer_firstname / customer_lastname

    • Customer’s email and name.

  18. customer_group_id

    • ID representing the group to which the customer belongs (e.g., retail, wholesale).

  19. customer_is_guest

    • Indicates if the order was placed by a guest (0 = registered, 1 = guest).

  20. discount_amount

    • Total discount applied to the order (same as base_discount_amount, in order currency).

  21. discount_description

    • Description of the discount applied (e.g., "UPI 2%").

  22. entity_id

    • Unique identifier for the order.

  23. global_currency_code / order_currency_code / store_currency_code

    • Currency codes for global, order, and store contexts.

  24. grand_total

    • Final total amount for the order in order currency.

  25. increment_id

    • Order number, often used for display purposes.

  26. is_virtual

    • Indicates if the order contains virtual products only (1 = yes, 0 = no).

  27. quote_id

    • Associated shopping cart ID for the order.

  28. remote_ip

    • IP address from which the order was placed.

  29. shipping_description

    • Description of the shipping method used.

  30. state / status

    • Current state and status of the order (e.g., canceled, processing).

  31. subtotal / subtotal_incl_tax

    • Subtotal amount (excluding and including tax) in order currency.

  32. tax_amount

    • Total tax applied to the order in order currency.

  33. total_due

    • Outstanding amount in order currency.

  34. total_item_count

    • Number of unique items in the order.

  35. total_qty_ordered

    • Total quantity of all products in the order.

  36. weight

    • Combined weight of all products in the order.

  37. x_forwarded_for

    • Proxy IP address if the order was placed via a proxy server.


Nested Levels

Inside items -> items (Order Items)

  1. amount_refunded

    • Amount refunded for the item.

  2. base_price / price

    • Unit price of the item in base currency and order currency.

  3. base_row_total / row_total

    • Total price for the item (unit price × quantity) in base and order currency.

  4. discount_percent

    • Percentage discount applied to the item.

  5. name

    • Name of the product.

  6. product_id / sku

    • Product ID and SKU.

  7. qty_ordered

    • Quantity of the item ordered.

  8. original_price

    • Original price of the product before any discounts.

  9. tax_percent / tax_amount

    • Tax percentage and tax amount applied to the item.


Inside items -> billing_address

  1. address_type

    • Type of address (e.g., billing).

  2. city / postcode / region

    • Billing address city, postal code, and region.

  3. street

    • Street address (as a list for multi-line addresses).

  4. telephone

    • Customer’s phone number.


Inside items -> payment

  1. method

    • Payment method used (e.g., cashfree).

  2. amount_authorized / amount_ordered

    • Authorized and total order amounts.

  3. additional_information

    • Additional data related to the payment method (e.g., "Cashfree").


Inside items -> status_histories

  1. status

    • Historical statuses of the order (e.g., processing).

  2. comment

    • Comments or notes on the status update.


Inside items -> extension_attributes

  1. shipping_assignments

    • Details about shipping, including the shipping address and method.

  2. payment_additional_info

    • Additional information about payment (e.g., "method_title": "Cashfree").

  3. mw_earn_points_data

    • Earned points data in loyalty programs.

Last updated