Update expense report
Updates an expense report owned by the calling user, or transitions its lifecycle.
curl --request PUT \
--url https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "58e195ab617940a7b2af2edf52f40e61",
"version": 3,
"comment": "Some comment",
"name": "Report name",
"expenseRecords": [
{
"id": "a73efe636a4d47359f3c28c3024b6d23"
},
{
"id": "2577ef6b3a6b4b869e93279ac789b21f"
}
],
"customFields": [
{
"fieldDefinitionId": "2b965c866b634698811dabf45a491089",
"value": true
}
]
}
'import requests
url = "https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}"
payload = {
"id": "58e195ab617940a7b2af2edf52f40e61",
"version": 3,
"comment": "Some comment",
"name": "Report name",
"expenseRecords": [{ "id": "a73efe636a4d47359f3c28c3024b6d23" }, { "id": "2577ef6b3a6b4b869e93279ac789b21f" }],
"customFields": [
{
"fieldDefinitionId": "2b965c866b634698811dabf45a491089",
"value": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '58e195ab617940a7b2af2edf52f40e61',
version: 3,
comment: 'Some comment',
name: 'Report name',
expenseRecords: [
{id: 'a73efe636a4d47359f3c28c3024b6d23'},
{id: '2577ef6b3a6b4b869e93279ac789b21f'}
],
customFields: [{fieldDefinitionId: '2b965c866b634698811dabf45a491089', value: true}]
})
};
fetch('https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}', 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/{expenseReportId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '58e195ab617940a7b2af2edf52f40e61',
'version' => 3,
'comment' => 'Some comment',
'name' => 'Report name',
'expenseRecords' => [
[
'id' => 'a73efe636a4d47359f3c28c3024b6d23'
],
[
'id' => '2577ef6b3a6b4b869e93279ac789b21f'
]
],
'customFields' => [
[
'fieldDefinitionId' => '2b965c866b634698811dabf45a491089',
'value' => true
]
]
]),
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/{expenseReportId}"
payload := strings.NewReader("{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\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.
Path Parameters
Id of the expense report. UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Query Parameters
Lifecycle transition to apply. When set, the request body is ignored: send submits the report for approval; retract recalls a previously-sent report.
send, retract When true, saves the report even if non-blocking validation warnings exist; validation errors still abort. Defaults to false.
Body
Free-text comment that travels with the report through approval and accounting integration.
Recipients notified when the report is sent in. Comma-separated email addresses, stored as a free-text field.
Display name of the report.
Organization that owns the report. Required on create; cannot be changed on update.
^[0-9a-fA-F]{32}$User-supplied report number. The server auto-generates one if omitted.
Optimistic-lock counter from the report last read by the client (the version field of a prior GET/PUT response). Optional; if provided and it no longer matches the report's current stored version, the update is rejected with 409 instead of being applied. Omit to skip this check.
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 PUT \
--url https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "58e195ab617940a7b2af2edf52f40e61",
"version": 3,
"comment": "Some comment",
"name": "Report name",
"expenseRecords": [
{
"id": "a73efe636a4d47359f3c28c3024b6d23"
},
{
"id": "2577ef6b3a6b4b869e93279ac789b21f"
}
],
"customFields": [
{
"fieldDefinitionId": "2b965c866b634698811dabf45a491089",
"value": true
}
]
}
'import requests
url = "https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}"
payload = {
"id": "58e195ab617940a7b2af2edf52f40e61",
"version": 3,
"comment": "Some comment",
"name": "Report name",
"expenseRecords": [{ "id": "a73efe636a4d47359f3c28c3024b6d23" }, { "id": "2577ef6b3a6b4b869e93279ac789b21f" }],
"customFields": [
{
"fieldDefinitionId": "2b965c866b634698811dabf45a491089",
"value": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '58e195ab617940a7b2af2edf52f40e61',
version: 3,
comment: 'Some comment',
name: 'Report name',
expenseRecords: [
{id: 'a73efe636a4d47359f3c28c3024b6d23'},
{id: '2577ef6b3a6b4b869e93279ac789b21f'}
],
customFields: [{fieldDefinitionId: '2b965c866b634698811dabf45a491089', value: true}]
})
};
fetch('https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}', 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/{expenseReportId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '58e195ab617940a7b2af2edf52f40e61',
'version' => 3,
'comment' => 'Some comment',
'name' => 'Report name',
'expenseRecords' => [
[
'id' => 'a73efe636a4d47359f3c28c3024b6d23'
],
[
'id' => '2577ef6b3a6b4b869e93279ac789b21f'
]
],
'customFields' => [
[
'fieldDefinitionId' => '2b965c866b634698811dabf45a491089',
'value' => true
]
]
]),
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/{expenseReportId}"
payload := strings.NewReader("{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/expensereports/{expenseReportId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"58e195ab617940a7b2af2edf52f40e61\",\n \"version\": 3,\n \"comment\": \"Some comment\",\n \"name\": \"Report name\",\n \"expenseRecords\": [\n {\n \"id\": \"a73efe636a4d47359f3c28c3024b6d23\"\n },\n {\n \"id\": \"2577ef6b3a6b4b869e93279ac789b21f\"\n }\n ],\n \"customFields\": [\n {\n \"fieldDefinitionId\": \"2b965c866b634698811dabf45a491089\",\n \"value\": true\n }\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>"
}
]
}
