POST
/products
curl \
--request POST 'http://localhost:3000/api/v1/products' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"Sample Product","image":"https://example.com/image.jpg","price":29.99,"description":"This is a great product."}'
Request example
{
"name": "Sample Product",
"image": "https://example.com/image.jpg",
"price": 29.99,
"description": "This is a great product."
}
Response examples (201)
{
"id": "string",
"name": "string",
"description": "string",
"image": "string",
"price": 42.0
}
Response examples (401)
{
"message": "Product not found"
}
Response examples (500)
{
"message": "Product not found"
}