주문서
주문서 생성
POST
header
AuthorizationBearer <JWT>회원 accessToken
x-cart-token*stringapplication/json- body
cartItemIds?array<string>Items
1 <= itemsdirectItem?fulfillmentMethod?string이행 방식(이슈 #115). 모든 줄에 같은 방식을 적용하고, 상품 fulfillment.methods에 없는 줄이 있으면 400 FULFILLMENT_METHOD_NOT_ALLOWED다. 생략하면 줄마다 상품 허용 방식의 첫 값이다. 방문 수령(PICKUP)은 배송지·배송비가 없다
Value in
"CARRIER""DIRECT""PICKUP""PROVIDED"pickupLocationId?string방문 수령 장소(GET /pickup-locations). 방식이 PICKUP이고 상점에 픽업 장소가 있으면 필수(400 PICKUP_LOCATION_REQUIRED), 없거나 쓰지 않는 장소면 400 PICKUP_LOCATION_NOT_FOUND. 다른 방식에 주면 400 PICKUP_LOCATION_NOT_APPLICABLE
성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/storefront/v1/checkout' \
-H 'x-cart-token: string' \
-H 'Content-Type: application/json' \
-d '{}'Example Response201
{
"meta": {
"status": 201,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"checkoutId": "string",
"currency": "KRW",
"items": [
{
"lineId": "string",
"productId": "string",
"productName": "string",
"thumbnailUrl": "http://example.com",
"optionId": "string",
"optionName": "string",
"optionSelections": [],
"customInputs": [],
"stay": {
"checkIn": "string",
"checkOut": "string",
"nights": [
{
"date": "string",
"price": 0
}
]
},
"quantity": 0,
"unitPrice": 0,
"totalPrice": 0,
"fulfillment": {
"type": "string",
"requiresShipping": true,
"method": "string"
}
}
],
"amounts": {
"productAmount": 0,
"deliveryFee": 0,
"totalAmount": 0,
"couponDiscountAmount": 0,
"deliveryDiscountAmount": 0,
"pointAmount": 0
},
"points": null,
"couponsEnabled": true,
"additionalPayment": false,
"orderPasswordRequired": false,
"memberOrder": false,
"delivery": {
"baseFee": 0,
"remoteSurcharge": 0,
"remoteArea": "NONE",
"remoteAreaLabel": "string",
"bundleCount": 0,
"freeByThreshold": true,
"zipCode": "string"
},
"requiresShipping": true,
"expiresAt": "string",
"paymentOptions": [
{
"label": "string",
"pgName": "string",
"logoUrl": "string",
"pg": "tosspayments",
"method": "CARD"
}
],
"testPayment": true
},
"error": null
}