Create expense report (fields format of expense report)
Creates an expense report from a fields-format payload — the same field-builder envelope returned by GET /me/organizations/{id}/expensereports/fields. Validation errors are returned in the same fields-format shape so the client can merge them back into the form fields.
curl --request POST \
--url 'https://stage-api.findity.com/api/v1/expense/expensereports?format=fields' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": false
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": null,
"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"
}
],
"meta": {
"capabilities": null,
"sections": null,
"summary": null
}
}
'import requests
url = "https://stage-api.findity.com/api/v1/expense/expensereports?format=fields"
payload = {
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": False
},
{
"name": None,
"property": "version",
"controlType": "INTEGER",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": False,
"visible": True,
"value": "Example Report Name",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": False,
"visible": True,
"value": "Example expense report description",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "RECIPIENT_LIST",
"mandatory": False,
"visible": False,
"value": [{ "email": "test.user@findity.com" }],
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Preview",
"property": "previewURL",
"controlType": "URL",
"mandatory": False,
"visible": True,
"value": "https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Testlista rapport",
"property": "8ab28c4e833655d4018336d471cf0134",
"controlType": "LIST",
"mandatory": False,
"visible": True,
"value": None,
"errorText": None,
"error": None,
"custom": True,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "FEP-1021 Test",
"property": "8ab28c4f746e90720174718de8460504",
"controlType": "LIST",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": True,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b"
}
],
"meta": {
"capabilities": None,
"sections": None,
"summary": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: [
{
name: 'Id',
property: 'id',
controlType: 'TEXT',
mandatory: false,
visible: false,
value: null,
errorText: null,
error: null,
custom: false
},
{
name: null,
property: 'version',
controlType: 'INTEGER',
mandatory: false,
visible: false,
value: null,
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'
}
],
meta: {capabilities: null, sections: null, summary: null}
})
};
fetch('https://stage-api.findity.com/api/v1/expense/expensereports?format=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/expensereports?format=fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
[
'name' => 'Id',
'property' => 'id',
'controlType' => 'TEXT',
'mandatory' => false,
'visible' => false,
'value' => null,
'errorText' => null,
'error' => null,
'custom' => false
],
[
'name' => null,
'property' => 'version',
'controlType' => 'INTEGER',
'mandatory' => false,
'visible' => false,
'value' => null,
'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'
]
],
'meta' => [
'capabilities' => null,
'sections' => null,
'summary' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/expense/expensereports?format=fields"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://stage-api.findity.com/api/v1/expense/expensereports?format=fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/expensereports?format=fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"comment": "<string>",
"dateCreated": "<string>",
"emailRecipients": "<string>",
"expenseRecords": [
{
"id": "<string>",
"status": "NEW",
"personId": "<string>",
"dateCreated": "<string>",
"lastUpdated": "<string>",
"version": 123,
"expenseDate": "<string>",
"organizationId": "<string>",
"categoryId": "<string>",
"rejectComment": "<string>",
"reimbursement": 123,
"reimbursementCurrency": "<string>",
"meta": {
"categoryIconUrl": "https://expense.findity.com/api/resources/8a5f867e9b204742a8cc2ca2b6c57358",
"person": {
"firstName": "Anna",
"lastName": "Andersson",
"email": "anna.andersson@example.com"
},
"abbreviation": {
"iconUrl": "https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b",
"dateDescription": "June 2, 2023",
"sortDescription": "June 1, 2023",
"userDescription": "Pens and erasers",
"expenseDescription": "Office supplies",
"reimbursementDescription": "44.5 SEK",
"totalReimbursementDescription": "44.5 SEK",
"alert": true,
"isComplete": true,
"expenseType": "ReceiptVerification",
"expenseTypeDescription": "<string>"
},
"capabilities": {
"canBeAddedToReport": false,
"canBeRemovedFromReport": false,
"canBeDeleted": true,
"canBeSentIn": true,
"canBeSplit": false,
"canBeEdited": true,
"canBeMerged": false,
"canAddBreakfast": false,
"canAddLunch": false,
"canAddDinner": false
},
"cardTransaction": {
"id": "4a17f93476ce4bf2832236be26743853",
"amount": 120,
"name": "Bank name",
"cardNumber": "xxxxxxxxxxxx1234"
}
},
"verification": {
"id": "<string>",
"reimbursement": 123,
"comment": "<string>",
"type": "ReceiptVerification",
"amount": 123,
"taxAmount": 123,
"tip": 1,
"exchangeRate": 123,
"currency": "<string>",
"description": "<string>",
"purchaseDate": "2023-11-07T05:31:56Z",
"dateCreated": "<string>",
"lastUpdated": "<string>",
"storeName": "<string>",
"verificationNumber": "<string>",
"paymentTypeId": "<string>",
"cardTransactionId": "<string>",
"eventType": "AUTHORIZATION_ACCEPTED",
"receiptAttachment": {
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
},
"representation": {
"type": "<string>",
"guestListAttached": false,
"includesLiquor": false,
"numberOfGuests": 123,
"numberOfExternalGuests": 123,
"place": "<string>",
"tip": 1,
"guestListAttachment": {
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
},
"guests": [
{
"name": "<string>",
"company": "<string>"
}
]
},
"attachments": [
{
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}
],
"customFields": [
{
"fieldDefinitionId": "<string>",
"value": "<unknown>"
}
],
"taxRates": [
{
"taxRateId": "<string>",
"rate": 123,
"taxAmount": 123
}
]
},
"expenseReportId": "<string>"
}
],
"id": "<string>",
"version": 123,
"lastUpdated": "<string>",
"meta": {
"abbreviation": {
"alert": true,
"approvalComment": "<string>",
"dateDescription": "<string>",
"sortDescription": "<string>",
"iconUrl": "<string>",
"reimbursementDescription": "44.5 SEK",
"userDescription": "<string>",
"labels": [
{
"property": "label.autoApproval",
"text": "Auto-approved",
"priority": "NORMAL",
"type": "SUCCESS",
"iconUrl": "https://expense.findity.com/api/resources/ic_ai_sparkles.svg"
}
]
},
"violations": [
{
"type": "DUPLICATE",
"level": "INFO",
"handledComment": "<string>",
"violatedExpenseIds": [
"<string>"
]
}
],
"approval": {
"rejectedExpenseRecordIds": [
"<string>"
]
},
"requirements": {
"approval": {
"requireNextStepApprovers": true,
"nextStepApprovers": "<string>"
}
},
"messages": [
{
"message": "<string>",
"date": "<string>"
}
],
"invoice": {
"cardIconUrl": "<string>",
"invoiceRef": "<string>",
"invoiceNumber": "<string>",
"bank": "<string>",
"dueDate": "<string>",
"invoiceDate": "<string>",
"liability": "corporate"
},
"capabilities": {
"canBeDeleted": true,
"canBeRetracted": false,
"canBeSentIn": true,
"canBeEdited": true,
"canRemoveExpenses": true,
"canAddExpenses": true
}
},
"name": "<string>",
"organizationId": "<string>",
"personId": "<string>",
"previewUrl": "<string>",
"reportNumber": "<string>",
"sent": "<string>",
"status": "APPROVAL",
"processStatus": "DRAFT",
"reimbursement": 123,
"reimbursementCurrency": "<string>",
"approvalChainId": "<string>",
"type": "AUTOMATIC",
"customFields": [
{
"fieldDefinitionId": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The id of the organization of the user UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Info about the structure passed in the body of request Parameter should be set to 'fields' value
When true, saves the report even if non-blocking validation warnings exist; validation errors still abort. Defaults to false.
Body
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
Response
OK
Hide child attributes
Hide child attributes
NEW, NORMAL, APPROVAL, APPROVED, REJECTED UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Optimistic-lock counter, incremented on every update. On PUT, echo back the value from the last GET/PUT response to detect if the expense was changed by someone else since it was read; a mismatch returns 409. Optional; omit to skip this check.
Date that the user has selected for the expense. For receipt expenses it is purchase date. For mileages it is travel date and for per diems it is the first travel date.
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Hide child attributes
Hide child attributes
"https://expense.findity.com/api/resources/8a5f867e9b204742a8cc2ca2b6c57358"
- Option 1
- Option 2
- Option 3
- Option 4
Hide child attributes
Hide child attributes
"https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b"
Date formatted according to users locale
"June 2, 2023"
Description of the value used for sorting
"June 1, 2023"
"Pens and erasers"
Description which contains the name of category
"Office supplies"
Reimbursement amount and currency formatted according to users locale
"44.5 SEK"
Total reimbursement amount and currency formatted according to users locale, only included if requesting meta.splits and the expense is the parent
"44.5 SEK"
If the report is rejected or contains expenses that has validation errors
If the expense is complete and ready to be sent, can contain warnings.
"ReceiptVerification"
description of expenseType property translated to the users language
Hide child attributes
Hide child attributes
Indicates if the expense record can be added to a report
false
Indicates if the expense record can be removed from a report
false
Indicates if the expense record can be deleted
true
true if the expense record can be sent in directly without report
true
Indicates if the expense record can be split
false
Indicates if the expense record can be edited
true
Indicates if the expense record can be merged with another expense record. Will only be true for expense records that are based on card transaction, has not been split and is editable by end user.
false
ONLY PART OF FoodBenefitsSpecifications! Indicates if breakfast is available for meal benefits.
false
ONLY PART OF FoodBenefitsSpecifications! Indicates if lunch is available for meal benefits.
false
ONLY PART OF FoodBenefitsSpecifications! Indicates if dinner is available for meal benefits.
false
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$"4a17f93476ce4bf2832236be26743853"
120
"Bank name"
"xxxxxxxxxxxx1234"
The expense-type-specific payload — receipt details, mileage details, per-diem details, or food-benefit details. Shape selected by the nested type discriminator.
- Option 1
- Option 2
- Option 3
- Option 4
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$ReceiptVerification The tip amount for the receipt, expressed as a non-negative decimal number in the receipt's currency. This is the canonical location for tip. For backwards compatibility the value is also mirrored on the deprecated representation.tip property.
x >= 0AUTHORIZATION_ACCEPTED, AUTHORIZATION_REJECTED, AUTHORIZATION_REVERSAL, CAPTURE, REFUND Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$EU Decoded fiscal QR string as sent in the qrScan request header on POST. Omitted when the resource has no QR data attached. Currently populated for Portuguese receipts.
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}${
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}
Hide child attributes
Hide child attributes
Deprecated. Tip is now a root receipt verification property (tip). A non-negative decimal number in the receipt's currency. This property is kept for backwards compatibility and mirrors the root value.
x >= 0Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$EU Decoded fiscal QR string as sent in the qrScan request header on POST. Omitted when the resource has no QR data attached. Currently populated for Portuguese receipts.
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}${
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$EU Decoded fiscal QR string as sent in the qrScan request header on POST. Omitted when the resource has no QR data attached. Currently populated for Portuguese receipts.
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Optimistic-lock counter, incremented on every update. Echo this value back in the request body of a PUT to detect if the report was changed by someone else since it was read; a mismatch returns 409.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
If the report is rejected or contains expenses that has validation errors
Reimbursement amount and currency formatted according to users locale
"44.5 SEK"
List of labels for the expense report
Hide child attributes
Hide child attributes
The property this label relates to
"label.autoApproval"
The label text to display
"Auto-approved"
Priority level of the label
NORMAL, IMPORTANT, CRITICAL "NORMAL"
Type of label indicating its semantic meaning
NORMAL, SUCCESS, INFORMATION, WARNING, ERROR "SUCCESS"
Optional URL to an icon for the label
"https://expense.findity.com/api/resources/ic_ai_sparkles.svg"
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
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$APPROVAL, APPROVED, READY_TO_SEND, BULK_TRANSFER, ERROR, NEW, NORMAL, PAID, REJECTED, SEND, SENT, TRANSFER, TRANSFER_TO_RECIPIENT DRAFT, PROCESSING, PROCESSED, REJECTED AUTOMATIC, MANUAL, COMPANY_CARD curl --request POST \
--url 'https://stage-api.findity.com/api/v1/expense/expensereports?format=fields' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": false,
"visible": false,
"value": null,
"errorText": null,
"error": null,
"custom": false
},
{
"name": null,
"property": "version",
"controlType": "INTEGER",
"mandatory": false,
"visible": false,
"value": null,
"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"
}
],
"meta": {
"capabilities": null,
"sections": null,
"summary": null
}
}
'import requests
url = "https://stage-api.findity.com/api/v1/expense/expensereports?format=fields"
payload = {
"fields": [
{
"name": "Id",
"property": "id",
"controlType": "TEXT",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": False
},
{
"name": None,
"property": "version",
"controlType": "INTEGER",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Name",
"property": "name",
"controlType": "TEXT",
"mandatory": False,
"visible": True,
"value": "Example Report Name",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Description",
"property": "description",
"controlType": "MULTI_LINE_TEXT",
"mandatory": False,
"visible": True,
"value": "Example expense report description",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Recipients",
"property": "recipientList",
"controlType": "RECIPIENT_LIST",
"mandatory": False,
"visible": False,
"value": [{ "email": "test.user@findity.com" }],
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Preview",
"property": "previewURL",
"controlType": "URL",
"mandatory": False,
"visible": True,
"value": "https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2",
"errorText": None,
"error": None,
"custom": False
},
{
"name": "Testlista rapport",
"property": "8ab28c4e833655d4018336d471cf0134",
"controlType": "LIST",
"mandatory": False,
"visible": True,
"value": None,
"errorText": None,
"error": None,
"custom": True,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b"
},
{
"name": "FEP-1021 Test",
"property": "8ab28c4f746e90720174718de8460504",
"controlType": "LIST",
"mandatory": False,
"visible": False,
"value": None,
"errorText": None,
"error": None,
"custom": True,
"url": "/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b"
}
],
"meta": {
"capabilities": None,
"sections": None,
"summary": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: [
{
name: 'Id',
property: 'id',
controlType: 'TEXT',
mandatory: false,
visible: false,
value: null,
errorText: null,
error: null,
custom: false
},
{
name: null,
property: 'version',
controlType: 'INTEGER',
mandatory: false,
visible: false,
value: null,
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'
}
],
meta: {capabilities: null, sections: null, summary: null}
})
};
fetch('https://stage-api.findity.com/api/v1/expense/expensereports?format=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/expensereports?format=fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
[
'name' => 'Id',
'property' => 'id',
'controlType' => 'TEXT',
'mandatory' => false,
'visible' => false,
'value' => null,
'errorText' => null,
'error' => null,
'custom' => false
],
[
'name' => null,
'property' => 'version',
'controlType' => 'INTEGER',
'mandatory' => false,
'visible' => false,
'value' => null,
'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'
]
],
'meta' => [
'capabilities' => null,
'sections' => null,
'summary' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/expense/expensereports?format=fields"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://stage-api.findity.com/api/v1/expense/expensereports?format=fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/expensereports?format=fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n {\n \"name\": \"Id\",\n \"property\": \"id\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": null,\n \"property\": \"version\",\n \"controlType\": \"INTEGER\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Name\",\n \"property\": \"name\",\n \"controlType\": \"TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example Report Name\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Description\",\n \"property\": \"description\",\n \"controlType\": \"MULTI_LINE_TEXT\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"Example expense report description\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Recipients\",\n \"property\": \"recipientList\",\n \"controlType\": \"RECIPIENT_LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": [\n {\n \"email\": \"test.user@findity.com\"\n }\n ],\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Preview\",\n \"property\": \"previewURL\",\n \"controlType\": \"URL\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": \"https://expense.findity.com/api/expensereports/2bb9fcae93894bf7aa2e8f9009b8f3e2\",\n \"errorText\": null,\n \"error\": null,\n \"custom\": false\n },\n {\n \"name\": \"Testlista rapport\",\n \"property\": \"8ab28c4e833655d4018336d471cf0134\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": true,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_a6e123ed4ab64d4c85d39dc50395c46f_8a49a1b359cbfe2a0159d551c8d5008b\"\n },\n {\n \"name\": \"FEP-1021 Test\",\n \"property\": \"8ab28c4f746e90720174718de8460504\",\n \"controlType\": \"LIST\",\n \"mandatory\": false,\n \"visible\": false,\n \"value\": null,\n \"errorText\": null,\n \"error\": null,\n \"custom\": true,\n \"url\": \"/me/organizations/8a49a1b359cbfe2a0159d551c8d5008b/lists/CUSTOM_DIMENSIONS_81f165ee1f2244e793568e039acb826b_8a49a1b359cbfe2a0159d551c8d5008b\"\n }\n ],\n \"meta\": {\n \"capabilities\": null,\n \"sections\": null,\n \"summary\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"comment": "<string>",
"dateCreated": "<string>",
"emailRecipients": "<string>",
"expenseRecords": [
{
"id": "<string>",
"status": "NEW",
"personId": "<string>",
"dateCreated": "<string>",
"lastUpdated": "<string>",
"version": 123,
"expenseDate": "<string>",
"organizationId": "<string>",
"categoryId": "<string>",
"rejectComment": "<string>",
"reimbursement": 123,
"reimbursementCurrency": "<string>",
"meta": {
"categoryIconUrl": "https://expense.findity.com/api/resources/8a5f867e9b204742a8cc2ca2b6c57358",
"person": {
"firstName": "Anna",
"lastName": "Andersson",
"email": "anna.andersson@example.com"
},
"abbreviation": {
"iconUrl": "https://expense.findity.com/api/resources/ba479b6fe32f4d5e87e6dda1e02e850b",
"dateDescription": "June 2, 2023",
"sortDescription": "June 1, 2023",
"userDescription": "Pens and erasers",
"expenseDescription": "Office supplies",
"reimbursementDescription": "44.5 SEK",
"totalReimbursementDescription": "44.5 SEK",
"alert": true,
"isComplete": true,
"expenseType": "ReceiptVerification",
"expenseTypeDescription": "<string>"
},
"capabilities": {
"canBeAddedToReport": false,
"canBeRemovedFromReport": false,
"canBeDeleted": true,
"canBeSentIn": true,
"canBeSplit": false,
"canBeEdited": true,
"canBeMerged": false,
"canAddBreakfast": false,
"canAddLunch": false,
"canAddDinner": false
},
"cardTransaction": {
"id": "4a17f93476ce4bf2832236be26743853",
"amount": 120,
"name": "Bank name",
"cardNumber": "xxxxxxxxxxxx1234"
}
},
"verification": {
"id": "<string>",
"reimbursement": 123,
"comment": "<string>",
"type": "ReceiptVerification",
"amount": 123,
"taxAmount": 123,
"tip": 1,
"exchangeRate": 123,
"currency": "<string>",
"description": "<string>",
"purchaseDate": "2023-11-07T05:31:56Z",
"dateCreated": "<string>",
"lastUpdated": "<string>",
"storeName": "<string>",
"verificationNumber": "<string>",
"paymentTypeId": "<string>",
"cardTransactionId": "<string>",
"eventType": "AUTHORIZATION_ACCEPTED",
"receiptAttachment": {
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
},
"representation": {
"type": "<string>",
"guestListAttached": false,
"includesLiquor": false,
"numberOfGuests": 123,
"numberOfExternalGuests": 123,
"place": "<string>",
"tip": 1,
"guestListAttachment": {
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
},
"guests": [
{
"name": "<string>",
"company": "<string>"
}
]
},
"attachments": [
{
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}
],
"customFields": [
{
"fieldDefinitionId": "<string>",
"value": "<unknown>"
}
],
"taxRates": [
{
"taxRateId": "<string>",
"rate": 123,
"taxAmount": 123
}
]
},
"expenseReportId": "<string>"
}
],
"id": "<string>",
"version": 123,
"lastUpdated": "<string>",
"meta": {
"abbreviation": {
"alert": true,
"approvalComment": "<string>",
"dateDescription": "<string>",
"sortDescription": "<string>",
"iconUrl": "<string>",
"reimbursementDescription": "44.5 SEK",
"userDescription": "<string>",
"labels": [
{
"property": "label.autoApproval",
"text": "Auto-approved",
"priority": "NORMAL",
"type": "SUCCESS",
"iconUrl": "https://expense.findity.com/api/resources/ic_ai_sparkles.svg"
}
]
},
"violations": [
{
"type": "DUPLICATE",
"level": "INFO",
"handledComment": "<string>",
"violatedExpenseIds": [
"<string>"
]
}
],
"approval": {
"rejectedExpenseRecordIds": [
"<string>"
]
},
"requirements": {
"approval": {
"requireNextStepApprovers": true,
"nextStepApprovers": "<string>"
}
},
"messages": [
{
"message": "<string>",
"date": "<string>"
}
],
"invoice": {
"cardIconUrl": "<string>",
"invoiceRef": "<string>",
"invoiceNumber": "<string>",
"bank": "<string>",
"dueDate": "<string>",
"invoiceDate": "<string>",
"liability": "corporate"
},
"capabilities": {
"canBeDeleted": true,
"canBeRetracted": false,
"canBeSentIn": true,
"canBeEdited": true,
"canRemoveExpenses": true,
"canAddExpenses": true
}
},
"name": "<string>",
"organizationId": "<string>",
"personId": "<string>",
"previewUrl": "<string>",
"reportNumber": "<string>",
"sent": "<string>",
"status": "APPROVAL",
"processStatus": "DRAFT",
"reimbursement": 123,
"reimbursementCurrency": "<string>",
"approvalChainId": "<string>",
"type": "AUTOMATIC",
"customFields": [
{
"fieldDefinitionId": "<string>",
"value": "<unknown>"
}
]
}
