Organization expense types
Returns the expense types available on the current organization. The expense types can be:
- ReceiptVerification: Normal receipts and entertainment expenses
- CarSpecification: For mileage expenses
- TravelExpense: Per diem expenses
- FoodBenefitsSpecification: Food benefit expenses
- FuelBenefitsSpecification: Fuel benefit expenses
The expense types can be used to render the different expense views using the fields endpoint which greatly simplifies the implementation of handling the localization rules and custom setup by organizations
GET
/
me
/
organizations
/
{id}
/
expensetypes
Organization expense types
curl --request GET \
--url https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"count": 5,
"total": 5
},
"data": [
{
"type": "CarSpecification",
"name": "Mileage",
"iconUrl": "https://expense.findity.com/api/resources/a7352e074ebf46378d3a0d6ca94d9c14"
},
{
"type": "FoodBenefitsSpecification",
"name": "Food benefit",
"iconUrl": "https://expense.findity.com/api/resources/2db726125795418b964547ac91e059cd"
},
{
"type": "FuelBenefitsSpecification",
"name": "Fuel benefit",
"iconUrl": "https://expense.findity.com/api/resources/7fa2309f7a224cb4bd0ea071300c480c"
},
{
"type": "ReceiptVerification",
"name": "Expense",
"iconUrl": "https://expense.findity.com/api/resources/ff808181442fd36301443006074e00c4"
},
{
"type": "SubsistenceAllowance",
"name": "Subsistence allowance",
"iconUrl": "https://expense.findity.com/api/resources/c1abd36dbb1d4499a215129e05d46795"
}
]
}{
"result": "error",
"code": "ORGANIZATION_NOT_FOUND",
"description": "Failed to get organization for id: b0d18fe3c5864d05a05ce5656cb14696"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the organization of the user UUID without dashes (32-character hex string)
Pattern:
^[0-9a-fA-F]{32}$Response
OK
Hide child attributes
Hide child attributes
Expense type where CarSpecification relates to Mileage, SubsistenceAllowance to Per Diem, etc
Available options:
CarSpecification, FoodBenefitsSpecification, FuelBenefitsSpecification, ReceiptVerification, SubsistenceAllowance true if the user can create an expense record of this type
⌘I
Organization expense types
curl --request GET \
--url https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensetypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"count": 5,
"total": 5
},
"data": [
{
"type": "CarSpecification",
"name": "Mileage",
"iconUrl": "https://expense.findity.com/api/resources/a7352e074ebf46378d3a0d6ca94d9c14"
},
{
"type": "FoodBenefitsSpecification",
"name": "Food benefit",
"iconUrl": "https://expense.findity.com/api/resources/2db726125795418b964547ac91e059cd"
},
{
"type": "FuelBenefitsSpecification",
"name": "Fuel benefit",
"iconUrl": "https://expense.findity.com/api/resources/7fa2309f7a224cb4bd0ea071300c480c"
},
{
"type": "ReceiptVerification",
"name": "Expense",
"iconUrl": "https://expense.findity.com/api/resources/ff808181442fd36301443006074e00c4"
},
{
"type": "SubsistenceAllowance",
"name": "Subsistence allowance",
"iconUrl": "https://expense.findity.com/api/resources/c1abd36dbb1d4499a215129e05d46795"
}
]
}{
"result": "error",
"code": "ORGANIZATION_NOT_FOUND",
"description": "Failed to get organization for id: b0d18fe3c5864d05a05ce5656cb14696"
}
