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

# Trigger send HMRC RTI FPS for payroll run

> Triggers the sending of HMRC RTI FPS (Full Payment Submission) for a specific payroll run



## OpenAPI

````yaml /api-reference/specs/pay-api.yaml post /rti/fps/{payrollConfigId}/{taxYear}/{period}
openapi: 3.0.3
info:
  title: FlowPayroll API
  description: >-
    API for payroll management, including payroll upload, lock, HMRC submission,
    employee management
  version: 0.1.0
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1
security:
  - XAuthToken: []
    XOrgId: []
tags:
  - name: Employees
    description: >-
      Create, retrieve, update, and delete employee records, and look them up by
      NI number or payroll ID.
  - name: Starters & leavers
    description: Set and clear starter and leaver details, individually or in bulk.
  - name: Tax codes
    description: >-
      Manage employee tax codes and query the effective tax code and NI category
      on a given date.
  - name: NI & identifiers
    description: Manage NI categories, National Insurance numbers, and payroll IDs.
  - name: Student loans
    description: Start and end student and postgraduate loans.
  - name: Payroll setup
    description: Assign an employee's payroll config and set opening balances.
  - name: Payroll
  - name: Payroll lines
  - name: PayrollConfig
  - name: Pay Elements
  - name: Calculator
  - name: Payslip
  - name: RTI
  - name: YearEnd
  - name: Organisation
paths:
  /rti/fps/{payrollConfigId}/{taxYear}/{period}:
    post:
      tags:
        - RTI
      summary: Trigger send HMRC RTI FPS for payroll run
      description: >-
        Triggers the sending of HMRC RTI FPS (Full Payment Submission) for a
        specific payroll run
      operationId: triggerSendHmrcRtiFpsForPayrollRun
      parameters:
        - name: payrollConfigId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
          description: The payroll configuration ID
        - name: taxYear
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9]{4}$
          description: The tax year
        - name: period
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9]+$
          description: The payroll period
        - name: preview
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to generate a preview without submitting to HMRC
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: string
              description: Final submission details (required for last period of tax year)
              example: Final submission details for the period
      responses:
        '200':
          description: HMRC RTI FPS preview generated successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResponseBody'
                  - type: object
                    properties:
                      data:
                        type: string
                        description: The FPS submission XML preview
                        example: <?xml version="1.0" encoding="UTF-8"?>...
        '202':
          description: FPS submission triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '400':
          description: >-
            Invalid request, payroll run not completed, or final submission
            details required
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResponseBody'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/FinalSubmissionErrorResponseDto'
        '404':
          description: Payroll config, payroll run, or HMRC settings not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '409':
          description: Payroll run already submitted to HMRC
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
components:
  schemas:
    ResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          type: object
          properties:
            data:
              type: object
              nullable: true
            metadata:
              type: object
              nullable: true
              properties:
                dateFormat:
                  type: string
                  default: yyyy-MM-dd
                dateTimeFormat:
                  type: string
                  default: yyyy-MM-ddTHH:mm:ss.fffZ
                paginationToken:
                  type: string
                  nullable: true
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
        messageToken:
          type: string
    FinalSubmissionErrorResponseDto:
      type: object
      properties:
        example:
          type: object
          description: Example of the required final submission details format
          example:
            field1: value1
            field2: value2
        description:
          type: string
          description: Description of what final submission details are required
          example: >-
            Final submission details are required for the last period of the tax
            year 2025-2026. Please provide the details in the request body using
            the example format above.
        type:
          type: string
          description: The type of final submission details required
          example: FinalSubmissionDetailsY2025To26
        taxYear:
          type: string
          description: The tax year range
          example: 2025-2026
      required:
        - example
        - description
        - type
        - taxYear
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
    ValidationIssue:
      type: object
      description: >
        Field validation item. `reasonToken` is a stable snake_case key for i18n
        or custom client messages; `reason` is the default English text from the
        API.
      properties:
        field:
          type: string
          description: Dot-path of the field (e.g. name.firstName, address.line1).
        reason:
          type: string
          description: Default human-readable message.
        reasonToken:
          type: string
          description: Machine-readable error identifier (snake_case).
        reasonTokenArguments:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Access token obtained from OAuth2 client credentials flow
    XOrgId:
      type: apiKey
      in: header
      name: X-Org-Id
      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).

````