> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize pagination states for all data types

> 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.



## OpenAPI

````yaml /api-reference/specs/hmrc-dps.json post /notifications/pagination/initialise
openapi: 3.0.1
info:
  title: HMRC DPS Service
  description: >-
    HMRC Data Provisioning Service (DPS) API for payroll notifications and data
    retrieval
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/hmrc-dps
security:
  - X-Auth-Token: []
    X-Org-Id: []
tags:
  - name: Notifications
    description: >-
      List, retrieve, and act on individual HMRC DPS notifications (apply,
      ignore, reassign, set status).
  - name: Bulk actions
    description: Apply, dismiss, retrieve, and re-match notifications in bulk.
  - name: Jobs
    description: Track and cancel asynchronous DPS retrieval and processing jobs.
  - name: Pagination
    description: Inspect and initialise DPS pagination state.
paths:
  /notifications/pagination/initialise:
    post:
      tags:
        - Pagination
      summary: Initialize pagination states for all data types
      description: >-
        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.
      operationId: InitializeOrganizationPagination
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitializePaginationRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseBody_InitializePaginationResponseDto
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_DpsErrorDto'
components:
  schemas:
    InitializePaginationRequestDto:
      type: object
      properties:
        date:
          type: string
          format: date
        overwriteExisting:
          type: boolean
        dataTypes:
          type: array
          items:
            enum:
              - P6
              - P9
              - SL1
              - SL2
              - PGL1
              - PGL2
              - AR
              - NOT
              - RTI
              - CIS
              - P35
              - CISINFO29
              - All
            type: string
          nullable: true
        service:
          enum:
            - PAYE
            - CIS
            - All
          type: string
          nullable: true
      additionalProperties: false
    ResponseBody_InitializePaginationResponseDto:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_InitializePaginationResponseDto'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ResponseBody_DpsErrorDto:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_DpsErrorDto'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ContentResponse_InitializePaginationResponseDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/InitializePaginationResponseDto'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
        reason:
          type: string
        reasonToken:
          type: string
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ContentResponse_DpsErrorDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DpsErrorDto'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    InitializePaginationResponseDto:
      type: object
      properties:
        date:
          type: string
          format: date
        results:
          type: array
          items:
            $ref: '#/components/schemas/PaginationInitializationResultDto'
        summary:
          $ref: '#/components/schemas/PaginationInitializationSummaryDto'
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    DpsErrorDto:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: string
          nullable: true
        timestamp:
          type: string
          format: date-time
      additionalProperties: false
    PaginationInitializationResultDto:
      type: object
      properties:
        dataType:
          enum:
            - P6
            - P9
            - SL1
            - SL2
            - PGL1
            - PGL2
            - AR
            - NOT
            - RTI
            - CIS
            - P35
            - CISINFO29
            - All
          type: string
        service:
          enum:
            - PAYE
            - CIS
            - All
          type: string
        success:
          type: boolean
        skipped:
          type: boolean
        highWaterMark:
          type: integer
          format: int32
        error:
          type: string
          nullable: true
      additionalProperties: false
    PaginationInitializationSummaryDto:
      type: object
      properties:
        totalProcessed:
          type: integer
          format: int32
        successful:
          type: integer
          format: int32
        skipped:
          type: integer
          format: int32
        failed:
          type: integer
          format: int32
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      name: X-Auth-Token
      in: header
    X-Org-Id:
      type: apiKey
      description: >-
        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).
      name: X-Org-Id
      in: header

````