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

# getStateW4FormFields

> The `getStateW4FormFields` API retrieves state-specific W4 form fields for an employee based on their location.

### What it does:

- Returns state-specific W4 form fields and their available options
- Provides field descriptions for state tax withholding forms (e.g. Married, Single etc.)
- Provides data type restrictions for W4 fields to prevent input error

### Notes:

- Employees state is determined using their **userId**
- **userId or stateCode** is required to retrieve the correct fields for the state
- Used before calling `addStateW4Information` to get the required fields for that state



## OpenAPI

````yaml get /reports/getStateW4FormFields
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /reports/getStateW4FormFields:
    get:
      tags: []
      summary: getStateW4FormFields
      description: >-
        The `getStateW4FormFields` API retrieves state-specific W4 form fields
        for an employee based on their location.


        ### What it does:


        - Returns state-specific W4 form fields and their available options

        - Provides field descriptions for state tax withholding forms (e.g.
        Married, Single etc.)

        - Provides data type restrictions for W4 fields to prevent input error


        ### Notes:


        - Employees state is determined using their **userId**

        - **userId or stateCode** is required to retrieve the correct fields for
        the state

        - Used before calling `addStateW4Information` to get the required fields
        for that state
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: getStateW4FormFeilds
                  example: getStateW4FormFeilds
                userId:
                  type: string
                stateCode:
                  type: string
              required:
                - method
            example:
              method: getStateW4FormFields
              userId: A31A0E84-3643-405A-B0E4-D229D0A194FB
              stateCode: CA
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  employeeId:
                    type: string
                  stateCode:
                    type: string
                  stateW4FieldsList:
                    type: object
                    properties:
                      Filing Status:
                        type: string
                      Withholding Allowance:
                        type: string
                      Additional Withholding:
                        type: string
                      NYC Withholding Allowance:
                        type: string
                      NYC Additional Withholding:
                        type: string
                    required:
                      - Filing Status
                      - Withholding Allowance
                      - Additional Withholding
                      - NYC Withholding Allowance
                      - NYC Additional Withholding
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldName:
                          type: string
                        fieldDescription:
                          type: string
                        options:
                          type: array
                          items:
                            type: string
                        dataType:
                          type: string
                      required:
                        - fieldName
                        - dataType
                required:
                  - employeeId
                  - stateCode
                  - stateW4FieldsList
                  - fields
              example:
                employeeId: A31A0E84-3643-405A-B0E4-D229D0A194FB
                stateCode: NY
                stateW4FieldsList:
                  Filing Status: ''
                  Withholding Allowance: ''
                  Additional Withholding: ''
                  NYC Withholding Allowance: ''
                  NYC Additional Withholding: ''
                fields:
                  - fieldName: Filing Status
                    fieldDescription: >-
                      In most cases, use the same filing status that you used on
                      your federal return. If unsure, read the official NY
                      filing status
                      definition("https://www.tax.ny.gov/pit/file/filing_status.htm/")
                    options:
                      - Married, but withhold as single
                      - Married
                      - Single
                  - fieldName: Withholding Allowance
                    fieldDescription: null
                    dataType: Number
                  - fieldName: Additional Withholding
                    fieldDescription: null
                    dataType: Double
                  - fieldName: NYC Withholding Allowance
                    fieldDescription: null
                    dataType: Number
                  - fieldName: NYC Additional Withholding
                    fieldDescription: null
                    dataType: Double
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````