Features and API Endpoints - claurymr/inventory-service GitHub Wiki

Features

  • Get Inventories by Products
  • Track stock levels by keeping their history
  • Handle inventory transactions
  • Update inventory records by entry or exit
  • Ensure data integrity with validation
  • Secure access with JWT authentication

The service will be available at http://localhost:15269 or https://localhost:15475.

API Endpoints

Get Inventory Item By Product Id

  • URL: /inventories/products/{productId}
  • Method: GET
  • Authorization: Bearer
  • Request:
    {}
    
  • Response: 200 Ok
    [
        {
            "productName": "string",
            "quantity": "number",
        },
        {
            "productName": "string",
            "quantity": "number",
        }
    ]
    

Adjust Inventory Item Entry By Product Id

  • URL: /inventories/products/{productId}/entry
  • Method: PUT
  • Authorization: Bearer
  • Request:
    {
        "quantity": "number"
    }
    
  • Response: 204 No Content

Adjust Inventory Item Exit By Product Id

  • URL: /inventories/products/{productId}/exit
  • Method: PUT
  • Authorization: Bearer
  • Request:
    {
        "quantity": "number"
    }
    
  • Response: 204 No Content

Get Inventory History Item By Product Id

  • URL: /inventoryhistories/products/{productId}
  • Method: GET
  • Authorization: Bearer
  • Response: 200 Ok
    [
        {
            "productName": "string",
            "quantity": "number",
        },
        {
            "productName": "string",
            "quantity": "number",
        }
    ]