딜 상품
딜 유형별 딜 상품 목록 조회
Request
Example
GET /deals/TIME_DEAL/dealProducts?pageNumber=0&sort=BASIC HTTP/1.1
Host: localhost:8080
Structure
Path Parameters
| Parameter | Description |
|---|---|
|
딜 유형 (TIME_DEAL : 타임딜, TODAY_DEAL : 오늘의딜) |
Query Parameters
| Path | Optional | Description |
|---|---|---|
pageNumber |
false |
페이지 번호 |
sort |
false |
정렬 (BASIC : 기본정렬순, PRICE_ASC : 높은가격순, PRICE_DESC : 낮은가격순) |
Response
Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 663
{
"code" : "OK",
"message" : "딜 상품 목록 조회 성공하였습니다.",
"data" : {
"pageNumber" : 0,
"pageSize" : 20,
"totalCount" : 1,
"items" : [ {
"dealProductUuid" : "01b8851c-d046-4635-83c1-eb0ca4342077",
"dealProductTile" : "1000원 할인 상품 1",
"productMainImgThumbnailUrl" : "/test.png",
"productOriginPrice" : 3000,
"dealProductDiscountType" : "FIXED_AMOUNT",
"dealProductDiscountValue" : 1000,
"dealProductDealQuantity" : 3,
"startedAt" : "2023-08-29T07:11:23.848582Z",
"finishedAt" : "2023-08-29T08:11:23.848583Z",
"dealProductStatus" : "OPEN"
} ]
}
}
Structure
| Path | Type | Description |
|---|---|---|
|
|
코드 |
|
|
메시지 |
|
|
데이터 |
|
|
페이지 번호 |
|
|
페이지당 개수 |
|
|
총 아이템 수 |
|
|
딜 상품 목록 |
|
|
딜 상품 UUID |
|
|
딜 상품 타이틀 |
|
|
딜 상품 메인 이미지 썸네일 URL |
|
|
상품 원가격 |
|
|
딜 상품 할인 유형 |
|
|
딜 상품 할인가 |
|
|
딜 상품 재고 수량 |
|
|
딜 상품 상태 (BEFORE_OPEN : 오픈 전, OPEN : 오픈, SOLD_OUT : 품절, CLOSE : 종료) |
|
|
딜 상품 시작 시간(예 : 2023-07-01T01:00:00Z) |
|
|
딜 상품 종료 시간(예 : 2023-07-01T02:00:00Z) |
딜 상품 상세보기
Request
Example
GET /dealProducts/01b8851c-d046-4635-83c1-eb0ca4342077 HTTP/1.1
Host: localhost:8080
Structure
Path Parameters
| Parameter | Description |
|---|---|
|
딜 상품 UUID |
Response
Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 690
{
"code" : "OK",
"message" : "딜 상품 상세보기 조회 성공하였습니다.",
"data" : {
"dealProductUuid" : "01b8851c-d046-4635-83c1-eb0ca4342077",
"dealProductTile" : "1000원 할인 상품 1",
"productMainImgUrl" : "/test.png",
"productDetailImgUrls" : [ "/detail_test1.png", "/detail_test2.png", "/detail_test3.png", "/detail_test4.png", "/detail_test5.png" ],
"productOriginPrice" : 3000,
"dealProductDiscountType" : "FIXED_AMOUNT",
"dealProductDiscountValue" : 1000,
"dealProductDealQuantity" : 3,
"maxOrderQuantityPerOrder" : 10,
"startedAt" : "2023-08-29T07:11:22.101008Z",
"finishedAt" : "2023-08-29T08:11:22.101011Z"
}
}
Structure
| Path | Type | Description |
|---|---|---|
|
|
코드 |
|
|
메시지 |
|
|
데이터 |
|
|
딜 상품 UUID |
|
|
딜 상품 타이틀 |
|
|
딜 상품 메인 이미지 URL |
|
|
딜 상품 상세 이미지 URL 목록 |
|
|
상품 원가격 |
|
|
딜 상품 할인 유형 |
|
|
딜 상품 할인가 |
|
|
딜 상품 재고 수량 |
|
|
딜 상품 주문당 최대 주문 수량 |
|
|
딜 상품 시작 시간(예 : 2023-07-01T01:00:00Z) |
|
|
딜 상품 종료 시간(예 : 2023-07-01T02:00:00Z) |
주문
주문 사전 저장
Request
Example
POST /orders/place-in-advance HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjF9.ZZ3CUl0jxeLGvQ1Js5nG2Ty5qGTlqai5ubDMXZOdaDk
Content-Length: 475
Host: localhost:8080
{
"orderUuid" : "79cabb22-ad7e-4def-8397-cb1a68faefe3",
"recipientInfoForm" : {
"recipientName" : "leecommerce",
"recipientPhoneNumber" : "01087654321",
"recipientAddress" : "서울시 ",
"recipientDetailAddress" : "101호",
"shippingRequest" : "빠른 배송 부탁드려요!"
},
"outOfStockHandlingOption" : "PARTIAL_ORDER",
"dealProductUuid" : "66a55e8d-2b0e-4101-bb5d-e4fa1a500532",
"orderQuantity" : 2,
"paymentMethod" : "CREDIT_CARD"
}
Structure
| Path | Type | Optional | Description |
|---|---|---|---|
orderUuid |
String |
false |
주문 ID |
recipientInfoForm.recipientName |
String |
false |
받는 사람 이름 |
recipientInfoForm.recipientPhoneNumber |
String |
false |
받는 사람 휴대폰 번호 |
recipientInfoForm.recipientAddress |
String |
false |
받는 사람 주소 |
recipientInfoForm.recipientDetailAddress |
String |
true |
받는 사람 상세 주소 |
recipientInfoForm.shippingRequest |
String |
true |
배송 요청 사항 |
outOfStockHandlingOption |
String |
false |
품절시 상품 처리 옵션 (ALL_CANCEL : 전체 취소, PARTIAL_ORDER : 주문 가능한 수량만큼 주문) |
dealProductUuid |
String |
false |
딜 상품 UUID |
orderQuantity |
Number |
false |
주문 수량 |
paymentMethod |
String |
false |
결제 방법 |
Response
Example
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 157
{
"code" : "CREATED",
"message" : "주문이 미리 저장 되었습니다.",
"data" : {
"orderUuid" : "839aa016-3066-46f8-b445-66bfd4e6e29e"
}
}
Structure
| Path | Type | Description |
|---|---|---|
|
|
코드 |
|
|
메시지 |
|
|
주문 UUID |
주문 승인
Request
Example
POST /orders/approve HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjF9.ZZ3CUl0jxeLGvQ1Js5nG2Ty5qGTlqai5ubDMXZOdaDk
Content-Length: 119
Host: localhost:8080
{
"paymentKey" : "tossPaymentsPaymentKey",
"orderId" : "79cabb22-ad7e-4def-8397-cb1a68faefe3",
"amount" : 15000
}
Structure
| Path | Type | Optional | Description |
|---|---|---|---|
paymentKey |
String |
false |
토스 페이먼츠 key |
orderId |
String |
false |
주문 ID |
amount |
Number |
false |
총 결제 금액 |
Response
Example
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 156
{
"code" : "CREATED",
"message" : "주문 접수가 완료되었습니다.",
"data" : {
"orderUuid" : "16ca2bb4-3dc3-4257-bd5f-137ba19cc6c3"
}
}
Structure
| Path | Type | Description |
|---|---|---|
|
|
코드 |
|
|
메시지 |
|
|
주문 UUID |