This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
3.1. API Design
sieun edited this page Jun 19, 2021
·
36 revisions
- request
- HTTP method + URL path
- body :
JSON
,multipart/form-data
{ key: value }
- response
- status code
- body :
JSON
- 성공
{ message: '', data: {} } { message: '', data: [] }
- 실패
{ message: '' }
- 버전관리 ?
- 회원가입 :
[POST] /auth/register
{
name: '홍길동'
email: '[email protected]',
password: '1234',
phone: '01012345678'
}
- 로그인 :
[POST] /auth/login
- 로그아웃 :
[POST] /auth/logout
- 상품 검색 :
[GET] /main/search?name={name}
- 로켓배송의 카테고리 목록과 상품 목록 조회 :
[GET] /products/rocket
- 로켓프레시의 카테고리 목록과 상품 목록 조회 :
[GET] /products/rocket-fresh
- 로켓직구의 카테고리 목록과 상품 목록 조회 :
[GET] /products/rocket-overseas
- 정기배송의 카테고리 목록과 상품 목록 조회 :
[GET] /products/regular
- 이벤트/쿠폰 목록 조회 :
[GET] /coupons
- 상품 상세 정보 조회 :
[GET] /products/{id}
- 장바구니 담기 :
[POST] /products/{id}/cart
{
options: { // 옵션은 제품마다 달라질 수 있음
color: 'green',
capacity: 10
},
number: 3
}
- 바로 구매하기 :
[POST] /products/{id}/purchase
{
options: { // 옵션은 제품마다 달라질 수 있음
color: 'green',
capacity: 10
},
number: 3
}
- 상품 리뷰 :
[POST] /products/{id}/reviews
score: 10
content: '튼튼하고 실용적입니다.'
img: [file]
- 도움이 돼요 :
[POST] /products/{id}/help
- 도움이 안 돼요 :
[POST] /products/{id}/no-help
- 장바구니 페이지 :
[GET] /carts
- 내 상품 목록 보여주기 :
[GET] /carts
- 구매하기 :
[POST] /carts/purchase
{
1: { // product ID
options: { // 옵션은 제품마다 달라질 수 있음
color: 'green',
capacity: 10
},
number: 3
}
}
- 구매자 정보 보여주기 :
[GET] /orders/{id}/information
- 받는사람 정보 보여주기 :
[GET] /orders/{id}/information
- 배송 정보 보여주기 :
[GET] /orders/{id}/information
- 결제 정보 보여주기 :
[GET] /orders/{id}/information
- 결제하기 :
[POST] /orders/{id}/information/pay
{
request: '문 앞' // 요청사항
payment: 'credit-card'
}
- 주문목록/배송조회 :
[GET] /mypage/order-history
- 취소/반품/교환/환불 내역 조회 :
[GET] /mypage/cancel
- 로켓와우 멤버십 관리 :
[GET] /mypage/membership
- 정기배송 관리 :
[GET] /mypage/regular
- 영수증 조회/출력 :
[GET] /mypage/receipt
- 할인쿠폰 :
[POST] /mypage/coupons
{
code: '12345'
}
- 문의하기 :
[POST] /mypage/ask
{
content: '주문한 상품에 대해 문의하고 싶어요.'
}
- 문의 내역 확인 :
[GET] /mypage/ask-history
- 리뷰관리 :
[GET] /mypage/review-history
- 개인정보 수정 :
[POST] /mypage/user-information/modify
{
email: '[email protected]',
name: '홍길동',
phone: '01012345678',
password: '1234'
}
- 배송지 관리 :
[POST] /mypage/address-information/modify
{
1: { // address ID
receiver: '홍길순',
address: '서울 0구 00동 00아파트 0동 0호',
phone: '01012345678'
}
}