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

# Get all pagination states for the organization

> Retrieves pagination states for all supported HMRC DPS data types for the organization. Returns pagination information even for data types that haven't been initialized yet (with highWaterMark = 0). This endpoint is useful for building UI that shows which data types have pagination configured.



## OpenAPI

````yaml /api-reference/specs/hmrc-dps.json get /notifications/pagination
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:
    get:
      tags:
        - Pagination
      summary: Get all pagination states for the organization
      description: >-
        Retrieves pagination states for all supported HMRC DPS data types for
        the organization. Returns pagination information even for data types
        that haven't been initialized yet (with highWaterMark = 0). This
        endpoint is useful for building UI that shows which data types have
        pagination configured.
      operationId: GetAllPaginationStates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseBody_AllPaginationStatesResponseDto
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_DpsErrorDto'
components:
  schemas:
    ResponseBody_AllPaginationStatesResponseDto:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_AllPaginationStatesResponseDto'
        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_AllPaginationStatesResponseDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AllPaginationStatesResponseDto'
        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
    AllPaginationStatesResponseDto:
      type: object
      properties:
        organisationStartDate:
          type: string
          format: date
          nullable: true
        paginationStates:
          type: array
          items:
            $ref: '#/components/schemas/PaginationStateDto'
        summary:
          $ref: '#/components/schemas/PaginationStatesSummaryDto'
      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
    PaginationStateDto:
      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
        highWaterMark:
          type: integer
          format: int32
        moreData:
          type: boolean
        lastRetrievedCount:
          type: integer
          format: int32
        lastRetrievedAt:
          type: string
          format: date-time
          nullable: true
        exists:
          type: boolean
        organisationStartDate:
          type: string
          format: date
          nullable: true
      additionalProperties: false
    PaginationStatesSummaryDto:
      type: object
      properties:
        totalDataTypes:
          type: integer
          format: int32
        withPagination:
          type: integer
          format: int32
        withoutPagination:
          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

````