Expense report fields - initialize
Returns the field definitions needed to render a form for creating or editing an expense report — the container that groups expense records before submission. Pass expenseReportId (query) to seed the response with an existing report’s values for editing; omit it to start from a blank report for creation. The set of fields surfaced depends on the organization’s configuration — for example, the recipient field is only included when the organization has at least one expense-management-service recipient with open-email enabled.
curl --request GET \
--url https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields"
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}/expensereports/fields', 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}/expensereports/fields",
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}/expensereports/fields"
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}/expensereports/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields")
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{
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": false,
"visible": false,
"value": "2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": null,
"error": null,
"custom": false
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": 3,
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": false,
"visible": true,
"value": "Example Report Name",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": false,
"visible": true,
"value": "Example expense report description",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "RECIPIENT_LIST",
"mandatory": false,
"visible": false,
"value": [
{
"email": "test.user@findity.com"
}
],
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Preview",
"property": "previewURL",
"controlType": "URL",
"mandatory": false,
"visible": true,
"value": "https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Testlista rapport",
"property": "8ab28c4e833655d4018336d471cf0134",
"controlType": "LIST",
"mandatory": false,
"visible": true,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "FEP-1021 Test",
"property": "8ab28c4f746e90720174718de8460504",
"controlType": "LIST",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "Expense records list",
"property": "expenseRecords",
"controlType": "LIST",
"multiSelect": true,
"mandatory": false,
"visible": true,
"value": [
"28897169ff6444c6957f362812fb9cc8",
"c99a0ead61344fa48657e8814737a524"
],
"errorText": null,
"error": null,
"custom": false,
"url": "/expenses?organizationId=8ab28c4f6fd37d39016fd6fee0470003&expenseReportId=0ac52a615656427689a2e5d6641e6bf0&include=meta.abbreviation"
}
],
"meta": {
"capabilities": {
"canBeDeleted": true,
"canBeSentIn": false,
"canBeRetracted": false
},
"summary": null
}
}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)
^[0-9a-fA-F]{32}$Query Parameters
The id of the expense report to initialize the fields with UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$optional properties to include
meta.capabilities, meta.summary Response
OK
Fields format of expense report
Field-builder metadata for the expense report. Contains the summary, the caller's capability flags, and a preview URL.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Indicates if the expense report could be deleted or not
true
Indicates if the expense report can be retracted. A report can only be retracted if it is in APPROVAL status and no expense records or approval chain instances have been approved yet
false
Indicates if the expense report can be sent in by end user
true
Indicates if the expense report can be edited in by end user
true
Indicates if expense records that are attached to/included in the report can be removed. This is set to false if the report is in processStatus = REJECTED or if it is corporate card expense report
Indicates if expense records that are not attached to/excluded from the report can be added. This is set to false if the report is in processStatus = REJECTED or if it is corporate card expense report
delivers the URL that can be used for the preview of expense report
Field-builder array describing the expense report's editable values. Each entry pairs a property name with a value and any errors.
Hide child attributes
Hide child attributes
A translated name of the field, can be used to present to to the user
Identifier of the field. Contains the path to the property in the expense API, for example verification.amount, cardLiability. Expense record and expense report fields include a hidden (visible: false) version field (controlType INTEGER) holding the optimistic-lock version of the stored object (null for a new object). Send it back unchanged in the fields of the update request; if the object has been modified since it was read, the update is rejected with 409 CONCURRENT_MODIFICATION.
TEXT, MULTI_LINE_TEXT, DOUBLE, INTEGER, SWITCH, DATE, DATE_TIME, LIST, CONTENT_HOLDER, GUEST_LIST, FIELD_GROUP, LOCAL_DATE_TIME, INFORMATION The field is required
Only fields with visible = true should be shown
Tells the client that if this field is changed, the client must call the API again with the fields data
If controlType is LIST this property contains an url to the selectable values for this field
Indicates if this is a custom field not part of the standard fields
Indicates if this field is part of the data extracted by the receipt scanning
Set on the verification.receiptAttachment (CONTENT_HOLDER) field when the organization's booking country uses fiscal QR codes on receipts (currently Portugal). When true, clients should offer a QR-scan step in the receipt capture flow and, on success, send the decoded string as the qrScan header on POST /content. Absent when not applicable.
The value of the field, this is dynamic based on the control type. For example if the control type is DOUBLE the value property must have a double type. For SubsistenceAllowance and property = verification.specification[x].date1 or date2, this value is set/delivered in format "yyyy-MM-dd HH:mm" where the date is at UTC date time
When calling the fields-endpoint initially, this may contain a list object for fields with control type LIST. This way the client does not have to make a call to the list endpoint to fetch the value. This has the same structure as the result in the list.
If controlType is DATE or DATE_TIME or LOCAL_DATE_TIME, this property is set. Default value is false. If the value is false, then date picker shouldn't allow setting date to value higher than today's date.
A string that represents the error. This property is not empty when there is some error related to the specific field.
Human readable description of value returned in error property. This property is not empty when there is some error related to the specific field.
Indicates if property should be enabled or disabled for editing. In Approval flow, this property is always set to "true".
This property is populated when controlType="FIELD_GROUP" and it has the same structure as this array of objects. The list of objects represents all fields that are related to the specific field group.
This property is used for removable fields, for example on the FIELD_GROUP for a specification in allowance
This property is used to define the command available on the filed of controlType=FIELD_GROUP
Hide child attributes
Hide child attributes
This property contains the text for the command to be displayed
This property indicates if the client should display a dialog with confirmation as result of it
This property contains the text that should be displayed in case that confirmationRequired=true and client decided to perform the command/action
This property contains the command that can be executed by performing the PUT request with it on the fields endpoint
This property is set when controlType=INFORMATION and it should indicate which type of information the field is
normal, information, warning, error, success This property is set when controlType=INFORMATION to indicate if the information is dismissible or not
This property is going in combination with controlType=LIST to indicate that multiple values can be selected from the list
This property is set when there is controlType=LIST & multiSelect=true to indicate which type of item is list made of
This property is set by the URL value for the icon which can indicate access to different provided commands. It is usually provided within the field of controlType=FIELD_GROUP
This property represents the text that can be set as replacement for all the fields behind the defined FIELD_GROUP. It can be used as display for accessor to the list of the fields provided in the FIELD_GORUP
The maximum number of decimals this field can present, uses current currency. only set for fields with an amount in value.
This property contains the list of possible commands that can be performed on the specific field
Hide child attributes
Hide child attributes
This property contains the text for the command to be displayed
This property indicates if the client should display a dialog with confirmation as result of it
This property contains the text that should be displayed in case that confirmationRequired=true and client decided to perform the command/action
This property contains the command that can be executed by performing the PUT request with it on the fields endpoint
curl --request GET \
--url https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields"
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}/expensereports/fields', 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}/expensereports/fields",
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}/expensereports/fields"
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}/expensereports/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/expensereports/fields")
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{
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": false,
"visible": false,
"value": "2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": null,
"error": null,
"custom": false
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": 3,
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": false,
"visible": true,
"value": "Example Report Name",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": false,
"visible": true,
"value": "Example expense report description",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "RECIPIENT_LIST",
"mandatory": false,
"visible": false,
"value": [
{
"email": "test.user@findity.com"
}
],
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Preview",
"property": "previewURL",
"controlType": "URL",
"mandatory": false,
"visible": true,
"value": "https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": null,
"error": null,
"custom": false
},
{
"name": "Testlista rapport",
"property": "8ab28c4e833655d4018336d471cf0134",
"controlType": "LIST",
"mandatory": false,
"visible": true,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "FEP-1021 Test",
"property": "8ab28c4f746e90720174718de8460504",
"controlType": "LIST",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "Expense records list",
"property": "expenseRecords",
"controlType": "LIST",
"multiSelect": true,
"mandatory": false,
"visible": true,
"value": [
"28897169ff6444c6957f362812fb9cc8",
"c99a0ead61344fa48657e8814737a524"
],
"errorText": null,
"error": null,
"custom": false,
"url": "/expenses?organizationId=8ab28c4f6fd37d39016fd6fee0470003&expenseReportId=0ac52a615656427689a2e5d6641e6bf0&include=meta.abbreviation"
}
],
"meta": {
"capabilities": {
"canBeDeleted": true,
"canBeSentIn": false,
"canBeRetracted": false
},
"summary": null
}
}
