Skip to content

Inventory_Control_Module

Yuri-M-Dias edited this page Mar 8, 2017 · 2 revisions

HandyShop

HandyShop is an application to automatize your groceries needs, and to help you spend less time shopping.

Group markets information

Single Market [/markets/{market_id}]

References each market, with more information about them, including links to the products and other functionalities.

  • Parameters
    • market_id (number) - ID of the Market in the form of an integer

Market Detail [GET]

Returns more information about one supermarket, with links to more actions.

  • Response 200 (application/json)

      {
          "id": 1,
          "name": "Extra",
          "image": "https://cdn.pbrd.co/images/elbA2rfOx.png",
          "products": "/markets/1/products",
          "location": {
              "latitude": "-16.720745",
              "longitude": "-49.262965"
          }
      }
    

Group Products information

All the operations related to the products go here.

Products Collection [/markets/{market_id}/products{?start,limit}]

References one collection of products from a single supermarket.

  • Parameters
    • market_id (number) - ID of the Market in the form of an integer
    • start (number) - number of the starting element, if paging
    • limit (number) - limits the requet to this many elements

Get all products for this supermarket, with filtering and pagination [GET]

TODO: filtering and sorting

  • Response 200 (application/json)

      [
          {
              "id": 1,
              "name": "Sucrilhos",
              "description": "Cereal Matinal Sucrilhos KELLOGG'S Caixa 730g",
              "price": "16.50",
              "image": "https://cdn.pbrd.co/images/eCKoX57At.png"
          },
          {
              "id": 2,
              "name": "Sabão líquido OMO",
              "description": "Lava Roupas Líquido OMO Progress Super Concentrado 1,75 Litros",
              "price": "32.25",
              "image": "https://cdn.pbrd.co/images/eCO1wvFXD.png"
          },
          {
              "id": 3,
              "name": "Sorvete La Basque",
              "description": "Sorvete de Menta com Pedaços de Chocolate LA BASQUE Pote 700ml",
              "price": "27.25",
              "image": "https://cdn.pbrd.co/images/eCL7BSlcQ.png"
          },
          {
              "id": 4,
              "name": "Patagonia",
              "description": "Cerveja Patagonia Bohemian Pilsen Garrafa 740ml",
              "price": "16.90",
              "image": "https://cdn.pbrd.co/images/eCMQrtsMk.png"
          }
      ]
    

Create a new product [PUT]

Creates a new product following the product specification, already linked to this market.

  • Response 200 (application/json)

Product detail [/markets/{market_id}/products/{product_id}]

References one product from a market.

  • Parameters
    • market_id (number) - ID of the Market in the form of an integer
    • product_id (number) - ID of the Product in the form of an integer

Detail one product [GET]

  • Response 200 (application/json)

          {
              "name": "Patagonia",
              "description": "Cerveja Patagonia Bohemian Pilsen Garrafa 740ml",
              "price": "16.90",
              "image": "https://cdn.pbrd.co/images/eCMQrtsMk.png"
          }
    

Alter one product [POST]

  • Response 200 (application/json)

Delete one product [DELETE]

  • Response 200 (application/json)