API Document - polynomeer/sidedish GitHub Wiki

API Document

Overview

Category API

Category Read

  • Description : ๋ชจ๋“  ์นดํ…Œ๊ณ ๋ฆฌ๋ชฉ๋ก ์กฐํšŒ

  • Request

GET /main
  • Response
[
    {
        "categoryId": 17011000,
        "name": "ํ’์„ฑํ•œ ๊ณ ๊ธฐ ๋ฐ˜์ฐฌ",
        "items": [
            {
                "detailHash": "H9882",
                "image": "https://cdn.bmf.kr/_data/product/H077F/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
                "alt": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "deliveryType": [
                    "์ƒˆ๋ฒฝ๋ฐฐ์†ก ์ „๊ตญํƒ๋ฐฐ"
                ],
                "title": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "description": "๊ฒฝ์ƒ๋„ ๋ช…๋ฌผ ์š”๋ฆฌ ์„ธ ๊ฐ€์ง€๋ฅผ ํ•œ ์ƒ์—!",
                "normalPrice": 39000,
                "salePrice": 31200,
                "badge": [
                    "์ด๋ฒคํŠธํŠน๊ฐ€"
                ]
            }
        ]
    },
    {
        "categoryId": 17011100,
        "name": "๋ฐ”๋‹คํ–ฅ๊ฐ€๋“ ๋ฐ˜์ฐฌ",
        "items": [
            {
                "detailHash": "H9883",
                "image": "https://cdn.bmf.kr/_data/product/H9881/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
                "alt": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "deliveryType": [
                    "์ƒˆ๋ฒฝ๋ฐฐ์†ก ์ „๊ตญํƒ๋ฐฐ"
                ],
                "title": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "description": "๊ฒฝ์ƒ๋„ ๋ช…๋ฌผ ์š”๋ฆฌ ์„ธ ๊ฐ€์ง€๋ฅผ ํ•œ ์ƒ์—!",
                "normalPrice": 39000,
                "salePrice": 31200,
                "badge": [
                    "๋ก ์นญํŠน๊ฐ€",
                    " ์ด๋ฒคํŠธํŠน๊ฐ€"
                ]
            }
        ]
    },
    {
        "categoryId": 17011200,
        "name": "ํ• ์ธํŠน๊ฐ€ ์„ธํŠธ ์ƒ์ƒ์ƒ",
        "items": [
            {
                "detailHash": "H9881",
                "image": "https://cdn.bmf.kr/_data/product/H9881/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
                "alt": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "deliveryType": [
                    "์ƒˆ๋ฒฝ๋ฐฐ์†ก ์ „๊ตญํƒ๋ฐฐ"
                ],
                "title": "[์†Œ์ค‘ํ•œ์‹์‚ฌ] ๊ฒฝ์ƒ๋„ ํ•œ์ƒ์ฐจ๋ฆผ",
                "description": "๊ฒฝ์ƒ๋„ ๋ช…๋ฌผ ์š”๋ฆฌ ์„ธ ๊ฐ€์ง€๋ฅผ ํ•œ ์ƒ์—!",
                "normalPrice": 39000,
                "salePrice": 31200,
                "badge": [
                    "์ด๋ฒคํŠธํŠน๊ฐ€"
                ]
            }
        ]
    }
]

Item API

Item Read

  • Description : ํŠน์ • ์•„์ดํ…œ์„ ๊ฐ€์ ธ์˜ด. ์ด๋•Œ ์นดํ…Œ๊ณ ๋ฆฌid์™€ ์•„์ดํ…œ์˜ ํ•ด์‹œ๊ฐ’์ด ๋งž์•„์•ผ ์ •์ƒ ์ถœ๋ ฅ๋œ๋‹ค.

  • Request

GET /detail/{categoryId}/{hash}
  • Response
{
    "detailHash": "H077F",
    "title": "[๋งˆ๋”์•ค์ฐฌ] ์ฝ”๋‹ค๋ฆฌ๊ตฌ์ด 320g",
    "topImage": "http://public.codesquad.kr/jk/storeapp/data/0221110ead70dfd455e40703bbdd6252.jpg",
    "thumbImages": [
        "http://public.codesquad.kr/jk/storeapp/data/0221110ead70dfd455e40703bbdd6252.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/2d408898494ac950d7d2cfd6c36d59c2.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/62c8bb77facfc9c3be81f9bf45b27f2a.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/f6d73afc0ebc1efa71eaea32e9d846f2.jpg"
    ],
    "productDescription": "ํผ์ง€๋ง‰ํ•˜๊ณ  ์‚ด์ง‘ ๋งŽ์€ ๋™ํƒœ ํ•œ ๋งˆ๋ฆฌ๋กœ ๋งŒ๋“  ์ฝ”๋‹ค๋ฆฌ๊ตฌ์ด์ž…๋‹ˆ๋‹ค.",
    "point": 75,
    "deliveryInfo": "์„œ์šธ ๊ฒฝ๊ธฐ ์ƒˆ๋ฒฝ๋ฐฐ์†ก / ์ „๊ตญํƒ๋ฐฐ (์ œ์ฃผ ๋ฐ ๋„์„œ์‚ฐ๊ฐ„ ๋ถˆ๊ฐ€) [์›” ยท ํ™” ยท ์ˆ˜ ยท ๋ชฉ ยท ๊ธˆ ยท ํ† ] ์ˆ˜๋ น ๊ฐ€๋Šฅํ•œ ์ƒํ’ˆ์ž…๋‹ˆ๋‹ค.",
    "deliveryFee": "2,500์› (40,000์› ์ด์ƒ ๊ตฌ๋งค ์‹œ ๋ฌด๋ฃŒ)",
    "prices": [
        "7500"
    ],
    "badge": [
        "๋ก ์นญํŠน๊ฐ€"
    ],
    "detailSection": [
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/9bd9158fb5ffbc46708b7928ee50708e.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/5f73c5c80b62ef63c8a8eecefe32fc29.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/9bd9158fb5ffbc46708b7928ee50708e.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/0253cdebc4972fefd6b94458024fe765.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/3299da0677b50c8c519adc0335271c49.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/0642265b65dcc2490ab164ff428cbfe2.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/695683493c1ae475a175475f50d3259f.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/c8f9bed4f5c07585b869e3d171904a93.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d2e3274c95c832bc9bfbcebbd548f61b.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d9e4fa00652483d74b46317d38159a2f.jpg",
        "http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d7799b67683128642453f9e2b4c8ce84.jpg"
    ],
    "stock": 10
}

Order API

Order by POST

  • Description : ํŠน์ • ์•„์ดํ…œ์„ ์ฃผ๋ฌธ

  • Request

POST /detail/{categoryId}/{hash}
  • Request Body
{
    "orderCount" : int
}
  • Response
no response body
  • History์˜ create๋Š” ์„œ๋ฒ„์—์„œ ๋ชจ๋“  api๊ฐ€ ํ˜ธ์ถœ๋  ๋•Œ ๋งˆ๋‹ค ํ˜ธ์ถœ๋˜๋„๋ก ๊ตฌํ˜„
  • History์˜ update/delete๋Š” ๋ถˆ๊ฐ€๋Šฅํ•˜๋„๋ก ๊ตฌํ˜„

References

REST API design with Spring

RESTful URL design

API Documentation