Closed JumongComputers closed 2 weeks ago
This is too many endpoints in one ticket. You need to pick one and check for duplicate
The last ticket that ended up being a duplicate had similar issue.i choose just the PUT but the other teams implemented the full CRUD and it was accepted i had to close it for them since they covered what i was implementing, however i will pick one
Hi @zxenonx @highb33kay @JumongComputers @buka4rill @Homoakin619
I'd like to take on this issue and implement it in the Java repo. Please assign it to me.
Thank you!
Description
Develop new API endpoints for managing product stock within the application. These endpoints will allow for retrieving current stock levels. This will provide flexibility and control over product inventory directly through the API.
Acceptance Criteria
/api/v1/products/:productId/stock
endpoint is created.GET
endpoint returns a JSON response withproductId
,currentStock
, andlastUpdated
.Requirements
-Create three API endpoints: --GET
/api/v1/products/:productId/stock
: Fetch the current stock level for a specific product. -The GET endpoint should return the following fields in JSON format: -productId (string): The ID of the product. -currentStock (number): The current stock level of the product. -lastUpdated (string, date-time): The last time the stock level was updated. -Implement proper error handling for potential issues such as database connection errors, validation errors, and insufficient permissions.Expected Outcome
-Functional and reliable GET
/api/v1/products/:productId/stock
, -The endpoints return the required fields in JSON format. -Proper error handling mechanisms are in place.Endpoints
GET /api/v1/products/stock
- Success Response
200 Ok