장바구니 조회
GET /carts
권한: CUSTOMER
HTTP Request Example
GET /carts HTTP/1.1
Host: localhost:8080
Response Fields
| Path | Type | Description |
|---|---|---|
|
|
응답 코드 |
|
|
HTTP 상태 |
|
|
응답 메시지 |
|
|
장바구니 ID |
|
|
가게 ID |
|
|
총 아이템 종류 수 |
|
|
총 수량 |
|
|
총 금액 |
|
|
장바구니 아이템 목록 |
|
|
생성일시 |
|
|
수정일시 |
HTTP Response Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 376
{"code":"CT200","status":"OK","message":"장바구니 조회 성공","data":{"cartId":"5f9e0980-51a5-4c98-b21e-96e3d71ff565","storeId":"e0cf18ca-009a-4a42-9e7c-b23c886eace1","totalItemCount":1,"totalQuantity":1,"totalAmount":18000,"items":[],"createdAt":"2026-03-11T10:09:55.906813770Z","updatedAt":"2026-03-11T10:09:55.906815974Z"},"timestamp":"2026-03-11T10:09:55.90798744"}
장바구니 아이템 추가
POST /carts/items
권한: CUSTOMER
Request Fields
| Path | Type | Description |
|---|---|---|
|
|
가게 ID |
|
|
메뉴 아이템 ID |
|
|
수량 (1 이상) |
HTTP Request Example
POST /carts/items HTTP/1.1
Content-Type: application/json
Content-Length: 136
Host: localhost:8080
{"storeId":"df6368fe-24ca-4070-a84f-3726e2f6dff8","menuItemId":"276663e2-be0a-4e44-8c56-31bbf3ad9193","quantity":1,"validQuantity":true}
Response Fields
| Path | Type | Description |
|---|---|---|
|
|
응답 코드 |
|
|
HTTP 상태 |
|
|
응답 메시지 |
|
|
장바구니 ID |
|
|
가게 ID |
|
|
총 아이템 종류 수 |
|
|
총 수량 |
|
|
총 금액 |
|
|
장바구니 아이템 목록 |
|
|
생성일시 |
|
|
수정일시 |
HTTP Response Example
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 392
{"code":"CT201","status":"CREATED","message":"장바구니 아이템 추가 성공","data":{"cartId":"a0a77bb2-8b7d-4b17-9190-d51c126e8f3e","storeId":"de05d1d3-7785-4c36-a71d-ebb69afcdce2","totalItemCount":1,"totalQuantity":1,"totalAmount":18000,"items":[],"createdAt":"2026-03-11T10:09:56.036796022Z","updatedAt":"2026-03-11T10:09:56.036798887Z"},"timestamp":"2026-03-11T10:09:56.042066547"}
장바구니 아이템 수량 변경
PATCH /carts/items/{cartItemId}
권한: CUSTOMER
Path Parameters
| Parameter | Description |
|---|---|
|
장바구니 아이템 ID |
Request Fields
| Path | Type | Description |
|---|---|---|
|
|
변경할 수량 (1 이상) |
HTTP Request Example
PATCH /carts/items/e807c844-6cec-4668-8ae4-0eee9e84f5f9 HTTP/1.1
Content-Type: application/json
Content-Length: 35
Host: localhost:8080
{"quantity":3,"validQuantity":true}
Response Fields
| Path | Type | Description |
|---|---|---|
|
|
응답 코드 |
|
|
HTTP 상태 |
|
|
응답 메시지 |
HTTP Response Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 142
{"code":"CT202","status":"OK","message":"장바구니 아이템 수량 변경 성공","data":null,"timestamp":"2026-03-11T10:09:55.952438644"}
장바구니 아이템 삭제
DELETE /carts/items/{cartItemId}
권한: CUSTOMER
Path Parameters
| Parameter | Description |
|---|---|
|
장바구니 아이템 ID |
HTTP Request Example
DELETE /carts/items/3171f6c4-f961-49d6-9e91-f65d5f3721f6 HTTP/1.1
Host: localhost:8080
Response Fields
| Path | Type | Description |
|---|---|---|
|
|
응답 코드 |
|
|
HTTP 상태 |
|
|
응답 메시지 |
HTTP Response Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 135
{"code":"CT203","status":"OK","message":"장바구니 아이템 삭제 성공","data":null,"timestamp":"2026-03-11T10:09:56.013480939"}
장바구니 비우기
DELETE /carts
권한: CUSTOMER
HTTP Request Example
DELETE /carts HTTP/1.1
Host: localhost:8080
Response Fields
| Path | Type | Description |
|---|---|---|
|
|
응답 코드 |
|
|
HTTP 상태 |
|
|
응답 메시지 |
HTTP Response Example
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 128
{"code":"CT204","status":"OK","message":"장바구니 비우기 성공","data":null,"timestamp":"2026-03-11T10:09:55.983503536"}