Lumiere API
  • 회원가입
  • 로그인 & 로그아웃
  • 상품
  • 작가
  • 주문
  • 랜딩페이지
  • 마이페이지
  • 관리자 페이지
Powered by GitBook
On this page
  • 전체 상품 목록 | 검색 목록 | 필터 목록
  • 해당 상품 상세
  • 상품 찜 추가 및 제거

상품

전체 상품 목록 | 검색 목록 | 필터 목록

GET /api/products

Query Parameters

Name
Type
Description

pageNumber

Number

pageNumber 1 is default

isAdmin

Boolean

true

keyword

String

empty string is default

theme

String

인물, 풍경, 정물, 동물, 상상, 추상

priceMin

Number

priceMax

Number

sizeMin

Number

sizeMax

Number

{
    "products": [
        {
            "info": {
                "details": " 캔버스에 아크릴",
                "size": "73x51cm",
                "canvas": 20,
                "createdAt": "2016"
            },
            "_id": "61af965004a0bb379026e1a9",
            "artist": {
                "_id": "61af41433d8f20435ba6b362",
                "code": "0003",
                "name": "아기새",
                "aka": "Baby Bird",
                "record": "피터팬처럼 영원히 어른이 되고 싶지 않은 마음을 동화처럼 표현하는 작가만의 이야기를 느낄 수 있습니다."
            },
            "likes": [],
            "artCode": "0002",
            "title": "문어 탕탕이",
            "image": "https://lumiereimage.s3-ap-northeast-2.amazonaws.com/4e73750a-5c0d-4cc0-b450-5fbe5e0202b8.png",
            "theme": "동물",
            "price": 56000,
            "count": 0,
            "inStock": true,
            "updatedAt": "2021-12-07T17:12:25.735Z"
        },
       ...
    ],
    "page": 2,
    "pages": 10
}
{
    "products": [
        {
            "info": {
                "size": "100x80cm",
                "canvas": 50
            },
            "_id": "61af41433d8f20435ba6b364",
            "artist": {
                "_id": "61af41433d8f20435ba6b362",
                "name": "아기새"
            },
            "likes": [],
            "title": "장난감",
            "image": "https://lumiereimage.s3-ap-northeast-2.amazonaws.com/0afa4fbf-75c9-4f15-8a2b-df4b3ca80904.jpeg",
            "price": 88000,
            "count": 5,
            "updatedAt": "2021-12-07T11:10:59.721Z"
        },
        ...
    ],
    "page": 2,
    "pages": 5
}

해당 상품 상세

GET /api/products/:id

Path Parameters

Name
Type
Description

id*

ObjectId

Product's

{
  "productDetail": {
      "info": {
          "details": "캔버스에 아크릴",
          "size": "73x61cm",
          "canvas": "20호",
          "createdAt": "2020"
      },
      "_id": "61a4c895f59ea1b7a727a658",
      "artist": {
          "_id": "61a4c82a2c1eaad2e0d0084c",
          "name": "안영희"
      },
      "artCode": "0001",
      "title": "잠식",
      "image": "/images/bye/1.jpg",
      "price": 99000,
      "inStock": true
  },
  "productsByArtist": [
      {
        "_id": "61a4c895f59ea1b7a727a658",
        "image": "/images/bye/2.jpg",
      },
      {
        "_id": "61a4c895f59ea1b7a727a658",
        "image": "/images/bye/3.jpg",
      },
  ...
  ],
  "productsByRandom": [
    {
      "_id": "61a4c895f59ea1b7a727a658",
      "image": "/images/bluff/2.jpg",
    },
    {
      "_id": "61a4c895f59ea1b7a727a658",
      "image": "/images/owner/3.jpg",
    },
	....
  ]
}
{
    "message": "해당 상품이 존재하지 않습니다"
}

상품 찜 추가 및 제거

PATCH /api/products/zzim

one or Array

Headers

Name
Type
Description

authorization*

String

Bearer Token

Content-type*

String

application/json

Request Body

Name
Type
Description

productId*

ObjectId

Product's

zzim*

Boolean

true or false

{
    "message": "해당 상품 찜 완료 or 해제"
}
{
    "message": "true? or false?"
}

Previous로그인 & 로그아웃Next작가

Last updated 3 years ago