Set a person’s hours and completion on a line
Both figures are stated as they now stand: hours is the person’s total on the line, and completion_rate the completion they stand at. The total is registered as the signed difference against what is registered, in the entry month of the request (Europe/Copenhagen): the one bucket per line, person and month the workspace reads. **Sending the same figures again registers nothing.** Name the line on an invoice (invoice and the invoice line’s id) or on an occurrence of a recurring series (series, occurrence and the series line’s id): an occurrence that is no invoice yet is made one first. Set one person’s hours on one line one request at a time: two requests at the same moment both measure against the same total. Refused with NOT_ASSIGNED (409) when the person holds no place on the line, and with HOURS_BILLED_LOCKED (409) for the hours of an hourly line its invoice has billed.
Authorization
bearerAuth An API key minted by an admin under Settings → Developers. It is bound to one company and has a scope: read, or read_write. A request without one, or with one that is not ours, is answered 401 and metered by its client address (x-rate-limits).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/work-registrations" \ -H "Content-Type: application/json" \ -d '{ "line": "cbd064df-a272-4ffb-a570-4b4e90fd2e3b", "user": "string" }'{ "object": "work_registration", "invoice_id": "string", "invoice_line_id": "string", "user_id": "string", "accrual_month": "string", "hours": 0, "hours_delta": 0, "completion_rate": 0, "external_id": "string"}