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

Expenses

PreviousFileNextLocations
🧭

Retrieve an expense

get

obtain information about a an expense

Path parameters
idstringRequired

ID of the the Expense

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/expenses/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "vendor": {
      "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"
    },
    "memo": "This is a memo",
    "amount": "100.00",
    "currency": "USD",
    "ceda_six_industry_id": "1111B0",
    "transacted_at": "2023-06-12",
    "recorded_at": "2023-06-12",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}

Delete an expense

delete

remove an expense

Path parameters
idstringRequired

ID of the the Expense

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

Retrieve all expenses

get

Retrieve expenses for a company

Query parameters
per_pageintegerOptional

limit of records per page

Example: 10
pageintegerOptional

page number

Example: 2
vendor_idstringOptional

ID of the supplier associated with the expense

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

date of the transaction you want to filter frome

Example: 2022-03-23
transacted_todateOptional

date of the transaction you wish to filter to

Example: 2023-03-23
memostringOptional

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

Example: test
sort_bystringOptional

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

Example: created_at
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/expenses HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
  "status": "Ok",
  "message": "Success",
  "data": [
    {
      "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
      "vendor": {
        "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"
      },
      "memo": "This is a memo",
      "amount": "100.00",
      "currency": "USD",
      "ceda_six_industry_id": "1111B0",
      "transacted_at": "2023-06-12",
      "recorded_at": "2023-06-12",
      "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"
    }
  }
}

Create an expense

post

Create an expense for a company

Body

Creates airtravel segment request body data

vendor_idanyOptional

Vendor ID for the Expense

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

Memo for the Expense

Example: This is a memo
amountanyOptional

Amount for the Expense

Example: 100.00
currencyanyRequired

Currency for the Expense

Example: USD
ceda_six_industryanyOptional

CEDA six industry Code or UUID for the Expense

Example: 1111B0
transacted_atanyRequired

Transacted At for the Expense

Example: 1999-01-01
recorded_atanyRequired

Recorded At for the Expense

Example: 1999-01-01
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/expenses HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 196

{
  "vendor_id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
  "memo": "This is a memo",
  "amount": "100.00",
  "currency": "USD",
  "ceda_six_industry": "1111B0",
  "transacted_at": "1999-01-01",
  "recorded_at": "1999-01-01"
}
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "vendor": {
      "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"
    },
    "memo": "This is a memo",
    "amount": "100.00",
    "currency": "USD",
    "ceda_six_industry_id": "1111B0",
    "transacted_at": "2023-06-12",
    "recorded_at": "2023-06-12",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}

Update an expense

put

Update of an expense

Path parameters
idstringRequired

ID of the the Expense

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

Update airtravel segment request body data

vendor_idanyOptional

Vendor ID for the Expense

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

Memo for the Expense

Example: This is a memo
amountanyOptional

Amount for the Expense

Example: 100.00
currencyanyRequired

Currency for the Expense

Example: USD
ceda_six_industryanyOptional

CEDA six industry ID for the Expense

Example: 1111B0
transacted_atanyRequired

Transacted At for the Expense

Example: 1999-01-01
recorded_atanyRequired

Recorded At for the Expense

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

{
  "vendor_id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
  "memo": "This is a memo",
  "amount": "100.00",
  "currency": "USD",
  "ceda_six_industry": "1111B0",
  "transacted_at": "1999-01-01",
  "recorded_at": "1999-01-01"
}
{
  "status": "Ok",
  "message": "Success",
  "data": {
    "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
    "vendor": {
      "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"
    },
    "memo": "This is a memo",
    "amount": "100.00",
    "currency": "USD",
    "ceda_six_industry_id": "1111B0",
    "transacted_at": "2023-06-12",
    "recorded_at": "2023-06-12",
    "updated_at": "2023-06-12T17:30:21.000000Z",
    "created_at": "2023-06-12T17:30:21.000000Z"
  },
  "meta": {}
}