---
title: "Get user cart"
method: GET
path: "/ecommerce/cart"
tags: ["🛒 Ecommerce"]
---

# Get user cart

`GET /ecommerce/cart`

The API endpoint returns the cart of the logged-in user.

This API allows authenticated users to retrieve the contents of their shopping cart.

The response typically includes information about the products or items added to the cart, such as their names, quantities, prices, and any relevant details.

This endpoint ensures that only authorized users can access and view their own cart data.

## Response `200`

Get user cart

- object
  - `data` object
    - `_id` string
    - `cartTotal` number
    - `coupon` object
      - `__v` number
      - `_id` string
      - `couponCode` string
      - `createdAt` string
      - `discountValue` number
      - `expiryDate` string
      - `isActive` boolean
      - `minimumCartValue` number
      - `name` string
      - `owner` string
      - `startDate` string
      - `type` string
      - `updatedAt` string
    - `discountedTotal` number
    - `items` object[]
      - `_id` string
      - `coupon` 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
  - `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/versions/a9f3a290e4dc/schema)
