Lumiere API
  • 회원가입
  • 로그인 & 로그아웃
  • 상품
  • 작가
  • 주문
  • 랜딩페이지
  • 마이페이지
  • 관리자 페이지
Powered by GitBook
On this page
  • 유저 전체 목록
  • 작가
  • 작가 등록 / + 첫 상품 등록
  • 작가 비활성화(중단) | 활성화
  • 작가 내용 수정
  • 상품
  • 상품 등록
  • 해당 상품 수정
  • 해당 상품 삭제 (미판매 시)
  • 주문
  • 주문 진행단계 변경 ( 발송 준비, 배송 중, 배송 완료, 반품 신청)
  • 전체 주문 내역
  • 이벤트
  • 배너 등록
  • 해당 배너 수정
  • 해당 배너 삭제

관리자 페이지

관리자 권한만 접근 가능

유저 전체 목록

GET /api/users

Query Parameters

Name
Type
Description

pageNumber

Number

pageNumber 1 is default

Headers

Name
Type
Description

authorization*

String

Bearer Token

[
    {
        "general": {
            "email": "test@test.com"
        },
        "active": {
            "lastAccessTime": "2021-11-30T01:28:29.942Z",
            "isClosed": false
        },
        "_id": "61a43a308f72e06afa31d",
        "name": "알로",
        "createdAt": "2021-11-29T02:25:52.260Z"
    },
    {
        "general": {
            "email": "a@test.com"
        },
        "active": {
            "isClosed": false
        },
        "_id": "61a4e52b4f5f6aabfec61",
        "name": "남대문",
        "createdAt": "2021-11-29T14:35:23.353Z"
    },
    ...
    "page": 2,
    "pages": 4
]
{
    "message": "Not authorized as an admin"
}

작가

작가 등록 / + 첫 상품 등록

POST /api/artists

생성 시 반드시 상품 하나 함 등록

Headers

Name
Type
Description

authorization*

String

Bearer Token

Content-type*

String

application/json

Request Body

Name
Type
Description

product.image*

String

product.title*

String

product.artCode*

String

artist.record*

String

artist.aka*

String

artist.name*

String

artist.code*

String

product.theme*

String

product.info.details*

String

product.info.size*

String

product.info.canvas*

Number

product.info.createdAt*

String

product.price*

Number

{
    "code": "0001",
    "name": "안영희",
    "aka": "Bye",
    "record": "안영희 작가는 자신의 작품을 통해 따듯한 기운을 전파하고자 노력합니다. 특히 빛에 초점을 두고 형체를 가늠할 수 없는 빛의 특징을 다른 대상에 투과 혹은 반사를 통해 나타내어 인지하기 어려운 것에 대한 감각을 자극해 일깨우려는 시도가 돋보입니다.",
    "joinAt": "2021-11-29T12:33:24.988Z",
    "countOfWorks": 1
}

작가 비활성화(중단) | 활성화

PATCH /api/artists

Headers

Name
Type
Description

Content-type*

String

application/json

authorization*

String

Bearer Token

Request Body

Name
Type
Description

isActive*

Boolean

artistId*

ObjectId

{
    "message": "해당 작가 비활성화 해제 or 완료"
}
{
    "message": "true? or false"
}

작가 내용 수정

PATCH /api/artists/:id

Path Parameters

Name
Type
Description

id*

ObjectId

작가 고유 아이디

Headers

Name
Type
Description

authorization*

String

Bearer Token

Content-type*

String

application/json

Request Body

Name
Type
Description

name

String

aka

String

record

String

thumbnail

String

{
    "code": "0001",
    "name": "안영희",
    "aka": "Bye Hee",
    "record": "안영희 작가는 자신의 작품을 통해 따듯한 기운을 전파하고자 노력합니다. 특히 빛에 초점을 두고 형체를 가늠할 수 없는 빛의 특징을 다른 대상에 투과 혹은 반사를 통해 나타내어 인지하기 어려운 것에 대한 감각을 자극해 일깨우려는 시도가 돋보입니다.",
    "joinAt": "2021-11-29T12:31:38.051Z",
    "countOfWorks": 1
}

상품

상품 등록

POST /api/products

Headers

Name
Type
Description

Content-type*

String

application/json

authorization*

String

Bearer Token

Request Body

Name
Type
Description

artist*

ObjectId

artCode*

String

title*

String

image*

String

theme*

String

info*

Object

details / size / canvas / createdAt

price*

Number

{
    "message": "상품이 등록되었습니다",
}
{
    "message": "상품 정보를 모두 입력해주세요",
}

해당 상품 수정

PATCH /api/products/:id

Path Parameters

Name
Type
Description

id*

ObjectId

해당 상품고유아이디

Headers

Name
Type
Description

Content-type*

String

application/json

authorization*

String

Bearer Token

Request Body

Name
Type
Description

title

String

image

String

theme

String

info

Object

details / size / canvas / createdAt

price

Number

{
    "message": "해당 상품 수정이 완료되었습니다",
}

해당 상품 삭제 (미판매 시)

DELETE /api/products/:id

Path Parameters

Name
Type
Description

id*

ObjectId

Headers

Name
Type
Description

authorization*

String

Bearer Token

{
    "message": "해당 상품이 삭제되었습니다"
}
{
    "message": "해당 상품은 삭제할 수 없습니다"
}

주문

주문 진행단계 변경 ( 발송 준비, 배송 중, 배송 완료, 반품 신청)

PATCH /api/orders/:id

Path Parameters

Name
Type
Description

id*

ObjectId

Headers

Name
Type
Description

authorization*

String

Bearer Token

Content-type*

String

application/json

Request Body

Name
Type
Description

status*

Number

발송준비중 1, 배송중 2, 배송완료 3, 반품요청중 4

{
    "message": "해당 주문이 발송 준비 중 단계로 변경되었습니다"
}
{
    "message": "진행 단계를 알 수 없습니다"
}
{
    "message": "해당 주문내역이 존재하지 않습니다"
}

전체 주문 내역

GET /api/orders

Query Parameters

Name
Type
Description

pageNumber

Number

pageNumber 1 is default

Headers

Name
Type
Description

authorization*

String

Bearer Token

[
    {
        "result": {
            "id": "20211130111111",
            "paidAt": "2021-12-01T17:15:53.146Z",
            "status": 0,
            "updatedAt": "2021-12-01T17:15:53.146Z"
        },
        "_id": "61a7adc903b7708e5dbba693",
        "user": {
            "general": {
                "email": "a@test.com"
            },
            "_id": "61a4e52b4f5f6aa036bfec61"
        },
        "orderItems": [
            {
                "image": "/images/bye/1.jpg",
                "title": "잠식",
                "artist": "안영희",
                "size": "73x61cm(20호)",
                "price": 99000,
                "product": "61a4c895f59ea1b7a727a658"
            },
            {
                "image": "/images/owner/1.jpg",
                "title": "파멸",
                "artist": "로키산맥",
                "size": "163x131cm(100호)",
                "price": 469000,
                "product": "61a4debe4f5f6aa036bfec5f"
            }
        ],
        "totalPrice": 578000
    },
    ...
    "page": 1,
    "pages": 4
]

이벤트

배너 등록

POST /api/events

Headers

Name
Type
Description

Content-type*

String

application/json

Request Body

Name
Type
Description

heading*

String

content*

String

linkname*

String

link*

String

image*

String

{
    "heading": "[Welcome to Lumiere]",
    "content": "여기 루미에르에서 당신의 예술적 감성을 일깨워보세요",
    "linkname": "작품 구경하기",
    "link": "http://example.com",
    "image": "/images/owner/5.jpg",
    "_id": "61a586353a08eda835961cb1"
}

해당 배너 수정

PATCH /api/events/:id

Path Parameters

Name
Type
Description

id*

ObjectId

이벤트 고유아이디

Headers

Name
Type
Description

Content-type*

String

application/json

authorization*

String

Bearer Token

Request Body

Name
Type
Description

heading

String

content

String

linkname

String

link

String

image

String

{
        "_id": "61a587133a08eda835961cb7",
        "heading": "[루미에르의 새로운 작가] 로키산맥",
        "content": "보는 이의 눈길을 사로잡는 로키산맥 작가만의 세계관이 돋보이는 작품들!",
        "linkname": "작가 구경하기",
        "link": "http://example.com",
        "image": "/images/owner/3.jpeg"
 }

해당 배너 삭제

DELETE /api/events/:id

Path Parameters

Name
Type
Description

id*

ObjectId

배너고유아이디

Headers

Name
Type
Description

authorization

String

Bearer Token

{
        "message": "해당 배너가 정상적으로 삭제되었습니다",
}

Previous마이페이지

Last updated 3 years ago