Code Monkey home page Code Monkey logo

api-product's Introduction

Some products are added by default. Basic Entity Product representation cause we are using embedded database

Example Json schema used:

{"name": "name", "description": "desc", "tags": [ "tag1", "tag12" ], "prices": { "USD": 2, "Euro": 2.40 } }

API:

Add a new product:
POST /api/v1/products/
Response HTTP -> Created if it was successful,
Response HTTP -> Conflict if a element was in the database with same name

Update a product:
PUT /api/v1/products/{id}
Response HTTP -> OK, it was updated successfully
Response HTTP -> Not found, it was not in the database the product

Set a price for product:
PUT /api/v1/products/{id}/price Response HTTP -> OK, it was updated successfully
Response HTTP -> Not found, it was not in the database the product

Get all products
GET /api/v1/products Response HTTP -> OK, List of products will be returned, it could be empty

Get a specific product by id
GET /api/v1/products/{id} Response HTTP -> OK, product will be returned Response HTTP -> Not found, it was not in the database the product

api-product's People

Contributors

esuarezz avatar

Stargazers

ZaidAlissa 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.