Contractors

contractorOps.terms.hours.update

Apply the exact focused hour-limit preview with its basisTermsId, expectedBasisRevision, basisDate, effectiveFrom, reason and hours patch. Preserve rate, pay schedule, dates, clauses and original documents. Explicit mode record_existing records terms already agreed elsewhere; use it only when the person confirms the agreement already permits them. send_amendment sends a separate amendment and keeps existing limits until all required signers sign. A new weekly cap never implies a daily allocation or two-week pooling. Stale previews and waiting or later updates are refused. Returns saved version and actual current terms.

POST/api/v1/accounting/contractorOps.terms.hours.update

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_contractor_ops_terms_hours_update

Fields

  • contractorIdstring (ID)Required

    The ID of a contractor, from contractors.list.

  • hoursobjectRequired

    No other fields

  • effectiveFromstring (date)Required
  • modeenumRequired
    record_existingsend_amendment
  • basisTermsIdstring (ID)Required

    The ID of the related record.

  • expectedBasisRevisionintegerRequired

    The related record's current revision, from the last time you read it.

    at most 9007199254740991 · greater than 0

  • basisDatestring (date)Required

    A date, as YYYY-MM-DD.

  • reasonstringRequired

    A short note saying why, kept in the record's history.

    10–1000 characters

  • companySignerobject

    No other fields

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.terms.hours.update \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "contractorId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "hours": {
    "dailyMaxMinutes": 90
  },
  "effectiveFrom": "2026-09-01",
  "mode": "record_existing",
  "basisTermsId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "expectedBasisRevision": 3,
  "basisDate": "2026-09-01",
  "reason": "Synthetic example from the docs"
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/contractorOps.terms.hours.update
curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.terms.hours.update \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "contractorId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "hours": {
    "dailyMaxMinutes": 90
  },
  "effectiveFrom": "2026-09-01",
  "mode": "record_existing",
  "basisTermsId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "expectedBasisRevision": 3,
  "basisDate": "2026-09-01",
  "reason": "Synthetic example from the docs"
}'

More in Contractors.