Zeal Contractors API

The Contractors API from Zeal — 2 operation(s) for contractors.

Documentation

Specifications

Other Resources

OpenAPI Specification

zeal-hq-contractors-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Zeal Companies Contractors API
  description: 'Zeal is an embedded payroll-as-a-service platform. This representative OpenAPI describes the core surfaces of the Zeal API used to build payroll products: onboarding companies, employees, and contractors; running pay runs (employee checks) and contractor payments; managing pay schedules, tax parameters, reports, funding, and webhooks. All requests are authenticated with a Bearer API key and scoped by a companyID. Use a test API key against Test Mode (no money moves) before switching to a live key.'
  termsOfService: https://www.zeal.com/terms
  contact:
    name: Zeal Support
    url: https://docs.zeal.com
    email: support@zeal.com
  version: '1.0'
servers:
- url: https://api.zeal.com
  description: Zeal API (test or live selected by API key)
security:
- bearerAuth: []
tags:
- name: Contractors
paths:
  /contractors:
    post:
      operationId: createContractor
      tags:
      - Contractors
      summary: Create a contractor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractorRequest'
      responses:
        '200':
          description: The created contractor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contractor'
    get:
      operationId: getContractors
      tags:
      - Contractors
      summary: Get contractors
      parameters:
      - $ref: '#/components/parameters/companyID'
      responses:
        '200':
          description: A list of contractors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractors:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contractor'
    put:
      operationId: updateContractorInformation
      tags:
      - Contractors
      summary: Update contractor information
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contractor'
      responses:
        '200':
          description: The updated contractor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contractor'
  /contractors/onboard:
    get:
      operationId: getContractorOnboardingLink
      tags:
      - Contractors
      summary: Generate a contractor onboarding link
      parameters:
      - $ref: '#/components/parameters/companyID'
      - name: contractorID
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A hosted onboarding link for the contractor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardLink'
components:
  schemas:
    OnboardLink:
      type: object
      properties:
        url:
          type: string
          format: uri
        expiration:
          type: string
          format: date-time
    CreateContractorRequest:
      type: object
      required:
      - companyID
      - type
      properties:
        companyID:
          type: string
        type:
          type: string
          enum:
          - individual
          - business
        first_name:
          type: string
        last_name:
          type: string
        business_name:
          type: string
        email:
          type: string
    Contractor:
      type: object
      properties:
        id:
          type: string
        companyID:
          type: string
        type:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        business_name:
          type: string
        onboarded:
          type: boolean
  parameters:
    companyID:
      name: companyID
      in: query
      required: true
      description: The Zeal companyID identifying the employer account.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Provide your Zeal API key as a Bearer token: `Authorization: Bearer <YOUR_API_KEY>`. Use a test key for Test Mode and a live key for production. Requests are additionally scoped by a companyID passed in the body or query.'