주문
장바구니 상품 재고 확인
GET
/api/products/cart-items
one or Array
Query Parameters
productId*
ObjectId
Product's
[
{
"info": {
"size": "163x131cm",
"canvas": 100
},
"_id": "61a4debe4f5f6aa036bfec5f",
"artist": {
"_id": "61a4debe4f5f6aa036bfec5d",
"name": "로키산맥"
},
"title": "파멸",
"image": "/images/owner/1.jpg",
"price": 469000,
"inStock": true
},
{
"info": {
"size": "146x112cm",
"canvas": 80
},
"_id": "61a58ed5eebb463c14eca0f9",
"artist": {
"_id": "61a4c82a2c1eaad2e0d0084c",
"name": "안영희"
},
"title": "날갯짓",
"image": "/images/bye/2.jpg",
"price": 310000,
"inStock": true
},
...
]
결제 예정 총 금액 확인
GET
/api/products/total-price
one or Array
Query Parameters
productId*
ObjectId
Product's
Headers
authorization*
String
Bearer Token
{
"_id": "결제 예정 총 금액",
"totalPrice": 898000
}
결제 전 주문 생성
POST
/api/orders
Headers
authorization*
String
Bearer Token
Content-type*
String
application/json
Request Body
orderItems*
Array
product, image, title, artist, size, price
result*
Object
id
deliveryInfo*
Object
address, detailedAddress, receiver, contactNum
ordererInfo*
Object
name, phoneNum, email, refundTerms
shippingPrice*
Number
totalPrice*
Number
deliveryDetails
Object
receiveAt, requestedTerms
{
"message": "주문서 생성 성공",
"orderId": "61a7adc903b7708e5dbba693"
}
아임포트 결제 후 해당 주문서에 imp_uid 추가
PATCH
/api/orders/pay
Request Body
imp_uid*
String
{
"message": "결제 성공"
}
해당 주문 취소 | 반품 신청
DELETE
/api/orders/:id
Path Parameters
id*
ObjectId
Order's
Headers
authorization*
String
Bearer Token
Content-type
String
application/json
Request Body
status
Number
{
"message": "해당 주문의 결제 취소가 완료되었습니다"
}
해당 주문 상세 확인
GET
/api/orders/:id
Path Parameters
id*
ObjectId
Order's
Headers
authorization*
String
Bearer Token
{
"result": {
"id": "20211130111111",
"paidAt": "2021-12-01T17:15:53.146Z",
"status": 0,
"updatedAt": "2021-12-01T17:15:53.146Z"
},
"deliveryInfo": {
"address": "[12990] 경기 하남시 감북로 18 (감일동)",
"detailedAddress": "강남으로 가자 8282",
"receiver": "김로또",
"contactNum": "010-7777-7777"
},
"deliveryDetails": {
"receiveAt": "문 앞",
"requestedTerms": "도착 시 꼭 문자주세요!!"
},
"ordererInfo": {
"name": "남대문",
"phoneNum": "010-4444-4444",
"email": "a@test.com",
"refundTerms": "품절 시 결제수단으로 환불"
},
"_id": "61a7adc903b7708e5dbba693",
"user": "61a4e52b4f5f6aa036bfec61",
"orderItems": [
{
"image": "/images/bye/1.jpg",
"title": "잠식",
"artist": "안영희",
"size": "73x61cm(20호)",
"price": 99000,
"product": "61a4c895f59ea1b7a727a658"
},
{
"image": "/images/owner/1.jpg",
"title": "파멸",
"artist": "로키산맥",
"size": "163x131cm(100호)",
"price": 469000,
"product": "61a4debe4f5f6aa036bfec5f"
}
],
"shippingPrice": 10000,
"totalPrice": 578000
}
유저의 최근 주문 정보
GET
/api/orders/latest
Headers
authorization*
String
Bearer Token
{
"deliveryInfo": {
"address": "[18030] 서울특별시 서초구 서초대로 396 ",
"detailedAddress": "강남빌딩 20층 (스파크플러스 강남2호점)",
"receiver": "김로또",
"contactNum": "010-7777-7777"
},
"deliveryDetails": {
"receiveAt": "문 앞에 놓아주세요",
"requestedTerms": "도착 시 문자주세요"
},
"ordererInfo": {
"name": "남대문",
"phoneNum": "010-4444-4444",
"email": "a@test.com",
"refundTerms": "품절 시 결제수단으로 환불"
},
"_id": "61b344023c5af7a153d19a71"
}
Last updated