Skip to content

jobyywilson/Order-Managment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

REST API's

Get all orders

Request

GET http://localhost:8080/order/

Response

[
   {
      "customerName":"John",
      "shippingAddress":"Hello World",
      "orderItemDTO":[
         {
            "productCode":"ABC",
            "productName":"HEllo Worlf",
            "quantity":8,
            "orderId":12
         },
         {
            "productCode":"ABC",
            "productName":"HEllo Worlf",
            "quantity":8,
            "orderId":12
         }
      ]
   },
   {
      "customerName":"John",
      "shippingAddress":"Hello World",
      "orderItemDTO":[

      ]
   }
]

Save an order

Request

POST /order/ HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Cache-Control: no-cache

    {
        "customerName":"John",
        "orderDate":"10/10/2020",
        "shippingAddress":"Hello World",
        "total":2000,
        "orderItemDTO":[
        {

        "productCode":"ABC",

        "productName":"HEllo Worlf",
        "orderId":2,
        "quantity":8


        },
        {
        "productCode":"ABC",
        "productName":"HEllo Worlf",
        "orderId":2,
        "quantity":8


        }
    ]	

    }

Response

{ "orderId": 49 }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages