---
title: "Get order by id"
method: GET
path: "/ecommerce/orders/{orderId}"
tags: ["🛒 Ecommerce"]
---

# Get order by id

`GET /ecommerce/orders/{orderId}`

The API allows users to retrieve information about an order placed by a user by specifying the `orderId` as a path variable.

This can be used to get complete details of the order for admin or user who has placed the order.

## Response `200`

Get order by id

- object
  - `data` object
    - `_id` string
    - `order` object
      - `__v` number
      - `_id` string
      - `address` object
        - `__v` number
        - `_id` string
        - `addressLine1` string
        - `addressLine2` string
        - `city` string
        - `country` string
        - `createdAt` string
        - `owner` string
        - `pincode` string
        - `state` string
        - `updatedAt` string
      - `coupon` object
        - `_id` string
        - `couponCode` string
        - `name` string
      - `createdAt` string
      - `customer` object
        - `_id` string
        - `email` string
        - `username` string
      - `discountedOrderPrice` number
      - `isPaymentDone` boolean
      - `items` object[]
        - `_id` string
        - `product` object
          - `__v` number
          - `_id` string
          - `category` string
          - `createdAt` string
          - `description` string
          - `mainImage` object
            - `_id` string
            - `localPath` string
            - `url` string
          - `name` string
          - `owner` string
          - `price` number
          - `stock` number
          - `subImages` object[]
            - `_id` string
            - `localPath` string
            - `url` string
          - `updatedAt` string
        - `quantity` number
      - `orderPrice` number
      - `paymentId` string
      - `paymentProvider` string
      - `status` string
      - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/revisions/a9f3a290e4dc/schema)
