Create a pension group
Creates a contribution group within a scheme: the pension type, contribution basis, employee and employer factors, and an optional external reference. One group can be marked as the organisation’s default.
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v2/pension/pension-group \
--header 'Content-Type: application/json' \
--data '
{
"pensionSchemaId": "<string>",
"name": "<string>",
"employeeFactor": 123,
"employerFactor": 123,
"isDefault": true,
"isSalarySacrifice": true,
"nationalInsuranceSavingsFactor": 123,
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>",
"acknowledgeBelowAutoEnrolmentMinimum": true
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v2/pension/pension-group"
payload = {
"pensionSchemaId": "<string>",
"name": "<string>",
"employeeFactor": 123,
"employerFactor": 123,
"isDefault": True,
"isSalarySacrifice": True,
"nationalInsuranceSavingsFactor": 123,
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>",
"acknowledgeBelowAutoEnrolmentMinimum": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pensionSchemaId: '<string>',
name: '<string>',
employeeFactor: 123,
employerFactor: 123,
isDefault: true,
isSalarySacrifice: true,
nationalInsuranceSavingsFactor: 123,
employeeFixedAmount: 123,
employerFixedAmount: 123,
externalReferenceId: '<string>',
acknowledgeBelowAutoEnrolmentMinimum: true
})
};
fetch('https://api.sandbox.flowpayroll.ai/v2/pension/pension-group', 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/v2/pension/pension-group",
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([
'pensionSchemaId' => '<string>',
'name' => '<string>',
'employeeFactor' => 123,
'employerFactor' => 123,
'isDefault' => true,
'isSalarySacrifice' => true,
'nationalInsuranceSavingsFactor' => 123,
'employeeFixedAmount' => 123,
'employerFixedAmount' => 123,
'externalReferenceId' => '<string>',
'acknowledgeBelowAutoEnrolmentMinimum' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.sandbox.flowpayroll.ai/v2/pension/pension-group"
payload := strings.NewReader("{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v2/pension/pension-group")
.header("Content-Type", "application/json")
.body("{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v2/pension/pension-group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}"
response = http.request(request)
puts response.read_body{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {
"id": "<string>",
"organisationId": "<string>",
"pensionSchemaId": "<string>",
"name": "<string>",
"isDefault": true,
"pensionType": "ReliefAtSource",
"basis": "Pensionable",
"employeeFactor": 123,
"employerFactor": 123,
"nationalInsuranceSavingsFactor": 123,
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isSalarySacrifice": true,
"contributionType": "Percentage",
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}Body
Pensionable, QualifyingEarnings ReliefAtSource, SalarySacrifice, NetPayArrangement Deprecated: send pensionType instead. This is only consulted when pensionType is omitted, and cannot express NetPayArrangement.
Percentage, FixedAmount Confirms the group is deliberately below the automatic enrolment minimum (8% total / 3% employer) or uses fixed amounts, and will not be used for automatic enrolment. Without it such a group is rejected.
Response
OK
The response envelope every FlowPayroll API answers with: a message, the
content, and any validationIssues. errors and the top-level
metadata are deprecated copies of validationIssues and
content.metadata, and will be removed.
What happened, as English text and a stable token to translate from.
textId and textParameters are deprecated copies of token and tokenArguments.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deprecated: the same issues as validationIssues (reasonText is reason, reasonId is reasonToken, reasonParameters is reasonTokenArguments). Read validationIssues; this will be removed.
Show child attributes
Show child attributes
Deprecated: the same values as content.metadata. Read that; this will be removed.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v2/pension/pension-group \
--header 'Content-Type: application/json' \
--data '
{
"pensionSchemaId": "<string>",
"name": "<string>",
"employeeFactor": 123,
"employerFactor": 123,
"isDefault": true,
"isSalarySacrifice": true,
"nationalInsuranceSavingsFactor": 123,
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>",
"acknowledgeBelowAutoEnrolmentMinimum": true
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v2/pension/pension-group"
payload = {
"pensionSchemaId": "<string>",
"name": "<string>",
"employeeFactor": 123,
"employerFactor": 123,
"isDefault": True,
"isSalarySacrifice": True,
"nationalInsuranceSavingsFactor": 123,
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>",
"acknowledgeBelowAutoEnrolmentMinimum": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pensionSchemaId: '<string>',
name: '<string>',
employeeFactor: 123,
employerFactor: 123,
isDefault: true,
isSalarySacrifice: true,
nationalInsuranceSavingsFactor: 123,
employeeFixedAmount: 123,
employerFixedAmount: 123,
externalReferenceId: '<string>',
acknowledgeBelowAutoEnrolmentMinimum: true
})
};
fetch('https://api.sandbox.flowpayroll.ai/v2/pension/pension-group', 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/v2/pension/pension-group",
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([
'pensionSchemaId' => '<string>',
'name' => '<string>',
'employeeFactor' => 123,
'employerFactor' => 123,
'isDefault' => true,
'isSalarySacrifice' => true,
'nationalInsuranceSavingsFactor' => 123,
'employeeFixedAmount' => 123,
'employerFixedAmount' => 123,
'externalReferenceId' => '<string>',
'acknowledgeBelowAutoEnrolmentMinimum' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.sandbox.flowpayroll.ai/v2/pension/pension-group"
payload := strings.NewReader("{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v2/pension/pension-group")
.header("Content-Type", "application/json")
.body("{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v2/pension/pension-group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"pensionSchemaId\": \"<string>\",\n \"name\": \"<string>\",\n \"employeeFactor\": 123,\n \"employerFactor\": 123,\n \"isDefault\": true,\n \"isSalarySacrifice\": true,\n \"nationalInsuranceSavingsFactor\": 123,\n \"employeeFixedAmount\": 123,\n \"employerFixedAmount\": 123,\n \"externalReferenceId\": \"<string>\",\n \"acknowledgeBelowAutoEnrolmentMinimum\": true\n}"
response = http.request(request)
puts response.read_body{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": {
"id": "<string>",
"organisationId": "<string>",
"pensionSchemaId": "<string>",
"name": "<string>",
"isDefault": true,
"pensionType": "ReliefAtSource",
"basis": "Pensionable",
"employeeFactor": 123,
"employerFactor": 123,
"nationalInsuranceSavingsFactor": 123,
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"isSalarySacrifice": true,
"contributionType": "Percentage",
"employeeFixedAmount": 123,
"employerFixedAmount": 123,
"externalReferenceId": "<string>"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}{
"message": {
"token": "<string>",
"text": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
],
"textId": "<string>",
"textParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
],
"errors": [
{
"field": "<string>",
"reasonText": "<string>",
"reasonId": "<string>",
"reasonParameters": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
}