-
Notifications
You must be signed in to change notification settings - Fork 1
Product API
hmmini edited this page May 30, 2024
·
3 revisions
- 작성자: hmmini
- 작성일: 2024. 04. 03
POST /products
Request Body
속성 | 타입 | 설명 |
---|---|---|
sellerId | long | 판매자 id |
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
Response Body
HTTP 201
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
createdDate | string | 생성 시간 |
updatedDate | string | 수정 시간 |
seller | object | 판매자 정보 |
categories | array | 카테고리 |
GET /products
Query Parameters
속성 | 타입 | 설명 |
---|---|---|
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
sellerName | string | 판매자 이름 |
sellerEmail | string | 판매자 이메일 |
sellerPhoneNumber | string | 판매자 휴대폰 번호 |
page | long | 페이지 번호 |
size | long | 조회 개수 |
sort | string | 정렬 속성 |
direction | string | 정렬 방향 |
Response Body
HTTP 200
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
createdDate | string | 생성 시간 |
updatedDate | string | 수정 시간 |
seller | object | 판매자 정보 |
categories | array(object) | 카테고리 정보 |
seller: object
속성 | 타입 | 설명 |
---|---|---|
sellerId | long | 판매자 id |
string | 이메일 | |
name | string | 이름 |
phoneNumber | string | 휴대폰 번호 |
createdDate | string | 생성 시간 |
updatedDate | string | 수정 시간 |
categories: array(object)
속성 | 타입 | 설명 |
---|---|---|
categoryId | string | 카테고리 id |
name | string | 카테고리 이름 |
GET /products/{productId}
Path Parameters
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
Response Body
HTTP 200
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
createdDate | string | 생성 시간 |
updatedDate | string | 수정 시간 |
seller | object | 판매자 정보 |
categories | array | 카테고리 |
PUT /products/{productId}
Path Parameters
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
Request Body
속성 | 타입 | 설명 |
---|---|---|
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
Response Body
HTTP 200
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
name | string | 상품 이름 |
description | string | 설명 |
price | double | 가격 |
stockQuantity | Integer | 재고 |
imageUrl | string | 이미지 url |
createdDate | string | 생성 시간 |
updatedDate | string | 수정 시간 |
seller | object | 판매자 정보 |
categories | array | 카테고리 |
DELETE /products/{productId}
Path Parameters
속성 | 타입 | 설명 |
---|---|---|
productId | long | 상품 id |
Response
HTTP 204