---
title: "Get product by id"
method: GET
path: "/public/randomproducts/{productId}"
tags: ["📢 Public APIs"]
---

# Get product by id

`GET /public/randomproducts/{productId}`

The API endpoint allows you to retrieve a product based on the specified product ID.

When accessing this endpoint and providing a valid product ID as a parameter, you will receive a response containing the details of the product matching the provided ID.

## Response `200`

Get product by id

- object
  - `data` object
    - `brand` string
    - `category` string
    - `description` string
    - `discountPercentage` number
    - `id` number
    - `images` string[]
    - `price` number
    - `rating` number
    - `stock` number
    - `thumbnail` string
    - `title` 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)
