쿠폰
받을 수 있는 쿠폰 목록
지금 받을 수 있는 쿠폰(사용 중, 기간 안, 총 발급 한도가 남음)이다. 최근 만든 순. `productId`를 주면 그 상품이 대상인 쿠폰만 싣는다(대상 상품·카테고리 기준, 최소 주문 금액·즉시할인 중복 조건은 주문서에서 판정한다). 회원 토큰이 있으면 항목마다 `downloaded`(이미 받음)·`downloadable`(더 받을 수 있음)을 싣고, 없으면 둘 다 null이고 `loginRequired`가 true다. 쿠폰을 쓸 수 없는 상점이면 빈 목록이다.
GET
지금 받을 수 있는 쿠폰(사용 중, 기간 안, 총 발급 한도가 남음)이다. 최근 만든 순. productId를 주면 그 상품이 대상인 쿠폰만 싣는다(대상 상품·카테고리 기준, 최소 주문 금액·즉시할인 중복 조건은 주문서에서 판정한다). 회원 토큰이 있으면 항목마다 downloaded(이미 받음)·downloadable(더 받을 수 있음)을 싣고, 없으면 둘 다 null이고 loginRequired가 true다. 쿠폰을 쓸 수 없는 상점이면 빈 목록이다.
header
AuthorizationBearer <token>회원 accessToken
productId?string이 상품에 쓸 수 있는 쿠폰만(대상 상품·카테고리 기준). 주문 쿠폰은 제외 대상이 아니면 싣는다
page?string페이지 번호 (1부터, 기본 1)
size?string페이지 크기 (기본 20, 최대 100)
성공
application/json- response
meta*data*error*|nullcurl -X GET 'https://api.sayren.io/storefront/v1/coupons'{ "meta": { "status": 200, "code": "OK", "message": "OK", "isSuccess": true }, "data": { "page": 0, "size": 0, "totalElements": 0, "totalPages": 0, "contents": [ { "couponId": "string", "name": "string", "description": "string", "kind": "string", "benefit": { "type": "string", "value": 0, "maxDiscountAmount": 0 }, "minOrderAmount": 0, "stackWithInstantDiscount": true, "target": { "allProducts": true, "includeProductIds": [ "string" ], "includeCategoryIds": [ "string" ], "excludeProductIds": [ "string" ], "excludeCategoryIds": [ "string" ] }, "startsAt": "string", "endsAt": "string", "validDaysAfterIssue": 0, "perMemberIssueLimit": 0, "loginRequired": true, "downloaded": true, "downloadable": true } ] }, "error": null}