Request :
- Header :
- Bearer ACCESS_TOKEN
Request :
- Method : GET
- Endpoint :
/products/flashsale - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"discountPercent": "decimal",
"priceAfterDiscount": "long",
"weight": "integer",
"unit": "string",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"priceWithDiscount": "long",
"weight": "integer",
"unit": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/products/latest - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/products/best-seller - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/products - Header :
- Accept: application/json
- Query Param :
- keyword : string
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"image": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/products/{productId} - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"name": "string",
"image": "string",
"description": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"amountSold": "integer",
"rating": "decimal",
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : GET
- Endpoint :
/products/{productId}/reviews - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"user": {
"id": "integer, unique",
"name": "string"
},
"rating": "decimal",
"content": "string",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"user": {
"id": "integer, unique",
"name": "string"
},
"rating": "decimal",
"content": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/carts - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"products": [
{
"id": "integer, unique",
"name": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"quantity": "integer",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"quantity": "integer",
"createdAt": "date",
"updatedAt": "date"
}
]
}
}Request :
- Method : POST
- Endpoint :
/carts - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"productId": "integer"
}Response :
{
"code": "integer",
"status": "string"
}Request :
- Method : PUT
- Endpoint :
/carts/{productId} - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"quantity": "integer"
}Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"products": [
{
"id": "integer, unique",
"name": "string",
"price": "long",
"weight": "integer",
"unit": "string",
"quantity": "integer",
"createdAt": "date",
"updatedAt": "date"
}
]
}
}Request :
- Method : DELETE
- Endpoint :
/carts/{productId} - Header :
- Accept: application/json
Response :
{
"code": "integer",
"status": "string"
}Request :
- Method : GET
- Endpoint :
/addresses - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"label": "string",
"ownerName": "string",
"phone": "long",
"address": "string",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"label": "string",
"ownerName": "string",
"phone": "string",
"address": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : POST
- Endpoint :
/addresses - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"label": "string",
"owner_name": "string",
"phone": "string",
"address": "string"
}Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"label": "string",
"ownerName": "string",
"phone": "long",
"address": "string",
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : PUT
- Endpoint :
/addresses/{addressId} - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"label": "string",
"owner_name": "string",
"phone": "string",
"address": "string"
}Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"label": "string",
"ownerName": "string",
"phone": "long",
"address": "string",
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : DELETE
- Endpoint :
/addresses/{addressId} - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string"
}Request :
- Method : GET
- Endpoint :
/shipping-methods - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"cost": "long",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"cost": "long",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/payment-methods - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"name": "string",
"code": "string",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"name": "string",
"code": "string",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/orders - Header :
- Accept: application/json
- Query Param :
- status : string
Response :
{
"code": "number",
"status": "string",
"data": [
{
"id": "integer, unique",
"orderNumber": "string",
"orderDate": "date",
"status": "string",
"total": "long",
"createdAt": "date",
"updatedAt": "date"
},
{
"id": "integer, unique",
"orderNumber": "string",
"orderDate": "date",
"status": "string",
"total": "long",
"createdAt": "date",
"updatedAt": "date"
}
]
}Request :
- Method : GET
- Endpoint :
/orders/{ordersId} - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"orderNumber": "string",
"orderDate": "date",
"shippingMethod": {
"name": "string",
"cost": "long"
},
"shippingAddress": {
"name": "string",
"phone": "long",
"address": "string"
},
"paymentMethod": {
"name": "string",
"bankCode": "string"
},
"total": "long",
"status": "string",
"products": [
{
"id": "integer, unique",
"name": "string",
"image": "string",
"quantity": "integer",
"price": "long",
"weight": "integer",
"unit": "string",
"reviews": {
"id": "integer, unique",
"name": "string",
"rating": "decimal",
"content": "string"
}
},
{
"id": "integer, unique",
"name": "string",
"image": "string",
"quantity": "integer",
"price": "long",
"weight": "integer",
"unit": "string",
"reviews": {
"id": "integer, unique",
"name": "string",
"rating": "decimal",
"content": "string"
}
}
],
"virtualAccount": "string",
"receivedDate": "date",
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : GET
- Endpoint :
/users - Header :
- Accept: application/json
Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"name": "string",
"dateOfBirth": "date",
"gender": "string",
"contact": {
"email": "string",
"phone": "string"
},
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : POST
- Endpoint :
/users/register - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"name": "string",
"dateOfBirth": "date",
"gender": "string",
"contact": {
"email": "string",
"phone": "string"
},
"password": "string"
}Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"name": "string",
"dateOfBirth": "date",
"gender": "string",
"contact": {
"email": "string",
"phone": "string"
},
"createdAt": "date",
"updatedAt": "date"
}
}Request :
- Method : POST
- Endpoint :
/users/login - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"email": "string",
"password": "string"
}Response :
{
"code": "number",
"status": "string",
"data": {
"accessToken": "string"
}
}Request :
- Method : PUT
- Endpoint :
/users/{userId} - Header :
- Content-Type: application/json
- Accept: application/json
Body :
{
"name": "string",
"dateOfBirth": "date",
"gender": "string",
"contact": {
"email": "string",
"phone": "string"
},
"password": "string"
}Response :
{
"code": "number",
"status": "string",
"data": {
"id": "integer, unique",
"name": "string",
"dateOfBirth": "date",
"gender": "string",
"contact": {
"email": "string",
"phone": "string"
},
"createdAt": "date",
"updatedAt": "date"
}
}