Appliances
Retreive all appliances for a company
limit of records per page
10
page number
2
This parameter is used to sort the records by a specific field (nickname,type,brand_name,model_number,upc,purchased_at,created_at)
type
Order type(asc or desc)
asc
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/appliances HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": [
{
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"nickname": "MinnieAir",
"type": "Air Purifie",
"brand_name": "Mr. Rolando Hayes DDS",
"model_number": "244727394",
"upc": "39962491427322",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"purchased_at": "2022-03-21",
"manufacturer_label": "{}",
"quantity": "1",
"leakage": "999999.99",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
}
],
"meta": {
"pagination": {
"current": "1",
"last_page": "1",
"per_page": "10",
"total": "6"
}
}
}
Store an appliance for a company
Creates appliances request body data
Nickname for the Appliance
Office A/C
Type for the Appliance
Air Purifier
Brand name of the Appliance
Frigidaire
Model number for the Appliance
2726522415
UPC for the Appliance
194301242821346
Room number for the Appliance
1
Purchased at for the Appliance
2020-01-12
Quantity for the Appliance
1
Leakage for the Appliance
1
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
POST /api/appliances HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 255
{
"nickname": "Office A/C",
"type": "Air Purifier",
"brand_name": "Frigidaire",
"model_number": "2726522415",
"upc": "194301242821346",
"room_number": "1",
"purchased_at": "2020-01-12",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"quantity": "1",
"leakage": "1"
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"nickname": "MinnieAir",
"type": "Air Purifie",
"brand_name": "Mr. Rolando Hayes DDS",
"model_number": "244727394",
"upc": "39962491427322",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"purchased_at": "2022-03-21",
"manufacturer_label": "{}",
"quantity": "1",
"leakage": "999999.99",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
Retrieve an appliance for a company
ID of the Appliance
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/appliances/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"nickname": "MinnieAir",
"type": "Air Purifie",
"brand_name": "Mr. Rolando Hayes DDS",
"model_number": "244727394",
"upc": "39962491427322",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"purchased_at": "2022-03-21",
"manufacturer_label": "{}",
"quantity": "1",
"leakage": "999999.99",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
Update an appliance for a company
ID of the Appliance
996501df-0bfc-4f95-954d-3a5d5dc48469
Update appliance request body data
Nickname for the Appliance
Office A/C
Type for the Appliance
Air Purifier
Brand name of the Appliance
Frigidaire
Model number for the Appliance
2726522415
UPC for the Appliance
194301242821346
Room number for the Appliance
1
Purchased at for the Appliance
2020-01-12
IDs of Locations for the Appliance
['9956f948-b7gd-4b47-8181-a53fa4403567']
Quantity for the Appliance
1
Leakage for the Appliance
1
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
PUT /api/appliances/{id} HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 255
{
"nickname": "Office A/C",
"type": "Air Purifier",
"brand_name": "Frigidaire",
"model_number": "2726522415",
"upc": "194301242821346",
"room_number": "1",
"purchased_at": "2020-01-12",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"quantity": "1",
"leakage": "1"
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"nickname": "MinnieAir",
"type": "Air Purifie",
"brand_name": "Mr. Rolando Hayes DDS",
"model_number": "244727394",
"upc": "39962491427322",
"locations": "['9956f948-b7gd-4b47-8181-a53fa4403567']",
"purchased_at": "2022-03-21",
"manufacturer_label": "{}",
"quantity": "1",
"leakage": "999999.99",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
Delete an appliance for a company
ID of the Appliance
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
DELETE /api/appliances/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": null,
"meta": {}
}