Contract templates
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.
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": {}
}'{
"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
AuthorizationstringheaderrequiredBearer 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>requiredreviewKeystring"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})$
expectedRevisionintegerrequiredAllowed: at least 0
commandstringrequiredAvailable options: start, save, submit, respond, activate, restart, notify
templateIdstring<uuid>bothbooleanacceptChangeFeebooleanRequired to submit a round that carries the custom agreement change fee.
acceptChangeFeeCountintegerAllowed: at least 1
suggestionsobject[]replacement null means comment-only; an empty replacement deletes the selected passage.
Show child attributes
idstring<uuid>requiredtemplateIdstring<uuid>requiredquotestringrequiredAllowed: at least 1 characters
startintegerAllowed: at least 0
replacementstring | nullrequiredcommentstringrequiredAllowed: at most 4000 characters
decisionstringrequiredAvailable options: PENDING, APPROVED, REJECTED
responsestringrequiredAllowed: at most 4000 characters
probationobjectThe client's probationary period choice by employment template id; removing it alone is free.
Response
200Successful response
canReviewbooleanrequiredorgNamestringrequiredtemplatesobject[]requiredShow child attributes
idstringrequirednamestringrequiredactiveNamestringrequiredkindstringrequiredAvailable options: CONTRACTOR, EMPLOYMENT
reviewKeystringrequiredcountryCodesstring[]requiredreviewStatusstring | nullrequiredreviewRevisionnumberrequiredcustomizedbooleanrequiredversionnumber | nullrequiredavailablebooleanrequiredupdatedAtstringrequiredreviewobject | nullrequiredShow child attributes
idstringrequiredreviewKeystringrequiredrevisionnumberrequiredstatusstringrequireddataobjectrequiredShow child attributes
targetsobject[]requiredShow child attributes
baseIdstringrequiredkindstringAvailable options: CONTRACTOR, EMPLOYMENT
countryCodestring | nullhasProbationClausebooleantemplateIdstringrequiredversionIdstringrequirednamestringrequireddriveIdstringrequiredtextstringrequiredcontentHashstringrequiredscopeHashstringrequiredsuggestionsobject[]requiredShow child attributes
idstring<uuid>requiredtemplateIdstring<uuid>requiredquotestringrequiredAllowed: at least 1 characters
startintegerAllowed: at least 0
replacementstring | nullrequiredcommentstringrequiredAllowed: at most 4000 characters
decisionstringrequiredAvailable options: PENDING, APPROVED, REJECTED
responsestringrequiredAllowed: at most 4000 characters
feesobject[]Show child attributes
templateIdstringrequiredtemplateNamestringrequiredcountryCodestring | nullrequiredstatusstringrequiredAvailable options: FEE_APPLIES, NO_FEE_PROBATION_ONLY
roundnumberrequiredamountstringrequiredcurrencystringrequiredprobationobjecteventsobject[]requiredShow child attributes
idstringrequiredrevisionnumberrequiredactionstringrequiredcreatedAtstringrequireddataobjectrequiredShow child attributes
targetsobject[]requiredShow child attributes
baseIdstringrequiredkindstringAvailable options: CONTRACTOR, EMPLOYMENT
countryCodestring | nullhasProbationClausebooleantemplateIdstringrequiredversionIdstringrequirednamestringrequireddriveIdstringrequiredtextstringrequiredcontentHashstringrequiredscopeHashstringrequiredsuggestionsobject[]requiredShow child attributes
idstring<uuid>requiredtemplateIdstring<uuid>requiredquotestringrequiredAllowed: at least 1 characters
startintegerAllowed: at least 0
replacementstring | nullrequiredcommentstringrequiredAllowed: at most 4000 characters
decisionstringrequiredAvailable options: PENDING, APPROVED, REJECTED
responsestringrequiredAllowed: at most 4000 characters
feesobject[]Show child attributes
templateIdstringrequiredtemplateNamestringrequiredcountryCodestring | nullrequiredstatusstringrequiredAvailable options: FEE_APPLIES, NO_FEE_PROBATION_ONLY
roundnumberrequiredamountstringrequiredcurrencystringrequiredprobationobjectnotificationPendingbooleanrequired