Contract templates

Save Contractor Template Review

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

POSThttps://api.toku.com/hris/save-contractor-template-review

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

curl --request POST \
  --url 'https://api.toku.com/hris/save-contractor-template-review' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "orgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "reviewKey": "string",
  "expectedRevision": 0,
  "command": "start",
  "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "both": true,
  "acceptChangeFee": true,
  "acceptChangeFeeCount": 0,
  "suggestions": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "quote": "string",
      "start": 0,
      "replacement": "string",
      "comment": "string",
      "decision": "PENDING",
      "response": "string"
    }
  ],
  "probation": {}
}'
200 response
{
  "canReview": true,
  "orgName": "string",
  "templates": [
    {
      "id": "string",
      "name": "string",
      "activeName": "string",
      "kind": "CONTRACTOR",
      "reviewKey": "string",
      "countryCodes": [
        "string"
      ],
      "reviewStatus": "string",
      "reviewRevision": 0,
      "customized": true,
      "version": 0,
      "available": true,
      "updatedAt": "string"
    }
  ],
  "review": {
    "id": "string",
    "reviewKey": "string",
    "revision": 0,
    "status": "string",
    "data": {
      "targets": [
        {
          "baseId": "string",
          "kind": "CONTRACTOR",
          "countryCode": "string",
          "hasProbationClause": true,
          "templateId": "string",
          "versionId": "string",
          "name": "string",
          "driveId": "string",
          "text": "string",
          "contentHash": "string",
          "scopeHash": "string"
        }
      ],
      "suggestions": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "quote": "string",
          "start": 0,
          "replacement": "string",
          "comment": "string",
          "decision": "PENDING",
          "response": "string"
        }
      ],
      "fees": [
        {
          "templateId": "string",
          "templateName": "string",
          "countryCode": "string",
          "status": "FEE_APPLIES",
          "round": 0,
          "amount": "string",
          "currency": "string"
        }
      ],
      "probation": {}
    },
    "events": [
      {
        "id": "string",
        "revision": 0,
        "action": "string",
        "createdAt": "string",
        "data": {
          "targets": [
            {
              "baseId": "string",
              "kind": "CONTRACTOR",
              "countryCode": "string",
              "hasProbationClause": true,
              "templateId": "string",
              "versionId": "string",
              "name": "string",
              "driveId": "string",
              "text": "string",
              "contentHash": "string",
              "scopeHash": "string"
            }
          ],
          "suggestions": [
            {
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "quote": "string",
              "start": 0,
              "replacement": "string",
              "comment": "string",
              "decision": "PENDING",
              "response": "string"
            }
          ],
          "fees": [
            {
              "templateId": "string",
              "templateName": "string",
              "countryCode": "string",
              "status": "FEE_APPLIES",
              "round": 0,
              "amount": "string",
              "currency": "string"
            }
          ],
          "probation": {}
        },
        "notificationPending": true
      }
    ]
  }
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

orgIdstring<uuid>required
reviewKeystring

"contractor" (the default) or "employment:<template id>"; a start may name its template instead.

Allowed: matches ^(contractor|employment:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$

expectedRevisionintegerrequired

Allowed: at least 0

commandstringrequired

Available options: start, save, submit, respond, activate, restart, notify

templateIdstring<uuid>
bothboolean
acceptChangeFeeboolean

Required to submit a round that carries the custom agreement change fee.

acceptChangeFeeCountinteger

Allowed: at least 1

suggestionsobject[]

replacement null means comment-only; an empty replacement deletes the selected passage.

Show child attributes
idstring<uuid>required
templateIdstring<uuid>required
quotestringrequired

Allowed: at least 1 characters

startinteger

Allowed: at least 0

replacementstring | nullrequired
commentstringrequired

Allowed: at most 4000 characters

decisionstringrequired

Available options: PENDING, APPROVED, REJECTED

responsestringrequired

Allowed: at most 4000 characters

probationobject

The client's probationary period choice by employment template id; removing it alone is free.

Response

200Successful response
canReviewbooleanrequired
orgNamestringrequired
templatesobject[]required
Show child attributes
idstringrequired
namestringrequired
activeNamestringrequired
kindstringrequired

Available options: CONTRACTOR, EMPLOYMENT

reviewKeystringrequired
countryCodesstring[]required
reviewStatusstring | nullrequired
reviewRevisionnumberrequired
customizedbooleanrequired
versionnumber | nullrequired
availablebooleanrequired
updatedAtstringrequired
reviewobject | nullrequired
Show child attributes
idstringrequired
reviewKeystringrequired
revisionnumberrequired
statusstringrequired
dataobjectrequired
Show child attributes
targetsobject[]required
Show child attributes
baseIdstringrequired
kindstring

Available options: CONTRACTOR, EMPLOYMENT

countryCodestring | null
hasProbationClauseboolean
templateIdstringrequired
versionIdstringrequired
namestringrequired
driveIdstringrequired
textstringrequired
contentHashstringrequired
scopeHashstringrequired
suggestionsobject[]required
Show child attributes
idstring<uuid>required
templateIdstring<uuid>required
quotestringrequired

Allowed: at least 1 characters

startinteger

Allowed: at least 0

replacementstring | nullrequired
commentstringrequired

Allowed: at most 4000 characters

decisionstringrequired

Available options: PENDING, APPROVED, REJECTED

responsestringrequired

Allowed: at most 4000 characters

feesobject[]
Show child attributes
templateIdstringrequired
templateNamestringrequired
countryCodestring | nullrequired
statusstringrequired

Available options: FEE_APPLIES, NO_FEE_PROBATION_ONLY

roundnumberrequired
amountstringrequired
currencystringrequired
probationobject
eventsobject[]required
Show child attributes
idstringrequired
revisionnumberrequired
actionstringrequired
createdAtstringrequired
dataobjectrequired
Show child attributes
targetsobject[]required
Show child attributes
baseIdstringrequired
kindstring

Available options: CONTRACTOR, EMPLOYMENT

countryCodestring | null
hasProbationClauseboolean
templateIdstringrequired
versionIdstringrequired
namestringrequired
driveIdstringrequired
textstringrequired
contentHashstringrequired
scopeHashstringrequired
suggestionsobject[]required
Show child attributes
idstring<uuid>required
templateIdstring<uuid>required
quotestringrequired

Allowed: at least 1 characters

startinteger

Allowed: at least 0

replacementstring | nullrequired
commentstringrequired

Allowed: at most 4000 characters

decisionstringrequired

Available options: PENDING, APPROVED, REJECTED

responsestringrequired

Allowed: at most 4000 characters

feesobject[]
Show child attributes
templateIdstringrequired
templateNamestringrequired
countryCodestring | nullrequired
statusstringrequired

Available options: FEE_APPLIES, NO_FEE_PROBATION_ONLY

roundnumberrequired
amountstringrequired
currencystringrequired
probationobject
notificationPendingbooleanrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits