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

# Run Payroll



## OpenAPI

````yaml /api-reference/openapi.json post /gb/payroll
openapi: 3.1.0
info:
  title: Intermezzo Global Payroll
  summary: Global Payroll Platform
  description: Intermezzo's global payroll apis, organized by country
  version: 1.0.0
  x-logo:
    url: /static/icon.svg
servers:
  - url: https://sandbox.intermezzo.ai
    description: Sandbox
security: []
paths:
  /gb/payroll:
    post:
      tags:
        - GB Paycheck Calculator
      summary: Run Payroll
      operationId: new_payroll_gb_payroll_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/payroll__gb__schema__request__PayrollRequest
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/payroll__gb__schema__response__PayrollResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken: []
components:
  schemas:
    payroll__gb__schema__request__PayrollRequest:
      properties:
        payDate:
          type: string
          format: date
          title: Paydate
          description: Payment Date for this payroll
        payCycle:
          $ref: '#/components/schemas/payroll__gb__types__PaymentPeriod'
          description: ''
        externalRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalref
          description: External reference for payroll run
        payrollGroup:
          items:
            $ref: >-
              #/components/schemas/payroll__gb__schema__request__PayrollRequestBase
          type: array
          title: Payrollgroup
      additionalProperties: false
      type: object
      required:
        - payCycle
        - payrollGroup
      title: PayrollRequest
      description: Input parameters
    payroll__gb__schema__response__PayrollResponse:
      properties:
        run:
          anyOf:
            - $ref: '#/components/schemas/RunDetails'
            - type: 'null'
        payslips:
          items:
            $ref: '#/components/schemas/payroll__gb__schema__response__Payslip'
          type: array
          title: Payslips
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/Errors'
              type: array
            - type: 'null'
          title: Errors
      additionalProperties: false
      type: object
      required:
        - run
        - payslips
        - errors
      title: PayrollResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    payroll__gb__types__PaymentPeriod:
      type: string
      enum:
        - year
        - month
        - week
      title: PaymentPeriod
      description: Payment Period
    payroll__gb__schema__request__PayrollRequestBase:
      properties:
        employeeId:
          anyOf:
            - type: string
            - type: string
              format: uuid
          title: Employeeid
          description: Employee identification number
        payDetails:
          $ref: '#/components/schemas/payroll__gb__schema__request__Gross'
      additionalProperties: false
      type: object
      required:
        - employeeId
        - payDetails
      title: PayrollRequestBase
      description: Input parameters
    RunDetails:
      properties:
        id:
          type: string
          title: Id
        externalRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalref
        status:
          $ref: '#/components/schemas/PayrunStatus'
      additionalProperties: false
      type: object
      required:
        - id
        - externalRef
        - status
      title: RunDetails
    payroll__gb__schema__response__Payslip:
      properties:
        paymentPeriod:
          $ref: '#/components/schemas/payroll__gb__types__PayCycleType'
          default: Month
        employeeId:
          type: string
          title: Employeeid
        currentPayPeriod:
          $ref: '#/components/schemas/payroll__gb__schema__response__CurrentPayPeriod'
      additionalProperties: false
      type: object
      required:
        - employeeId
        - currentPayPeriod
      title: Payslip
    Errors:
      properties:
        employeeId:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Employeeid
        error:
          type: string
          title: Error
      additionalProperties: false
      type: object
      required:
        - employeeId
        - error
      title: Errors
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    payroll__gb__schema__request__Gross:
      properties:
        earnings:
          anyOf:
            - items:
                $ref: '#/components/schemas/payroll__gb__schema__request__Earnings'
              type: array
            - type: 'null'
          title: Earnings
        benefits:
          anyOf:
            - items:
                $ref: '#/components/schemas/Benefits'
              type: array
            - type: 'null'
          title: Benefits
        deductions:
          anyOf:
            - items:
                $ref: '#/components/schemas/payroll__gb__schema__request__Deductions'
              type: array
            - type: 'null'
          title: Deductions
        reimbursements:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/payroll__gb__schema__request__Reimbursement
              type: array
            - type: 'null'
          title: Reimbursements
      additionalProperties: false
      type: object
      required:
        - earnings
        - benefits
      title: Gross
    PayrunStatus:
      type: string
      enum:
        - draft
        - approved
        - paid
      title: PayrunStatus
      description: Payrun status
    payroll__gb__types__PayCycleType:
      type: string
      enum:
        - Year
        - Month
        - Week
        - Day
      title: PayCycleType
    payroll__gb__schema__response__CurrentPayPeriod:
      properties:
        employee:
          $ref: >-
            #/components/schemas/payroll__gb__schema__response__EmployeeCurrentPayPeriod
        employer:
          $ref: >-
            #/components/schemas/payroll__gb__schema__response__EmployerCurrentPayPeriod
      additionalProperties: false
      type: object
      title: CurrentPayPeriod
    payroll__gb__schema__request__Earnings:
      properties:
        earningType:
          $ref: '#/components/schemas/EarningType'
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
          title: Amount
          description: Earnings amount (taxable gross)
        earningFrequency:
          anyOf:
            - $ref: '#/components/schemas/payroll__gb__types__PaymentPeriod'
            - type: 'null'
          description: If recurring, specify the frequency
          default: month
        isLumpsum:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Islumpsum
          description: True if onetime. Defaults to False
          default: false
      additionalProperties: false
      type: object
      required:
        - earningType
        - amount
      title: Earnings
    Benefits:
      properties:
        name:
          $ref: '#/components/schemas/BenefitType'
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
            - type: 'null'
          title: Amount
          description: Amount of benefit
          default: '0.00'
        makeGoodAmount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
            - type: 'null'
          title: Makegoodamount
          description: Amount paid by employee for the benefit
          default: '0.00'
        foregoneAmount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
            - type: 'null'
          title: Foregoneamount
          description: If subject to OpRa, amount foregone
          default: '0.00'
      additionalProperties: false
      type: object
      required:
        - name
      title: Benefits
    payroll__gb__schema__request__Deductions:
      properties:
        name:
          type: string
          title: Name
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
          title: Amount
      additionalProperties: false
      type: object
      required:
        - name
        - amount
      title: Deductions
    payroll__gb__schema__request__Reimbursement:
      properties:
        name:
          type: string
          title: Name
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
          title: Amount
      additionalProperties: false
      type: object
      required:
        - name
        - amount
      title: Reimbursement
    payroll__gb__schema__response__EmployeeCurrentPayPeriod:
      properties:
        totals:
          $ref: '#/components/schemas/payroll__gb__schema__response__EmployeeTotals'
        benefits:
          $ref: '#/components/schemas/EmployeeBenefits'
        taxes:
          $ref: '#/components/schemas/payroll__gb__schema__response__EmployeeTaxes'
        insurance:
          $ref: >-
            #/components/schemas/payroll__gb__schema__response__EmployeeInsurance
        deductions:
          items:
            $ref: '#/components/schemas/DeductionsResponse'
          type: array
          title: Deductions
        reimbursements:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReimbursementResponse'
              type: array
            - type: 'null'
          title: Reimbursements
      additionalProperties: false
      type: object
      title: EmployeeCurrentPayPeriod
    payroll__gb__schema__response__EmployerCurrentPayPeriod:
      properties:
        secondaryClass1Nic:
          type: string
          title: Secondaryclass1Nic
          default: '0.00'
        class1ANic:
          type: string
          title: Class1Anic
          default: '0.00'
        employerPensionContribution:
          type: string
          title: Employerpensioncontribution
          default: '0.00'
      additionalProperties: false
      type: object
      title: EmployerCurrentPayPeriod
    EarningType:
      type: string
      enum:
        - Salary
        - Commissions
        - Bonus
        - Allowances
        - Other
      title: EarningType
    BenefitType:
      type: string
      enum:
        - Company Car
        - Car Fuel
        - Van
        - Van Fuel
        - Living Accommodation
        - Beneficial Loan
        - Medical Insurance
        - Asset Transferred
        - Asset Available
        - Mileage Allowance
        - Entertainment
        - Credit Card
        - Vouchers
        - Telephone
        - Mobile Telephone
        - Relocation Expenses
        - Services Provided
        - Professional Subscription
        - Other Benefit
        - School Fees
        - Educational Assistance
        - Childcare
        - Holiday
        - Non-Executive Director Fees
        - Scholarships
      title: BenefitType
    payroll__gb__schema__response__EmployeeTotals:
      properties:
        grossWages:
          type: string
          title: Grosswages
          default: '0.00'
        netWages:
          type: string
          title: Netwages
          default: '0.00'
        totalDeductions:
          type: string
          title: Totaldeductions
          default: '0.00'
        totalReimbursements:
          type: string
          title: Totalreimbursements
          default: '0.00'
        netPay:
          type: string
          title: Netpay
          default: '0.00'
      additionalProperties: false
      type: object
      title: EmployeeTotals
    EmployeeBenefits:
      properties:
        benefitsInKind:
          type: string
          title: Benefitsinkind
          default: '0.00'
      additionalProperties: false
      type: object
      title: EmployeeBenefits
    payroll__gb__schema__response__EmployeeTaxes:
      properties:
        incomeTaxAssessmentBase:
          type: string
          title: Incometaxassessmentbase
          default: '0.00'
        incomeTax:
          type: string
          title: Incometax
          default: '0.00'
      additionalProperties: false
      type: object
      title: EmployeeTaxes
    payroll__gb__schema__response__EmployeeInsurance:
      properties:
        insuranceAssessmentBase:
          type: string
          title: Insuranceassessmentbase
          default: '0.00'
        nationalInsurance:
          type: string
          title: Nationalinsurance
          default: '0.00'
      additionalProperties: false
      type: object
      title: EmployeeInsurance
    DeductionsResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        amount:
          type: string
          title: Amount
          default: '0.00'
      additionalProperties: false
      type: object
      title: DeductionsResponse
    ReimbursementResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        amount:
          type: string
          title: Amount
          default: '0.00'
      additionalProperties: false
      type: object
      title: ReimbursementResponse
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer

````