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

# Save Contractor Template Review

> Creates, saves, submits, responds to, or activates account-scoped contractor agreement redlines.

Not available to API keys yet. It will need `documents:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/save-contractor-template-review
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/save-contractor-template-review:
    post:
      operationId: saveContractorTemplateReview
      summary: Save Contractor Template Review
      description: >-
        Creates, saves, submits, responds to, or activates account-scoped
        contractor agreement redlines.


        Not available to API keys yet. It will need `documents:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveContractorTemplateReviewRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveContractorTemplateReviewResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SaveContractorTemplateReviewRequest:
      type: object
      properties:
        orgId:
          type: string
          format: uuid
        reviewKey:
          type: string
          pattern: >-
            ^(contractor|employment:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
          description: >-
            "contractor" (the default) or "employment:<template id>"; a start
            may name its template instead.
        expectedRevision:
          type: integer
          minimum: 0
        command:
          type: string
          enum:
            - start
            - save
            - submit
            - respond
            - activate
            - restart
            - notify
        templateId:
          type: string
          format: uuid
        both:
          type: boolean
        acceptChangeFee:
          type: boolean
          description: >-
            Required to submit a round that carries the custom agreement change
            fee.
        acceptChangeFeeCount:
          type: integer
          minimum: 1
        suggestions:
          type: array
          items:
            $ref: '#/components/schemas/ContractorReviewSuggestionInput'
          description: >-
            replacement null means comment-only; an empty replacement deletes
            the selected passage.
        probation:
          type: object
          additionalProperties:
            type: string
            enum:
              - INCLUDE
              - REMOVE
          description: >-
            The client's probationary period choice by employment template id;
            removing it alone is free.
      required:
        - orgId
        - expectedRevision
        - command
    ContractorReviewSuggestionInput:
      type: object
      properties:
        id:
          type: string
          format: uuid
        templateId:
          type: string
          format: uuid
        quote:
          type: string
          minLength: 1
        start:
          type: integer
          minimum: 0
        replacement:
          type:
            - string
            - 'null'
        comment:
          type: string
          maxLength: 4000
        decision:
          type: string
          enum:
            - PENDING
            - APPROVED
            - REJECTED
        response:
          type: string
          maxLength: 4000
      required:
        - id
        - templateId
        - quote
        - replacement
        - comment
        - decision
        - response
    SaveContractorTemplateReviewResponse:
      type: object
      properties:
        canReview:
          type: boolean
        orgName:
          type: string
        templates:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              activeName:
                type: string
              kind:
                type: string
                enum:
                  - CONTRACTOR
                  - EMPLOYMENT
              reviewKey:
                type: string
              countryCodes:
                type: array
                items:
                  type: string
              reviewStatus:
                type:
                  - string
                  - 'null'
              reviewRevision:
                type: number
              customized:
                type: boolean
              version:
                type:
                  - number
                  - 'null'
              available:
                type: boolean
              updatedAt:
                type: string
            required:
              - id
              - name
              - activeName
              - kind
              - reviewKey
              - countryCodes
              - reviewStatus
              - reviewRevision
              - customized
              - version
              - available
              - updatedAt
        review:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            reviewKey:
              type: string
            revision:
              type: number
            status:
              type: string
            data:
              type: object
              properties:
                targets:
                  type: array
                  items:
                    type: object
                    properties:
                      baseId:
                        type: string
                      kind:
                        type: string
                        enum:
                          - CONTRACTOR
                          - EMPLOYMENT
                      countryCode:
                        type:
                          - string
                          - 'null'
                      hasProbationClause:
                        type: boolean
                      templateId:
                        type: string
                      versionId:
                        type: string
                      name:
                        type: string
                      driveId:
                        type: string
                      text:
                        type: string
                      contentHash:
                        type: string
                      scopeHash:
                        type: string
                    required:
                      - baseId
                      - templateId
                      - versionId
                      - name
                      - driveId
                      - text
                      - contentHash
                      - scopeHash
                suggestions:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      templateId:
                        type: string
                        format: uuid
                      quote:
                        type: string
                        minLength: 1
                      start:
                        type: integer
                        minimum: 0
                      replacement:
                        type:
                          - string
                          - 'null'
                      comment:
                        type: string
                        maxLength: 4000
                      decision:
                        type: string
                        enum:
                          - PENDING
                          - APPROVED
                          - REJECTED
                      response:
                        type: string
                        maxLength: 4000
                    required:
                      - id
                      - templateId
                      - quote
                      - replacement
                      - comment
                      - decision
                      - response
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      templateId:
                        type: string
                      templateName:
                        type: string
                      countryCode:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                        enum:
                          - FEE_APPLIES
                          - NO_FEE_PROBATION_ONLY
                      round:
                        type: number
                      amount:
                        type: string
                      currency:
                        type: string
                    required:
                      - templateId
                      - templateName
                      - countryCode
                      - status
                      - round
                      - amount
                      - currency
                probation:
                  type: object
                  additionalProperties:
                    type: string
                    enum:
                      - INCLUDE
                      - REMOVE
              required:
                - targets
                - suggestions
            events:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  revision:
                    type: number
                  action:
                    type: string
                  createdAt:
                    type: string
                  data:
                    type: object
                    properties:
                      targets:
                        type: array
                        items:
                          type: object
                          properties:
                            baseId:
                              type: string
                            kind:
                              type: string
                              enum:
                                - CONTRACTOR
                                - EMPLOYMENT
                            countryCode:
                              type:
                                - string
                                - 'null'
                            hasProbationClause:
                              type: boolean
                            templateId:
                              type: string
                            versionId:
                              type: string
                            name:
                              type: string
                            driveId:
                              type: string
                            text:
                              type: string
                            contentHash:
                              type: string
                            scopeHash:
                              type: string
                          required:
                            - baseId
                            - templateId
                            - versionId
                            - name
                            - driveId
                            - text
                            - contentHash
                            - scopeHash
                      suggestions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            templateId:
                              type: string
                              format: uuid
                            quote:
                              type: string
                              minLength: 1
                            start:
                              type: integer
                              minimum: 0
                            replacement:
                              type:
                                - string
                                - 'null'
                            comment:
                              type: string
                              maxLength: 4000
                            decision:
                              type: string
                              enum:
                                - PENDING
                                - APPROVED
                                - REJECTED
                            response:
                              type: string
                              maxLength: 4000
                          required:
                            - id
                            - templateId
                            - quote
                            - replacement
                            - comment
                            - decision
                            - response
                      fees:
                        type: array
                        items:
                          type: object
                          properties:
                            templateId:
                              type: string
                            templateName:
                              type: string
                            countryCode:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - FEE_APPLIES
                                - NO_FEE_PROBATION_ONLY
                            round:
                              type: number
                            amount:
                              type: string
                            currency:
                              type: string
                          required:
                            - templateId
                            - templateName
                            - countryCode
                            - status
                            - round
                            - amount
                            - currency
                      probation:
                        type: object
                        additionalProperties:
                          type: string
                          enum:
                            - INCLUDE
                            - REMOVE
                    required:
                      - targets
                      - suggestions
                  notificationPending:
                    type: boolean
                required:
                  - id
                  - revision
                  - action
                  - createdAt
                  - data
                  - notificationPending
          required:
            - id
            - reviewKey
            - revision
            - status
            - data
            - events
      required:
        - canReview
        - orgName
        - templates
        - review
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
