Expense report fields - update
Recomputes the field definitions after a client-side change to one or more fields on an expense report. Send the current fields payload as the request body — typically after a field marked requiresUpdate: true was edited — and the response returns the same shape with derived and dependent fields refreshed. If the body’s id field carries an existing expense-report id the server uses it to load report context; otherwise the body alone is the source of truth. Unlike the GET variant, no fields are seeded from server-side records.
curl --request PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAuthorizations
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
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
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 PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
