Code Monkey home page Code Monkey logo

order-api's Introduction

DB

store

  • 가게

item

  • 상품
  • store와 1:N

item_image

  • 상품의 이미지
  • type: RAW(원본), RESIZE(리사이즈)
  • item과 1:N

order

  • 특정 상품에 대한 주문
  • status: WAIT(대기), 접수(ACCEPT), 완료(COMPLETE)
  • item과 N:1

API

상세 조회

  • GET /api/orders/{id}
  • 성공시 200, 해당 주문애 대한 정보를 반환
  • 잘못된 요청시 400, 잘못된 요청에 대한 값과 사유를 반환
  • 값이 없을시 404를 반환

목록 조회

  • GET /api/orders
  • 성공시 200, 페이지네이션 정보와 주문 목록을 반환
    • page, size, sort를 통해 페이징 조정 가능
      • sort는 [prop:direction, prop2:direction2...]의 형태로 요청
      • 누락시엔 기본 프로퍼티와 기본 디렉션으로 정렬
    • 주문명, 주문자명, 상태를 요청해 해당 값에 해당하는 목록 조회 가능
  • 잘못된 요청시 400, 잘못된 요청에 대한 값과 사유를 반환
  • 값이 없을시 404를 반환

주문 접수

  • PATCH /api/orders/{id}/accept
  • 성공시 200, 주문 접수 처리된 주문정보를 반환
  • 잘못된 요청시 400, 잘못된 요청에 대한 값과 사유를 반환
  • 값이 없을시 404를 반환

주문 완료

  • PATCH /api/orders/{id}/complete
  • 성공시 200, 주문 완료 처리된 주문정보를 반환
  • 잘못된 요청시 400, 잘못된 요청에 대한 값과 사유를 반환
  • 값이 없을시 404를 반환

order-api's People

Contributors

choimory avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.