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

Vendors

PreviousVehiclesNextPage
🧭

Retrieve a vendor

get

Retrieve a vendor for a company

Path parameters
idstringRequired

Id of the vendor

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/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "name": "test name",
    "description": "description...",
    "website": "https://www.example.com/",
    "notes": "notes...",
    "services_provided": "example",
    "products_purchased": "example",
    "account_manager_name": "name manager",
    "account_manager_email": "example@gmail.com",
    "currency": "USD",
    "score": "2",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}

Delete vendor

delete

remove vendor

Path parameters
idstringRequired

Id of the vendor

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/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": null,
  "meta": {}
}
  • GETRetrieve all vendors
  • POSTStore a vendor
  • GETRetrieve a vendor
  • PUTUpdate a vendor
  • DELETEDelete vendor

Retrieve all vendors

get

Retrieve all vendors for a company

Query parameters
per_pageintegerOptional

limit of records per page

Example: 10
pageintegerOptional

page number

Example: 2
namestringOptional

This field is used to filter by vendor name. (LIKE)

Example: Hay
sort_bystringOptional

This parameter is used to sort the records by a specific field (created_at,name)

Example: name
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/vendors HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": [
    {
      "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
      "name": "test name",
      "description": "description...",
      "website": "https://www.example.com/",
      "notes": "notes...",
      "services_provided": "example",
      "products_purchased": "example",
      "account_manager_name": "name manager",
      "account_manager_email": "example@gmail.com",
      "currency": "USD",
      "score": "2",
      "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 a vendor

post

Store a vendor for a company

Body

create vendor request body data

namestringRequired

name of the Vendor

Example: test name
websitestringRequired

website of the Vendor

Example: https://www.example.com/
descriptionstringOptional

description of the Vendor

Example: description...
notesstringOptional

notes of the Vendor

Example: notes...
services_providedstringOptional

services_provided of the Vendor

Example: example
products_purchasedstringOptional

products_purchased of the Vendor

Example: example
account_manager_namestringOptional

account_manager_name of the Vendor

Example: name manager
account_manager_emailstringOptional

account_manager_email of the Vendor

Example: example@gmail.com
currencystringOptional

currency of the Vendor

Example: USD
scoreintegerOptional

score of the Vendor

Example: 22
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/vendors HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 280

{
  "name": "test name",
  "website": "https://www.example.com/",
  "description": "description...",
  "notes": "notes...",
  "services_provided": "example",
  "products_purchased": "example",
  "account_manager_name": "name manager",
  "account_manager_email": "example@gmail.com",
  "currency": "USD",
  "score": "22"
}
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "name": "test name",
    "description": "description...",
    "website": "https://www.example.com/",
    "notes": "notes...",
    "services_provided": "example",
    "products_purchased": "example",
    "account_manager_name": "name manager",
    "account_manager_email": "example@gmail.com",
    "currency": "USD",
    "score": "2",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}

Update a vendor

put

Update a vendor for a company

Path parameters
idstringRequired

Id of the vendor

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

create vendor request body data

namestringRequired

name of the Vendor

Example: test name
websitestringRequired

website of the Vendor

Example: https://www.example.com/
descriptionstringOptional

description of the Vendor

Example: description...
notesstringOptional

notes of the Vendor

Example: notes...
services_providedstringOptional

services_provided of the Vendor

Example: example
products_purchasedstringOptional

products_purchased of the Vendor

Example: example
account_manager_namestringOptional

account_manager_name of the Vendor

Example: name manager
account_manager_emailstringOptional

account_manager_email of the Vendor

Example: example@gmail.com
currencystringOptional

currency of the Vendor

Example: USD
scoreintegerOptional

score of the Vendor

Example: 22
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/vendors/{id} HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 280

{
  "name": "test name",
  "website": "https://www.example.com/",
  "description": "description...",
  "notes": "notes...",
  "services_provided": "example",
  "products_purchased": "example",
  "account_manager_name": "name manager",
  "account_manager_email": "example@gmail.com",
  "currency": "USD",
  "score": "22"
}
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "name": "test name",
    "description": "description...",
    "website": "https://www.example.com/",
    "notes": "notes...",
    "services_provided": "example",
    "products_purchased": "example",
    "account_manager_name": "name manager",
    "account_manager_email": "example@gmail.com",
    "currency": "USD",
    "score": "2",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}