---
title: "Get a product"
method: GET
path: "/products/{product_id}"
tags: ["products"]
---

# Get a product

`GET /products/{product_id}`

## Request

- Base URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1`
- URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1/products/{product_id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/docs/products/:product_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a product entry.

## Path parameters

- `product_id` string, required: The id of the product to be retrieved

## Response `200`

Product retrieved successfully

- object
  - `id` string: The id of the product
  - `name` string: The name of the product
  - `description` string: A brief description of the product
  - `price` number: The price of the product
  - `stock` integer: The stock quantity of the product
  - `category` string: The category of the product

## Other responses

- `400`: Bad Request
- `401`: Authentication error
- `404`: Not Found
- `500`: Server error

---

[API](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger.md) - [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) - [OpenAPI document](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/revisions/2d1d3ed96bb9?raw)
