Add an approver to an approval section item
Creates a new approver on a specific approval section item (an organizational unit for DEPARTMENT sections, a custom dimension value for DIMENSION sections). Identify the person by either personId or personExternalId. The request must not include an id. The organizationId path parameter supports both the Findity id and the partner-side externalId.
curl --request POST \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sectionItemId": "1528b743a5c44eb5963b6dd53a98c43b",
"level": 1,
"personId": "ff8080819e74371c019e7437518600fa",
"amountLimit": 500
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers"
payload = {
"sectionItemId": "1528b743a5c44eb5963b6dd53a98c43b",
"level": 1,
"personId": "ff8080819e74371c019e7437518600fa",
"amountLimit": 500
}
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({
sectionItemId: '1528b743a5c44eb5963b6dd53a98c43b',
level: 1,
personId: 'ff8080819e74371c019e7437518600fa',
amountLimit: 500
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers', 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}/approval/sections/{sectionId}/approvers",
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([
'sectionItemId' => '1528b743a5c44eb5963b6dd53a98c43b',
'level' => 1,
'personId' => 'ff8080819e74371c019e7437518600fa',
'amountLimit' => 500
]),
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/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers"
payload := strings.NewReader("{\n \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\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/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers")
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 \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\n}"
response = http.request(request)
puts response.read_body{
"id": "8ab28c4f6f1da520016f23777f0e01a9",
"personId": "ff8080819e74371c019e7437518600fa",
"personExternalId": null,
"firstName": "FirstName1",
"lastName": "LastName1",
"email": "firstName1.lastName1@test.com",
"level": 1,
"amountLimit": 500
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the organization. String in UUID without dashes (32-character hex string) if access is done via values from Findity system otherwise, id of external system can be used
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Body
Request body for creating a new approver on a section item. Identify the person by either personId or personExternalId — when both are present personId takes precedence.
Identifier of the approval section item this approver is being added to. For DEPARTMENT sections this is the organizational unit id (or its external id); for DIMENSION sections this is the custom dimension list value id.
255Zero-based sequential approval level at which this approver acts. Must be greater than or equal to 0; approvers are processed from lowest (0) to highest level.
x >= 0Findity identifier of the person to add as approver. Provide either personId or personExternalId.
^[0-9a-fA-F]{32}$External source identifier of the person to add as approver. Used when the caller identifies persons by their external system id. Ignored if personId is also provided.
255Optional maximum expense report amount this approver is authorized to approve, expressed in the organization's base currency.
x >= 0Response
Approver successfully created
An approver assigned to an approval section item at a specific level.
Findity unique identifier of the approver record (not the person). Use this value when updating or deleting the approver.
^[0-9a-fA-F]{32}$Findity identifier of the person acting as approver.
^[0-9a-fA-F]{32}$Sequential approval level of this approver within the section item. Approvers are processed from lowest to highest level.
x >= 0External source identifier of the person as provided by the integrating system. Null if not set.
255First name of the approver.
255Last name of the approver.
255Email address of the approver.
255Maximum expense report amount this approver is authorized to approve, expressed in the organization's base currency. Null indicates no upper limit applies.
x >= 0Display metadata for the approver. Present only on GET responses when the request includes the query parameter include=approver.meta.abbreviation. Never returned on POST/PUT responses.
Hide child attributes
Hide child attributes
Full name of the approver, formatted as "firstName lastName".
511Full name with email address, formatted as "firstName lastName (email@example.com)".
511Localized, currency-formatted representation of the approver's amountLimit using the organization's base currency (e.g. "200,10 SEK"). Null when amountLimit is null.
64curl --request POST \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sectionItemId": "1528b743a5c44eb5963b6dd53a98c43b",
"level": 1,
"personId": "ff8080819e74371c019e7437518600fa",
"amountLimit": 500
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers"
payload = {
"sectionItemId": "1528b743a5c44eb5963b6dd53a98c43b",
"level": 1,
"personId": "ff8080819e74371c019e7437518600fa",
"amountLimit": 500
}
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({
sectionItemId: '1528b743a5c44eb5963b6dd53a98c43b',
level: 1,
personId: 'ff8080819e74371c019e7437518600fa',
amountLimit: 500
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers', 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}/approval/sections/{sectionId}/approvers",
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([
'sectionItemId' => '1528b743a5c44eb5963b6dd53a98c43b',
'level' => 1,
'personId' => 'ff8080819e74371c019e7437518600fa',
'amountLimit' => 500
]),
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/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers"
payload := strings.NewReader("{\n \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\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/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}/approvers")
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 \"sectionItemId\": \"1528b743a5c44eb5963b6dd53a98c43b\",\n \"level\": 1,\n \"personId\": \"ff8080819e74371c019e7437518600fa\",\n \"amountLimit\": 500\n}"
response = http.request(request)
puts response.read_body{
"id": "8ab28c4f6f1da520016f23777f0e01a9",
"personId": "ff8080819e74371c019e7437518600fa",
"personExternalId": null,
"firstName": "FirstName1",
"lastName": "LastName1",
"email": "firstName1.lastName1@test.com",
"level": 1,
"amountLimit": 500
}
