Show API 문서 - f-lab-edu/at_ticket GitHub Wiki


Show API 문서

version 1.0.0-SNAPSHOT

공연별 남은 좌석 조회

Request

GET /shows/1/seats/count HTTP/1.1
Host: localhost:8080

Path Parameter

Table 1. /shows/{showId}/seats/count
Parameter Description

showId

공연 ID

Response

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

{
  "code" : 200,
  "message" : "요청에 성공하셨습니다.",
  "data" : {
    "remainSeats" : [ {
      "showId" : 1,
      "gradeId" : 1,
      "gradeNm" : "A",
      "seatCnt" : 5
    }, {
      "showId" : 1,
      "gradeId" : 2,
      "gradeNm" : "B",
      "seatCnt" : 3
    } ]
  }
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data.remainSeats[].showId

Number

공연 ID

data.remainSeats[].gradeId

Number

등급 ID

data.remainSeats[].gradeNm

String

공연 이름

data.remainSeats[].seatCnt

Number

남은 좌석수

공연 등록

Request

POST /shows/product/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 196
Host: localhost:8080

{
  "shows" : [ {
    "date" : "2023-05-05",
    "time" : "10:00:00",
    "session" : 1,
    "hallId" : 1,
    "seats" : [ {
      "grade" : 1,
      "ids" : [ 1, 2, 3 ]
    } ]
  } ]
}

Path Parameter

Table 2. /shows/product/{productId}
Parameter Description

productId

상품 ID

Request Fields

Path Type Description

shows[].date

String

공연 날짜

shows[].time

String

공연 시간

shows[].session

Number

공연 순번

shows[].hallId

Number

공연장 ID

shows[].seats[].grade

Number

공연 등급 ID

shows[].seats[].ids

Array

좌석 ID

Response

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

{
  "code" : 200,
  "message" : "요청에 성공하셨습니다.",
  "data" : {
    "showIds" : [ ]
  }
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data.showIds[]

Array

등록된 공연 ID

공연의 남은 좌석 조회

Request

GET /shows/1/seats HTTP/1.1
Host: localhost:8080

Path Parameter

Table 3. /shows/{showId}/seats
Parameter Description

showId

공연 ID

Response

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

{
  "code" : 200,
  "message" : "요청에 성공하셨습니다.",
  "data" : {
    "seats" : [ {
      "id" : 1,
      "space" : "1층",
      "locX" : "1",
      "locY" : "1",
      "row" : "1L",
      "rowNum" : 0,
      "grade" : "A",
      "price" : 1000
    } ]
  }
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data.seats[].id

Number

좌석 이름

data.seats[].space

String

영역 이름

data.seats[].locX

String

x 좌표

data.seats[].locY

String

y 좌표

data.seats[].row

String

좌석 행

data.seats[].rowNum

Number

좌석 열

data.seats[].grade

String

좌석 등급

data.seats[].price

Number

좌석 가격

공연 좌석 가격 조회

Request

POST /shows/1/seats/price HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 31
Host: localhost:8080

{
  "seatIds" : [ 1, 2, 3 ]
}

Path Parameter

Table 4. /shows/{showId}/seats/price
Parameter Description

showId

공연 ID

Request Fields

Path Type Description

seatIds

Array

좌석 ID

Response

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

{
  "code" : 200,
  "message" : "요청에 성공하셨습니다.",
  "data" : 1000
}

Response Fields

Path Type Description

code

Number

결과코드

message

String

결과 메세지

data

Number

가격

Version 1.0.0-SNAPSHOT
Last updated 2023-10-20 16:46:58 +0900

⚠️ **GitHub.com Fallback** ⚠️