v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
📢 Public APIs

Get product by id

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.

get/public/randomproducts/{productId}

Response

Get product by id

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "brand": "Golden",
    "category": "home-decoration",
    "description": "Attractive DesignMetallic materialFour key hooksReliable & DurablePremium Quality",
    "discountPercentage": 2.92,
    "id": 30,
    "images": [
      "https://i.dummyjson.com/data/products/30/1.jpg",
      "https://i.dummyjson.com/data/products/30/2.jpg",
      "https://i.dummyjson.com/data/products/30/3.jpg",
      "https://i.dummyjson.com/data/products/30/thumbnail.jpg"
    ],
    "price": 30,
    "rating": 4.92,
    "stock": 54,
    "thumbnail": "https://i.dummyjson.com/data/products/30/thumbnail.jpg",
    "title": "Key Holder"
  },
  "message": "Product fetched successfully",
  "statusCode": 200,
  "success": true
}