1. 배송비 정책

1.1. 적용 배송비 정책 조회

1.1.1. 요청

HTTP 요청
GET /api/delivery-policies/current HTTP/1.1
Host: localhost:8080

1.1.2. 응답

응답 필드
Path Type Description

deliveryPolicyId

Number

배송비 정책 번호

deliveryPrice

Number

배송비

freeDeliveryPrice

Number

무료 배송 기준 금액

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 85

{
  "deliveryPolicyId" : 1,
  "deliveryPrice" : 5000,
  "freeDeliveryPrice" : 50000
}

1.2. 전체 조회

1.2.1. 요청

HTTP 요청
GET /api/admin/delivery-policies HTTP/1.1
Host: localhost:8080

1.2.2. 응답

응답 필드
Path Type Description

[].deliveryPolicyId

Number

배송비 정책 번호

[].deliveryPrice

Number

배송비

[].freeDeliveryPrice

Number

무료 배송 기준 금액

[].createdAt

String

변경일자

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 119

[ {
  "deliveryPolicyId" : 1,
  "deliveryPrice" : 1000,
  "createdAt" : "2024-01-01",
  "freeDeliveryPrice" : 50000
} ]

1.3. 생성

1.3.1. 요청

요청 필드
Path Type Description

deliveryPrice

Number

배송비

freeDeliveryPrice

Number

무료 배송 기준 금액

HTTP 요청
POST /api/admin/delivery-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 59
Host: localhost:8080

{
  "deliveryPrice" : 1000,
  "freeDeliveryPrice" : 50000
}

1.3.2. 응답

HTTP 응답
HTTP/1.1 201 Created

1.3.3. 예외

HTTP 요청
POST /api/admin/delivery-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 60
Host: localhost:8080

{
  "deliveryPrice" : -1000,
  "freeDeliveryPrice" : 50000
}
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 59

{
  "message" : "유효성 검사에 실패했습니다."
}

2. 적립률 정책

2.1. 적립률 정책 ID 조회

2.1.1. 요청

요청 파라미터
Table 1. /api/accumulation-rate-policies/{accumulationRatePolicyId}
Parameter Description

accumulationRatePolicyId

적립률 정책 번호

HTTP 요청
GET /api/accumulation-rate-policies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080

2.1.2. 응답

응답 필드
Path Type Description

accumulationRatePolicyId

Number

적립률 정책 번호

accumulationRate

Number

적립률

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 62

{
  "accumulationRatePolicyId" : 1,
  "accumulationRate" : 1
}

2.1.3. 예외 - ID에 일치하는 적립률 정책이 존재하지 않은 경우

HTTP 요청
GET /api/accumulation-rate-policies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 73

{
  "message" : "해당 적립율 정책이 존재하지 않습니다."
}

2.2. 적용 적립률 정책 조회

2.2.1. 요청

HTTP 요청
GET /api/accumulation-rate-policies/current HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080

2.2.2. 응답

응답 필드
Path Type Description

accumulationRatePolicyId

Number

적립률 정책 번호

accumulationRate

Number

적립률

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 62

{
  "accumulationRatePolicyId" : 1,
  "accumulationRate" : 1
}

2.3. 적립률 정책 전체 조회

2.3.1. 요청

HTTP 요청
GET /api/admin/accumulation-rate-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080
응답 필드
Path Type Description

[].accumulationRatePolicyId

Number

적립률 정책 번호

[].accumulationRate

Number

적립률

[].createdAt

String

변경일자

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 96

[ {
  "accumulationRatePolicyId" : 1,
  "accumulationRate" : 1,
  "createdAt" : "2024-01-01"
} ]

2.4. 적립률 정책 생성

2.4.1. 요청

요청 필드
Path Type Description

accumulationRate

Number

적립률

HTTP 요청
POST /api/admin/accumulation-rate-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 28
Host: localhost:8080

{
  "accumulationRate" : 5
}

2.4.2. 응답

HTTP 응답
HTTP/1.1 201 Created

2.4.3. 예외 - 유효성 검사 실패

HTTP 요청
POST /api/admin/accumulation-rate-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 29
Host: localhost:8080

{
  "accumulationRate" : -5
}
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 80

{
  "message" : "적립율 정책의 유효성 검사에 실패 했습니다."
}

3. 포인트 정책 유형

3.1. 포인트 정책 유형 전체 조회

3.1.1. 요청

HTTP 요청
GET /api/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080

3.1.2. 응답

응답 필드
Path Type Description

[].pointPolicyTypeId

Number

포인트 정책 유형 번호

[].policyType

String

포인트 정책 유형 이름

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 62

[ {
  "pointPolicyTypeId" : 1,
  "policyType" : "REGISTER"
} ]

3.2. 포인트 정책 유형 생성

3.2.1. 요청

요청 필드
Path Type Description

policyType

String

포인트 정책 유형 이름

accumulatePoint

Number

정책 적립 포인트

HTTP 요청
POST /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 59
Host: localhost:8080

{
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000
}

3.2.2. 응답

HTTP 응답
HTTP/1.1 201 Created

3.2.3. 예외 - 존재하는 포인트 정책 유형

HTTP 요청
POST /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 59
Host: localhost:8080

{
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000
}
HTTP 응답
HTTP/1.1 409 Conflict
Content-Type: application/json
Content-Length: 51

{
  "message" : "POINT_POLICY_TYPE_ALREADY_EXIST"
}

3.2.4. 예외 - 유효성 검사 실패

HTTP 요청
POST /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 51
Host: localhost:8080

{
  "policyType" : "",
  "accumulatePoint" : null
}

3.2.5. HTTP 응답

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 86

{
  "message" : "포인트 정책 유형의 유효성 검사에 실패했습니다."
}

3.3. 포인트 정책 유형 수정

3.3.1. 요청

요청 필드
Path Type Description

pointPolicyTypeId

Number

포인트 정책 유형 번호

policyType

String

포인트 정책 유형 이름

HTTP 요청
PUT /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "pointPolicyTypeId" : 1,
  "policyType" : "REVIEW"
}

3.3.2. 응답

HTTP 응답
HTTP/1.1 200 OK

3.3.3. 예외 - 수정할 포인트 정책 유형을 찾지 못한 경우

HTTP 요청
PUT /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "pointPolicyTypeId" : 1,
  "policyType" : "REVIEW"
}
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 47

{
  "message" : "POINT_POLICY_TYPE_NOT_FOUND"
}

3.3.4. 예외 - 유효성 검사 실패

HTTP 요청
PUT /api/admin/point-policy-types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 50
Host: localhost:8080

{
  "pointPolicyTypeId" : 1,
  "policyType" : ""
}
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 86

{
  "message" : "포인트 정책 유형의 유효성 검사에 실패했습니다."
}

3.4. 포인트 정책 유형 삭제

3.4.1. 요청

요청 파라미터
Table 2. /api/admin/point-policy-types/{pointPolicyTypeId}
Parameter Description

pointPolicyTypeId

포인트 정책 유형 번호

HTTP 요청
DELETE /api/admin/point-policy-types/1 HTTP/1.1
Host: localhost:8080

3.4.2. 응답

HTTP 응답
HTTP/1.1 200 OK

3.4.3. 예외 - 삭제할 포인트 정책 유형을 찾지 못한 경우

HTTP 요청
DELETE /api/admin/point-policy-types/1 HTTP/1.1
Host: localhost:8080
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 47

{
  "message" : "POINT_POLICY_TYPE_NOT_FOUND"
}

4. 포인트 정책

4.1. 적용 유형 정책 조회

4.1.1. 요청

HTTP 요청
GET /api/point-policies/current/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080

4.1.2. 응답

응답 필드
Path Type Description

pointPolicyId

Number

포인트 정책 번호

policyType

String

포인트 정책 유형 이름

accumulatePoint

Number

적립 포인트

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 82

{
  "pointPolicyId" : 1,
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000
}

4.1.3. 예외 - 존재하지 않는 포인트 정책 유형

HTTP 요청
GET /api/point-policies/current/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 70

{
  "message" : "포인트 정책 유형을 찾지 못했습니다."
}

4.2. 전체 조회

4.2.1. 요청

HTTP 요청
GET /api/admin/point-policies HTTP/1.1
Host: localhost:8080

4.2.2. 응답

4.2.3. 응답 필드

Path Type Description

[].pointPolicyId

Number

포인트 정책 번호

[].policyType

String

포인트 정책 유형 이름

[].accumulatePoint

Number

적립 포인트

[].createdAt

String

변경일자

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 116

[ {
  "pointPolicyId" : 1,
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000,
  "createdAt" : "2024-01-01"
} ]

4.3. 정책 유형 ID 조회

4.3.1. 요청

HTTP 요청
GET /api/admin/point-policies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080

4.3.2. 응답

응답 필드
Path Type Description

[].pointPolicyId

Number

포인트 정책 번호

[].policyType

String

포인트 정책 유형 이름

[].accumulatePoint

Number

적립 포인트

[].createdAt

String

변경일자

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 116

[ {
  "pointPolicyId" : 1,
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000,
  "createdAt" : "2024-01-01"
} ]

4.3.3. 예외 - 포인트 정책이 존재하지 않은 경우

HTTP 요청
GET /api/admin/point-policies/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:8080
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 70

{
  "message" : "포인트 정책 유형을 찾지 못했습니다."
}

4.4. 적용중인 포인트 정책 목록 조회

4.4.1. 요청

응답 필드
Path Type Description

[].pointPolicyId

Number

포인트 정책 번호

[].policyType

String

포인트 정책 유형 이름

[].accumulatePoint

Number

적립 포인트

[].createdAt

String

변경일자

HTTP 요청
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 116

[ {
  "pointPolicyId" : 1,
  "policyType" : "REGISTER",
  "accumulatePoint" : 1000,
  "createdAt" : "2024-01-01"
} ]

4.5. 포인트 정책 생성

4.5.1. 요청

요청 필드
Path Type Description

accumulatePoint

Number

적립 포인트

pointPolicyTypeId

Number

포인트 정책 유형 번호

HTTP 요청
POST /api/admin/point-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "accumulatePoint" : 100,
  "pointPolicyTypeId" : 1
}

4.5.2. 응답

HTTP 응답
HTTP/1.1 201 Created

4.5.3. 예외 - 포인트 정책 유형이 존재하지 않는 경우

HTTP 요청
POST /api/admin/point-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 56
Host: localhost:8080

{
  "accumulatePoint" : 100,
  "pointPolicyTypeId" : 1
}
HTTP 응답
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 70

{
  "message" : "포인트 정책 유형을 찾지 못했습니다."
}

4.5.4. 예외 - 유효성 검사 실패

HTTP 요청
POST /api/admin/point-policies HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 57
Host: localhost:8080

{
  "accumulatePoint" : -100,
  "pointPolicyTypeId" : 1
}
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 76

{
  "message" : "포인트 정책 유효성 검사에 실패했습니다."
}

5. 도서

5.1. 도서

5.1.1. 도서 목록 조회

메인 페이지에서 도서 목록을 조회합니다.

요청
HTTP 요청
GET /api/books HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
응답
응답 필드
Path Type Description

booksPaginationReadResponseDtos.content[].bookId

Number

도서 번호

booksPaginationReadResponseDtos.content[].bookTitle

String

도서 이름

booksPaginationReadResponseDtos.content[].price

Number

도서 판매가

booksPaginationReadResponseDtos.content[].publisherName

String

출판사 이름

booksPaginationReadResponseDtos.content[].fileUrl

String

도서 썸네일

booksPaginationReadResponseDtos.totalPages

Number

총 페이지

booksPaginationReadResponseDtos.totalElements

Number

총 개수

booksPaginationReadResponseDtos.size

Number

화면에 출력할 개수

booksPaginationReadResponseDtos.number

Number

현재 페이지

booksPaginationReadResponseDtos.numberOfElements

Number

현재 페이지 개수

authorPaginationReadResponseDto[].authorName

Array

작가 이름

HTTP 응답
{
  "booksPaginationReadResponseDtos" : {
    "content" : [ {
      "bookId" : 1,
      "bookTitle" : "title",
      "price" : 1000,
      "publisherName" : "publisher",
      "fileUrl" : "url"
    } ],
    "pageable" : "INSTANCE",
    "totalPages" : 1,
    "totalElements" : 1,
    "last" : true,
    "size" : 1,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "sorted" : false,
      "unsorted" : true
    },
    "numberOfElements" : 1,
    "first" : true,
    "empty" : false
  },
  "authorPaginationReadResponseDto" : [ {
    "authorName" : [ "authorName" ]
  } ]
}

5.1.2. 장바구니용 도서 상세 조회

도서 번호들로 장바구니 및 주문용 도서 상세를 조회합니다.

요청
요청 필드
GET /api/books/orders?book-id=1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
요청 파라미터
Parameter Description

book-id

도서 번호

응답
응답 필드
Path Type Description

[].bookId

Number

도서 번호

[].bookTitle

String

도서 이름

[].regularPrice

Number

정가

[].price

Number

판매가

[].discountRatio

Number

할인율

[].stock

Number

재고

[].isPackagable

Boolean

포장 가능 여부

[].thumbnail

String

썸네일

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 192

[ {
  "bookId" : 1,
  "bookTitle" : "bookTitle",
  "regularPrice" : 10000,
  "price" : 1000,
  "discountRatio" : 33.3,
  "stock" : 100,
  "isPackagable" : true,
  "thumbnail" : "thumbnail"
} ]

5.1.3. 도서 상세 조회

도서 번호로 도서 상세를 조회합니다. memberId로 좋아요 버튼을 보여줄지 판단합니다.

요청
HTTP 요청
GET /api/books/1?memberId=1 HTTP/1.1
Host: localhost:8080
요청 경로 변수
Table 3. /api/books/{bookId}
Parameter Description

bookId

도서 번호

요청 파라미터
Parameter Description

memberId

회원 번호

응답
응답 필드
Path Type Description

bookDetailReadResponseDto.bookTitle

String

도서 이름

bookDetailReadResponseDto.bookIndex

String

도서 목차

bookDetailReadResponseDto.description

String

도서 설명

bookDetailReadResponseDto.publicatedAt

String

출판일시

bookDetailReadResponseDto.isbn

String

도서 isbn

bookDetailReadResponseDto.regularPrice

Number

도서 정가

bookDetailReadResponseDto.price

Number

도서 판매가

bookDetailReadResponseDto.discountRatio

Number

도서 할인율

bookDetailReadResponseDto.isPackagable

Boolean

도서 포장여부

bookDetailReadResponseDto.thumbnail

String

도서 썸네일

bookDetailReadResponseDto.statusName

Null

도서 상태 이름

bookDetailReadResponseDto.publisherId

Number

출판사 번호

bookDetailReadResponseDto.publisherName

String

출판사 이름

bookDetailReadResponseDto.authors

Object

작가

bookDetailReadResponseDto.wish

Number

좋아요

bookDetailReadResponseDto.view

Null

조회수

bookDetailReadResponseDto.fileUrl[]

Array

도서 상세 이미지

bookDetailReadResponseDto.tagName[]

Array

태그 이름

bookDetailReadResponseDto.categoryName[]

Array

카테고리 이름

reviewAverageReadResponseDto.avg

Number

리뷰 평점 평균

reviewAverageReadResponseDto.count

Number

도서가 가지는 리뷰 개수

HTTP 응답
{
  "bookDetailReadResponseDto" : {
    "bookTitle" : "title",
    "bookIndex" : "index",
    "description" : "description",
    "publicatedAt" : "2024-03-26",
    "isbn" : "1234567890123",
    "regularPrice" : 10000,
    "price" : 8000,
    "discountRatio" : 3.3,
    "isPackagable" : true,
    "thumbnail" : "thumbnail",
    "statusName" : null,
    "publisherId" : 1,
    "publisherName" : "publisher",
    "authors" : {
      "1" : "author"
    },
    "wish" : 1,
    "view" : null,
    "fileUrl" : [ "url" ],
    "tagName" : [ "tag" ],
    "categoryName" : [ "category" ]
  },
  "reviewAverageReadResponseDto" : {
    "avg" : 3.3,
    "count" : 1
  }
}

5.2. 도서(admin)

5.2.1. 도서 목록 조회

관리자 페이지에서 도서 목록을 조회합니다.

요청
HTTP 요청
GET /api/books HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 582

{
  "booksPaginationReadResponseDtos" : {
    "content" : [ {
      "bookId" : 1,
      "bookTitle" : "title",
      "price" : 1000,
      "publisherName" : "publisher",
      "fileUrl" : "url"
    } ],
    "pageable" : "INSTANCE",
    "totalPages" : 1,
    "totalElements" : 1,
    "last" : true,
    "size" : 1,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "sorted" : false,
      "unsorted" : true
    },
    "numberOfElements" : 1,
    "first" : true,
    "empty" : false
  },
  "authorPaginationReadResponseDto" : [ {
    "authorName" : [ "authorName" ]
  } ]
}
응답 필드
Path Type Description

booksPaginationReadResponseDtos.content[].bookId

Number

도서 번호

booksPaginationReadResponseDtos.content[].bookTitle

String

도서 이름

booksPaginationReadResponseDtos.content[].price

Number

도서 판매가

booksPaginationReadResponseDtos.content[].publisherName

String

출판사 이름

booksPaginationReadResponseDtos.content[].fileUrl

String

도서 썸네일

booksPaginationReadResponseDtos.totalPages

Number

총 페이지

booksPaginationReadResponseDtos.totalElements

Number

총 개수

booksPaginationReadResponseDtos.size

Number

화면에 출력할 개수

booksPaginationReadResponseDtos.number

Number

현재 페이지

booksPaginationReadResponseDtos.numberOfElements

Number

현재 페이지 개수

authorPaginationReadResponseDto[].authorName

Array

작가 이름

5.2.2. 도서 상세 조회

도서 번호로 도서 상세를 조회합니다.

요청
HTTP 요청
GET /api/admin/books/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
요청 파라미터
Table 4. /api/admin/books/{bookId}
Parameter Description

bookId

도서 번호

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 962

{
  "adminSelectedReadResponseDto" : {
    "bookTitle" : "title",
    "bookIndex" : "index",
    "description" : "description",
    "publicatedAt" : "2022-02-27",
    "isbn" : "1234567890123",
    "regularPrice" : 1,
    "price" : 1,
    "discountRatio" : 33.3,
    "stock" : 100,
    "isPackagable" : true,
    "authorIdList" : [ 1 ],
    "publisherId" : 1,
    "statusId" : 1,
    "url" : "test",
    "categoryIdList" : null,
    "tagIdList" : null
  },
  "parentCategoryReadResponseDtoList" : [ {
    "categoryId" : null,
    "categoryName" : "category",
    "parentCategories" : [ ]
  } ],
  "publisherReadResponseDtoList" : [ {
    "publisherId" : 1,
    "publisherName" : "publisher"
  } ],
  "authorReadResponseDtoList" : [ {
    "authorId" : 1,
    "authorName" : "author"
  } ],
  "bookStatusReadResponseDtoList" : [ {
    "statusId" : 1,
    "statusName" : "status"
  } ],
  "tagReadResponseDtoList" : [ {
    "tagId" : 1,
    "tagName" : "tag"
  } ]
}
응답 필드
Path Type Description

adminSelectedReadResponseDto.bookTitle

String

도서 이름

adminSelectedReadResponseDto.bookIndex

String

목차

adminSelectedReadResponseDto.description

String

도서 설명

adminSelectedReadResponseDto.publicatedAt

String

출판일자

adminSelectedReadResponseDto.isbn

String

isbn

adminSelectedReadResponseDto.regularPrice

Number

정가

adminSelectedReadResponseDto.price

Number

판매가

adminSelectedReadResponseDto.discountRatio

Number

할인율

adminSelectedReadResponseDto.stock

Number

재고

adminSelectedReadResponseDto.isPackagable

Boolean

포장 여부

adminSelectedReadResponseDto.authorIdList

Array

작가 번호 리스트

adminSelectedReadResponseDto.publisherId

Number

출판사 번호

adminSelectedReadResponseDto.statusId

Number

도서 상태 번호

adminSelectedReadResponseDto.url

String

도서 썸네일

adminSelectedReadResponseDto.categoryIdList

Null

카테고리 번호 리스트

adminSelectedReadResponseDto.tagIdList

Null

태그 번호 리스트

parentCategoryReadResponseDtoList[].categoryId

Null

전체 출판사 번호 번호

parentCategoryReadResponseDtoList[].categoryName

String

전체 출판사 이름

parentCategoryReadResponseDtoList[].parentCategories

Array

전체 출판사 이름

publisherReadResponseDtoList[].publisherId

Number

전체 출판사 번호 번호

publisherReadResponseDtoList[].publisherName

String

전체 출판사 이름

authorReadResponseDtoList[].authorId

Number

전체 출판사 번호 번호

authorReadResponseDtoList[].authorName

String

전체 출판사 이름

bookStatusReadResponseDtoList

Array

전체 도서 상태 번호 리스트

bookStatusReadResponseDtoList[].statusId

Number

전체 출판사 번호 번호

bookStatusReadResponseDtoList[].statusName

String

전체 출판사 이름

tagReadResponseDtoList[].tagId

Number

전체 출판사 번호 번호

tagReadResponseDtoList[].tagName

String

전체 출판사 이름

5.2.3. 도서 등록 폼 조회

도서 등록 폼을 조회합니다. 등록하기 위해 카테고리, 태그, 작가, 출판사의 전체 목록을 조회합니다.

요청
HTTP 요청
GET /api/admin/books/form HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 508

{
  "parentCategoryReadResponseDtoList" : [ {
    "categoryId" : null,
    "categoryName" : "category",
    "parentCategories" : [ ]
  } ],
  "publisherReadResponseDtoList" : [ {
    "publisherId" : 1,
    "publisherName" : "publisher"
  } ],
  "authorReadResponseDtoList" : [ {
    "authorId" : 1,
    "authorName" : "author"
  } ],
  "bookStatusReadResponseDtoList" : [ {
    "statusId" : 1,
    "statusName" : "status"
  } ],
  "tagReadResponseDtoList" : [ {
    "tagId" : 1,
    "tagName" : "tag"
  } ]
}
응답 필드
Path Type Description

parentCategoryReadResponseDtoList[].categoryId

Null

전체 출판사 번호 번호

parentCategoryReadResponseDtoList[].categoryName

String

전체 출판사 이름

parentCategoryReadResponseDtoList[].parentCategories

Array

전체 출판사 이름

publisherReadResponseDtoList[].publisherId

Number

전체 출판사 번호 번호

publisherReadResponseDtoList[].publisherName

String

전체 출판사 이름

authorReadResponseDtoList[].authorId

Number

전체 출판사 번호 번호

authorReadResponseDtoList[].authorName

String

전체 출판사 이름

bookStatusReadResponseDtoList[].statusId

Number

전체 출판사 번호 번호

bookStatusReadResponseDtoList[].statusName

String

전체 출판사 이름

tagReadResponseDtoList[].tagId

Number

전체 출판사 번호 번호

tagReadResponseDtoList[].tagName

String

전체 출판사 이름

5.2.4. 도서 등록

도서를 등록합니다.

요청
HTTP 요청
POST /api/admin/books HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=image; filename=thumbnail
Content-Type: image/png

thumbnail
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=book; filename=book
Content-Type: application/json

{"bookTitle":"title","bookIndex":null,"description":null,"publicatedAt":null,"isbn":"1234567890123","regularPrice":null,"price":null,"discountRatio":null,"stock":null,"isPackagable":null,"publisherId":null,"categories":null,"tags":null,"authorIdList":null,"fileIdList":null}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
요청 파트
Part Description

book

도서 정보

image

이미지 url

응답
HTTP 응답
HTTP/1.1 201 Created

5.2.5. 예외 - 잘못된 입력값이 들어올 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
POST /api/admin/books HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=image; filename=thumbnail
Content-Type: image/png

thumbnail
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=book; filename=book
Content-Type: application/json

{"bookTitle":null,"bookIndex":null,"description":null,"publicatedAt":null,"isbn":null,"regularPrice":null,"price":null,"discountRatio":null,"stock":null,"isPackagable":null,"publisherId":null,"categories":null,"tags":null,"authorIdList":null,"fileIdList":null}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
요청 파트
Part Description

book

도서 정보

image

이미지 url

응답
응답 필드
Path Type Description

message

String

오류 메세지

HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

5.2.6. 도서 수정

도서 번호로 기존 도서 정보를 조회하고 요청 데이터로 도서를 수정합니다.

요청
HTTP 요청
PUT /api/admin/books/1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=book; filename=book
Content-Type: application/json

{"bookTitle":"title","bookIndex":null,"description":null,"publicatedAt":null,"isbn":"1234567890123","regularPrice":null,"price":null,"discountRatio":null,"stock":null,"isPackagable":null,"statusId":null,"publisherId":null,"categories":null,"tags":null,"authorIdList":null,"fileIdList":null}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=image; filename=thumbnail
Content-Type: image/png

thumbnail
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
요청 파라미터
Table 5. /api/admin/books/{bookId}
Parameter Description

bookId

도서 번호

요청 파트
Part Description

book

도서 정보

image

이미지 url

응답
HTTP 응답
HTTP/1.1 200 OK

5.2.7. 예외 - 잘못된 입력값이 들어올 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
PUT /api/admin/books/1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=book; filename=book
Content-Type: application/json

{"bookTitle":"title","bookIndex":null,"description":null,"publicatedAt":null,"isbn":"1234567890123","regularPrice":null,"price":null,"discountRatio":null,"stock":null,"isPackagable":null,"statusId":null,"publisherId":null,"categories":null,"tags":null,"authorIdList":null,"fileIdList":null}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=image; filename=thumbnail
Content-Type: image/png

thumbnail
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
요청 파라미터
Table 6. /api/admin/books/{bookId}
Parameter Description

bookId

도서 번호

요청 파트
Part Description

book

도서 정보

image

이미지 url

응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 74

{
  "message" : "도서 제목은 한 글자 이상이여야 합니다."
}
응답 필드
{
  "message" : "도서 제목은 한 글자 이상이여야 합니다."
}

6. 작가

6.1. 작가

6.1.1. 작가 상세 조회

작가 번호로 작가 상세를 조회합니다.

요청
HTTP 요청
GET /api/authors/1 HTTP/1.1
Host: localhost:8080
요청 경로 변수
Table 7. /api/authors/{authorId}
Parameter Description

authorId

작가 번호

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 101

{
  "authorId" : 1,
  "authorName" : "name",
  "authorIntroduce" : "introduce",
  "fileUrl" : "url"
}
응답 필드
Path Type Description

authorId

Number

작가 번호

authorName

String

작가 이름

authorIntroduce

String

작가 설명

fileUrl

String

작가 사진

6.1.2. 작가 이름으로 작가 목록 조회

작가 이름으로 작가 목록을 조회합니다. 동명이인의 경우 해당하는 모든 작가 목록이 나옵니다.

요청
HTTP 요청
GET /api/authors?authorName=name HTTP/1.1
Host: localhost:8080
요청 파라미터
Parameter Description

authorName

작가 이름

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 105

[ {
  "authorId" : 1,
  "authorName" : "name",
  "authorIntroduce" : "introduce",
  "fileUrl" : "url"
} ]
응답 필드
Path Type Description

[].authorId

Number

작가 번호

[].authorName

String

작가 이름

[].authorIntroduce

String

작가 설명

[].fileUrl

String

작가 사진

6.2. 작가(admin)

6.2.1. 작가 목록 페이지 조회

관리자 페이지에서 작가 목록 페이지를 조회합니다.

요청
HTTP 요청
GET /api/admin/authors HTTP/1.1
Host: localhost:8080
응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 395

{
  "content" : [ {
    "authorId" : 1,
    "authorName" : "name",
    "authorIntroduce" : "introduce",
    "fileUrl" : "url"
  } ],
  "pageable" : "INSTANCE",
  "totalPages" : 1,
  "totalElements" : 1,
  "last" : true,
  "size" : 1,
  "number" : 0,
  "sort" : {
    "empty" : true,
    "sorted" : false,
    "unsorted" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "empty" : false
}
응답 필드
{
  "content" : [ {
    "authorId" : 1,
    "authorName" : "name",
    "authorIntroduce" : "introduce",
    "fileUrl" : "url"
  } ],
  "pageable" : "INSTANCE",
  "totalPages" : 1,
  "totalElements" : 1,
  "last" : true,
  "size" : 1,
  "number" : 0,
  "sort" : {
    "empty" : true,
    "sorted" : false,
    "unsorted" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "empty" : false
}

6.2.2. 작가 등록

관리자 페이지에서 작가를 등록합니다.

요청
HTTP 요청
POST /api/admin/authors HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 74
Host: localhost:8080

{
  "authorName" : "authorName",
  "authorIntroduce" : "authorIntroduce"
}
요청 파트
Part Description

author

작가

authorFile

작가 사진

응답
HTTP 응답
HTTP/1.1 201 Created

6.2.3. 예외 - 잘못된 입력값이 들어올 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
POST /api/admin/authors HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 53
Host: localhost:8080

{
  "authorName" : null,
  "authorIntroduce" : null
}
응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

6.2.4. 작가 수정

작가 번호로 기존 작가 정보를 조회하고 요청 데이터로 작가를 수정합니다.

요청
HTTP 요청
PUT /api/admin/authors/1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 74
Host: localhost:8080

{
  "authorName" : "authorName",
  "authorIntroduce" : "authorIntroduce"
}
요청 경로 변수
Table 8. /api/admin/authors/{authorId}
Parameter Description

authorId

작가 번호

요청 파트
Part Description

author

작가

authorFile

작가 사진

응답
HTTP 응답
HTTP/1.1 200 OK

6.2.5. 예외 - 잘못된 입력값이 들어온 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
PUT /api/admin/authors/1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080

--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=authorFile; filename=authorFile
Content-Type: image/png

authorFile
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=author; filename=author
Content-Type: application/json

{"authorName":null,"authorIntroduce":null}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
요청 경로 변수
Table 9. /api/admin/authors/{authorId}
Parameter Description

authorId

작가 번호

요청 파트
Part Description

author

작가

authorFile

작가 사진

응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

7. 리뷰

7.1. 리뷰

7.1.1. 회원 번호로 리뷰 조회

회원 번호로 회원이 작성한 리뷰를 조회합니다.

요청
HTTP 요청
GET /api/auth/reviews?memberId=1 HTTP/1.1
Host: localhost:8080
요청 파라미터
Parameter Description

memberId

회원 번호

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 671

{
  "reviewDetailReadResponseDtos" : {
    "content" : [ {
      "reviewId" : 1,
      "reviewTitle" : "reviewTitle",
      "reviewContent" : "reviewContent",
      "registeredAt" : "24. 3. 26. 오후 6:31",
      "score" : 5,
      "bookId" : 123,
      "bookTitle" : "bookTitle",
      "thumbnail" : "thumbnail"
    } ],
    "pageable" : "INSTANCE",
    "totalPages" : 1,
    "totalElements" : 1,
    "last" : true,
    "size" : 1,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "sorted" : false,
      "unsorted" : true
    },
    "numberOfElements" : 1,
    "first" : true,
    "empty" : false
  },
  "reviewFiles" : {
    "1" : [ ]
  },
  "count" : 1
}

7.1.2. 도서 번호로 리뷰 조회

도서 번호로 도서가 가진 리뷰를 조회합니다.

요청
HTTP 요청
GET /api/reviews/books/1 HTTP/1.1
Host: localhost:8080
요청 경로 변수
Table 10. /api/reviews/books/{bookId}
Parameter Description

bookId

도서 번호

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 589

{
  "reviewDetailReadResponseDtos" : {
    "content" : [ {
      "reviewId" : 1,
      "reviewerEmail" : "email",
      "reviewTitle" : "reviewTitle",
      "reviewContent" : "reviewContent",
      "registeredAt" : "2024-03-26",
      "score" : 1
    } ],
    "pageable" : "INSTANCE",
    "totalPages" : 1,
    "totalElements" : 1,
    "last" : true,
    "size" : 1,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "sorted" : false,
      "unsorted" : true
    },
    "numberOfElements" : 1,
    "first" : true,
    "empty" : false
  },
  "reviewFiles" : {
    "1" : [ ]
  }
}

7.1.3. 리뷰 등록

리뷰를 등록합니다. 주문 완료 후 상태가 배송 완료가 되어야 리뷰를 작성할 수 있습니다.

요청
HTTP 요청
POST /api/auth/reviews?memberId=1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 126
Host: localhost:8080

{
  "bookId" : 1,
  "orderDetailId" : 1,
  "reviewTitle" : "reviewTitle",
  "reviewContent" : "reviewContent",
  "score" : 1
}
요청 파라미터
Parameter Description

memberId

회원 번호

요청 파트
Part Description

review

리뷰

images

리뷰 이미지

요청 필드
Path Type Description

bookId

Number

도서 번호

orderDetailId

Number

주문 상세 번호

reviewTitle

String

리뷰 제목

reviewContent

String

리뷰 설명

score

Number

평점

응답
HTTP 응답
HTTP/1.1 201 Created

7.1.4. 예외 - 잘못된 입력값이 들어올 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
POST /api/auth/reviews?memberId=1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 115
Host: localhost:8080

{
  "bookId" : null,
  "orderDetailId" : null,
  "reviewTitle" : null,
  "reviewContent" : null,
  "score" : null
}
요청 파라미터
Parameter Description

memberId

회원 번호

요청 파트
Part Description

review

리뷰

images

리뷰 이미지

요청 필드
Path Type Description

bookId

Null

도서 번호

orderDetailId

Null

주문 상세 번호

reviewTitle

Null

리뷰 제목

reviewContent

Null

리뷰 설명

score

Null

평점

응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

7.1.5. 리뷰 수정

리뷰 번호로 기존 리뷰 정보를 조회하고 요청 데이터로 리뷰를 수정합니다.

요청
HTTP 요청
PUT /api/auth/reviews/1?memberId=1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 87
Host: localhost:8080

{
  "reviewTitle" : "reviewTitle",
  "reviewContent" : "reviewContent",
  "score" : 1
}
요청 파라미터
Parameter Description

memberId

회원 번호

요청 파트
Part Description

review

리뷰

images

리뷰 이미지

요청 필드
Path Type Description

reviewTitle

String

리뷰 제목

reviewContent

String

리뷰 설명

score

Number

리뷰 평점

응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

7.1.6. 예외 - 잘못된 입력값이 들어올 경우

잘못된 입력에 대해 메세지를 반환합니다.

요청
HTTP 요청
PUT /api/auth/reviews/1?memberId=1 HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Accept: application/json
Content-Length: 70
Host: localhost:8080

{
  "reviewTitle" : null,
  "reviewContent" : null,
  "score" : null
}
요청 파라미터
Parameter Description

memberId

회원 번호

요청 파트
Part Description

review

리뷰

images

리뷰 이미지

요청 필드
Path Type Description

reviewTitle

Null

리뷰 제목

reviewContent

Null

리뷰 설명

score

Null

리뷰 평점

응답
HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 37

{
  "message" : "must not be blank"
}

8. 장바구니

8.1. 장바구니

8.1.1. 장바구니 조회

회원 번호로 장바구니를 조회합니다.

요청
HTTP 요청
GET /api/carts/1 HTTP/1.1
Host: localhost:8080
요청 경로 변수
Table 11. /api/carts/{memberId}
Parameter Description

memberId

회원 번호

응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 38

[ {
  "amount" : 1,
  "bookId" : 1
} ]
응답 필드
Path Type Description

[].amount

Number

수량

[].bookId

Number

도서 번호

8.1.2. 장바구니 등록

장바구니를 등록합니다.

요청
HTTP 요청
POST /api/carts HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 56
Host: localhost:8080

[ {
  "memberId" : 1,
  "bookId" : 1,
  "amount" : 1
} ]
요청 필드
Path Type Description

[].bookId

Number

도서 번호

[].memberId

Number

회원 번호

[].amount

Number

수량

응답
HTTP 응답
HTTP/1.1 201 Created

9. 쿠폰

9.1. 쿠폰

9.1.1. 요청

HTTP 요청
GET /api/coupons?page=0 HTTP/1.1
Host: localhost:8080

9.1.2. 응답

응답 필드
Path Type Description

content[].couponId

String

쿠폰 ID

content[].couponName

String

쿠폰 이름

content[].minPrice

Number

최소 주문 가격

content[].discountPrice

Number

할인 가격

content[].maxDiscountPrice

Number

최대 할인 가격

content[].basicIssuedDate

String

쿠폰 발급일

content[].basicExpiredDate

String

쿠폰 만료일

content[].validity

Number

쿠폰 유효 기간

content[].couponTypeId

Number

쿠폰 유형 ID

content[].isBirth

Boolean

생일 쿠폰 여부

content[].couponStatusId

Number

쿠폰 상태 ID

pageable

String

페이지 정보

last

Boolean

마지막 페이지 여부

totalPages

Number

전체 페이지 수

totalElements

Number

전체 요소 수

number

Number

현재 페이지 번호 (0부터 시작)

size

Number

페이지 크기

numberOfElements

Number

현재 페이지의 요소 수

empty

Boolean

비어 있는지 여부

sort.empty

Boolean

정렬 여부: 비어 있음

sort.sorted

Boolean

정렬 여부: 정렬됨

sort.unsorted

Boolean

정렬 여부: 정렬되지 않음

first

Boolean

처음

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 589

{
  "content" : [ {
    "couponId" : "1",
    "couponName" : "쿠폰1",
    "minPrice" : 10000,
    "discountPrice" : 5000,
    "maxDiscountPrice" : 0,
    "basicIssuedDate" : "2024.03.26",
    "basicExpiredDate" : "2024.04.02",
    "validity" : 7,
    "couponTypeId" : 1,
    "isBirth" : true,
    "couponStatusId" : 1
  } ],
  "pageable" : "INSTANCE",
  "totalPages" : 1,
  "totalElements" : 1,
  "last" : true,
  "size" : 1,
  "number" : 0,
  "sort" : {
    "empty" : true,
    "sorted" : false,
    "unsorted" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "empty" : false
}

9.2. 쿠폰 디테일

9.2.1. 요청

HTTP 요청
GET /api/coupons/1 HTTP/1.1
Host: localhost:8080

9.2.2. 응답

응답 필드
Path Type Description

couponId

String

쿠폰 ID

couponName

String

쿠폰 이름

minPrice

Number

최소 가격

discountPrice

Number

할인 가격

maxDiscountPrice

Number

최대 할인 가격

basicIssuedDate

String

기본 발급 날짜

basicExpiredDate

String

기본 만료 날짜

validity

Number

유효 기간

couponTypeName

String

쿠폰 타입

isBirth

Boolean

생일 쿠폰 여부

couponStatusName

String

쿠폰 상태

categories

Array

관련 카테고리 목록

books.[].bookId

Number

관련 책 id

books.[].bookTitle

String

관련 책 이름

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 304

{"couponId":"1","couponName":"쿠폰1","minPrice":10000,"discountPrice":5000,"maxDiscountPrice":0,"basicIssuedDate":"2024-03-26","basicExpiredDate":"2024-04-02","validity":7,"couponTypeName":"%","isBirth":true,"couponStatusName":"정상","categories":[],"books":[{"bookId":1,"bookTitle":"테스트책"}]}

9.3. 쿠폰리스트

9.3.1. 요청

HTTP 요청
GET /api/admin/coupons?coupon-status-id=1 HTTP/1.1
Host: localhost:8080

9.3.2. 응답

응답 필드
Path Type Description

content[0].couponId

String

쿠폰 ID

content[0].couponName

String

쿠폰 이름

content[0].discountPrice

Number

할인 금액

content[0].maxDiscountPrice

Number

최대 할인 금액

content[0].minPrice

Number

최소 주문 금액

content[0].basicIssuedDate

String

발급일

content[0].basicExpiredDate

String

만료일

content[0].validity

Number

유효 기간

content[0].couponTypeId

Number

쿠폰 유형 ID

content[0].isBirth

Boolean

생일 쿠폰 여부

content[0].couponStatusId

Number

쿠폰 상태 ID

pageable

String

페이지 정보

last

Boolean

마지막 페이지 여부

totalPages

Number

전체 페이지 수

totalElements

Number

전체 요소 수

first

Boolean

첫 페이지 여부

number

Number

현재 페이지 번호 (0부터 시작)

size

Number

페이지 크기

numberOfElements

Number

현재 페이지 요소 수

empty

Boolean

비어 있는지 여부

sort.empty

Boolean

정렬 여부: 비어 있음

sort.sorted

Boolean

정렬 여부: 정렬됨

sort.unsorted

Boolean

정렬 여부: 정렬되지 않음

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 602

{
  "content" : [ {
    "couponId" : "1",
    "couponName" : "테스트쿠폰",
    "minPrice" : 10000,
    "discountPrice" : 1000,
    "maxDiscountPrice" : 1000,
    "basicIssuedDate" : "2024.03.26",
    "basicExpiredDate" : "2024.03.26",
    "validity" : 30,
    "couponTypeId" : 2,
    "isBirth" : false,
    "couponStatusId" : 1
  } ],
  "pageable" : "INSTANCE",
  "totalPages" : 1,
  "totalElements" : 1,
  "last" : true,
  "size" : 1,
  "number" : 0,
  "sort" : {
    "empty" : true,
    "sorted" : false,
    "unsorted" : true
  },
  "numberOfElements" : 1,
  "first" : true,
  "empty" : false
}

9.4. 쿠폰생성

9.4.1. 요청

HTTP 요청
POST /api/admin/coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 231
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 3, 26 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1
}

9.4.2. 응답

HTTP 응답
HTTP/1.1 201 Created

9.5. 쿠폰생성오류

9.5.1. 요청

HTTP 요청
POST /api/admin/coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 231
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 2, 25 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1
}

9.5.2. 응답

HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 61

{
  "message" : "쿠폰발급시작일이 과거입니다."
}

9.6. 책쿠폰 등록

9.6.1. 요청

HTTP 요청
POST /api/admin/coupons/book-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 251
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 3, 26 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1,
  "bookId" : 12345
}

9.6.2. 응답

HTTP 응답
HTTP/1.1 201 Created

9.7. 책쿠폰 등록 실패

9.7.1. 요청

HTTP 요청
POST /api/admin/coupons/book-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 243
Host: localhost:8080

{
  "couponName" : "asd",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 2, 25 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1,
  "bookId" : 12345
}

9.7.2. 응답

HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 61

{
  "message" : "쿠폰발급시작일이 과거입니다."
}

9.8. 카테고리 쿠폰 등록

9.8.1. 요청

HTTP 요청
POST /api/admin/coupons/category-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 255
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 3, 26 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1,
  "categoryId" : 12345
}

9.8.2. 응답

HTTP 응답
HTTP/1.1 201 Created

9.9. 카테고리 쿠폰 등록 실패

9.9.1. 요청

HTTP 요청
POST /api/admin/coupons/category-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 255
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "basicIssuedDate" : [ 2024, 2, 25 ],
  "basicExpiredDate" : [ 2024, 4, 25 ],
  "validity" : 30,
  "couponTypeId" : 1,
  "categoryId" : 12345
}

9.9.2. 응답

HTTP 응답
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: 61

{
  "message" : "쿠폰발급시작일이 과거입니다."
}

9.10. 생일 쿠폰 등록

9.10.1. 요청

HTTP 요청
POST /api/admin/coupons/birthday-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 126
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "month" : 4
}

9.10.2. 응답

HTTP 응답
HTTP/1.1 201 Created

9.11. 생일쿠폰 등록 실패

9.11.1. 요청

HTTP 요청
POST /api/admin/coupons/birthday-coupons HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 126
Host: localhost:8080

{
  "couponName" : "Test Coupon",
  "minPrice" : 10000,
  "maxDiscountPrice" : 5000,
  "discountPrice" : 2000,
  "month" : 4
}

9.11.2. 응답

HTTP 응답
HTTP/1.1 201 Created

10. 회원

10.1. 회원가입

10.1.1. 요청

요청 필드
Path Type Description

email

String

이메일

password

String

패스워드

memberName

String

이름

birthday

Array

생일

phoneNumber

String

핸드폰 번호

HTTP 요청
POST /api/members HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 204
Host: localhost:8080

{
  "email" : "sa4777@naver.com",
  "password" : "$2a$10$Vg6NdhS0lnyQNe1FXg6cROGWVPgcyfDXl9ftA1pA6ni4aY3Hj",
  "memberName" : "이민서",
  "birthday" : [ 2024, 3, 26 ],
  "phoneNumber" : "01012345678"
}
응답
HTTP 응답
HTTP/1.1 201 Created

10.1.2. 예외 - 유효성 검사 실패 (이메일 null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 63

{
  "message" : "[이메일은 필수 입력 값 입니다.]"
}

10.1.3. 예외 - 유효성 검사 실패 (비밀번호 null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 66

{
  "message" : "[비밀번호는 필수 입력 값 입니다.]"
}

10.1.4. 예외 - 유효성 검사 실패 (비밀번호 공백)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 66

{
  "message" : "[비밀번호는 필수 입력 값 입니다.]"
}

10.1.5. 예외 - 유효성 검사 실패 (이름 null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 60

{
  "message" : "[이름은 필수 입력 값 입니다.]"
}

10.1.6. 예외 - 유효성 검사 실패 (이름 공백)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 60

{
  "message" : "[이름은 필수 입력 값 입니다.]"
}

10.1.7. 예외 - 유효성 검사 실패 (생일 null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 60

{
  "message" : "[생일은 필수 입력 값 입니다.]"
}

10.1.8. 예외 - 유효성 검사 실패 (핸드폰 번호 null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 70

{
  "message" : "[핸드폰 번호는 필수 입력 값 입니다.]"
}

10.1.9. 예외 - 유효성 검사 실패 (핸드폰 번호 공백)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 70

{
  "message" : "[핸드폰 번호는 필수 입력 값 입니다.]"
}

10.2. 로그인 정보 가져오기

10.2.1. 요청

요청 필드
Path Type Description

email

String

이메일

HTTP 요청
POST /api/members/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 34
Host: localhost:8080

{
  "email" : "sa4777@naver.com"
}
응답
응답 필드
Path Type Description

memberId

Number

멤버 아이디

email

String

이메일

password

String

패스워드

role.[]

Array

권한

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156

{
  "memberId" : 1,
  "email" : "sa4777@naver.com",
  "password" : "$2a$10$ILNBmH6tPNBa8/WeZ4hvi.BHj4bcpUKWcCM/Zc2SLIHBgvForZdHq",
  "role" : [ "MEMBER" ]
}

10.2.2. 예외 - 유효성 검사 실패 (이메일 - null)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 63

{
  "message" : "[이메일은 필수 입력 값 입니다.]"
}

10.3. 이메일 중복 체크

10.3.1. 요청

요청 필드
Path Type Description

email

String

이메일

HTTP 요청
POST /api/members/checkEmail HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 34
Host: localhost:8080

{
  "email" : "sa4777@naver.com"
}
응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4

true

10.3.2. 중복일 경우

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 5

false

10.3.3. 예외 - 유효성 검사 실패 (이메일 - 패턴)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 65

{
  "message" : "[이메일이 형식에 맞지 않습니다.]"
}

10.3.4. 예외 - 유효성 검사 실패 (이메일 - 공백)

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 63

{
  "message" : "[이메일은 필수 입력 값 입니다.]"
}

10.4. 회원 정보 가져오기

10.4.1. 요청

HTTP 요청
GET /api/auth/info HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization-Id: 1
Host: localhost:8080
응답
응답 필드
Path Type Description

memberId

Number

멤버 아이디

memberName

String

멤버 이름

email

String

이메일

phoneNumber

String

핸드폰 번호

birthday

String

생일

memberPoint

Number

포인트

roles.[]

Array

권한

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 16

sa4777@naver.com

10.5. 소셜 멤버 체크

10.5.1. 요청

응답 필드
Path Type Description

id

String

아이디

HTTP 요청
POST /api/oauth/check HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 23
Host: localhost:8080

{
  "id" : "thisisID"
}
응답
HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4

true

10.5.2. 소셜 멤버 체크 실패

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 5

false

10.5.3. 예외 - 유효성 검사 실패

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 63

{
  "message" : "[아이디는 필수 입력 값 입니다.]"
}

10.6. 소셜 멤버 아이디 가져오기

10.6.1. 요청

요청 필드
Path Type Description

id

String

아이디

HTTP 요청
POST /api/oauth HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 23
Host: localhost:8080

{
  "id" : "thisisID"
}

10.6.2. 응답

HTTP 응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 16

sa4777@naver.com

10.6.3. 예외 - 유효성 검사 실패

HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 63

{
  "message" : "[아이디는 필수 입력 값 입니다.]"
}

11. 결제

11.1. 결제

11.1.1. 요청

요청 필드
Path Type Description

payKey

String

결제 키

orderCode

String

주문 코드

totalAmount

Number

결제 금액

balanceAmount

Number

환불 가능 금액

approvedAt

String

결제 승인 시간

requestedAt

String

결제 요청 시간

vat

Number

부가세

isPartialCancelable

Boolean

부분 환불 여부

method

String

결제 방법

status

String

결제 상태

provider

String

결제 회사

HTTP 요청
POST /api/pays HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 331
Host: localhost:8080

{
  "payKey" : "payKey",
  "orderCode" : "571f17cd2b054353ba4b1ed48b44ef13",
  "totalAmount" : 10000,
  "balanceAmount" : 10000,
  "approvedAt" : "2024-01-01T00:00:00",
  "requestedAt" : "2024-01-01T00:00:00",
  "vat" : 1000,
  "isPartialCancelable" : true,
  "method" : "간편결제",
  "status" : "DONE",
  "provider" : "toss"
}

11.1.2. 응답

HTTP 응답
HTTP/1.1 201 Created

11.1.3. 예외 - 유효성 검사 실패

HTTP 요청
POST /api/pays HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 247
Host: localhost:8080

{
  "payKey" : null,
  "orderCode" : null,
  "totalAmount" : null,
  "balanceAmount" : null,
  "approvedAt" : null,
  "requestedAt" : null,
  "vat" : null,
  "isPartialCancelable" : null,
  "method" : null,
  "status" : null,
  "provider" : null
}
HTTP 응답
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 518

{
  "message" : "[결제회사 정보는 필수 항목입니다., 결제 수단은 필수 항목입니다., 환불 가능 금액은 필수 항목입니다., 결제 시간은 필수 항목입니다., 결제 키 값은 공백일 수 없습니다., 결제 금액은 필수 항목입니다., 부가세는 필수 항목입니다., 개별 환불 여부는 필수 항목입니다., 결제 승인 시간은 필수 항목입니다., 결제 상태는 필수 항목입니다., 주문 코드 값은 공백일 수 없습니다.]"
}