Update expense service category
PUT
/
organizations
/
{organizationId}
/
expenseservice
/
categories
/
{id}
Update expense service category
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"section": 123,
"classType": "<string>",
"categoryTemplateId": "<string>",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": true,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [
{}
],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": [
"<string>"
],
"presetValues": [
{}
],
"expenseCategoryFilter": "<string>",
"showAccounting": true,
"showRepresentation": true,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": true
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}"
payload = {
"name": "<string>",
"section": 123,
"classType": "<string>",
"categoryTemplateId": "<string>",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": True,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [{}],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": ["<string>"],
"presetValues": [{}],
"expenseCategoryFilter": "<string>",
"showAccounting": True,
"showRepresentation": True,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": 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({
name: '<string>',
section: 123,
classType: '<string>',
categoryTemplateId: '<string>',
defaultTaxPercent: 123,
deviantTaxPercent: 123,
nonDeductableVat: true,
accountNumberMapping: '<string>',
accountingNumberId: '<string>',
accountingNumbers: [{}],
expenseCodeId: '<string>',
salaryCodeId: '<string>',
taxAccountingNumberId: '<string>',
taxSalaryCodeId: '<string>',
taxExpenseCodeId: '<string>',
budgetAmount: 123,
budgetName: '<string>',
budgetStartMonth: 123,
mccCodes: ['<string>'],
presetValues: [{}],
expenseCategoryFilter: '<string>',
showAccounting: true,
showRepresentation: true,
settings: {},
employeeGroupId: '<string>',
useAlternatePerDiemRate: true
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}', 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}/expenseservice/categories/{id}",
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([
'name' => '<string>',
'section' => 123,
'classType' => '<string>',
'categoryTemplateId' => '<string>',
'defaultTaxPercent' => 123,
'deviantTaxPercent' => 123,
'nonDeductableVat' => true,
'accountNumberMapping' => '<string>',
'accountingNumberId' => '<string>',
'accountingNumbers' => [
[
]
],
'expenseCodeId' => '<string>',
'salaryCodeId' => '<string>',
'taxAccountingNumberId' => '<string>',
'taxSalaryCodeId' => '<string>',
'taxExpenseCodeId' => '<string>',
'budgetAmount' => 123,
'budgetName' => '<string>',
'budgetStartMonth' => 123,
'mccCodes' => [
'<string>'
],
'presetValues' => [
[
]
],
'expenseCategoryFilter' => '<string>',
'showAccounting' => true,
'showRepresentation' => true,
'settings' => [
],
'employeeGroupId' => '<string>',
'useAlternatePerDiemRate' => 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/admin/organizations/{organizationId}/expenseservice/categories/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\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/admin/organizations/{organizationId}/expenseservice/categories/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}")
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 \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"iconUrl": "<string>",
"section": 123,
"categoryType": "SubsistenceAllowanceCategory",
"verificationClassType": "<string>",
"categoryTemplateId": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": true,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [
{}
],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": [
"<string>"
],
"presetValues": [
{}
],
"expenseCategoryFilter": "<string>",
"showAccounting": true,
"showRepresentation": true,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": true
}{
"result": "<string>",
"code": "<string>",
"description": "<string>"
}{
"result": "error",
"code": "ORGANIZATION_NOT_FOUND",
"description": "Failed to get organization for id: {orgId}"
}Authorizations
Path Parameters
Body
application/json
String (32-character hex string). ID of the employee group the category is restricted to. When the organization uses employee groups, per diem categories restricted to a group are only available to users in that group. null or an empty string removes the restriction. An unknown ID returns 404 EMPLOYEE_GROUP_NOT_FOUND.
Response
OK
The resolved class type of the expense category
Available options:
SubsistenceAllowanceCategory, RepresentationExpenseCategory, OtherExpenseCategory, MileageExpenseCategory, FuelBenefitsExpenseCategory, FoodBenefitsExpenseCategory, ExpenseCategory, CongestionBenefitExpenseCategory, BenefitExpenseCategory, AbroadPurchaseExpenseCategory String (32-character hex string). ID of the employee group the category is restricted to. When the organization uses employee groups, per diem categories restricted to a group are only available to users in that group. null or an empty string removes the restriction. An unknown ID returns 404 EMPLOYEE_GROUP_NOT_FOUND.
Was this page helpful?
⌘I
Update expense service category
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"section": 123,
"classType": "<string>",
"categoryTemplateId": "<string>",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": true,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [
{}
],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": [
"<string>"
],
"presetValues": [
{}
],
"expenseCategoryFilter": "<string>",
"showAccounting": true,
"showRepresentation": true,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": true
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}"
payload = {
"name": "<string>",
"section": 123,
"classType": "<string>",
"categoryTemplateId": "<string>",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": True,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [{}],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": ["<string>"],
"presetValues": [{}],
"expenseCategoryFilter": "<string>",
"showAccounting": True,
"showRepresentation": True,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": 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({
name: '<string>',
section: 123,
classType: '<string>',
categoryTemplateId: '<string>',
defaultTaxPercent: 123,
deviantTaxPercent: 123,
nonDeductableVat: true,
accountNumberMapping: '<string>',
accountingNumberId: '<string>',
accountingNumbers: [{}],
expenseCodeId: '<string>',
salaryCodeId: '<string>',
taxAccountingNumberId: '<string>',
taxSalaryCodeId: '<string>',
taxExpenseCodeId: '<string>',
budgetAmount: 123,
budgetName: '<string>',
budgetStartMonth: 123,
mccCodes: ['<string>'],
presetValues: [{}],
expenseCategoryFilter: '<string>',
showAccounting: true,
showRepresentation: true,
settings: {},
employeeGroupId: '<string>',
useAlternatePerDiemRate: true
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}', 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}/expenseservice/categories/{id}",
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([
'name' => '<string>',
'section' => 123,
'classType' => '<string>',
'categoryTemplateId' => '<string>',
'defaultTaxPercent' => 123,
'deviantTaxPercent' => 123,
'nonDeductableVat' => true,
'accountNumberMapping' => '<string>',
'accountingNumberId' => '<string>',
'accountingNumbers' => [
[
]
],
'expenseCodeId' => '<string>',
'salaryCodeId' => '<string>',
'taxAccountingNumberId' => '<string>',
'taxSalaryCodeId' => '<string>',
'taxExpenseCodeId' => '<string>',
'budgetAmount' => 123,
'budgetName' => '<string>',
'budgetStartMonth' => 123,
'mccCodes' => [
'<string>'
],
'presetValues' => [
[
]
],
'expenseCategoryFilter' => '<string>',
'showAccounting' => true,
'showRepresentation' => true,
'settings' => [
],
'employeeGroupId' => '<string>',
'useAlternatePerDiemRate' => 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/admin/organizations/{organizationId}/expenseservice/categories/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\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/admin/organizations/{organizationId}/expenseservice/categories/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/expenseservice/categories/{id}")
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 \"name\": \"<string>\",\n \"section\": 123,\n \"classType\": \"<string>\",\n \"categoryTemplateId\": \"<string>\",\n \"defaultTaxPercent\": 123,\n \"deviantTaxPercent\": 123,\n \"nonDeductableVat\": true,\n \"accountNumberMapping\": \"<string>\",\n \"accountingNumberId\": \"<string>\",\n \"accountingNumbers\": [\n {}\n ],\n \"expenseCodeId\": \"<string>\",\n \"salaryCodeId\": \"<string>\",\n \"taxAccountingNumberId\": \"<string>\",\n \"taxSalaryCodeId\": \"<string>\",\n \"taxExpenseCodeId\": \"<string>\",\n \"budgetAmount\": 123,\n \"budgetName\": \"<string>\",\n \"budgetStartMonth\": 123,\n \"mccCodes\": [\n \"<string>\"\n ],\n \"presetValues\": [\n {}\n ],\n \"expenseCategoryFilter\": \"<string>\",\n \"showAccounting\": true,\n \"showRepresentation\": true,\n \"settings\": {},\n \"employeeGroupId\": \"<string>\",\n \"useAlternatePerDiemRate\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"iconUrl": "<string>",
"section": 123,
"categoryType": "SubsistenceAllowanceCategory",
"verificationClassType": "<string>",
"categoryTemplateId": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"defaultTaxPercent": 123,
"deviantTaxPercent": 123,
"nonDeductableVat": true,
"accountNumberMapping": "<string>",
"accountingNumberId": "<string>",
"accountingNumbers": [
{}
],
"expenseCodeId": "<string>",
"salaryCodeId": "<string>",
"taxAccountingNumberId": "<string>",
"taxSalaryCodeId": "<string>",
"taxExpenseCodeId": "<string>",
"budgetAmount": 123,
"budgetName": "<string>",
"budgetStartMonth": 123,
"mccCodes": [
"<string>"
],
"presetValues": [
{}
],
"expenseCategoryFilter": "<string>",
"showAccounting": true,
"showRepresentation": true,
"settings": {},
"employeeGroupId": "<string>",
"useAlternatePerDiemRate": true
}{
"result": "<string>",
"code": "<string>",
"description": "<string>"
}{
"result": "error",
"code": "ORGANIZATION_NOT_FOUND",
"description": "Failed to get organization for id: {orgId}"
}
