Voucher API

쿠폰 등록

HTTP Request

POST /api/vouchers HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=image; filename=voucherImage.jpg
Content-Type: image/jpeg

voucherImage
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=request
Content-Type: application/json

{"groupId":1,"voucherName":"voucher name","expiration":"2025-01-01"}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

Multipart info

Part Description

request

쿠폰 생성 request

image

쿠폰 이미지 파일

Multipart Request Fields

Path Type Description Optional

groupId

Number

쿠폰을 저장할 그룹 ID

X

voucherName

String

저장할 쿠폰의 이름

X

expiration

String

저장할 쿠폰의 만료 기간

X

HTTP Response

HTTP/1.1 201 Created
Location: /vouchers/1
Content-Type: application/json
Content-Length: 177

{
  "id" : 1,
  "presignedImage" : "image",
  "name" : "voucher name",
  "registeredUserId" : 1,
  "expiration" : "2025-01-01",
  "status" : "AVAILABLE",
  "isWishList" : true
}

Response Fields

Path Type Description Optional

id

Number

생성된 쿠폰 ID

X

presignedImage

String

이미지 URL

X

status

String

쿠폰 상태 (AVAILABLE/EXPIRED/USED)

X

registeredUserId

Number

쿠폰을 등록한 유저의 ID

X

name

String

쿠폰 등록자가 설정한 쿠폰의 이름

X

expiration

String

쿠폰 등록자가 설정한 쿠폰의 만료 기간

X

isWishList

Boolean

쿠폰이 찜 되어 있는지의 여부

X

쿠폰 삭제

HTTP Request

DELETE /api/vouchers/group/1/voucher/1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

Path Parameters

Name Description

groupId

쿠폰이 속한 그룹 ID

voucherId

삭제할 쿠폰 ID

HTTP Response

HTTP/1.1 200 OK

쿠폰 조회

HTTP Request

GET /api/vouchers/1?cursorId=1&pageSize=1&voucherStatuses=AVAILABLE&startDay=2025-01-01&endDay=2025-01-31 HTTP/1.1
Content-Type: application/json
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

Path Parameters

Name Description

groupId

쿠폰을 조회하고자 하는 그룹 ID

Query parameters

Name Description Optional

cursorId

커서 ID 값

O

pageSize

페이지 사이즈 값 (기본값 10)

O

voucherStatuses

조회할 쿠폰의 사용 상태 (AVAILABLE/EXPIRED/USED)

O

startDay

만료일 기준으로 쿠폰을 조회하는 기간의 시작일 (yyyy-MM-dd)

O

endDay

만료일 기준으로 쿠폰을 조회하는 기간의 종료일 (yyyy-MM-dd)

O

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 387

{
  "content" : [ {
    "groupTitle" : "나의 그룹 이름",
    "groupInviteCode" : "InviteCode",
    "vouchers" : [ {
      "id" : 1,
      "presignedImage" : "mockPresignedUrl",
      "name" : "쿠폰 이름",
      "registeredUserId" : 1,
      "expiration" : "2020-01-01",
      "status" : "AVAILABLE",
      "isWishList" : false
    } ]
  } ],
  "size" : 1,
  "hasNext" : false
}

Response Fields

Path Type Description Optional

content

Array

조회된 쿠폰 객체들의 배열

X

content[].groupTitle

String

해당 쿠폰 객체가 속해있는 그룹의 사용자별 별칭

X

content[].groupInviteCode

String

해당 쿠폰 객체가 속해있는 그룹의 초대코드

X

content[].vouchers[].id

Number

쿠폰 ID

X

content[].vouchers[].presignedImage

String

쿠폰 이미지 URL

X

content[].vouchers[].status

String

쿠폰 사용 상태. 다중 선택 가능 (AVAILABLE/EXPIRED/USED)

X

content[].vouchers[].registeredUserId

Number

쿠폰을 등록한 유저의 ID

X

content[].vouchers[].name

String

쿠폰 등록자가 설정한 쿠폰의 이름

X

content[].vouchers[].expiration

String

쿠폰 등록자가 설정한 쿠폰의 만료 기간

X

content[].vouchers[].isWishList

Boolean

쿠폰이 찜 되어 있는지의 여부

X

hasNext

Boolean

다음 페이지가 존재하는지 여부

X

size

Number

요청한 페이지의 사이즈

X

쿠폰 상태 변경

HTTP Request

PATCH /api/vouchers/group/1/voucher/1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

Path Parameters

Name Description

groupId

쿠폰이 속한 그룹 ID

voucherId

변경할 쿠폰 ID

HTTP Response

HTTP/1.1 200 OK

Token API

엑세스 토큰 발급

HTTP Request

GET /api/reissue HTTP/1.1
Host: api.shareticon.site
Cookie: refresh=refreshtoken
Name Description

refresh

리프레시 토큰

HTTP Response

HTTP/1.1 200 OK
Authorization: Bearer expectedToken

Response Header

Name Description

Authorization

엑세스 토큰

로그아웃

HTTP Request

POST /api/logout HTTP/1.1
Content-Type: application/json
Authorization: Bearer expectedToken
Host: api.shareticon.site

Request Header

Name Description

Authorization

엑세스 토큰

HTTP Response

HTTP/1.1 200 OK

Group API

그룹 생성

HTTP Request

POST /api/group HTTP/1.1
Content-Type: application/json
Content-Length: 31
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

{
  "title" : "그룹 이름"
}

HTTP Response

HTTP/1.1 201 Created
Location: /group/1
Content-Type: application/json
Content-Length: 38

{
  "id" : 1,
  "inviteCode" : "ABC"
}

Response Fields

Path Type Description Optional

id

Number

생성된 그룹 ID

X

inviteCode

String

생성된 그룹의 초대코드

X

Response Header

Name Description

Location

생성된 그룹 조회 URI

전체 그룹 조회

HTTP Request

GET /api/group HTTP/1.1
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 150

[ {
  "groupId" : 1,
  "groupTitleAlias" : "title1",
  "memberCount" : 2
}, {
  "groupId" : 2,
  "groupTitleAlias" : "title2",
  "memberCount" : 2
} ]

Response Fields

Path Type Description Optional

[]

Array

조회된 그룹 리스트

X

[].groupId

Number

그룹 ID

X

[].groupTitleAlias

String

그룹의 별칭

X

[].memberCount

Number

그룹에 참여중인 총 멤버의 수

X

그룹 가입

HTTP Request

POST /api/group/join HTTP/1.1
Content-Type: application/json
Content-Length: 33
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

{
  "inviteCode" : "inviteCode"
}

Request Fields

Path Type Description Optional

inviteCode

String

가입하기를 원하는 그룹의 초대 코드

X

HTTP Response

HTTP/1.1 204 No Content

그룹 가입 신청 내역 조회

HTTP Request

GET /api/group/join HTTP/1.1
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

[ {
  "targetGroupId" : 1,
  "leaderGroupAlias" : "리더의 그룹 별칭",
  "pendingMembers" : [ {
    "applyUserId" : 1,
    "applyUserNickname" : "가입신청한 유저"
  } ]
} ]

Response Fields

Path Type Description Optional

[]

Array

유저가 처리할 수 있는 그룹 가입 신청 리스트

X

[].targetGroupId

Number

가입 신청이 들어온 그룹 ID

X

[].leaderGroupAlias

String

리더가 설정한 가입 신청이 들어온 그룹의 별칭

X

[].pendingMembers

Array

가입을 신청한 유저의 리스트

X

[].pendingMembers[].applyUserId

Number

가입을 신청한 유저 ID

X

[].pendingMembers[].applyUserNickname

String

가입을 신청한 유저의 닉네임

X

그룹 가입 신청 내역 처리

HTTP Request

PATCH /api/group/1/user/1?status=APPROVED HTTP/1.1
Content-Type: application/json
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

Path Parameters

Name Description

groupId

유저가 가입 신청을 한 대상 그룹 ID

userId

가입 신청을 한 유저 ID

Query parameters

Name Description Optional

status

처리할 상태값. (APPROVED: 승인, REJECTED: 거절)

X

HTTP Response

HTTP/1.1 204 No Content

사용자별 그룹 별칭 변경

HTTP Request

PATCH /api/group/1 HTTP/1.1
Content-Type: application/json
Content-Length: 43
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

{
  "newGroupTitleAlias" : "그룹별칭"
}

Path Parameters

Name Description

groupId

별칭을 변경할 대상이 되는 그룹 ID

Request Fields

Path Type Description Optional

newGroupTitleAlias

String

변경하기를 원하는 별칭

X

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 52

{
  "groupId" : 1,
  "titleAlias" : "그룹별칭"
}

Response Fields

Path Type Description Optional

groupId

Number

별칭이 변경된 그룹 ID

X

titleAlias

String

변경된 별칭

X

User API

유저 프로필 조회

HTTP Request

GET /api/profile HTTP/1.1
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 122

{
  "userId" : 1,
  "nickName" : "닉네임",
  "email" : "test@test",
  "joinGroupCount" : 1,
  "ownedVoucherCount" : 2
}

Response Fields

Path Type Description Optional

userId

Number

서버에서의 유저 아이디

X

nickName

String

유저의 닉네임

X

email

String

유저의 이메일

X

joinGroupCount

Number

유저가 가입되어 있는 그룹의 개수

X

ownedVoucherCount

Number

유저가 등록한 쿠폰의 총 개수

X

유저 닉네임 변경

HTTP Request

PATCH /api/profile HTTP/1.1
Content-Type: application/json
Content-Length: 43
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

{
  "newNickname" : "새로운 닉네임"
}

Request Fields

Path Type Description Optional

newNickname

String

유저가 새로 바꾸려는 닉네임

X

HTTP Response

HTTP/1.1 204 No Content

WishList API

찜 목록 조회

Http Request

GET /api/wishList?cursorId=1&pageSize=3 HTTP/1.1
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site

Query parameters

Name Description Optional

cursorId

페이지네이션 기반 조회를 위한 커서 ID

O

pageSize

페이지 사이즈 값 (기본값 5)

O

Http Response

{
  "content" : [ {
    "voucherId" : 1,
    "presignedImage" : "mockPresignedUrl",
    "voucherName" : "쿠폰",
    "groupId" : 1,
    "registeredUserId" : 1,
    "expiration" : "2020-01-01",
    "status" : "AVAILABLE"
  } ],
  "size" : 3,
  "hasNext" : false
}

Response Fields

Path Type Description Optional

content

Array

조회된 찜 목록에 속하는 쿠폰 객체 배열

X

content[].voucherId

Number

유저가 찜한 쿠폰 ID

X

content[].groupId

Number

유저가 찜한 쿠폰이 속한 그룹 ID

X

content[].presignedImage

String

유저가 찜한 쿠폰 이미지 URL

X

content[].voucherName

String

유저가 찜한 쿠폰 이름

X

content[].registeredUserId

Number

쿠폰을 등록한 유저 ID

X

content[].expiration

String

유저가 찜한 쿠폰의 만료일

X

content[].status

String

유저가 찜한 쿠폰의 상태

X

hasNext

Boolean

다음 페이지가 존재하는지 여부

X

size

Number

요청한 페이지의 사이즈

X

찜하기 / 찜 해제하기

Http Request

PATCH /api/wishList/group/1/voucher/1 HTTP/1.1
Authorization: Bearer TOKEN_VALUE
Host: api.shareticon.site
Content-Type: application/x-www-form-urlencoded

Path Parameters

Name Description

groupId

찜 대상이 되는 쿠폰이 속한 그룹 ID

voucherId

찜 대상이 되는 쿠폰 ID

Http Response

HTTP/1.1 204 No Content