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



## OpenAPI

````yaml /api-reference/specs/statutory-pay.json post /payments/import/{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/import/{employeeId}:
    post:
      tags:
        - Import & reconcile
      operationId: ImportStatutoryPay
      parameters:
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
        - name: source
          in: query
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportStatutoryPayRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_ImportStatutoryPayResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_Object'
components:
  schemas:
    ImportStatutoryPayRequest:
      type: object
      properties:
        statutoryType:
          type: string
        startDate:
          type: string
        averageWeeklyEarnings:
          type: number
          format: double
        endDate:
          type: string
          nullable: true
        paidUntilDate:
          type: string
          nullable: true
        paidWeeks:
          type: number
          format: double
          nullable: true
        qualifyingEventDate:
          type: string
          nullable: true
        requestedStartDate:
          type: string
          nullable: true
        isReceivingStatutoryMaternityPay:
          type: boolean
        previousSicknessPeriods:
          type: array
          items:
            $ref: '#/components/schemas/SicknessPeriodDto'
          nullable: true
        workingDays:
          $ref: '#/components/schemas/WorkingDaysConfigurationDto'
        isPrimaryParent:
          type: boolean
        previousPrimaryPayWeeks:
          type: integer
          format: int32
          nullable: true
        otherParentShppWeeks:
          type: integer
          format: int32
          nullable: true
        neonatalCareStartDate:
          type: string
          nullable: true
        neonatalCareEndDate:
          type: string
          nullable: true
        higherRateWeeks:
          type: integer
          format: int32
          nullable: true
        higherRateAmount:
          type: number
          format: double
          nullable: true
        standardRateWeeks:
          type: integer
          format: int32
          nullable: true
        standardRateAmount:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    ResponseBody_ImportStatutoryPayResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_ImportStatutoryPayResponse'
        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
    SicknessPeriodDto:
      type: object
      properties:
        startDate:
          type: string
        endDate:
          type: string
        wereFirstThreeDaysPaid:
          type: boolean
      additionalProperties: false
    WorkingDaysConfigurationDto:
      type: object
      properties:
        standardWorkingDays:
          $ref: '#/components/schemas/StandardWorkingDaysDto'
        shiftPattern:
          $ref: '#/components/schemas/ShiftPatternDto'
        workingPattern:
          type: string
          nullable: true
        explicitSchedule:
          $ref: '#/components/schemas/ExplicitScheduleDto'
      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_ImportStatutoryPayResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ImportStatutoryPayResponse'
        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
    StandardWorkingDaysDto:
      type: object
      properties:
        monday:
          type: boolean
        tuesday:
          type: boolean
        wednesday:
          type: boolean
        thursday:
          type: boolean
        friday:
          type: boolean
        saturday:
          type: boolean
        sunday:
          type: boolean
      additionalProperties: false
    ShiftPatternDto:
      type: object
      properties:
        rotationStartDate:
          type: string
        shifts:
          type: array
          items:
            $ref: '#/components/schemas/ShiftDto'
        patternType:
          type: string
        patternWeeks:
          type: integer
          format: int32
      additionalProperties: false
    ExplicitScheduleDto:
      type: object
      properties:
        weeks:
          type: array
          items:
            $ref: '#/components/schemas/ScheduledWeekDto'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    ImportStatutoryPayResponse:
      type: object
      properties:
        statutoryId:
          type: string
        employeeId:
          type: string
        statutoryType:
          type: string
        totalWeeks:
          type: integer
          format: int32
        paidWeeks:
          type: integer
          format: int32
        pendingWeeks:
          type: integer
          format: int32
        totalAmount:
          type: number
          format: double
        paidAmount:
          type: number
          format: double
        pendingAmount:
          type: number
          format: double
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
    ShiftDto:
      type: object
      properties:
        name:
          type: string
        workingDays:
          $ref: '#/components/schemas/StandardWorkingDaysDto'
        durationInDays:
          type: integer
          format: int32
        weekNumber:
          type: integer
          format: int32
      additionalProperties: false
    ScheduledWeekDto:
      type: object
      properties:
        weekCommencing:
          type: string
        workingDays:
          $ref: '#/components/schemas/StandardWorkingDaysDto'
      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

````