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

# Post paymentsemployees



## OpenAPI

````yaml /api-reference/specs/statutory-pay.json post /payments/employees/{employeeId}
openapi: 3.0.1
info:
  title: Statutory Service
  description: Statutory Pay API for FlowPayroll
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/statutory-pay
security:
  - X-Auth-Token: []
    X-Org-Id: []
tags:
  - name: Statutory payments
    description: >-
      Create, retrieve, update, and delete statutory payments, and list them for
      an employee or organisation.
  - name: Line items & schedule
    description: >-
      Inspect and adjust payment line items, weekly amounts, and export the
      schedule.
  - name: External payments
    description: Record payments already made outside the payroll.
  - name: Attachments
    description: Upload and manage supporting documents for a statutory payment.
  - name: Alabaster & earnings
    description: >-
      Average weekly earnings and Alabaster (pay-rise) detection and
      recalculation.
  - name: Import & reconcile
    description: Import statutory payments and reconcile against a pay run.
  - name: Statutory Calculations
  - name: Statutory Rates
paths:
  /payments/employees/{employeeId}:
    post:
      tags:
        - Statutory payments
      operationId: CreateEmployeeStatutoryPay
      parameters:
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
        - name: source
          in: query
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CalculateStatutorySickPayRequest'
                - $ref: '#/components/schemas/CalculateStatutoryMaternityPayRequest'
                - $ref: '#/components/schemas/CalculateStatutoryPaternityPayRequest'
                - $ref: '#/components/schemas/CalculateStatutoryAdoptionPayRequest'
                - $ref: >-
                    #/components/schemas/CalculateStatutoryParentalBereavementPayRequest
                - $ref: >-
                    #/components/schemas/CalculateStatutorySharedParentalPayRequest
                - $ref: >-
                    #/components/schemas/CalculateStatutoryNeoNatalCarePayRequest
              discriminator:
                propertyName: statutoryType
                mapping:
                  StatutorySickPay:
                    $ref: '#/components/schemas/CalculateStatutorySickPayRequest'
                  StatutoryMaternityPay:
                    $ref: '#/components/schemas/CalculateStatutoryMaternityPayRequest'
                  StatutoryPaternityPay:
                    $ref: '#/components/schemas/CalculateStatutoryPaternityPayRequest'
                  StatutoryAdoptionPay:
                    $ref: '#/components/schemas/CalculateStatutoryAdoptionPayRequest'
                  StatutoryParentalBereavementPay:
                    $ref: >-
                      #/components/schemas/CalculateStatutoryParentalBereavementPayRequest
                  StatutorySharedParentalPay:
                    $ref: >-
                      #/components/schemas/CalculateStatutorySharedParentalPayRequest
                  StatutoryNeoNatalCarePay:
                    $ref: >-
                      #/components/schemas/CalculateStatutoryNeoNatalCarePayRequest
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_CalculatorOutputResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_Object'
components:
  schemas:
    CalculateStatutorySickPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            isReceivingStatutoryMaternityPay:
              type: boolean
            previousSicknessPeriods:
              type: array
              items:
                $ref: '#/components/schemas/SicknessPeriodDto'
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutoryMaternityPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            expectedWeekOfChildbirth:
              type: string
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutoryPaternityPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            expectedWeekOfChildbirth:
              type: string
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutoryAdoptionPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            expectedWeekOfPlacement:
              type: string
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutoryParentalBereavementPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            dateOfChildDeath:
              type: string
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutorySharedParentalPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            expectedWeekOfChildbirth:
              type: string
              nullable: true
            expectedWeekOfPlacement:
              type: string
              nullable: true
            isPrimaryParent:
              type: boolean
            previousPrimaryPayWeeks:
              type: integer
              format: int32
              nullable: true
            otherParentShppWeeks:
              type: integer
              format: int32
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    CalculateStatutoryNeoNatalCarePayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequest'
        - type: object
          properties:
            dateOfBirthOrExpectedDateOfBirth:
              type: string
              nullable: true
            neonatalCareStartDate:
              type: string
              nullable: true
            neonatalCareEndDate:
              type: string
              nullable: true
            statutoryType:
              enum:
                - None
                - StatutorySickPay
                - StatutoryMaternityPay
                - StatutoryPaternityPay
                - StatutoryAdoptionPay
                - StatutoryParentalBereavementPay
                - StatutorySharedParentalPay
                - StatutoryNeoNatalCarePay
              type: string
              readOnly: true
          additionalProperties: false
    ResponseBody_CalculatorOutputResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_CalculatorOutputResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ResponseBody_Object:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_Object'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    CalculateStatutoryPayRequest:
      allOf:
        - $ref: '#/components/schemas/CalculateStatutoryPayRequestBase'
        - required:
            - statutoryType
          type: object
          properties:
            statutoryType:
              type: string
          additionalProperties: false
          discriminator:
            propertyName: statutoryType
            mapping:
              CalculateStatutoryAdoptionPayRequest:
                $ref: '#/components/schemas/CalculateStatutoryAdoptionPayRequest'
              CalculateStatutoryMaternityPayRequest:
                $ref: '#/components/schemas/CalculateStatutoryMaternityPayRequest'
              CalculateStatutoryNeoNatalCarePayRequest:
                $ref: '#/components/schemas/CalculateStatutoryNeoNatalCarePayRequest'
              CalculateStatutoryParentalBereavementPayRequest:
                $ref: >-
                  #/components/schemas/CalculateStatutoryParentalBereavementPayRequest
              CalculateStatutoryPaternityPayRequest:
                $ref: '#/components/schemas/CalculateStatutoryPaternityPayRequest'
              CalculateStatutorySharedParentalPayRequest:
                $ref: >-
                  #/components/schemas/CalculateStatutorySharedParentalPayRequest
              CalculateStatutorySickPayRequest:
                $ref: '#/components/schemas/CalculateStatutorySickPayRequest'
    SicknessPeriodDto:
      type: object
      properties:
        startDate:
          type: string
        endDate:
          type: string
        wereFirstThreeDaysPaid:
          type: boolean
      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_CalculatorOutputResponse:
      type: object
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/StatutoryAdoptionPayCalculationResponse'
            - $ref: '#/components/schemas/StatutoryMaternityPayCalculationResponse'
            - $ref: '#/components/schemas/StatutoryNeoNatalCarePayCalculationResponse'
            - $ref: >-
                #/components/schemas/StatutoryParentalBereavementPayCalculationResponse
            - $ref: '#/components/schemas/StatutoryPaternityPayCalculationResponse'
            - $ref: >-
                #/components/schemas/StatutorySharedParentalPayCalculationResponse
            - $ref: '#/components/schemas/StatutorySickPayCalculationResponse'
          nullable: true
        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_Object:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    CalculateStatutoryPayRequestBase:
      required:
        - statutoryType
      type: object
      properties:
        statutoryType:
          enum:
            - None
            - StatutorySickPay
            - StatutoryMaternityPay
            - StatutoryPaternityPay
            - StatutoryAdoptionPay
            - StatutoryParentalBereavementPay
            - StatutorySharedParentalPay
            - StatutoryNeoNatalCarePay
          type: string
          readOnly: true
        startDate:
          type: string
          nullable: true
        endDate:
          type: string
          nullable: true
        qualifyingEventDate:
          type: string
          nullable: true
        averageEarningsOverride:
          type: number
          format: double
          nullable: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/CreateStatutoryAttachmentRequest'
          nullable: true
        paidWeeks:
          type: number
          format: double
          nullable: true
        paidUntilDate:
          type: string
          nullable: true
      additionalProperties: false
      discriminator:
        propertyName: statutoryType
        mapping:
          StatutorySickPay:
            $ref: '#/components/schemas/CalculateStatutorySickPayRequest'
          StatutoryMaternityPay:
            $ref: '#/components/schemas/CalculateStatutoryMaternityPayRequest'
          StatutoryPaternityPay:
            $ref: '#/components/schemas/CalculateStatutoryPaternityPayRequest'
          StatutoryAdoptionPay:
            $ref: '#/components/schemas/CalculateStatutoryAdoptionPayRequest'
          StatutoryParentalBereavementPay:
            $ref: >-
              #/components/schemas/CalculateStatutoryParentalBereavementPayRequest
          StatutorySharedParentalPay:
            $ref: '#/components/schemas/CalculateStatutorySharedParentalPayRequest'
          StatutoryNeoNatalCarePay:
            $ref: '#/components/schemas/CalculateStatutoryNeoNatalCarePayRequest'
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    StatutoryAdoptionPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutoryMaternityPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutoryNeoNatalCarePayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutoryParentalBereavementPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutoryPaternityPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutorySharedParentalPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    StatutorySickPayCalculationResponse:
      allOf:
        - $ref: '#/components/schemas/CalculatorOutputResponse'
        - type: object
          properties:
            statutoryType:
              type: string
              readOnly: true
          additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    CreateStatutoryAttachmentRequest:
      type: object
      properties:
        filename:
          type: string
        contentType:
          type: string
        fileSize:
          type: integer
          format: int64
      additionalProperties: false
    CalculatorOutputResponse:
      allOf:
        - $ref: '#/components/schemas/StatutoryCalculationResponse'
        - required:
            - statutoryType
          type: object
          properties:
            statutoryType:
              type: string
          additionalProperties: false
          discriminator:
            propertyName: statutoryType
            mapping:
              StatutoryAdoptionPayCalculationResponse:
                $ref: '#/components/schemas/StatutoryAdoptionPayCalculationResponse'
              StatutoryMaternityPayCalculationResponse:
                $ref: '#/components/schemas/StatutoryMaternityPayCalculationResponse'
              StatutoryNeoNatalCarePayCalculationResponse:
                $ref: >-
                  #/components/schemas/StatutoryNeoNatalCarePayCalculationResponse
              StatutoryParentalBereavementPayCalculationResponse:
                $ref: >-
                  #/components/schemas/StatutoryParentalBereavementPayCalculationResponse
              StatutoryPaternityPayCalculationResponse:
                $ref: '#/components/schemas/StatutoryPaternityPayCalculationResponse'
              StatutorySharedParentalPayCalculationResponse:
                $ref: >-
                  #/components/schemas/StatutorySharedParentalPayCalculationResponse
              StatutorySickPayCalculationResponse:
                $ref: '#/components/schemas/StatutorySickPayCalculationResponse'
    StatutoryCalculationResponse:
      required:
        - statutoryType
      type: object
      properties:
        statutoryType:
          minLength: 1
          type: string
          readOnly: true
        totalAmount:
          type: number
          format: double
        statutoryId:
          type: string
          nullable: true
        uploadUrls:
          type: array
          items:
            $ref: '#/components/schemas/StatutoryAttachmentUploadResponse'
          nullable: true
        nonRoundedTotalAmount:
          type: number
          format: double
        requestDate:
          type: string
        startDate:
          type: string
        endDate:
          type: string
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/CalculatorOutputItemResponse'
        maxEndDate:
          type: string
          nullable: true
        dailyBreakdown:
          type: array
          items:
            $ref: '#/components/schemas/StatutoryDailyBreakdown'
          nullable: true
        periodRange:
          type: string
          nullable: true
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/StatutoryWarningDto'
        averageWeeklyEarnings:
          type: number
          format: double
          nullable: true
        paidUntilDate:
          type: string
          nullable: true
        paidAmount:
          type: number
          format: double
        pendingAmount:
          type: number
          format: double
        paidThroughPayPeriodEnd:
          type: string
          nullable: true
        paidThroughYear:
          type: integer
          format: int32
          nullable: true
        paidThroughPeriod:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
      discriminator:
        propertyName: statutoryType
        mapping:
          StatutorySickPay:
            $ref: '#/components/schemas/StatutorySickPayCalculationResponse'
          StatutoryMaternityPay:
            $ref: '#/components/schemas/StatutoryMaternityPayCalculationResponse'
          StatutoryPaternityPay:
            $ref: '#/components/schemas/StatutoryPaternityPayCalculationResponse'
          StatutoryAdoptionPay:
            $ref: '#/components/schemas/StatutoryAdoptionPayCalculationResponse'
          StatutoryParentalBereavementPay:
            $ref: >-
              #/components/schemas/StatutoryParentalBereavementPayCalculationResponse
          StatutorySharedParentalPay:
            $ref: '#/components/schemas/StatutorySharedParentalPayCalculationResponse'
          StatutoryNeoNatalCarePay:
            $ref: '#/components/schemas/StatutoryNeoNatalCarePayCalculationResponse'
    StatutoryAttachmentUploadResponse:
      type: object
      properties:
        attachmentId:
          type: string
        filename:
          type: string
        uploadUrl:
          type: string
        expiresAt:
          type: string
      additionalProperties: false
    CalculatorOutputItemResponse:
      type: object
      properties:
        year:
          type: integer
          format: int32
        period:
          type: integer
          format: int32
        frequency:
          type: string
        week:
          type: integer
          format: int32
        value:
          type: number
          format: double
        nonRoundedValue:
          type: number
          format: double
        status:
          type: string
      additionalProperties: false
    StatutoryDailyBreakdown:
      type: object
      properties:
        date:
          type: string
        status:
          enum:
            - NonQualifyingDay
            - WaitingDay
            - PaidDay
            - LimitReached
            - NonWorkingDay
          type: string
        amount:
          type: number
          format: double
          nullable: true
        description:
          type: string
          nullable: true
        isLinked:
          type: boolean
      additionalProperties: false
    StatutoryWarningDto:
      type: object
      properties:
        code:
          enum:
            - BackdatedWeeksAccruedToNextOpenRun
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/StatutoryWarningDetailsDto'
      additionalProperties: false
    StatutoryWarningDetailsDto:
      type: object
      properties:
        accruedWeeks:
          type: integer
          format: int32
          nullable: true
        accruedAmount:
          type: number
          format: double
          nullable: true
        accrualPaymentDate:
          type: string
          nullable: true
        closedPeriods:
          type: array
          items:
            $ref: '#/components/schemas/ClosedPeriodSummaryDto'
          nullable: true
      additionalProperties: false
    ClosedPeriodSummaryDto:
      type: object
      properties:
        year:
          type: integer
          format: int32
        period:
          type: integer
          format: int32
        payPeriodStartDate:
          type: string
        payPeriodEndDate:
          type: string
        paymentDate:
          type: string
      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

````