All API must use this authentication
Request :
- Header :
- X-Api-Key : "your secret api key"
Request :
- Method : POST
- Endpoint :
/api/product
- Header :
- Content-Type : applications/json
- Accept : applications/json
- Body :
{
"code": "number",
"status" : "string",
"data" : [
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
},
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
]
}
- Response :
{
"code" : "number",
"status" : "string",
"data" :
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
Request :
-
Method : GET
-
Endpoint :
/api/product/{id_product}
-
Header :
- Content-Type : applications/json
- Accept : applications/json
-
Response :
{
"code" : "number",
"status" : "string",
"data" :
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
Request :
- Method : POST
- Endpoint :
/api/product/{id_product}
- Header :
- Content-Type : applications/json
- Accept : applications/json
- Body :
{
"code": "number",
"status" : "string",
"data" :
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
}
Request :
- Method : GET
- Endpoint :
/api/products
- Header :
- Content-Type : applications/json
- Accept : applications/json
- Query Param : {
- size : number,
- limit : number
- }
- Response :
{
"code" : "number",
"status" : "string",
"data" :
[
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
},
{
"id" : "string,unique",
"name" : "string",
"price" : "long",
"quantity" : "integer",
"createdAt" : "date",
"updatedAt" : "date"
}
]
}
Request :
- Method : POST
- Endpoint :
/api/product/id_product
- Header :
- Content-Type : applications/json
- Accept : applications/json
- Response :
{
"code": "number",
"status" : "string"
}