V0 - Add, update or remove employee (externalId)
Creates, updates, or removes users in the organization. The request body is an array of user objects: each object is upserted (matched on externalSourceId); to remove a user, set delete: true on that user object. An invitation email is sent to new users by default — control with the sendInvitationMail query parameter.
curl --request PUT \
--url https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"externalSourceId": "222",
"employeeId": "12345",
"organizationalUnitExternalSourceId": "1234567",
"title": "12345",
"admin": "false",
"impersonatorEmployees": [
"<array>"
],
"endDate": "2019-12-31T00:00:000Z",
"person": {
"externalSourceId": "external-source-id-1234",
"firstName": "Leif",
"lastName": "Larsson",
"email": "example@findity.com",
"clearExternalSourceIds": false,
"address": {
"street1": "Street 1",
"city": "The city",
"postalCode": "123 45",
"countryCode": "SE"
}
},
"presetValues": [
"<array>"
]
}
]
'import requests
url = "https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/"
payload = [
{
"externalSourceId": "222",
"employeeId": "12345",
"organizationalUnitExternalSourceId": "1234567",
"title": "12345",
"admin": "false",
"impersonatorEmployees": ["<array>"],
"endDate": "2019-12-31T00:00:000Z",
"person": {
"externalSourceId": "external-source-id-1234",
"firstName": "Leif",
"lastName": "Larsson",
"email": "example@findity.com",
"clearExternalSourceIds": False,
"address": {
"street1": "Street 1",
"city": "The city",
"postalCode": "123 45",
"countryCode": "SE"
}
},
"presetValues": ["<array>"]
}
]
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: '222',
employeeId: '12345',
organizationalUnitExternalSourceId: '1234567',
title: '12345',
admin: 'false',
impersonatorEmployees: ['<array>'],
endDate: '2019-12-31T00:00:000Z',
person: {
externalSourceId: 'external-source-id-1234',
firstName: 'Leif',
lastName: 'Larsson',
email: 'example@findity.com',
clearExternalSourceIds: false,
address: {street1: 'Street 1', city: 'The city', postalCode: '123 45', countryCode: 'SE'}
},
presetValues: ['<array>']
}
])
};
fetch('https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/', 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/externalid/{externalId}/users/",
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' => '222',
'employeeId' => '12345',
'organizationalUnitExternalSourceId' => '1234567',
'title' => '12345',
'admin' => 'false',
'impersonatorEmployees' => [
'<array>'
],
'endDate' => '2019-12-31T00:00:000Z',
'person' => [
'externalSourceId' => 'external-source-id-1234',
'firstName' => 'Leif',
'lastName' => 'Larsson',
'email' => 'example@findity.com',
'clearExternalSourceIds' => false,
'address' => [
'street1' => 'Street 1',
'city' => 'The city',
'postalCode' => '123 45',
'countryCode' => 'SE'
]
],
'presetValues' => [
'<array>'
]
]
]),
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/externalid/{externalId}/users/"
payload := strings.NewReader("[\n {\n \"externalSourceId\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\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-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"externalSourceId\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/")
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\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "success",
"description": "users updated",
"ongoingReports": [],
"movedReports": []
}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 external source id of the organization
Query Parameters
When true (default), an invitation email is sent to newly created users. When false, no invitation email is sent.
Body
Array of user objects to upsert in the organization. Set delete: true on a user object to remove that user.
External source identifier of the user. Used to match an existing user; if no match, a new user is created.
"222"
Employee identifier set by the organization. Must be unique within the organization.
"12345"
External source id of the organizational unit (department) the user belongs to.
"1234567"
Job title of the user.
"12345"
Whether the user has administrator privileges in the organization.
"false"
Other users in the organization who may impersonate this user (e.g. to handle expenses on their behalf).
Date the user stops being an active employee. ISO 8601. A future date is allowed; a past date marks the employee as ended.
"2019-12-31T00:00:000Z"
Person profile attached to the user — the individual identity the user represents. A Person can have multiple Users across different Organizations within the same client application.
Hide child attributes
Hide child attributes
External source identifier of the person.
"external-source-id-1234"
First name of the person.
"Leif"
Last name of the person.
"Larsson"
Email address of the person. Must be unique per client application unless the disableMultipleExternalSourceIds setting is off.
"example@findity.com"
When true, all existing external source identifiers on the person are cleared before applying the update.
false
Postal address of the person.
Custom dimension values that are preset on the user, optionally with temporary approver assignments.
Response
curl --request PUT \
--url https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"externalSourceId": "222",
"employeeId": "12345",
"organizationalUnitExternalSourceId": "1234567",
"title": "12345",
"admin": "false",
"impersonatorEmployees": [
"<array>"
],
"endDate": "2019-12-31T00:00:000Z",
"person": {
"externalSourceId": "external-source-id-1234",
"firstName": "Leif",
"lastName": "Larsson",
"email": "example@findity.com",
"clearExternalSourceIds": false,
"address": {
"street1": "Street 1",
"city": "The city",
"postalCode": "123 45",
"countryCode": "SE"
}
},
"presetValues": [
"<array>"
]
}
]
'import requests
url = "https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/"
payload = [
{
"externalSourceId": "222",
"employeeId": "12345",
"organizationalUnitExternalSourceId": "1234567",
"title": "12345",
"admin": "false",
"impersonatorEmployees": ["<array>"],
"endDate": "2019-12-31T00:00:000Z",
"person": {
"externalSourceId": "external-source-id-1234",
"firstName": "Leif",
"lastName": "Larsson",
"email": "example@findity.com",
"clearExternalSourceIds": False,
"address": {
"street1": "Street 1",
"city": "The city",
"postalCode": "123 45",
"countryCode": "SE"
}
},
"presetValues": ["<array>"]
}
]
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: '222',
employeeId: '12345',
organizationalUnitExternalSourceId: '1234567',
title: '12345',
admin: 'false',
impersonatorEmployees: ['<array>'],
endDate: '2019-12-31T00:00:000Z',
person: {
externalSourceId: 'external-source-id-1234',
firstName: 'Leif',
lastName: 'Larsson',
email: 'example@findity.com',
clearExternalSourceIds: false,
address: {street1: 'Street 1', city: 'The city', postalCode: '123 45', countryCode: 'SE'}
},
presetValues: ['<array>']
}
])
};
fetch('https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/', 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/externalid/{externalId}/users/",
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' => '222',
'employeeId' => '12345',
'organizationalUnitExternalSourceId' => '1234567',
'title' => '12345',
'admin' => 'false',
'impersonatorEmployees' => [
'<array>'
],
'endDate' => '2019-12-31T00:00:000Z',
'person' => [
'externalSourceId' => 'external-source-id-1234',
'firstName' => 'Leif',
'lastName' => 'Larsson',
'email' => 'example@findity.com',
'clearExternalSourceIds' => false,
'address' => [
'street1' => 'Street 1',
'city' => 'The city',
'postalCode' => '123 45',
'countryCode' => 'SE'
]
],
'presetValues' => [
'<array>'
]
]
]),
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/externalid/{externalId}/users/"
payload := strings.NewReader("[\n {\n \"externalSourceId\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\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-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"externalSourceId\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-expense.findity.com/api/admin/organizations/externalid/{externalId}/users/")
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\": \"222\",\n \"employeeId\": \"12345\",\n \"organizationalUnitExternalSourceId\": \"1234567\",\n \"title\": \"12345\",\n \"admin\": \"false\",\n \"impersonatorEmployees\": [\n \"<array>\"\n ],\n \"endDate\": \"2019-12-31T00:00:000Z\",\n \"person\": {\n \"externalSourceId\": \"external-source-id-1234\",\n \"firstName\": \"Leif\",\n \"lastName\": \"Larsson\",\n \"email\": \"example@findity.com\",\n \"clearExternalSourceIds\": false,\n \"address\": {\n \"street1\": \"Street 1\",\n \"city\": \"The city\",\n \"postalCode\": \"123 45\",\n \"countryCode\": \"SE\"\n }\n },\n \"presetValues\": [\n \"<array>\"\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"result": "success",
"description": "users updated",
"ongoingReports": [],
"movedReports": []
}
