Skip to content

장바구니 API

soobin im edited this page Aug 5, 2019 · 4 revisions

장바구니 API

상품을 장바구니에 담아서 회원, 비회원이 주문을 할 수 있게 하기 위한 API

Cart Properties

Attribute Description
cart_no 장바구니분류
amount 수량
buy_YN 구매여부
member_YN 회원여부
reg_date 생성일
member_no 회원번호
product_no 상품분류

Admin API

EndPoints

- 장바구니 생성

Definition

POST /api/v1/cart/

- Request Example

	curl -X 'POST' /api/v1/cart/
             -H 'content-type: application/json' \
             -H 'X-Api-Version: {version}'
             -D {
                  "amount" : 10,
                  "buy_YN" : "N",
                  "member_YN" : "N",
                  "member_no" : 1,
                  "product_no" : 1
                }

- Response Example

 {
	"result" : "success",
        "message" : null,
        "data" : "success"
}

- 해당 장바구니 조회

Definition

GET /api/v1/cart/{id} 

- Request Example

	curl -X 'GET' /api/v1/cart/isb9082
             -H 'content-type: application/json' \
             -H 'X-Api-Version: {version}'

- Response Example

  {
    "data": [ {
    "cart_no" : 1,
    "amount" : 10,
    "buy_YN" : "N",
    "member_YN" : "N",
    "reg_date" : "2019-08-03",
    "member_no" : 1,
    "product_no" : 1
  }, {
    "cart_no" : 2,
    "amount" : 2,
    "buy_YN" : "N",
    "member_YN" : "N",
    "reg_date" : "2019-08-03",
    "member_no" : 1,
    "product_no" : 2
  }, {
    "cart_no" : 3,
    "amount" : 5,
    "buy_YN" : "N",
    "member_YN" : "N",
    "reg_date" : "2019-08-03",
    "member_no" : 1,
    "product_no" : 3
  }, {
    "cart_no" : 4,
    "amount" : 1,
    "buy_YN" : "N",
    "member_YN" : "N",
    "reg_date" : "2019-08-03",
    "member_no" : 1,
    "product_no" : 4
  },
  ... ]
}