Skip to Content
Sayren 유저가이드
주문서

주문서의 최대 쿠폰 할인 조합

로그인한 구매자가 가진 사용 가능 쿠폰으로 이 주문서의 쿠폰 할인이 가장 큰 조합을 고른다(종류별 자리·결합 가능 여부·최소 결제 금액을 지킨다). `applications`를 그대로 금액 미리보기·결제 시작의 `coupons`로 넣으면 같은 금액이다. 적립금은 넣지 않고 계산한다. 비회원·쿠폰을 끈 권역·쿠폰을 막은 주문서는 빈 조합이다.

GET
/storefront/v1/checkout/{checkoutId}/best-coupons

로그인한 구매자가 가진 사용 가능 쿠폰으로 이 주문서의 쿠폰 할인이 가장 큰 조합을 고른다(종류별 자리·결합 가능 여부·최소 결제 금액을 지킨다). applications를 그대로 금액 미리보기·결제 시작의 coupons로 넣으면 같은 금액이다. 적립금은 넣지 않고 계산한다. 비회원·쿠폰을 끈 권역·쿠폰을 막은 주문서는 빈 조합이다.

Authorization

headerAuthorizationBearer <JWT>

회원 accessToken

Path Parameters

checkoutId*string

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X GET 'https://api.sayren.io/storefront/v1/checkout/string/best-coupons'
Example Response
{
  "meta": {
    "status": 200,
    "code": "OK",
    "message": "OK",
    "isSuccess": true
  },
  "data": {
    "applications": [
      {
        "issueId": "string",
        "code": "string",
        "optionId": "string",
        "lineId": "string"
      }
    ],
    "coupons": [
      {
        "couponId": "string",
        "issueId": "string",
        "name": "string",
        "kind": "string",
        "discountAmount": 0,
        "lineId": "string",
        "needsDownload": true
      }
    ],
    "discountAmount": 0,
    "totalAmount": 0,
    "withPoints": true
  },
  "error": null
}