Approval expense report fields - initialize
Returns the field definitions for an expense report that an approver is reviewing. Use this endpoint instead of the regular expense-report fields-initialize endpoint when rendering the approver’s review screen — it loads the report by {expenseReportId} and assembles the response in approval context. Requires the caller to be assigned as an approver in the organization and to be authorised on the specific expense report; otherwise the endpoint returns 404. The 404 is intentionally identical to “expense report not found” so approval-access can’t be probed.
curl --request GET \
--url https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/approvals/expensereports/{expenseReportId}/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/approvals/expensereports/{expenseReportId}/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": "6ff26be43630418f9a68767a0f00ef13",
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": 3,
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": false,
"visible": true,
"value": "Samo provjera",
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": false,
"visible": true,
"value": null,
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "MULTI_VALUE",
"mandatory": false,
"visible": false,
"value": [
{
"email": "test.user@findity.com"
},
{
"email": "second.recipient@gmail.com"
}
],
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Expense records list",
"property": "expenseRecords",
"controlType": "LIST",
"multiSelect": true,
"mandatory": false,
"visible": true,
"value": [
"28897169ff6444c6957f362812fb9cc8",
"c99a0ead61344fa48657e8814737a524"
],
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Hello World",
"property": "8ab28c4e7294727001729806a19d0055",
"controlType": "LIST",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"disabled": true,
"url": "/me/organizations/8ab28c4f6fd37d39016fd6fee0470003/lists/CUSTOM_DIMENSIONS_866bd40e084b48e88f93bd51644fa054_8ab28c4f6fd37d39016fd6fee0470003"
}
],
"meta": {
"capabilities": null,
"previewUrl": "https://stage-expense.findity.com/api/expensereports/6ff26be43630418f9a68767a0f00ef13?X-Findity-Date=1705061838721&X-Findity-Expires=1705065438721&X-Findity-Credential=8ab28cb36b6a16a2016b6a1918eb0001&X-Findity-ClientApplicationId=16200214&X-Findity-Signature=78da92475f9f0c25ed39659307d6914255e9e668146c2dd329e9aba497bec508",
"summary": [
{
"type": "property_value",
"value": "OwnerFirstName OwnerLstName",
"property": "person"
},
{
"type": "property_value",
"value": "1 records",
"property": "expensesDescription"
},
{
"type": "property_value",
"value": "SEK122.10",
"property": "amount"
},
{
"type": "property_value",
"value": "Waiting for approval",
"property": "status"
},
{
"type": "property_value",
"value": "Expense report",
"property": "expenseTypeDescription"
},
{
"type": "property_value",
"value": "ExpenseReport",
"property": "expenseType"
}
]
}
}{
"Expense report with Approval status not found example": {
"value": {
"result": "error",
"code": "EXPENSE_REPORT_NOT_FOUND",
"description": "Expense report not found"
}
},
"Expense report with Approval status not found for organization example": {
"value": {
"result": "error",
"code": "EXPENSE_REPORT_NOT_FOUND",
"description": "Expense report not found in requested organization"
}
}
}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}$Id of the expense report. UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Query Parameters
optional properties to include
meta.capabilities, meta.summary Response
OK
Fields format of expense report for Approval process
Hide child attributes
Hide child attributes
It is set to null for the Approval process.
Delivers the URL that can be used for the preview of expense report
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}/approvals/expensereports/{expenseReportId}/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/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}/approvals/expensereports/{expenseReportId}/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/me/organizations/{id}/approvals/expensereports/{expenseReportId}/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": "6ff26be43630418f9a68767a0f00ef13",
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": 3,
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": false,
"visible": true,
"value": "Samo provjera",
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": false,
"visible": true,
"value": null,
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "MULTI_VALUE",
"mandatory": false,
"visible": false,
"value": [
{
"email": "test.user@findity.com"
},
{
"email": "second.recipient@gmail.com"
}
],
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Expense records list",
"property": "expenseRecords",
"controlType": "LIST",
"multiSelect": true,
"mandatory": false,
"visible": true,
"value": [
"28897169ff6444c6957f362812fb9cc8",
"c99a0ead61344fa48657e8814737a524"
],
"errorText": null,
"error": null,
"custom": false,
"disabled": true
},
{
"name": "Hello World",
"property": "8ab28c4e7294727001729806a19d0055",
"controlType": "LIST",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": true,
"disabled": true,
"url": "/me/organizations/8ab28c4f6fd37d39016fd6fee0470003/lists/CUSTOM_DIMENSIONS_866bd40e084b48e88f93bd51644fa054_8ab28c4f6fd37d39016fd6fee0470003"
}
],
"meta": {
"capabilities": null,
"previewUrl": "https://stage-expense.findity.com/api/expensereports/6ff26be43630418f9a68767a0f00ef13?X-Findity-Date=1705061838721&X-Findity-Expires=1705065438721&X-Findity-Credential=8ab28cb36b6a16a2016b6a1918eb0001&X-Findity-ClientApplicationId=16200214&X-Findity-Signature=78da92475f9f0c25ed39659307d6914255e9e668146c2dd329e9aba497bec508",
"summary": [
{
"type": "property_value",
"value": "OwnerFirstName OwnerLstName",
"property": "person"
},
{
"type": "property_value",
"value": "1 records",
"property": "expensesDescription"
},
{
"type": "property_value",
"value": "SEK122.10",
"property": "amount"
},
{
"type": "property_value",
"value": "Waiting for approval",
"property": "status"
},
{
"type": "property_value",
"value": "Expense report",
"property": "expenseTypeDescription"
},
{
"type": "property_value",
"value": "ExpenseReport",
"property": "expenseType"
}
]
}
}{
"Expense report with Approval status not found example": {
"value": {
"result": "error",
"code": "EXPENSE_REPORT_NOT_FOUND",
"description": "Expense report not found"
}
},
"Expense report with Approval status not found for organization example": {
"value": {
"result": "error",
"code": "EXPENSE_REPORT_NOT_FOUND",
"description": "Expense report not found in requested organization"
}
}
}
