Skip to content

Crear Producto

POST
/api/products/create

Crear un nuevo producto.

{
    name: string,
    price: number,
    categories: string[]
}
object
name
string
price
integer
categories
Array<string>
Example
{
"name": "Notebook Lenovo Thinkpad",
"price": 800000,
"categories": [
"Tecnología",
"Computadoras",
"Notebooks"
]
}

SUCCESS

Vary
string
Example
Origin
Access-Control-Allow-Credentials
boolean
Example
true
Content-Length
integer
Example
154
ETag
string
Example
W/"9a-zkjnNFvr9pfEziChX6dU1g+IH4o"
Date
string
Example
Thu, 11 Dec 2025 19:00:55 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5

VALIDATION_ERROR

Vary
string
Example
Origin
Access-Control-Allow-Credentials
boolean
Example
true
Content-Length
integer
Example
84
ETag
string
Example
W/"54-H3n/UH9GlS6fEhgDlCxUviRIy5k"
Date
string
Example
Thu, 11 Dec 2025 19:16:53 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5

UNAUTHORIZED

object
code
string
error
string
Example
{
"code": "UNAUTHORIZED",
"error": "Token inválido"
}
Vary
string
Example
Origin
Access-Control-Allow-Credentials
boolean
Example
true
Content-Length
integer
Example
49
ETag
string
Example
W/"31-745jFqqEU0VFC/rtfxiNcpDpdss"
Date
string
Example
Thu, 11 Dec 2025 18:06:04 GMT
Connection
string
Example
keep-alive
Keep-Alive
string
Example
timeout=5