Render the payment basis of expense reports
The payment basis sums up what is to be paid out to each employee for the listed reports: the tax free amount, the taxable amount and their total, one row per employee sorted by email, followed by the grand total. It is returned as HTML, or as a PDF with format=pdf.
Which amounts are summed depends on the organization’s accounting structure. On the new accounting structure only the per diem, mileage and food benefit amounts of each report are summed, receipts are not included. On the old accounting structure the per diem, mileage and food benefit amounts are summed as well, and the receipt amounts in the base currency are added to the tax free amount.
The endpoint also accepts a pre-signed URL (the X-Findity-* query parameters added by POST /api/auth/urlsignature), so the document can be opened in a new browser tab without an Authorization header. The signed URL acts as the user who signed it, limited to the same organization when the signing token was. Like without a signature, a signed URL without format renders HTML; a signed URL with any other format than html or pdf is answered with 401.
curl --request GET \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis', 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/admin/organizations/{organizationId}/reports/paymentbasis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<!DOCTYPE html>
<html>
<head><title>Payment basis</title></head>
<body>...</body>
</html>Authorizations
Path Parameters
Query Parameters
The expense reports the payment basis covers, as a comma separated list
(expenseReportIds=05b8daba9ba14a49846fe77883248cf0,7c1f0a3b9d2e4f5a8b6c0d1e2f3a4b5c).
Every id must belong to the organization and not be deleted, if any of them does not the whole call is rejected with 404 and nothing is rendered. Array of strings, UUID format (32-character hexadecimal), 1-100 items. Required.
1 - 100 elementsUUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Recipient whose accounting the amounts are calculated with. Only organizations on the old accounting structure calculate the amounts per recipient, with the new accounting structure the amounts are the same for every recipient. A recipient that is disconnected from the organization is accepted, a recipient of another organization is rejected with 400 INVALID_PARAMETER. String, UUID format (32-character hexadecimal). Optional, the default accounting of each report is used when omitted.
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Response
The rendered payment basis
The response is of type string.
Was this page helpful?
curl --request GET \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis', 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/admin/organizations/{organizationId}/reports/paymentbasis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/reports/paymentbasis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<!DOCTYPE html>
<html>
<head><title>Payment basis</title></head>
<body>...</body>
</html>
