Expenses
Upsert Expense Spending Cap
Creates or updates an org spending cap by type, amount, category and contributor type.
POSThttps://api.toku.com/hris/upsert-expense-spending-cap
Not available to API keys yet. It will need expenses:write.
curl --request POST \
--url 'https://api.toku.com/hris/upsert-expense-spending-cap' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"capID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hrisExpenseCategoryID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"capType": "PER_EXPENSE",
"maxAmount": "string",
"contributorType": "EMPLOYEE"
}'200 response
{
"capID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}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
capIDstring<uuid>hrisExpenseCategoryIDstring | null<uuid>capTypestringrequiredAvailable options: PER_EXPENSE, MONTHLY_PER_SUBMITTER, MONTHLY_PER_CATEGORY_PER_SUBMITTER
maxAmountstring | any | numberrequiredNOTE(ck): z.instanceof(Decimal) has no contract form; TGA still checks it
contributorTypestring | nullAvailable options: EMPLOYEE, CONTRACTOR, null
Response
200Successful response
capIDstring<uuid>required400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits