쿠폰
쿠폰 목록 조회
최근 만든 순이다. 상태·종류·발급 방식으로 거르고 이름·코드로 찾는다
GET
최근 만든 순이다. 상태·종류·발급 방식으로 거르고 이름·코드로 찾는다
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
status?string쿠폰 상태. ACTIVE=사용 중, PAUSED=중지(재개 가능), ENDED=종료(되돌릴 수 없음)
Value in
"ACTIVE""PAUSED""ENDED"kind?string쿠폰 종류. ORDER=주문 쿠폰(대상 상품 합계에서 할인), PRODUCT=상품 쿠폰(주문상품 한 줄에서 할인), DELIVERY=배송비 쿠폰(기본 배송비에서 할인, 지역 추가 배송비 제외)
Value in
"ORDER""PRODUCT""DELIVERY"issueMethod?string발급 방식. CODE=구매자가 주문서에 코드를 입력한다, MANUAL=셀러가 회원을 골라 지급한다, DOWNLOAD=구매자가 스토어프론트에서 받는다, SIGNUP=회원가입 때 자동으로 지급한다, FLOW=주문 흐름의 쿠폰 지급 단계가 그 주문의 구매자에게 지급한다, VOUCHER=셀러가 1회용 쿠폰 번호를 만들어 나눠 주고 구매자가 번호를 등록하면 지급한다
Value in
"CODE""MANUAL""DOWNLOAD""SIGNUP""FLOW""VOUCHER"q?string이름·코드 검색(포함)
page?string페이지 번호 (1부터, 기본 1)
size?string페이지 크기 (기본 20, 최대 100)
X-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
성공
application/json- response
meta*data*error*|nullcurl -X GET 'https://api.sayren.io/v1/coupons' \
-H 'X-Store-Id: string'Example Response
{
"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": "ORDER",
"benefit": {
"type": "RATE",
"value": 1,
"maxDiscountAmount": 1
},
"conditions": {
"minOrderAmount": 0,
"firstOrderOnly": true,
"memberOnly": true,
"stackWithInstantDiscount": true
},
"target": {
"includeProductIds": [
"string"
],
"includeCategoryIds": [
"string"
],
"excludeProductIds": [
"string"
],
"excludeCategoryIds": [
"string"
]
},
"issueMethod": "string",
"code": "string",
"startsAt": "string",
"endsAt": "string",
"validDaysAfterIssue": 0,
"totalIssueLimit": 0,
"dailyIssueLimit": null,
"totalUseLimit": 0,
"perMemberIssueLimit": 0,
"perMemberUseLimit": 0,
"voucher": null,
"issuedCount": 0,
"reservedCount": 0,
"usedCount": 0,
"currency": "KRW",
"eligibility": {
"combinator": "and",
"rules": [
{
"field": "string",
"operator": "string",
"value": 0
}
]
},
"targetRules": {
"include": [
{
"field": "string",
"operator": "string",
"value": 0
}
],
"exclude": [
{
"field": "string",
"operator": "string",
"value": 0
}
]
},
"targetTree": {
"include": {
"combinator": "and",
"rules": [
{
"field": "string",
"operator": "string",
"value": 0
}
]
},
"exclude": {
"combinator": "and",
"rules": [
{
"field": "string",
"operator": "string",
"value": 0
}
]
}
},
"audience": {
"combinator": "and",
"rules": [
{
"field": "string",
"operator": "string",
"value": 0
}
]
},
"stacking": {
"combinesWith": {
"order": true,
"product": true,
"delivery": true
},
"withPoints": true,
"perOrderLimit": 1
},
"reward": null,
"rulesOnly": false,
"issueStartsAt": null,
"issueEndsAt": null,
"visibleFrom": null,
"status": "ACTIVE",
"locked": true,
"lockedAt": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
},
"error": null
}