ZenHR Inc Documents API

The Documents API from ZenHR Inc — 2 operation(s) for documents.

OpenAPI Specification

zenhr-inc-documents-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ZenHR Approvals Documents API
  version: v3
  description: REST API for the ZenHR HR & payroll platform. Integrate external applications with ZenHR to manage branches, employees, master/professional/financial data, payroll (salaries, financial transactions, loans, overtime), time off, attendance, competencies, HR letters, terminations, business travel, and documents. Responds in JSON with standard HTTP status codes; authenticated via OAuth 2.0 (authorization code + PKCE). Derived by API Evangelist from the provider's published Postman documentation collection.
  contact:
    name: ZenHR DevOps
    email: devops@zenhr.com
    url: https://api-docs.zenhr.com/
  x-apievangelist-source: https://api-docs.zenhr.com/ (Postman published collection 2sA3dxDWwR)
servers:
- url: https://app.zenhr.com/api/v3
  description: Production
- url: https://aiapi.zenhr.com/api/v3
  description: Attendance ingestion (AI) host
security:
- oauth2:
  - read:employee
tags:
- name: Documents
paths:
  /branches/{branch_id}/documents:
    get:
      summary: List Documents for a branch
      tags:
      - Documents
      operationId: listDocumentsForABranch
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
        '404':
          description: Not found
      parameters:
      - name: branch_id
        in: path
        required: true
        schema:
          type: string
    post:
      summary: Create Document
      tags:
      - Documents
      operationId: createDocument
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
        '404':
          description: Not found
      parameters:
      - name: branch_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
            example:
              name: string
              document_type_id: 1
              owner_type: string
              owner_id: 1
              admin_only: false
              expiry_date: string
              attachments_attributes:
              - attachment: string
  /branches/{branch_id}/documents/{document_id}:
    get:
      summary: Get Document
      tags:
      - Documents
      operationId: getDocument
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
        '404':
          description: Not found
      parameters:
      - name: branch_id
        in: path
        required: true
        schema:
          type: string
      - name: document_id
        in: path
        required: true
        schema:
          type: string
    patch:
      summary: Edit Document
      tags:
      - Documents
      operationId: editDocument
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
        '404':
          description: Not found
      parameters:
      - name: branch_id
        in: path
        required: true
        schema:
          type: string
      - name: document_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
            example:
              name: string
              document_type_id: 1
              owner_type: string
              owner_id: 1
              admin_only: false
              expiry_date: string
              attachments_attributes:
              - attachment: string
    delete:
      summary: Delete Document
      tags:
      - Documents
      operationId: deleteDocument
      responses:
        '200':
          description: Successful response
        '401':
          description: Unauthorized
        '404':
          description: Not found
      parameters:
      - name: branch_id
        in: path
        required: true
        schema:
          type: string
      - name: document_id
        in: path
        required: true
        schema:
          type: string
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.zenhr.com/en/oauth/authorize
          tokenUrl: https://api.zenhr.com/en/oauth/token
          scopes:
            read:branch: Read branch data
            read:employee: Read employee data
            accessed_employees_branches:employee: Access employees within permitted branches
            read:professional_info: Read employee professional information
            read:termination: Read termination data
            read:employee_disciplinary_actions: Read employee disciplinary actions
            read:financial_transaction: Read financial transactions
            read:performance_evaluation: Read performance evaluations
            read:timeoff_transaction: Read time-off transactions