API Endpoints
This section covers all available API endpoints.
Products
Register Product
- URL:
/api/products - Method:
POST - Description: Registers a new product in the commerce system.
Request Body
{
"name": "string", // Product name (required)
"price": number, // Product price in KRW (required)
"stock": number, // Stock quantity (required)
"description": "string" // Product description (optional)
}
Example Request
{
"name": "Jeju Samdasoo 500ml 20-pack",
"price": 15000,
"stock": 100,
"description": "Jeju Samdasoo 500ml bottled water, 20-pack."
}
Success Response
- Status Code:
201 Created
{
"id": "string", // Unique product ID
"name": "string", // Product name
"price": number, // Product price
"stock": number, // Stock quantity
"createdAt": "string" // ISO 8601 timestamp of creation
}
Error Responses
Missing Parameter
- Status Code:
400 Bad Request
{
"result": "FAILED",
"code": "MISSING_PARAMETER",
"message": "\"name\" field is required."
}
Invalid Parameter Type
- Status Code:
400 Bad Request
{
"result": "FAILED",
"code": "INVALID_PARAMETER",
"message": "\"price\" must be a number."
}
TACA
TACA Inquiry
- URL:
/api/taca/list - Method:
POST - Description: Retrieves details for a list of TACA items based on provided TACA IDs.
Request Body
{
"tacaIds": [number] // Array of TACA IDs (required)
}
Example Request
{
"tacaIds": [82275455, 103718011]
}
Success Response
- Status Code:
200 OK
{
"resultType": "SUCCESS",
"success": {
"list": [
{
"taca": {
"tacaId": number,
"name": "string",
"brandName": "string",
"attributes": [
{
"key": "string",
"value": "string",
"unit": "string"
}
],
"bup": {
"quantity": number,
"unit": "string"
},
"thumbnailUrl": "string",
"productItemGroupId": number
},
"reviewStat": {
"totalCount": number,
"averageRating": number
},
"primaryItem": {
"itemId": number,
"name": "string",
"thumbnailUrl": "string",
"stock": {
"stockId": number,
"price": number,
"originPrice": number,
"baseUnitPrice": number
},
"product": {
"productId": number,
"name": "string",
"thumbnailUrl": "string",
"deliveryFeeType": "string"
},
"productItemId": number,
"price": number,
"originPrice": number
}
}
]
}
}
Error Responses
Invalid TACA ID
- Status Code:
400 Bad Request
{
"result": "FAILED",
"code": "INVALID_PARAMETER",
"message": "tacaIds must be an array."
}
Empty TACA ID List
- Status Code:
400 Bad Request
{
"result": "FAILED",
"code": "EMPTY_TACA_IDS",
"message": "tacaIds array cannot be empty."
}
TACA Not Found
- Status Code:
404 Not Found
{
"result": "FAILED",
"code": "TACA_NOT_FOUND",
"message": "No TACAs found for the provided IDs."
}