Skip to content

Order API

hmmini edited this page May 30, 2024 · 3 revisions
  • 작성자: hmmini
  • 작성일: 2024. 04. 03

6. Order

6-1. 등록

POST /orders

Request Body

속성 타입 설명
customerId long 고객 id
status string 주문 상태

Response Body

HTTP 201

속성 타입 설명
orderId long 주문 id
orderDate string 주문 시간
status string 주문 상태
createdDate string 생성 시간
updatedDate string 수정 시간
orderItems array(object) 주문 상품 리스트
customer object 고객 정보
shippingAddress object 배송 정보

6-2. 목록 조회

GET /orders

Query Parameters

속성 타입 설명
orderDate long 주문 시간
status string 주문 상태
customerName string 고객 이름
customerEmail string 고객 이메일
customerPhoneNumber string 고객 휴대폰 번호
page long 페이지 번호
size long 조회 개수
sort string 정렬 속성
direction string 정렬 방향

Response Body

HTTP 200

속성 타입 설명
orderId long 주문 id
orderDate string 주문 시간
status string 주문 상태
createdDate string 생성 시간
updatedDate string 수정 시간
orderItems array(object) 주문 상품 리스트
customer object 고객 정보
shippingAddress object 배송 정보

orderItems: array(object)

속성 타입 설명
orderItemId long 주문 상품 id
quantity integer 수량
pricePerItem double 가격
createdDate string 생성 시간
updatedDate string 수정 시간

customer: object

속성 타입 설명
customerId long 고객 id
email string 이메일
name string 이름
phoneNumber string 휴대폰 번호
createdDate string 생성 시간
updatedDate string 수정 시간

shippingAddress: object

속성 타입 설명
addressId long 주소 id
receiptName string 수신인 이름
receiptPhoneNumber string 수신인 휴대폰 번호
region string 지역
city string
town string
street string
zipCode string 우편 번호
detail string 상세 주소

6-3. 조회

GET /orders/{orderId}

Path Parameters

속성 타입 설명
orderId long 주문 id

Response Body

HTTP 200

속성 타입 설명
orderId long 주문 id
orderDate string 주문 시간
status string 주문 상태
createdDate string 생성 시간
updatedDate string 수정 시간
orderItems array 주문 상품 리스트
customer object 고객 정보
shippingAddress object 배송 정보

6-4. 수정

PUT /orders/{orderId}

Path Parameters

속성 타입 설명
orderId long 주문 id

Request Body

속성 타입 설명
status string 주문 상태

Response Body

HTTP 200

속성 타입 설명
orderId long 주문 id
orderDate string 주문 시간
status string 주문 상태
createdDate string 생성 시간
updatedDate string 수정 시간
orderItems array 주문 상품 리스트
customer object 고객 정보
shippingAddress object 배송 정보

6-5. 삭제

DELETE /orders/{orderId}

Path Parameters

속성 타입 설명
orderId long 주문 id

Response

HTTP 204


Clone this wiki locally