This system includes all the information about companies and their products.
All the APIs for companies
Creates a new company in database and adds the info about the company
Endpoint:
Method: POST
Type: RAW
URL: {{URL}}/companies/
Body:
{
"name": "company-name",
"tel": "021525632"
}
Deletes a single company with that ID
Endpoint:
Method: DELETE
Type:
URL: {{URL}}/companies/5ef11d35291d23051477f79c
Retrieves all the companies with their products
Endpoint:
Method: GET
Type:
URL: {{URL}}/companies/
Retrieves a single company with that ID
Endpoint:
Method: GET
Type:
URL: {{URL}}/companies/5ef11ca0d8e55e3cb81c0c0a
Updates a single company with that ID
Endpoint:
Method: PUT
Type: RAW
URL: {{URL}}/companies/5ef11ca0d8e55e3cb81c0c0a
Body:
{
"tel": "0100011"
}
All the APIs for products
Creates a new product in database and adds the info about the product
Endpoint:
Method: POST
Type: RAW
URL: {{URL2}}/products/
Body:
{
"title": "product-title",
"productType": "type 2",
"productionDate": "2/3/2018",
"company": "5ef121074aba222f4ceddfd9"
}
Deletes a single product with that ID
Endpoint:
Method: DELETE
Type:
URL: {{URL2}}/products/5ef12607ed6eef3700a632de
Retrieves all the products information
Endpoint:
Method: GET
Type:
URL: {{URL2}}/products
Retrieves a single product with that ID
Endpoint:
Method: GET
Type:
URL: {{URL2}}/products/5ef12607ed6eef3700a632de
Updates a single product with that ID
Endpoint:
Method: PUT
Type: RAW
URL: {{URL2}}/products/5ef12607ed6eef3700a632de
Body:
{
"title": "Product new title",
"productionDate": "2/5/2019",
"company": "5ef12153676582353c8c2212"
}
Made with ♥ by thedevsaddam | Generated at: 2020-06-25 23:16:44 by docgen