{"id":18251395,"url":"https://github.com/shehza-d/products-api","last_synced_at":"2025-04-04T16:32:15.229Z","repository":{"id":181784827,"uuid":"667287691","full_name":"shehza-d/products-api","owner":"shehza-d","description":"A document products api with mongo node drive (backend)","archived":false,"fork":false,"pushed_at":"2024-07-08T13:04:18.000Z","size":107,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T15:22:12.482Z","etag":null,"topics":["api","backend","mongo-node-driver","mongodb","rest"],"latest_commit_sha":null,"homepage":"https://products-api-dot-learning-chatbot-393109.lm.r.appspot.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shehza-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-17T07:04:44.000Z","updated_at":"2024-07-28T19:09:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f364e62e-aa5e-404c-a27d-e57a14fdaef5","html_url":"https://github.com/shehza-d/products-api","commit_stats":null,"previous_names":["shehza-d/products-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehza-d%2Fproducts-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehza-d%2Fproducts-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehza-d%2Fproducts-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehza-d%2Fproducts-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shehza-d","download_url":"https://codeload.github.com/shehza-d/products-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247209542,"owners_count":20901805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","backend","mongo-node-driver","mongodb","rest"],"created_at":"2024-11-05T09:47:29.000Z","updated_at":"2025-04-04T16:32:14.951Z","avatar_url":"https://github.com/shehza-d.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product APIs Documentation\n\nA document products api with mongo node drive\n\n[![wakatime](https://wakatime.com/badge/user/2b9bc0da-3bf8-4082-b333-bc011089fbbb/project/91c93c6b-65bf-4904-902e-49fc1283b63b.svg)](https://wakatime.com/badge/user/2b9bc0da-3bf8-4082-b333-bc011089fbbb/project/91c93c6b-65bf-4904-902e-49fc1283b63b)\n\nThis document provides a comprehensive guide to using the Product APIs to interact with the product data stored in the backend. The APIs allow you to retrieve, add, update, and delete products. Before using the APIs, ensure you have set up the necessary backend server and have a clear understanding of the request and response structures.\n\n## Base URL\n\nAll API requests should be made to the following base URL:\n[`http://localhost:3003/`](http://localhost:3003/)\n\n## Endpoints\n\n### 1. Get One Product\n\nRetrieve details of a specific product by providing its unique ID.\n\n- **Endpoint:** `/product/{product_id}`\n- **Method:** GET\n- **URL Template:** http://localhost:3003/api/v1/product/64b6b990be8c3565d3f55c00\n\n### 2. Get All Products\n\nRetrieve a list of all products available in the system.\n\n- **Endpoint:** `/products`\n- **Method:** GET\n- **URL Template:** http://localhost:3003/api/v1/products\n\n### 3. Add Product\n\nAdd a new product to the system with the given details.\n\n- **Endpoint:** `/product`\n- **Method:** POST\n- **URL Template:** http://localhost:3003/api/v1/product/\n- **Request Body:**\n\n  ```json\n  {\n    \"name\": \"samsung\",\n    \"price\": 50,\n    \"description\": \"im testing\"\n  }\n  ```\n\n### 4. Update Product\n\nUpdate an existing product with new details using its unique ID.\n\n- **Endpoint:** `/product`\n- **Method:** PUT\n- **URL Template:** http://localhost:3003/api/v1/product\n- **Request Body:**\n\n```json\n{\n  \"id\": \"64b6b990be8c3565d3f55c00\",\n  \"name\": \"Samsung\",\n  \"price\": 500,\n  \"description\": \"Lorem Ipsum is simply dummy book. It has survived not only\"\n}\n```\n\n### 5. Delete One Product\n\nDelete a specific product from the system using its unique ID.\n\n- **Endpoint:** /product/{product_id}\n- **Method:** DELETE\n- **URL Template:** http://localhost:3003/api/v1/product/64b7d998528ea187021255e9\n\n### Request Headers\n\nThe APIs do not require any specific headers to be passed in the requests. The examples provided above do not include any headers.\n\n### Response\n\nThe API responses will contain relevant data or messages based on the request made. The response structure may vary depending on the specific endpoint. However, the API collection does not provide any response examples, so you will need to test the APIs and refer to the backend documentation for more details on the responses.\n\n**Notes:**\nAlways ensure you have the correct base URL [http://localhost:3003/api/v1](http://localhost:3003/api/v1) when making requests to the API endpoints.\nFor endpoints that require request bodies (e.g., Add Product, Update Product), make sure to provide valid JSON data in the raw format.\nPlease refer to the backend documentation or consult the developers for additional information on the expected responses, error handling, and any authentication/authorization requirements for these APIs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshehza-d%2Fproducts-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshehza-d%2Fproducts-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshehza-d%2Fproducts-api/lists"}