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

# Get Payroll Run By Id

> Returns a PayrollRun object with the given id.



## OpenAPI

````yaml get /api/hris/v1/payroll-runs/{id}
openapi: 3.1.0
info:
  title: Bindbee APIs
  version: 0.1.0
servers:
  - url: https://api.bindbee.dev
  - url: https://api-eu.bindbee.dev
security: []
paths:
  /api/hris/v1/payroll-runs/{id}:
    get:
      tags:
        - Payroll Runs
      summary: Get Payroll Run By Id
      description: Returns a PayrollRun object with the given id.
      operationId: get_payroll_run_by_id_api_hris_v1_payroll_runs__id__get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
        - name: include_raw_data
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Whether to include the original data Bindbee fetched from the
              third-party to produce these models.
            examples:
              - false
            default: false
            title: Include Raw Data
          description: >-
            Whether to include the original data Bindbee fetched from the
            third-party to produce these models.
        - name: include_custom_fields
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to include custom fields in the response.
            examples:
              - false
            default: false
            title: Include Custom Fields
          description: Whether to include custom fields in the response.
        - name: expand
          in: query
          required: false
          schema:
            type: string
            description: >-
              Which relations should be returned in expanded form. Multiple
              relation names should be comma separated without spaces. You can
              also specify required fields in [] for each relation name.
            examples:
              - manager[first_name,last_name]
            title: Expand
          description: >-
            Which relations should be returned in expanded form. Multiple
            relation names should be comma separated without spaces. You can
            also specify required fields in [] for each relation name.
        - name: x-connector-token
          in: header
          required: true
          schema:
            type: string
            title: X-Connector-Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HrisPayrollRun'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HrisPayrollRun:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          examples:
            - 018b18ef-c487-703c-afd9-0ca478ccd9d6
        remote_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Remote Id
          description: The third-party API ID of the matching object.
          examples:
            - '123321'
        modified_at:
          type: string
          title: Modified At
          description: This is the datetime that this object was last updated by Bindbee
          examples:
            - '2021-10-16T00:00:00Z'
        raw_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Raw Data
          description: This is the Raw data
          examples:
            - key_1: Platform dependent data 1
              key_2: Platform dependent data 2
        custom_fields:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Fields
          description: The custom fields related to the model
          examples:
            - category_group: REG
              disability_type: ASBERG
              hire_date: '1991-03-16T00:00:00'
              hire_source: REFER
              nationality: USA
              original_hire_date: '1991-03-16T00:00:00'
        pay_group:
          anyOf:
            - {}
            - type: 'null'
          title: Pay Group
          description: The paygroup to which this pay cycle belongs to
          examples:
            - 018af1fe-2fad-749e-a282-ea17ba4fc0c4
        run_state:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - PAID
            - DRAFT
            - APPROVED
            - FAILED
            - CLOSED
            - NOT_STARTED
          title: Run State
          description: >-
            The state of the payroll run. If the value is not one of the defined
            enum values, the original value passed through will be returned.
          examples:
            - PAID
        run_type:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - REGULAR
            - OFF_CYCLE
            - CORRECTION
            - TERMINATION
            - BONUS
            - SIGN_ON_BONUS
          title: Run Type
          description: >-
            The type of the payroll run. If the value is not one of the defined
            enum values, the original value passed through will be returned.
          examples:
            - REGULAR
        start_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Date
          description: The day and time the payroll run started.
          examples:
            - '2020-11-08T00:00:00Z'
        end_date:
          anyOf:
            - type: string
            - type: 'null'
          title: End Date
          description: The day and time the payroll run ended.
          examples:
            - '2020-11-15T00:00:00Z'
        check_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Check Date
          description: The day and time the payroll run was checked.
          examples:
            - '2020-11-15T00:00:00Z'
        payroll_run_calendar:
          anyOf:
            - {}
            - type: 'null'
          title: Payroll Run Calendar
          description: The payroll run calendar to which which the payroll run belongs
          examples:
            - 018af1fe-2fad-749e-a282-ea17ba4fc0c4
      type: object
      required:
        - id
        - remote_id
        - modified_at
        - custom_fields
        - pay_group
        - run_state
        - run_type
        - start_date
        - end_date
        - check_date
        - payroll_run_calendar
      title: HrisPayrollRun
      description: >-
        The PayrollRun object is used to represent a group of pay statements for
        a specific pay schedule.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````