Import & reconcile
Post paymentsimport
POST
/
payments
/
import
/
{employeeId}
cURL
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"statutoryType": "<string>",
"startDate": "<string>",
"averageWeeklyEarnings": 123,
"endDate": "<string>",
"paidUntilDate": "<string>",
"paidWeeks": 123,
"qualifyingEventDate": "<string>",
"requestedStartDate": "<string>",
"isReceivingStatutoryMaternityPay": true,
"previousSicknessPeriods": [
{
"startDate": "<string>",
"endDate": "<string>",
"wereFirstThreeDaysPaid": true
}
],
"workingDays": {
"standardWorkingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
},
"shiftPattern": {
"rotationStartDate": "<string>",
"shifts": [
{
"name": "<string>",
"workingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
},
"durationInDays": 123,
"weekNumber": 123
}
],
"patternType": "<string>",
"patternWeeks": 123
},
"workingPattern": "<string>",
"explicitSchedule": {
"weeks": [
{
"weekCommencing": "<string>",
"workingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
}
}
]
}
},
"isPrimaryParent": true,
"previousPrimaryPayWeeks": 123,
"otherParentShppWeeks": 123,
"neonatalCareStartDate": "<string>",
"neonatalCareEndDate": "<string>",
"higherRateWeeks": 123,
"higherRateAmount": 123,
"standardRateWeeks": 123,
"standardRateAmount": 123
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}"
payload = {
"statutoryType": "<string>",
"startDate": "<string>",
"averageWeeklyEarnings": 123,
"endDate": "<string>",
"paidUntilDate": "<string>",
"paidWeeks": 123,
"qualifyingEventDate": "<string>",
"requestedStartDate": "<string>",
"isReceivingStatutoryMaternityPay": True,
"previousSicknessPeriods": [
{
"startDate": "<string>",
"endDate": "<string>",
"wereFirstThreeDaysPaid": True
}
],
"workingDays": {
"standardWorkingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
},
"shiftPattern": {
"rotationStartDate": "<string>",
"shifts": [
{
"name": "<string>",
"workingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
},
"durationInDays": 123,
"weekNumber": 123
}
],
"patternType": "<string>",
"patternWeeks": 123
},
"workingPattern": "<string>",
"explicitSchedule": { "weeks": [
{
"weekCommencing": "<string>",
"workingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
}
}
] }
},
"isPrimaryParent": True,
"previousPrimaryPayWeeks": 123,
"otherParentShppWeeks": 123,
"neonatalCareStartDate": "<string>",
"neonatalCareEndDate": "<string>",
"higherRateWeeks": 123,
"higherRateAmount": 123,
"standardRateWeeks": 123,
"standardRateAmount": 123
}
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({
statutoryType: '<string>',
startDate: '<string>',
averageWeeklyEarnings: 123,
endDate: '<string>',
paidUntilDate: '<string>',
paidWeeks: 123,
qualifyingEventDate: '<string>',
requestedStartDate: '<string>',
isReceivingStatutoryMaternityPay: true,
previousSicknessPeriods: [{startDate: '<string>', endDate: '<string>', wereFirstThreeDaysPaid: true}],
workingDays: {
standardWorkingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
},
shiftPattern: {
rotationStartDate: '<string>',
shifts: [
{
name: '<string>',
workingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
},
durationInDays: 123,
weekNumber: 123
}
],
patternType: '<string>',
patternWeeks: 123
},
workingPattern: '<string>',
explicitSchedule: {
weeks: [
{
weekCommencing: '<string>',
workingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
}
}
]
}
},
isPrimaryParent: true,
previousPrimaryPayWeeks: 123,
otherParentShppWeeks: 123,
neonatalCareStartDate: '<string>',
neonatalCareEndDate: '<string>',
higherRateWeeks: 123,
higherRateAmount: 123,
standardRateWeeks: 123,
standardRateAmount: 123
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}', 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/statutory-pay/payments/import/{employeeId}",
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([
'statutoryType' => '<string>',
'startDate' => '<string>',
'averageWeeklyEarnings' => 123,
'endDate' => '<string>',
'paidUntilDate' => '<string>',
'paidWeeks' => 123,
'qualifyingEventDate' => '<string>',
'requestedStartDate' => '<string>',
'isReceivingStatutoryMaternityPay' => true,
'previousSicknessPeriods' => [
[
'startDate' => '<string>',
'endDate' => '<string>',
'wereFirstThreeDaysPaid' => true
]
],
'workingDays' => [
'standardWorkingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
],
'shiftPattern' => [
'rotationStartDate' => '<string>',
'shifts' => [
[
'name' => '<string>',
'workingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
],
'durationInDays' => 123,
'weekNumber' => 123
]
],
'patternType' => '<string>',
'patternWeeks' => 123
],
'workingPattern' => '<string>',
'explicitSchedule' => [
'weeks' => [
[
'weekCommencing' => '<string>',
'workingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
]
]
]
]
],
'isPrimaryParent' => true,
'previousPrimaryPayWeeks' => 123,
'otherParentShppWeeks' => 123,
'neonatalCareStartDate' => '<string>',
'neonatalCareEndDate' => '<string>',
'higherRateWeeks' => 123,
'higherRateAmount' => 123,
'standardRateWeeks' => 123,
'standardRateAmount' => 123
]),
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/statutory-pay/payments/import/{employeeId}"
payload := strings.NewReader("{\n \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\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/statutory-pay/payments/import/{employeeId}")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}")
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 \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"statutoryId": "<string>",
"employeeId": "<string>",
"statutoryType": "<string>",
"totalWeeks": 123,
"paidWeeks": 123,
"pendingWeeks": 123,
"totalAmount": 123,
"paidAmount": 123,
"pendingAmount": 123
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}Authorizations
Authentication token for API access
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).
Path Parameters
Query Parameters
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"statutoryType": "<string>",
"startDate": "<string>",
"averageWeeklyEarnings": 123,
"endDate": "<string>",
"paidUntilDate": "<string>",
"paidWeeks": 123,
"qualifyingEventDate": "<string>",
"requestedStartDate": "<string>",
"isReceivingStatutoryMaternityPay": true,
"previousSicknessPeriods": [
{
"startDate": "<string>",
"endDate": "<string>",
"wereFirstThreeDaysPaid": true
}
],
"workingDays": {
"standardWorkingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
},
"shiftPattern": {
"rotationStartDate": "<string>",
"shifts": [
{
"name": "<string>",
"workingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
},
"durationInDays": 123,
"weekNumber": 123
}
],
"patternType": "<string>",
"patternWeeks": 123
},
"workingPattern": "<string>",
"explicitSchedule": {
"weeks": [
{
"weekCommencing": "<string>",
"workingDays": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
}
}
]
}
},
"isPrimaryParent": true,
"previousPrimaryPayWeeks": 123,
"otherParentShppWeeks": 123,
"neonatalCareStartDate": "<string>",
"neonatalCareEndDate": "<string>",
"higherRateWeeks": 123,
"higherRateAmount": 123,
"standardRateWeeks": 123,
"standardRateAmount": 123
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}"
payload = {
"statutoryType": "<string>",
"startDate": "<string>",
"averageWeeklyEarnings": 123,
"endDate": "<string>",
"paidUntilDate": "<string>",
"paidWeeks": 123,
"qualifyingEventDate": "<string>",
"requestedStartDate": "<string>",
"isReceivingStatutoryMaternityPay": True,
"previousSicknessPeriods": [
{
"startDate": "<string>",
"endDate": "<string>",
"wereFirstThreeDaysPaid": True
}
],
"workingDays": {
"standardWorkingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
},
"shiftPattern": {
"rotationStartDate": "<string>",
"shifts": [
{
"name": "<string>",
"workingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
},
"durationInDays": 123,
"weekNumber": 123
}
],
"patternType": "<string>",
"patternWeeks": 123
},
"workingPattern": "<string>",
"explicitSchedule": { "weeks": [
{
"weekCommencing": "<string>",
"workingDays": {
"monday": True,
"tuesday": True,
"wednesday": True,
"thursday": True,
"friday": True,
"saturday": True,
"sunday": True
}
}
] }
},
"isPrimaryParent": True,
"previousPrimaryPayWeeks": 123,
"otherParentShppWeeks": 123,
"neonatalCareStartDate": "<string>",
"neonatalCareEndDate": "<string>",
"higherRateWeeks": 123,
"higherRateAmount": 123,
"standardRateWeeks": 123,
"standardRateAmount": 123
}
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({
statutoryType: '<string>',
startDate: '<string>',
averageWeeklyEarnings: 123,
endDate: '<string>',
paidUntilDate: '<string>',
paidWeeks: 123,
qualifyingEventDate: '<string>',
requestedStartDate: '<string>',
isReceivingStatutoryMaternityPay: true,
previousSicknessPeriods: [{startDate: '<string>', endDate: '<string>', wereFirstThreeDaysPaid: true}],
workingDays: {
standardWorkingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
},
shiftPattern: {
rotationStartDate: '<string>',
shifts: [
{
name: '<string>',
workingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
},
durationInDays: 123,
weekNumber: 123
}
],
patternType: '<string>',
patternWeeks: 123
},
workingPattern: '<string>',
explicitSchedule: {
weeks: [
{
weekCommencing: '<string>',
workingDays: {
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: true,
sunday: true
}
}
]
}
},
isPrimaryParent: true,
previousPrimaryPayWeeks: 123,
otherParentShppWeeks: 123,
neonatalCareStartDate: '<string>',
neonatalCareEndDate: '<string>',
higherRateWeeks: 123,
higherRateAmount: 123,
standardRateWeeks: 123,
standardRateAmount: 123
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}', 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/statutory-pay/payments/import/{employeeId}",
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([
'statutoryType' => '<string>',
'startDate' => '<string>',
'averageWeeklyEarnings' => 123,
'endDate' => '<string>',
'paidUntilDate' => '<string>',
'paidWeeks' => 123,
'qualifyingEventDate' => '<string>',
'requestedStartDate' => '<string>',
'isReceivingStatutoryMaternityPay' => true,
'previousSicknessPeriods' => [
[
'startDate' => '<string>',
'endDate' => '<string>',
'wereFirstThreeDaysPaid' => true
]
],
'workingDays' => [
'standardWorkingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
],
'shiftPattern' => [
'rotationStartDate' => '<string>',
'shifts' => [
[
'name' => '<string>',
'workingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
],
'durationInDays' => 123,
'weekNumber' => 123
]
],
'patternType' => '<string>',
'patternWeeks' => 123
],
'workingPattern' => '<string>',
'explicitSchedule' => [
'weeks' => [
[
'weekCommencing' => '<string>',
'workingDays' => [
'monday' => true,
'tuesday' => true,
'wednesday' => true,
'thursday' => true,
'friday' => true,
'saturday' => true,
'sunday' => true
]
]
]
]
],
'isPrimaryParent' => true,
'previousPrimaryPayWeeks' => 123,
'otherParentShppWeeks' => 123,
'neonatalCareStartDate' => '<string>',
'neonatalCareEndDate' => '<string>',
'higherRateWeeks' => 123,
'higherRateAmount' => 123,
'standardRateWeeks' => 123,
'standardRateAmount' => 123
]),
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/statutory-pay/payments/import/{employeeId}"
payload := strings.NewReader("{\n \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\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/statutory-pay/payments/import/{employeeId}")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/statutory-pay/payments/import/{employeeId}")
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 \"statutoryType\": \"<string>\",\n \"startDate\": \"<string>\",\n \"averageWeeklyEarnings\": 123,\n \"endDate\": \"<string>\",\n \"paidUntilDate\": \"<string>\",\n \"paidWeeks\": 123,\n \"qualifyingEventDate\": \"<string>\",\n \"requestedStartDate\": \"<string>\",\n \"isReceivingStatutoryMaternityPay\": true,\n \"previousSicknessPeriods\": [\n {\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"wereFirstThreeDaysPaid\": true\n }\n ],\n \"workingDays\": {\n \"standardWorkingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"shiftPattern\": {\n \"rotationStartDate\": \"<string>\",\n \"shifts\": [\n {\n \"name\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n },\n \"durationInDays\": 123,\n \"weekNumber\": 123\n }\n ],\n \"patternType\": \"<string>\",\n \"patternWeeks\": 123\n },\n \"workingPattern\": \"<string>\",\n \"explicitSchedule\": {\n \"weeks\": [\n {\n \"weekCommencing\": \"<string>\",\n \"workingDays\": {\n \"monday\": true,\n \"tuesday\": true,\n \"wednesday\": true,\n \"thursday\": true,\n \"friday\": true,\n \"saturday\": true,\n \"sunday\": true\n }\n }\n ]\n }\n },\n \"isPrimaryParent\": true,\n \"previousPrimaryPayWeeks\": 123,\n \"otherParentShppWeeks\": 123,\n \"neonatalCareStartDate\": \"<string>\",\n \"neonatalCareEndDate\": \"<string>\",\n \"higherRateWeeks\": 123,\n \"higherRateAmount\": 123,\n \"standardRateWeeks\": 123,\n \"standardRateAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": {
"statutoryId": "<string>",
"employeeId": "<string>",
"statutoryType": "<string>",
"totalWeeks": 123,
"paidWeeks": 123,
"pendingWeeks": 123,
"totalAmount": 123,
"paidAmount": 123,
"pendingAmount": 123
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": null
}
]
},
"content": {
"data": null,
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": null
}
]
}
]
}