쿠폰
발급 대상 전원 지급
셀러 지급(`MANUAL`) 쿠폰을 발급 대상 조건(`audience`)에 맞는 회원 모두에게 준다. 회원이 많을 수 있어 202로 작업을 만들고 서버가 뒤에서 지급한다. 한도는 셀러 지급과 같다(1인·총·하루 발급 한도). 1인 발급 한도에 닿은 회원은 건너뛰고, 총·하루 한도가 차면 작업이 일찍 끝난다(`stopCode`). 진행은 `GET /v1/coupons/{couponId}/distributions/{distributionId}`로 본다.
POST
셀러 지급(MANUAL) 쿠폰을 발급 대상 조건(audience)에 맞는 회원 모두에게 준다. 회원이 많을 수 있어 202로 작업을 만들고 서버가 뒤에서 지급한다. 한도는 셀러 지급과 같다(1인·총·하루 발급 한도). 1인 발급 한도에 닿은 회원은 건너뛰고, 총·하루 한도가 차면 작업이 일찍 끝난다(stopCode). 진행은 GET /v1/coupons/{couponId}/distributions/{distributionId}로 본다.
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
couponId*stringX-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
성공
application/json- response
meta*data*발급 대상 전원 지급 작업
error*|nullcurl -X POST 'https://api.sayren.io/v1/coupons/string/distributions' \
-H 'X-Store-Id: string'Example Response
{
"meta": {
"status": 202,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"distributionId": "string",
"couponId": "string",
"status": "string",
"processedCount": 0,
"issuedCount": 0,
"skippedCount": 0,
"stopCode": "string",
"createdAt": "string",
"startedAt": "string",
"finishedAt": "string"
},
"error": null
}