Skip to main content
GET
/
products
/
{id}
Get product
curl --request GET \
  --url http://localhost:3002/api/v1/products/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "prod_123",
  "sku": "PROD-001",
  "name": "Product Name",
  "price": 100000,
  "description": "<string>",
  "category": "electronics",
  "cost": 75000,
  "stock": 50,
  "status": "active",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Path Parameters

id
string
required

Product ID

Response

Product detail

id
string
required
Example:

"prod_123"

sku
string
required
Example:

"PROD-001"

name
string
required
Example:

"Product Name"

price
number<double>
required
Example:

100000

description
string
category
string
Example:

"electronics"

cost
number<double>
Example:

75000

stock
integer
Example:

50

status
enum<string>
Available options:
active,
inactive
Example:

"active"

created_at
string<date-time>
updated_at
string<date-time>