API for Bambino, a simple and user-friendly e-commerce platform built to sell baby clothes.
API for Bambino, a simple and user-friendly e-commerce platform built to sell baby clothes.
Request :
/login
{
"email": "string",
"password": "string"
}
Response :
{
"code": "number",
"status": "string",
"data": {
"token": "string"
}
}
All API below must use this authentication
Request :
Request :
/products
{
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "string",
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
}
Request :
/products?page=1&limit=10&q={name}
Response :
{
"code": "number",
"status": "string",
"data": {
"totalData": "integer",
"totalPage": "integer",
"products": [
{
"id": "string",
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
]
}
}
Request :
/products/{id}
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "string",
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
}
Request :
Method : PUT
Endpoint : /products/{id}
Header :
Body :
{
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "string",
"name": "string",
"price": "integer",
"imageUrl": "string",
"categoryId": "string",
"slug": "string",
"sku": "string",
"overview": "string",
"materials": "string"
}
}
Request :
/products/{id}
Response :
{
"code": "number",
"status": "string"
}
To install dependencies:
bun install
To run:
bun run dev