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

# Generate Contractor Onboarding Link

> Generate an expirable link to Zeal's hosted contractor onboarding flow.

Generate an expirable link to Zeal's contractor onboarding. Zeal's onboarding collects:

* Profile information (e.g. SSN, DOB, Address)
* Contractor account username and password (optional)
* Contractor Survey attributes (optional). **NOTE: Only applicable for Custom Attributes (Early Access)**
* ID collection (optional - Zeal collects Driver's License + Social Security Card OR Passport)

  NOTE - If passing the onboarding link in a `src` of an iframe, the `allow="camera"` flag must be passed in order for the iframe to prompt or access a user's camera.
* Paperwork (W9 form)
* Bank Account Information (optional)
* Paycard enrollment information for the contractor (optional). **NOTE: Only applicable for Paycards (Early Access)**
* Instant Pay enrollment information for the contractor (optional). **NOTE: Only applicable for Instant Pay (Early Access)**

You can choose whether you want to turn on or off these sections of Zeal onboarding by using this endpoint. This onboarding flow was custom-made to take less than 3 minutes to complete. After onboarding is completed, the contractor can start getting paid!

## Returns

| attribute | type    | description                                                                                                                                                                        |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| success   | boolean | Response status                                                                                                                                                                    |
| data      | string  | Web onboarding link for this contractor                                                                                                                                            |
| errors    | array   | Contains a list of error objects which consists of: `message` (error message) and `code` (error code, see [Error codes](https://docs.zeal.com/reference/introduction/error-codes)) |


## OpenAPI

````yaml openapi/zeal-api.json post /contractors/onboard
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /contractors/onboard:
    post:
      summary: Generate Contractor Onboarding Link
      description: Generate a secure onboarding link for a contractor.
      operationId: get-contractor-onboarding-link
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - companyID
                - contractorID
              properties:
                companyID:
                  type: string
                  description: Company ID of employer
                contractorID:
                  type: string
                  description: ID of Contractor
                contractor_acct:
                  type: boolean
                  description: >-
                    If false, the contractor account information (username and
                    password) collection step of onboarding will be left out.
                  default: false
                survey:
                  type: boolean
                  description: >-
                    If false, the contractor survey step will be left out (Early
                    Access)
                  default: false
                id_scan:
                  type: boolean
                  description: >-
                    If false, the ID collection step of contractor onboarding
                    will be left out.
                  default: false
                payment_method_required:
                  type: boolean
                  description: >-
                    If false, the onboarding worker will be able to skip the
                    bank account collection section of onboarding
                  default: false
                paycard:
                  type: boolean
                  description: >-
                    If false, the paycard enrollment screen will be left out.
                    NOTE: Only applicable for Paycards (Early Access)
                  default: false
                instant_pay:
                  type: boolean
                  description: >-
                    If false, the instant pay enrollment screen will be left
                    out. NOTE: Only applicable for Instant Pay (Early Access)
            examples:
              Request Example:
                value:
                  companyID: eeeee434343553413eccc34534
                  contractorID: 874759t85785745748e3847
                  scan_id: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    data: >-
                      https://payroll.your-domain.com/contractoronboarding/10983755744920193854758300657020834
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
                  data:
                    type: string
                    example: >-
                      https://payroll.your-domain.com/contractoronboarding/10983755744920193854758300657020834
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: No contractorID in the body/query of the request
                        code: 35
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: No contractorID in the body/query of the request
                        code:
                          type: integer
                          example: 35
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````