Skip to content

gregtuc/go-rest-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create an inventory item:

POST to /items/create

Sample Payload:

{
    "name": "Beef",
    "description": "lean",
    "amount": 60
}

Read inventory items:

GET to /items/read

Update inventory items:

PATCH to /items/edit

Sample Payload:

{
    "itemId": "1f709c78-7960-11ec-af55-a70c809bdb5e",
    "amount": 5
}

Delete inventory items:

DELETE to /items/delete/:id

Sample Request: /items/delete/0c022abe-7960-11ec-af55-a70c809bdb5e

Extra Requirement: Shipments


Create a shipment

POST to /shipments/create

Sample Payload:

{
    "address": "Downtown Montreal",
    "contents": [
        {
            "itemId": "2ae314a7-7960-11ec-af55-a70c809bdb5e",
            "amount" : 10
        },
        {
            "itemId": "338bba99-7960-11ec-af55-a70c809bdb5e",
            "amount" : 5
        }
    ]
}

Read shipments:

GET to /shipments/read

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages