Organisation
Update the HMRC settings for the current organisation
Updates the HMRC settings for the current organisation
POST
/
organisation
/
hmrc
/
settings
Update the HMRC settings for the current organisation
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": false,
"hasSmallEmployerRelief": false,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"password": "password123"
},
"agentCredentials": {
"userId": "user123",
"password": "password123",
"agentId": "agent_123"
}
},
"employmentAllowanceSettings": {
"isEnabled": true,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": [
"Agriculture",
"Industry"
]
},
"apprenticeshipLevySettings": {
"isEnabled": true,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": {
"payFrequency": "Monthly"
},
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings"
payload = {
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": False,
"hasSmallEmployerRelief": False,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"password": "password123"
},
"agentCredentials": {
"userId": "user123",
"password": "password123",
"agentId": "agent_123"
}
},
"employmentAllowanceSettings": {
"isEnabled": True,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": ["Agriculture", "Industry"]
},
"apprenticeshipLevySettings": {
"isEnabled": True,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": { "payFrequency": "Monthly" },
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
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({
taxReferenceNumbers: {
employerPayeReference: {officeNumber: '123', referenceNumber: 'AB12345'},
accountsOfficeReference: '123PX00123456',
selfAssessmentUniqueTaxpayerReference: '1234567890',
corporationTaxReferenceUniqueTaxpayerReference: '1234567890'
},
isCisContractor: false,
hasSmallEmployerRelief: false,
governmentGatewaySettings: {
hmrcSubmissionMethod: 'Direct',
credentials: {userId: 'user123', password: 'password123'},
agentCredentials: {userId: 'user123', password: 'password123', agentId: 'agent_123'}
},
employmentAllowanceSettings: {
isEnabled: true,
claimStatus: 'Claimed',
deMinimisStateAidSectors: ['Agriculture', 'Industry']
},
apprenticeshipLevySettings: {isEnabled: true, annualAllowanceAmount: 15000},
payeLiabilitySettings: {payFrequency: 'Monthly'},
bankAccount: {
accountNumber: '12345678',
sortCode: '12-34-56',
accountHolderName: 'Acme Corporation Limited',
buildingSocietyReference: 'BS123456'
}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings', 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/hmrc/settings",
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([
'taxReferenceNumbers' => [
'employerPayeReference' => [
'officeNumber' => '123',
'referenceNumber' => 'AB12345'
],
'accountsOfficeReference' => '123PX00123456',
'selfAssessmentUniqueTaxpayerReference' => '1234567890',
'corporationTaxReferenceUniqueTaxpayerReference' => '1234567890'
],
'isCisContractor' => false,
'hasSmallEmployerRelief' => false,
'governmentGatewaySettings' => [
'hmrcSubmissionMethod' => 'Direct',
'credentials' => [
'userId' => 'user123',
'password' => 'password123'
],
'agentCredentials' => [
'userId' => 'user123',
'password' => 'password123',
'agentId' => 'agent_123'
]
],
'employmentAllowanceSettings' => [
'isEnabled' => true,
'claimStatus' => 'Claimed',
'deMinimisStateAidSectors' => [
'Agriculture',
'Industry'
]
],
'apprenticeshipLevySettings' => [
'isEnabled' => true,
'annualAllowanceAmount' => 15000
],
'payeLiabilitySettings' => [
'payFrequency' => 'Monthly'
],
'bankAccount' => [
'accountNumber' => '12345678',
'sortCode' => '12-34-56',
'accountHolderName' => 'Acme Corporation Limited',
'buildingSocietyReference' => 'BS123456'
]
]),
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/hmrc/settings"
payload := strings.NewReader("{\n \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\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/hmrc/settings")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings")
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 \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\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": {
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": false,
"hasSmallEmployerRelief": false,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"hasPassword": true,
"password": "***"
},
"agentCredentials": {
"userId": "user123",
"hasPassword": true,
"password": "***",
"agentId": "agent_123"
}
},
"organisationId": "org_123",
"createdDate": "2025-01-01T00:00:00Z",
"createdBy": "user_123",
"updatedBy": "user_456",
"updatedDate": "2025-01-02T00:00:00Z",
"employmentAllowanceSettings": {
"isEnabled": true,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": [
"Agriculture",
"Industry"
]
},
"apprenticeshipLevySettings": {
"isEnabled": true,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": {
"payFrequency": "Monthly"
},
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
}{
"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>"
}{
"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
application/json
Show child attributes
Show child attributes
Whether the organisation is a CIS(Construction Industry Scheme) contractor
Example:
false
Whether the organisation has a small employer relief
Example:
false
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Update the HMRC settings for the current organisation
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": false,
"hasSmallEmployerRelief": false,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"password": "password123"
},
"agentCredentials": {
"userId": "user123",
"password": "password123",
"agentId": "agent_123"
}
},
"employmentAllowanceSettings": {
"isEnabled": true,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": [
"Agriculture",
"Industry"
]
},
"apprenticeshipLevySettings": {
"isEnabled": true,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": {
"payFrequency": "Monthly"
},
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings"
payload = {
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": False,
"hasSmallEmployerRelief": False,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"password": "password123"
},
"agentCredentials": {
"userId": "user123",
"password": "password123",
"agentId": "agent_123"
}
},
"employmentAllowanceSettings": {
"isEnabled": True,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": ["Agriculture", "Industry"]
},
"apprenticeshipLevySettings": {
"isEnabled": True,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": { "payFrequency": "Monthly" },
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
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({
taxReferenceNumbers: {
employerPayeReference: {officeNumber: '123', referenceNumber: 'AB12345'},
accountsOfficeReference: '123PX00123456',
selfAssessmentUniqueTaxpayerReference: '1234567890',
corporationTaxReferenceUniqueTaxpayerReference: '1234567890'
},
isCisContractor: false,
hasSmallEmployerRelief: false,
governmentGatewaySettings: {
hmrcSubmissionMethod: 'Direct',
credentials: {userId: 'user123', password: 'password123'},
agentCredentials: {userId: 'user123', password: 'password123', agentId: 'agent_123'}
},
employmentAllowanceSettings: {
isEnabled: true,
claimStatus: 'Claimed',
deMinimisStateAidSectors: ['Agriculture', 'Industry']
},
apprenticeshipLevySettings: {isEnabled: true, annualAllowanceAmount: 15000},
payeLiabilitySettings: {payFrequency: 'Monthly'},
bankAccount: {
accountNumber: '12345678',
sortCode: '12-34-56',
accountHolderName: 'Acme Corporation Limited',
buildingSocietyReference: 'BS123456'
}
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings', 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/hmrc/settings",
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([
'taxReferenceNumbers' => [
'employerPayeReference' => [
'officeNumber' => '123',
'referenceNumber' => 'AB12345'
],
'accountsOfficeReference' => '123PX00123456',
'selfAssessmentUniqueTaxpayerReference' => '1234567890',
'corporationTaxReferenceUniqueTaxpayerReference' => '1234567890'
],
'isCisContractor' => false,
'hasSmallEmployerRelief' => false,
'governmentGatewaySettings' => [
'hmrcSubmissionMethod' => 'Direct',
'credentials' => [
'userId' => 'user123',
'password' => 'password123'
],
'agentCredentials' => [
'userId' => 'user123',
'password' => 'password123',
'agentId' => 'agent_123'
]
],
'employmentAllowanceSettings' => [
'isEnabled' => true,
'claimStatus' => 'Claimed',
'deMinimisStateAidSectors' => [
'Agriculture',
'Industry'
]
],
'apprenticeshipLevySettings' => [
'isEnabled' => true,
'annualAllowanceAmount' => 15000
],
'payeLiabilitySettings' => [
'payFrequency' => 'Monthly'
],
'bankAccount' => [
'accountNumber' => '12345678',
'sortCode' => '12-34-56',
'accountHolderName' => 'Acme Corporation Limited',
'buildingSocietyReference' => 'BS123456'
]
]),
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/hmrc/settings"
payload := strings.NewReader("{\n \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\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/hmrc/settings")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/organisation/hmrc/settings")
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 \"taxReferenceNumbers\": {\n \"employerPayeReference\": {\n \"officeNumber\": \"123\",\n \"referenceNumber\": \"AB12345\"\n },\n \"accountsOfficeReference\": \"123PX00123456\",\n \"selfAssessmentUniqueTaxpayerReference\": \"1234567890\",\n \"corporationTaxReferenceUniqueTaxpayerReference\": \"1234567890\"\n },\n \"isCisContractor\": false,\n \"hasSmallEmployerRelief\": false,\n \"governmentGatewaySettings\": {\n \"hmrcSubmissionMethod\": \"Direct\",\n \"credentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\"\n },\n \"agentCredentials\": {\n \"userId\": \"user123\",\n \"password\": \"password123\",\n \"agentId\": \"agent_123\"\n }\n },\n \"employmentAllowanceSettings\": {\n \"isEnabled\": true,\n \"claimStatus\": \"Claimed\",\n \"deMinimisStateAidSectors\": [\n \"Agriculture\",\n \"Industry\"\n ]\n },\n \"apprenticeshipLevySettings\": {\n \"isEnabled\": true,\n \"annualAllowanceAmount\": 15000\n },\n \"payeLiabilitySettings\": {\n \"payFrequency\": \"Monthly\"\n },\n \"bankAccount\": {\n \"accountNumber\": \"12345678\",\n \"sortCode\": \"12-34-56\",\n \"accountHolderName\": \"Acme Corporation Limited\",\n \"buildingSocietyReference\": \"BS123456\"\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": {
"taxReferenceNumbers": {
"employerPayeReference": {
"officeNumber": "123",
"referenceNumber": "AB12345"
},
"accountsOfficeReference": "123PX00123456",
"selfAssessmentUniqueTaxpayerReference": "1234567890",
"corporationTaxReferenceUniqueTaxpayerReference": "1234567890"
},
"isCisContractor": false,
"hasSmallEmployerRelief": false,
"governmentGatewaySettings": {
"hmrcSubmissionMethod": "Direct",
"credentials": {
"userId": "user123",
"hasPassword": true,
"password": "***"
},
"agentCredentials": {
"userId": "user123",
"hasPassword": true,
"password": "***",
"agentId": "agent_123"
}
},
"organisationId": "org_123",
"createdDate": "2025-01-01T00:00:00Z",
"createdBy": "user_123",
"updatedBy": "user_456",
"updatedDate": "2025-01-02T00:00:00Z",
"employmentAllowanceSettings": {
"isEnabled": true,
"claimStatus": "Claimed",
"deMinimisStateAidSectors": [
"Agriculture",
"Industry"
]
},
"apprenticeshipLevySettings": {
"isEnabled": true,
"annualAllowanceAmount": 15000
},
"payeLiabilitySettings": {
"payFrequency": "Monthly"
},
"bankAccount": {
"accountNumber": "12345678",
"sortCode": "12-34-56",
"accountHolderName": "Acme Corporation Limited",
"buildingSocietyReference": "BS123456"
}
}
}{
"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>"
}{
"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>"
}