v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
🛒 Ecommerce

Get my orders

The API endpoint allows you to retrieve the placed orders of the logged-in user in an ecommerce application.

When accessing this endpoint, you will receive a response containing the list of orders that have been placed by the currently authenticated user.

get/ecommerce/profile/my-orders

Query parameters

pagestring
Example:1
limitstring
Example:10

Response

Get my orders

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "limit": 10,
    "orders": [
      {
        "__v": 0,
        "_id": "649e7bfcdbf96264731f5a14",
        "address": {
          "__v": 0,
          "_id": "649e7bfcdbf96264731f5727",
          "addressLine1": "1296 Crooks Forest",
          "addressLine2": "Quitzon Expressway",
          "city": "Malden",
          "country": "Argentina",
          "createdAt": "2023-06-30T06:53:48.725Z",
          "owner": "649e7bfbdbf96264731f5416",
          "pincode": "745740",
          "state": "South Dakota",
          "updatedAt": "2023-06-30T06:53:48.725Z"
        },
        "coupon": null,
        "createdAt": "2023-06-30T06:53:48.827Z",
        "customer": {
          "_id": "649e7bfbdbf96264731f5416",
          "email": "vernon_roberts19@hotmail.com",
          "username": "nicholas.lakin"
        },
        "discountedOrderPrice": 1014,
        "isPaymentDone": true,
        "orderPrice": 1014,
        "paymentId": "e0vN1lABsMCJlXaZZFk7rQg2",
        "paymentProvider": "PAYPAL",
        "status": "CANCELLED",
        "totalOrderItems": 2,
        "updatedAt": "2023-06-30T06:53:48.827Z"
      }
    ],
    "page": 1,
    "serialNumberStartFrom": 1,
    "totalOrders": 1,
    "totalPages": 1
  },
  "message": "Orders fetched successfully",
  "statusCode": 200,
  "success": true
}