V0 - Update dimensions (internalId)
Creates, updates, or removes custom dimension definitions on the organization. The request body is the full set of dimensions to apply: definitions in the body are upserted; definitions present on the organization but absent from the body may be removed. After applying changes, the API rebuilds the dimension lists, custom fields, and the dimension script for the organization. The organization must be writable.
curl --request PUT \
--url https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"externalSourceId": "project",
"description": "Project",
"level": "EXPENSE",
"controlType": "LIST_SEARCHABLE",
"presetLocation": "NONE",
"userOverridable": true,
"visibleIfNoPreset": true
}
]
'import requests
url = "https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/"
payload = [
{
"externalSourceId": "project",
"description": "Project",
"level": "EXPENSE",
"controlType": "LIST_SEARCHABLE",
"presetLocation": "NONE",
"userOverridable": True,
"visibleIfNoPreset": 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([
{
externalSourceId: 'project',
description: 'Project',
level: 'EXPENSE',
controlType: 'LIST_SEARCHABLE',
presetLocation: 'NONE',
userOverridable: true,
visibleIfNoPreset: true
}
])
};
fetch('https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/', 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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/",
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([
[
'externalSourceId' => 'project',
'description' => 'Project',
'level' => 'EXPENSE',
'controlType' => 'LIST_SEARCHABLE',
'presetLocation' => 'NONE',
'userOverridable' => true,
'visibleIfNoPreset' => 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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/"
payload := strings.NewReader("[\n {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/")
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 {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "success",
"description": "custom dimension definition updated",
"dimensions": [
{
"id": "5e1a8d1b3c4f4d2db8a6e1d7c2f5a3b9",
"definition": null,
"description": "Project",
"type": "CUSTOM",
"level": "EXPENSE",
"presetLocation": "NONE",
"controlType": "LIST_SEARCHABLE",
"userOverridable": true,
"externalSourceId": "project",
"useDateInterval": false,
"recipientId": null,
"useAsRecipientFilter": false,
"visibleIfNoPreset": true,
"hideDimensionValues": false,
"usedInCarbonFootprint": false,
"deviateOnCreditRow": false,
"deviatingCreditRowValue": null
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Standard application/json content type.
Findity API version. Use 3 for the current admin API.
Path Parameters
The internal id of the organization
Body
The full set of custom dimension definitions to apply to the organization.
Can be used to address a dimension with a globally unique id from external system
Name of dimension
Where the dimension is presented
EXPENSE, EXPENSE_REPORT If the dimension is a fixed list or a free text field
LIST_SEARCHABLE, TEXT If preset is used, this defines where the preset is set
NONE, EMPLOYEE, DEPARTMENT, CATEGORY If preset is used, this controls if user can change the preset
If preset is not used, this indicates if the dimension should be shown or not
Response
Custom dimension definitions saved.
curl --request PUT \
--url https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"externalSourceId": "project",
"description": "Project",
"level": "EXPENSE",
"controlType": "LIST_SEARCHABLE",
"presetLocation": "NONE",
"userOverridable": true,
"visibleIfNoPreset": true
}
]
'import requests
url = "https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/"
payload = [
{
"externalSourceId": "project",
"description": "Project",
"level": "EXPENSE",
"controlType": "LIST_SEARCHABLE",
"presetLocation": "NONE",
"userOverridable": True,
"visibleIfNoPreset": 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([
{
externalSourceId: 'project',
description: 'Project',
level: 'EXPENSE',
controlType: 'LIST_SEARCHABLE',
presetLocation: 'NONE',
userOverridable: true,
visibleIfNoPreset: true
}
])
};
fetch('https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/', 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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/",
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([
[
'externalSourceId' => 'project',
'description' => 'Project',
'level' => 'EXPENSE',
'controlType' => 'LIST_SEARCHABLE',
'presetLocation' => 'NONE',
'userOverridable' => true,
'visibleIfNoPreset' => 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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/"
payload := strings.NewReader("[\n {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\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-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-expense.findity.com/api/admin/organizations/{internalId}/customdimensions/")
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 {\n \"externalSourceId\": \"project\",\n \"description\": \"Project\",\n \"level\": \"EXPENSE\",\n \"controlType\": \"LIST_SEARCHABLE\",\n \"presetLocation\": \"NONE\",\n \"userOverridable\": true,\n \"visibleIfNoPreset\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "success",
"description": "custom dimension definition updated",
"dimensions": [
{
"id": "5e1a8d1b3c4f4d2db8a6e1d7c2f5a3b9",
"definition": null,
"description": "Project",
"type": "CUSTOM",
"level": "EXPENSE",
"presetLocation": "NONE",
"controlType": "LIST_SEARCHABLE",
"userOverridable": true,
"externalSourceId": "project",
"useDateInterval": false,
"recipientId": null,
"useAsRecipientFilter": false,
"visibleIfNoPreset": true,
"hideDimensionValues": false,
"usedInCarbonFootprint": false,
"deviateOnCreditRow": false,
"deviatingCreditRowValue": null
}
]
}
