Create a new pay element for the current organisation
Creates a new pay element for the current organisation
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": true,
"accrueHoliday": true,
"subjectToNmwCheck": true,
"isClass1ANiable": false,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": {
"courtOrders": {
"cmsDeo": true,
"dea": true,
"aeoPriority": false,
"aeoNonPriority": false,
"ctaeo": false,
"ea": false,
"mcaeo": false
}
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element"
payload = {
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": True,
"accrueHoliday": True,
"subjectToNmwCheck": True,
"isClass1ANiable": False,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": { "courtOrders": {
"cmsDeo": True,
"dea": True,
"aeoPriority": False,
"aeoNonPriority": False,
"ctaeo": False,
"ea": False,
"mcaeo": False
} }
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'PE001',
description: 'Basic Salary',
taxType: 'Taxable',
niType: 'Niable',
payType: 'Payable',
isPensionable: true,
accrueHoliday: true,
subjectToNmwCheck: true,
isClass1ANiable: false,
defaultUnitName: 'Hour',
defaultPayRate: 15.5,
defaultUnitValue: 1,
defaultChargeRate: 20,
eligibility: {
courtOrders: {
cmsDeo: true,
dea: true,
aeoPriority: false,
aeoNonPriority: false,
ctaeo: false,
ea: false,
mcaeo: false
}
}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element', 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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element",
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([
'id' => 'PE001',
'description' => 'Basic Salary',
'taxType' => 'Taxable',
'niType' => 'Niable',
'payType' => 'Payable',
'isPensionable' => true,
'accrueHoliday' => true,
'subjectToNmwCheck' => true,
'isClass1ANiable' => false,
'defaultUnitName' => 'Hour',
'defaultPayRate' => 15.5,
'defaultUnitValue' => 1,
'defaultChargeRate' => 20,
'eligibility' => [
'courtOrders' => [
'cmsDeo' => true,
'dea' => true,
'aeoPriority' => false,
'aeoNonPriority' => false,
'ctaeo' => false,
'ea' => false,
'mcaeo' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element"
payload := strings.NewReader("{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {},
"metadata": {
"dateFormat": "yyyy-MM-dd",
"dateTimeFormat": "yyyy-MM-ddTHH:mm:ss.fffZ",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"messageToken": "<string>",
"data": {
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": true,
"accrueHoliday": true,
"subjectToNmwCheck": true,
"organisationId": "org_123",
"createdBy": "user_123",
"updatedBy": "user_456",
"createdDate": "2024-01-01T00:00:00Z",
"updatedDate": "2024-01-02T00:00:00Z",
"isClass1ANiable": false,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": {
"courtOrders": {
"cmsDeo": true,
"dea": true,
"aeoPriority": false,
"aeoNonPriority": false,
"ctaeo": false,
"ea": false,
"mcaeo": false
}
},
"isSystemCode": false
}
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {},
"metadata": {
"dateFormat": "yyyy-MM-dd",
"dateTimeFormat": "yyyy-MM-ddTHH:mm:ss.fffZ",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"messageToken": "<string>"
}Authorizations
Access token obtained from OAuth2 client credentials flow
Organisation to scope the request to. Required when the principal can access more than one organisation; optional for single-organisation principals (the authorizer resolves it automatically).
Body
The unique identifier for the pay element
"PE001"
The description of the pay element
"Basic Salary"
The tax type for the pay element
Taxable, NonTaxable "Taxable"
The National Insurance type for the pay element
Niable, NonNiable, EmployerOnly "Niable"
The pay type for the pay element
Payable, Deductible, Informational "Payable"
Whether the pay element is pensionable
true
Whether the pay element accrues holiday
true
Whether the pay element is subject to National Minimum Wage checks
true
Whether the pay element is Class 1A National Insurance liable
false
The default unit name for the pay element
Hour, Day, Week, Month, Year, Fixed, Informational, Percentage "Hour"
The default pay rate for the pay element
15.5
The default unit value for the pay element
1
The default charge rate for the pay element
20
Eligibility flags for this pay element (court orders, pensions, etc.)
Show child attributes
Show child attributes
{
"courtOrders": {
"cmsDeo": true,
"dea": true,
"aeoPriority": false,
"aeoNonPriority": false,
"ctaeo": false,
"ea": false,
"mcaeo": false
}
}
Was this page helpful?
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": true,
"accrueHoliday": true,
"subjectToNmwCheck": true,
"isClass1ANiable": false,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": {
"courtOrders": {
"cmsDeo": true,
"dea": true,
"aeoPriority": false,
"aeoNonPriority": false,
"ctaeo": false,
"ea": false,
"mcaeo": false
}
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element"
payload = {
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": True,
"accrueHoliday": True,
"subjectToNmwCheck": True,
"isClass1ANiable": False,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": { "courtOrders": {
"cmsDeo": True,
"dea": True,
"aeoPriority": False,
"aeoNonPriority": False,
"ctaeo": False,
"ea": False,
"mcaeo": False
} }
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'PE001',
description: 'Basic Salary',
taxType: 'Taxable',
niType: 'Niable',
payType: 'Payable',
isPensionable: true,
accrueHoliday: true,
subjectToNmwCheck: true,
isClass1ANiable: false,
defaultUnitName: 'Hour',
defaultPayRate: 15.5,
defaultUnitValue: 1,
defaultChargeRate: 20,
eligibility: {
courtOrders: {
cmsDeo: true,
dea: true,
aeoPriority: false,
aeoNonPriority: false,
ctaeo: false,
ea: false,
mcaeo: false
}
}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element', 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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element",
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([
'id' => 'PE001',
'description' => 'Basic Salary',
'taxType' => 'Taxable',
'niType' => 'Niable',
'payType' => 'Payable',
'isPensionable' => true,
'accrueHoliday' => true,
'subjectToNmwCheck' => true,
'isClass1ANiable' => false,
'defaultUnitName' => 'Hour',
'defaultPayRate' => 15.5,
'defaultUnitValue' => 1,
'defaultChargeRate' => 20,
'eligibility' => [
'courtOrders' => [
'cmsDeo' => true,
'dea' => true,
'aeoPriority' => false,
'aeoNonPriority' => false,
'ctaeo' => false,
'ea' => false,
'mcaeo' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element"
payload := strings.NewReader("{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
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://api.sandbox.flowpayroll.ai/v1/organisation/pay-element")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/organisation/pay-element")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"PE001\",\n \"description\": \"Basic Salary\",\n \"taxType\": \"Taxable\",\n \"niType\": \"Niable\",\n \"payType\": \"Payable\",\n \"isPensionable\": true,\n \"accrueHoliday\": true,\n \"subjectToNmwCheck\": true,\n \"isClass1ANiable\": false,\n \"defaultUnitName\": \"Hour\",\n \"defaultPayRate\": 15.5,\n \"defaultUnitValue\": 1,\n \"defaultChargeRate\": 20,\n \"eligibility\": {\n \"courtOrders\": {\n \"cmsDeo\": true,\n \"dea\": true,\n \"aeoPriority\": false,\n \"aeoNonPriority\": false,\n \"ctaeo\": false,\n \"ea\": false,\n \"mcaeo\": false\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {},
"metadata": {
"dateFormat": "yyyy-MM-dd",
"dateTimeFormat": "yyyy-MM-ddTHH:mm:ss.fffZ",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"messageToken": "<string>",
"data": {
"id": "PE001",
"description": "Basic Salary",
"taxType": "Taxable",
"niType": "Niable",
"payType": "Payable",
"isPensionable": true,
"accrueHoliday": true,
"subjectToNmwCheck": true,
"organisationId": "org_123",
"createdBy": "user_123",
"updatedBy": "user_456",
"createdDate": "2024-01-01T00:00:00Z",
"updatedDate": "2024-01-02T00:00:00Z",
"isClass1ANiable": false,
"defaultUnitName": "Hour",
"defaultPayRate": 15.5,
"defaultUnitValue": 1,
"defaultChargeRate": 20,
"eligibility": {
"courtOrders": {
"cmsDeo": true,
"dea": true,
"aeoPriority": false,
"aeoNonPriority": false,
"ctaeo": false,
"ea": false,
"mcaeo": false
}
},
"isSystemCode": false
}
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {},
"metadata": {
"dateFormat": "yyyy-MM-dd",
"dateTimeFormat": "yyyy-MM-ddTHH:mm:ss.fffZ",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"messageToken": "<string>"
}