Skip to content

μƒν’ˆ

Lucas edited this page Jan 3, 2020 · 25 revisions

μΉ΄ν…Œκ³ λ¦¬ / μ΅œμ‹  순 리슀트 쑰회

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
GET /goods?category=coat&page=7&sort=newest μΉ΄ν…Œκ³ λ¦¬ 별 μƒν’ˆλ¦¬μŠ€νŠΈ 쑰회


Request

/goods?category=coat&page=7
  • category={μΉ΄ν…Œκ³ λ¦¬ 순}
  • page={νŽ˜μ΄μ§• 수}
  • sort={newest: μ΅œμ‹  순}


Response

Success


    "code": 200,
    "json": {
        "success": true,
        "message": "coat 리슀트 6개 쑰회",
        "data": [
            {
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577903952662.jpg",
                "price": 85000,
                "_id": "5e0ce753e055d50011a1d651",
                "goodsName": "λŸ¬λΈ”λ¦¬ 레이슀 μ½”νŠΈ",
                "sellerName": "κΈ°μš”λ―Έν•¨λƒν•¨λƒ",
                "sellerId": "5e0a4763217f2200119b6042",
                "like": false
            },
            {
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577906946492.jpg",
                "price": 125000,
                "_id": "5e0cf308e055d50011a1d65d",
                "goodsName": "λΈ”λž™ μΊμ‹œλ―Έμ–΄ μ˜€λ²„ν• μ½”νŠΈ",
                "sellerName": "ν—ˆμ μ—†λŠ”ν—ˆμ •λ―Ό",
                "sellerId": "5e0a4d19217f2200119b6053",
                "like": false
            },
            {
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577908158187.jpg",
                "price": 27500,
                "_id": "5e0cf7c6e055d50011a1d661",
                "goodsName": "둜브 울 μ½”νŠΈ",
                "sellerName": "ν—ˆμ μ—†λŠ”ν—ˆμ •λ―Ό",
                "sellerId": "5e0a4d19217f2200119b6053",
                "like": false
            },
            {
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577948199142.jpg",
                "price": 63000,
                "_id": "5e0d942be055d50011a1d697",
                "goodsName": "데이지 κ½ƒμžμˆ˜ 울 μ½”νŠΈ",
                "sellerName": "μ–‘ν•΄κ΅¬ν•˜λŠ”μ–‘ν˜œμ„ ",
                "sellerId": "5e0a4b8a217f2200119b604e",
                "like": false
            }
        ]
    }
}


Fail : 리슀트 쑰회 μ‹€νŒ¨

{
    "code": 403,
    "json": {
        "success": false,
        "message": "${category} 리슀트 쑰회 μ‹€νŒ¨",
    }
}

Fail : μ„œλ²„ λ‚΄λΆ€ 였λ₯˜

{
    "code": 500,
    "json": {
        "success": false,
        "message": "μ„œλ²„ λ‚΄λΆ€ 였λ₯˜"
    }
}





상세 νŽ˜μ΄μ§€ 쑰회

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
GET goods/:goodsId μƒν’ˆμ˜ 상세 λ””ν…ŒμΌμ„ 확인


Response ν…ŒμŠ€νŠΈ ν•  goodsId κ°’: 5e0ce3f0e055d50011a1d64e

Success

{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ œν’ˆ λ””ν…ŒμΌ 쑰회 성곡",
        "data": {
            "comment": "νΌν”Œ 컬러의 ν”Œλ¦¬μΈ  벨벳 μ™€μ΄λ“œ νŒ¬μΈ μž…λ‹ˆλ‹€.",
            "img": [
                "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577903085757.jpg",
                "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577903086627.jpg",
                "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577903086925.jpg"
            ],
            "grade": 0,
            "condition": 10,
            "_id": "5e0ce3f0e055d50011a1d64e",
            "size": "lg"
        }
    }
}


Fail : 인증 이메일 전솑 μ‹€νŒ¨

{
    "code": 400,
    "json": {
        "success": false,
        "message": "μ œν’ˆ λ””ν…ŒμΌ 쑰회 μ‹€νŒ¨",
    }
}



판맀자의 λ‹€λ₯Έ μƒν’ˆ

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
GET /goods/seller/:sellerId ν•΄λ‹Ή μ œν’ˆμ„ νŒλ§€ν•˜λŠ” 판맀자의 λ‹€λ₯Έ μƒν’ˆμ„ μ΅œμ‹ μˆœμœΌλ‘œ λ³΄μ—¬μ€Œ


Response

ν…ŒμŠ€νŠΈ ν•  sellerId κ°’ : 5e0a3d33217f2200119b6036

Success

{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ‘΄μž¬ν•˜λŠ” 판맀자의 λ‹€λ₯Έ μƒν’ˆ μž…λ‹ˆλ‹€.",
        "data": [
            {
                "_id": "5e0d06d4e055d50011a1d686",
                "goodsName": "μ•€ν‹± μž₯λ―Έ μ›ν”ΌμŠ€",
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577912015078.jpg",
                "price": 26000
            },
            {
                "_id": "5e0d09c8e055d50011a1d689",
                "goodsName": "마크제이μ½₯슀 ν€„νŒ…λ°±",
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577912756285.jpg",
                "price": 25000
            },
            {
                "_id": "5e0d28cfe055d50011a1d695",
                "goodsName": "mcmλ°λ‹˜",
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577920717044.jpg",
                "price": 35000
            },
            {
                "_id": "5e0df2d5e055d50011a1d69d",
                "goodsName": "lee 일자 연청생지 λ°λ‹˜",
                "mainImg": "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577972435661.jpg",
                "price": 45000
            }
        ]
    }
}


Fail : μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 판맀자.

{
    "code": 400,
    "json": {
        "success": true,
        "message": "μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” νŒλ§€μžμž…λ‹ˆλ‹€.",
    }
}

Fail : μ„œλ²„ λ‚΄λΆ€ μ—λŸ¬

{
    "code": 500,
    "json": {
        "success": true,
        "message": "판맀자의 λ‹€λ₯Έ μƒν’ˆ 쑰회 μ‹€νŒ¨",
    }
}



μ’‹μ•„μš”(찜) μ—¬λΆ€ 확인

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
GET /goods/:goodId/like ν•΄λ‹Ή μƒν’ˆμ΄ μœ μ €μ—κ²Œ μ’‹μ•„μš”(찜) λ˜μ–΄μžˆλŠ”μ§€ 확인


Response

Success

{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ‘΄μž¬ν•˜λŠ” μ’‹μ•„μš” μž…λ‹ˆλ‹€.",
        "data": [
          {
            "_id": "μƒν’ˆμ˜ 고유 idκ°’",
            "goodsName": "μƒν’ˆ 이름",
            "mainImg": "μƒν’ˆ 메인 이미지",
            "prise": "가격"
          }
        ]
    }
}

Success : μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 판맀자.

{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μ’‹μ•„μš” μž…λ‹ˆλ‹€.",
    }
}


Fail : μ„œλ²„ λ‚΄λΆ€ μ—λŸ¬

{
    "code": 500,
    "json": {
        "success": true,
        "message": "μ’‹μ•„μš” μ—¬λΆ€ 쑰회 μ‹€νŒ¨",
    }
}



μ’‹μ•„μš”(찜) λˆ„λ₯΄κΈ° / μ·¨μ†Œ

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
POST /goods/:goodId/like μƒν’ˆμ„ μ’‹μ•„μš”ν•˜κ±°λ‚˜ / μ·¨μ†Œν•˜κ±°λ‚˜


Request

body

{
    "like": true,
}
  • true: μ’‹μ•„μš” λˆ„λ₯΄κΈ°
  • false: μ’‹μ•„μš” μ·¨μ†Œν•˜κΈ°


Response

Success : μ’‹μ•„μš” ν•˜κΈ°

{
    "code": 200,
    "json": {
        "success": true,
        "message": "'μ’‹μ•„μš” ν•˜κΈ°' μž‘μ„± 성곡",
        "data": [
          {
            "goodsId": "μ’‹μ•„μš”ν•œ μƒν’ˆ Idκ°’",
            "like": true,
          }
        ]
    }
}

Success : μ’‹μ•„μš” μ·¨μ†Œ

{
    "code": 200,
    "json": {
        "success": true,
        "message": "'μ’‹μ•„μš” μ·¨μ†Œ' μž‘μ„± 성곡",
        "data": [
          {
            "goodsId": "μ’‹μ•„μš”ν•œ μƒν’ˆ Idκ°’",
            "like": true,
          }
        ]
    }
}


Fail : μ„œλ²„ λ‚΄λΆ€ μ—λŸ¬

{
    "code": 500,
    "json": {
        "success": false,
        "message": "μ’‹μ•„μš” μž‘μ„± μ‹€νŒ¨",
    }
}



μƒν’ˆ 필터링

Context-type : application/json

λ©”μ†Œλ“œ 경둜 짧은 μ„€λͺ…
POST /goods/filter 전체 μƒν’ˆμ„ ν•„ν„°λ§ν•˜μ—¬ 쑰회


Request

body

{
    "color": "brown",
    "category": ["jacket","coat"],
    "size": ["lg"]
}


Response

Success

{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ œν’ˆ 필터링을 μ„±κ³΅ν•˜μ˜€μŠ΅λ‹ˆλ‹€.",
        "data": [
          {
            "_id": "μƒν’ˆ ObjectId",
            "goodsName": "μƒν’ˆλͺ…",
            "mainImg": "μƒν’ˆ 메인 이미지",
            "price": "가격",
          },
          {
            "_id": "μƒν’ˆ ObjectId",
            "goodsName": "μƒν’ˆλͺ…",
            "mainImg": "μƒν’ˆ 메인 이미지",
            "price": "가격",
          },
        ]
    }
}

// 더미데이터 μ˜ˆμ‹œ
{
    "code": 200,
    "json": {
        "success": true,
        "message": "μ œν’ˆ 필터링을 μ„±κ³΅ν•˜μ˜€μŠ΅λ‹ˆλ‹€.",
        "data": [
            {
                "img": [
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907923687.jpg",
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907925597.jpg",
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907925874.jpg",
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907925962.jpg",
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907926103.jpg",
                    "https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577907926183.jpg"
                ],
                "price": 24000,
                "_id": "5e0cf6d7e055d50011a1d65f",
                "goodsName": "λ°°μƒ‰μ²΄ν¬μžμΌ“"
            }
        ]
    }
}


Success : 필터링 쑰건에 λ§žλŠ” μƒν’ˆμ΄ μ—†λŠ” 경우

{
    "code": 200,
    "json": {
        "success": true,
        "message": "필터링 쑰건에 λ§žλŠ” μƒν’ˆμ΄ μ—†μŠ΅λ‹ˆλ‹€."
    }
}


Fail : 잘λͺ»λœ μš”μ²­

{
    "code": 400,
    "json": {
        "success": false,
        "message": "μ œν’ˆ 필터링을 μ‹€νŒ¨ν•˜μ˜€μŠ΅λ‹ˆλ‹€.",
    }
}