Pagination
Initialize pagination states for all data types
Needs permission rti:submit.
Initializes pagination states for all supported HMRC DPS data types using date2index conversion. This endpoint can be used to set up pagination from a specific date for both PAYE and CIS services. Use the ‘overwriteExisting’ parameter to control whether existing pagination states should be replaced.
POST
/
notifications
/
pagination
/
initialise
Initialize pagination states for all data types
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"date": "2023-12-25",
"overwriteExisting": true,
"dataTypes": []
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise"
payload = {
"date": "2023-12-25",
"overwriteExisting": True,
"dataTypes": []
}
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({date: '2023-12-25', overwriteExisting: true, dataTypes: []})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise', 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/hmrc-dps/notifications/pagination/initialise",
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([
'date' => '2023-12-25',
'overwriteExisting' => true,
'dataTypes' => [
]
]),
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/hmrc-dps/notifications/pagination/initialise"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\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/hmrc-dps/notifications/pagination/initialise")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise")
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 \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"date": "2023-12-25",
"results": [
{
"dataType": "P6",
"service": "PAYE",
"success": true,
"skipped": true,
"highWaterMark": 123,
"error": "<string>"
}
],
"summary": {
"totalProcessed": 123,
"successful": 123,
"skipped": 123,
"failed": 123
}
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"error": "<string>",
"message": "<string>",
"details": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}Authorizations
Body
application/json
Was this page helpful?
⌘I
Initialize pagination states for all data types
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"date": "2023-12-25",
"overwriteExisting": true,
"dataTypes": []
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise"
payload = {
"date": "2023-12-25",
"overwriteExisting": True,
"dataTypes": []
}
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({date: '2023-12-25', overwriteExisting: true, dataTypes: []})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise', 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/hmrc-dps/notifications/pagination/initialise",
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([
'date' => '2023-12-25',
'overwriteExisting' => true,
'dataTypes' => [
]
]),
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/hmrc-dps/notifications/pagination/initialise"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\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/hmrc-dps/notifications/pagination/initialise")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/hmrc-dps/notifications/pagination/initialise")
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 \"date\": \"2023-12-25\",\n \"overwriteExisting\": true,\n \"dataTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"date": "2023-12-25",
"results": [
{
"dataType": "P6",
"service": "PAYE",
"success": true,
"skipped": true,
"highWaterMark": 123,
"error": "<string>"
}
],
"summary": {
"totalProcessed": 123,
"successful": 123,
"skipped": 123,
"failed": 123
}
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"content": {
"data": {
"error": "<string>",
"message": "<string>",
"details": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"metadata": {
"dateFormat": "<string>",
"dateTimeFormat": "<string>",
"paginationToken": "<string>"
}
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}{
"message": {
"text": "<string>",
"token": "<string>",
"tokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"validationIssues": [
{
"field": "<string>",
"reason": "<string>",
"reasonToken": "<string>",
"reasonTokenArguments": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
]
}