agency-time

PATCH /v1/agency/time/entries/{entryId}

Correct a time entry.

所有 agency-time 端点

身份验证

请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。

此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。

免费试用

将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。

curl -X PATCH https://api.zinndigital.com/v1/agency/time/entries/{entryId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点

详细信息

⛔ An entry that has been invoiced cannot be changed — 422. Changing the minutes on an invoiced line would make the timesheet disagree with a document the client is holding; the remedy is to void the draft invoice, which releases the time back into the pool.

参数

名称类型必填内容简介
entryId (path)string

请求正文

名称类型必填内容简介
task_idstring
work_datestring
minutesinteger
descriptionstring
billableboolean

响应

名称类型必填内容简介
idstring
user_idstring
project_idstring
project_namestring
task_idstring
task_namestring
client_idstring
work_datestring
minutesinteger⛔ An INTEGER of minutes. There is no `hours` field on this API: an hours-as-float duration re-enters the money through the rate and no rounding point can recover it.
duration_labelstringPresentational only — never multiplied by anything.
descriptionstring
billableboolean
billing_run_idstringThe run that invoiced this entry. `null` means it is still outstanding.
billed_rate_minor_per_hourinteger
billed_amount_minorintegerWhat was actually charged, frozen at billing time so the document can be re-derived years later even if every rate card has since changed.
billed_currencystring
billed_under_fixed_pricebooleanTRUE when these minutes were rolled into a task's FIXED price rather than charged by the hour. `billed_amount_minor` is then 0 and that zero is correct — read this flag, not the…
rate_minor_per_hourintegerThe rate that WOULD apply, resolved against this entry's own `work_date`, for an entry not yet billed. ⛔ `null` means **unpriced**, not free: work with no rate card is never inv…
rate_scopestring<task, project, client, org>Which rate card won, so a surprising invoice can be explained.
rate_kindstring<hourly, fixed>
created_atstring

此端点可能返回的错误

401 · 403 · 404 · 422