GreenPlaces Integrations
HomeDashboard
  • 👋Welcome to GreenPlaces
  • Overview
    • Adding your Team
    • Available Integrations
      • 👥HRIS
      • ⚡Utilities
      • 📖Accounting
    • Configuring SSO
  • Integrations
    • HRIS
    • Accounting
    • Utilities
  • GreenPlaces API
    • 🌏API Overview
    • 🔐Authentication
    • 🧭API Reference
      • Air travel
        • Bulk
        • Segments
      • Appliances
        • File
      • Expenses
      • Locations
      • Vehicles
      • Vendors
    • Specification
  • Page
Powered by GitBook
On this page
  1. GreenPlaces API
  2. API Reference

Appliances

PreviousSegmentsNextFile
🧭

Retrieve an appliance

get

Retrieve an appliance for a company

Path parameters
appliancestringRequired

ID of the Appliance

Example: 996501df-0bfc-4f95-954d-3a5d5dc48469
Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
get
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": {}
}

Delete an appliance

delete

Delete an appliance for a company

Path parameters
idstringRequired

ID of the Appliance

Example: 996501df-0bfc-4f95-954d-3a5d5dc48469
Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
delete
DELETE /api/appliances/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": null,
  "meta": {}
}
  • GETRetreive all appliances
  • POSTStore an appliance
  • GETRetrieve an appliance
  • PUTUpdate an appliance
  • DELETEDelete an appliance

Retreive all appliances

get

Retreive all appliances for a company

Query parameters
per_pageintegerOptional

limit of records per page

Example: 10
pageintegerOptional

page number

Example: 2
sort_bystringOptional

This parameter is used to sort the records by a specific field (nickname,type,brand_name,model_number,upc,purchased_at,created_at)

Example: type
sort_dirstringOptional

Order type(asc or desc)

Example: asc
Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
get
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

post

Store an appliance for a company

Body

Creates appliances request body data

nicknameanyOptional

Nickname for the Appliance

Example: Office A/C
typeanyRequired

Type for the Appliance

Example: Air Purifier
brand_nameanyRequired

Brand name of the Appliance

Example: Frigidaire
model_numberanyRequired

Model number for the Appliance

Example: 2726522415
upcanyOptional

UPC for the Appliance

Example: 194301242821346
room_numberanyOptional

Room number for the Appliance

Example: 1
purchased_atanyOptional

Purchased at for the Appliance

Example: 2020-01-12
quantityanyOptional

Quantity for the Appliance

Example: 1
leakageanyOptional

Leakage for the Appliance

Example: 1
Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
post
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": {}
}

Update an appliance

put

Update an appliance for a company

Path parameters
idstringRequired

ID of the Appliance

Example: 996501df-0bfc-4f95-954d-3a5d5dc48469
Body

Update appliance request body data

nicknameanyOptional

Nickname for the Appliance

Example: Office A/C
typeanyRequired

Type for the Appliance

Example: Air Purifier
brand_nameanyRequired

Brand name of the Appliance

Example: Frigidaire
model_numberanyRequired

Model number for the Appliance

Example: 2726522415
upcanyOptional

UPC for the Appliance

Example: 194301242821346
room_numberanyOptional

Room number for the Appliance

Example: 1
purchased_atanyOptional

Purchased at for the Appliance

Example: 2020-01-12
locationsanyOptional

IDs of Locations for the Appliance

Example: ['9956f948-b7gd-4b47-8181-a53fa4403567']
quantityanyOptional

Quantity for the Appliance

Example: 1
leakageanyOptional

Leakage for the Appliance

Example: 1
Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
put
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": {}
}