Send the pay run to the connected pension providers
Submits enrolments and the contribution schedule to each connected scheme in the pay run. Completing a pay run produces the export files and stops there, so a submission only happens when you ask for one. Pass schemeId to send a single scheme, and operationType (pension.members.enrol or pension.contributions.submit) to send just that part, which is how a part that did not land is sent again on its own. With both parts, enrolments go first, because a member the provider has never seen cannot appear on a contribution schedule. Read schemes in the response to find out what the send decided, scheme by scheme: Submitted, Skipped (not connected, or nothing outstanding), Blocked (the connection needs finishing or repairing) or Failed, each with a reason token. Do not read an empty submissions list as success. Submission is asynchronous, so submissions carries the ledger as it stands now; read the pay run’s submissions to follow them. Sending the same unchanged data twice is deduplicated rather than submitted again. Naming a schemeId the pay run does not hold answers 404. Answers 409 while the pay run is still calculating: the schedule is built from the run’s contributions, not from the export files, so sending early would put a schedule short of members in front of the provider. The request is unchanged - retry once the run has finished.
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/sendimport requests
url = "https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send', 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/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send"
req, _ := http.NewRequest("POST", url, nil)
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/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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": {
"schemes": [
{
"schemeId": "<string>",
"schemeName": "<string>",
"status": "Submitted",
"providerSlug": "<string>",
"connectionId": "<string>",
"reasonToken": "<string>",
"reasonMessage": "<string>"
}
],
"submissions": [
{
"schemeId": "<string>",
"operationType": "<string>",
"providerSlug": "<string>",
"status": "Pending",
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"operationId": "<string>",
"providerReference": "<string>",
"errorToken": "<string>",
"errorMessage": "<string>",
"notResentToken": "<string>",
"notResentMessage": "<string>",
"issues": [
{
"message": "<string>",
"reference": "<string>",
"referenceLabel": "<string>",
"employeeId": "<string>",
"code": "<string>",
"noActionNeeded": true
}
],
"issueCount": 123,
"memberCount": 123,
"totalAmount": 123
}
]
},
"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>"
}
}{
"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>"
}
}Path Parameters
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/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/sendimport requests
url = "https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send', 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/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send"
req, _ := http.NewRequest("POST", url, nil)
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/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v2/pension/provider-sync/{payrollConfigId}/{year}/{frequency}/{period}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
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": {
"schemes": [
{
"schemeId": "<string>",
"schemeName": "<string>",
"status": "Submitted",
"providerSlug": "<string>",
"connectionId": "<string>",
"reasonToken": "<string>",
"reasonMessage": "<string>"
}
],
"submissions": [
{
"schemeId": "<string>",
"operationType": "<string>",
"providerSlug": "<string>",
"status": "Pending",
"createdBy": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"operationId": "<string>",
"providerReference": "<string>",
"errorToken": "<string>",
"errorMessage": "<string>",
"notResentToken": "<string>",
"notResentMessage": "<string>",
"issues": [
{
"message": "<string>",
"reference": "<string>",
"referenceLabel": "<string>",
"employeeId": "<string>",
"code": "<string>",
"noActionNeeded": true
}
],
"issueCount": 123,
"memberCount": 123,
"totalAmount": 123
}
]
},
"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>"
}
}{
"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>"
}
}