Developers

API changelog

Every change to the TimeSubmit API, newest first: each dated, marked additive or breaking, with the operations it affects. Subscribe by RSS.

Every change to the TimeSubmit API, newest first. An additive change keeps a working integration working; a breaking one could stop it, as Versioning defines them. Subscribe to the RSS feed to hear about each one.

An assignment's start date cannot be moved past its end date

Breaking

PATCH /v1/assignments/{id} now refuses a startDate later than the assignment's endDate, which the dashboard sets, with 400 invalid_request, "The end date cannot be before the start date." It used to be stored. That makes this a breaking change by our own definition, made within /v1 because the only requests it refuses are ones that stored an assignment ending before it started. An update that sends no startDate is not judged, so an assignment already stored that way can still have its other fields changed. A start on the end day is allowed.

Operations: PATCH /assignments/{id}.

A request sent together with others on one key is tried again before it is refused

Additive

Every answer says not to cache it, an unknown route answers in the error shape, and scope is judged first

Additive

Every /v1 answer now carries Cache-Control: no-store; before, the site added public, max-age=0, must-revalidate. A method and path that is not an operation, such as PUT /v1/clients, answers 404 not_found in the error shape, where it answered plain text. And a key without projects:read or assignments:read is refused with 403 insufficient_scope whatever filter it sends to GET /v1/projects or GET /v1/assignments, where a malformed filter, or no filter on assignments, was judged first. No request that succeeded is refused.

Operations: GET /clients, GET /clients/{id}, POST /clients, PATCH /clients/{id}, POST /clients/{id}/archive, GET /projects, GET /projects/{id}, POST /projects, PATCH /projects/{id}, GET /consultants, GET /consultants/{id}, GET /assignments, GET /assignments/{id}, POST /assignments, PATCH /assignments/{id}, DELETE /assignments/{id}, GET /invoices, GET /invoices/{id}, GET /client-purchase-orders, GET /client-purchase-orders/{id}, GET /client-purchase-orders/{id}/changes, POST /client-purchase-orders, PATCH /client-purchase-orders/{id}, POST /client-purchase-orders/{id}/close, DELETE /client-purchase-orders/{id}, GET /consultant-purchase-orders, GET /consultant-purchase-orders/{id}, GET /consultant-purchase-orders/{id}/changes, POST /consultant-purchase-orders, PATCH /consultant-purchase-orders/{id}, POST /consultant-purchase-orders/{id}/close, DELETE /consultant-purchase-orders/{id}, GET /events.

A project's end date cannot be before its start date

Breaking

POST /v1/projects and PATCH /v1/projects/{id} now refuse an endDate before the startDate with 400 invalid_request, "The end date cannot be before the start date." They used to store it. That makes this a breaking change by our own definition, made within /v1 because the only requests it refuses are ones that stored a project ending before it started. An update compares the dates as they will be after it, so moving only one of them past the stored other is refused too, and a project already stored that way is refused any update until its dates are corrected. An end on the start day is allowed.

Operations: POST /projects, PATCH /projects/{id}.

Requests sent together on one key now answer 429 where some answered 500

Additive

Pending time counts against a consultant purchase order's budget at submission

Additive

Where an organisation has turned on "Purchase orders control consultants' time", a timesheet is now refused at submission if its time would take a consultant purchase order past its budget, counting what the purchase order has invoiced, its committed and pending time, and the timesheet's own time. The API cannot submit timesheets. A refused timesheet stays a draft, so no timesheet.submitted event fires for it and its time never reaches pending. pending still does not reduce remaining, and nothing changes for an organisation that leaves the setting off, which is the default.

Operations: GET /consultant-purchase-orders/{id}, GET /events.

A period can appear on two payables, one per currency

Additive

When a consultant's time in one timesheet period is covered by consultant purchase orders in different currencies, it is now raised as one payable per currency instead of being refused. Each is an ordinary payable: invoice.raised fires for each, and GET /v1/invoices/{id} answers each with its own currency, consultantPurchaseOrders and lines. A line still covers one period, and on these payables carries only its own currency's projects, so do not assume a period is on one payable only. Time no purchase order covers goes in the consultant's preferred currency, unless all of the consultant's purchase orders are in one currency. Nothing changes for a consultant whose purchase orders are all in one currency.

Operations: GET /invoices/{id}, GET /invoices, GET /consultant-purchase-orders/{id}, GET /events.

Budget warnings can repeat when the nearly-used percentage changes

Additive

When an organisation changes its nearly-used percentage, the next daily check compares each purchase order with the new one. A purchase order that has already had client_purchase_order.budget_near or consultant_purchase_order.budget_near gets the event again if it is past the new percentage, even though its budget has not changed. One that is now below the new percentage gets it again when it reaches it. Changing the percentage and changing it back before the check records nothing new. A change of percentage never repeats budget_used or ending.

Operations: GET /events.

The last approver can give final approval

Additive

A consultancy can now choose to let a timesheet's last approver give final approval, instead of a consultancy admin. Where it has, timesheet.approved fires when the last approver approves, with no admin step; nothing changes for a consultancy that keeps the default. The event still means one thing, a timesheet finally approved and billable, and still fires once per approval. Do not read it as "an admin approved this".

Operations: GET /events.

Responses say when something they use is deprecated

Additive

A response of an operation that is deprecated, or that accepts or answers with a deprecated field, now carries a Deprecation header with the day it was announced, and a Link header with rel="deprecation" pointing at the entry that announced it. Every /v1/projects response does, for approvalsRequired. Once a retirement day is set for /v1, every response will carry Sunset, and from that day /v1 answers 410 with the new error code gone; no day is set. Versioning explains all three.

Operations: GET /projects, GET /projects/{id}, POST /projects, PATCH /projects/{id}.

Invoices can be rejected

Additive

An invoice can now report status rejected: a consultant's invoice the consultancy had been sent and refused, with a reason. It is final, and it asks nobody for money. A new webhook event, invoice.rejected, fires when an admin rejects a sent payable, and its weeks can then be invoiced again.

Operations: GET /invoices, GET /invoices/{id}, GET /events.

A project's approvalsRequired is deprecated

Additive

approvalsRequired on a project has never changed how a timesheet is approved: it needs every approver on the project, then final approval. It is now marked deprecated, here and in the OpenAPI document. Within /v1 it is still accepted, checked as a whole number from 1 to 10, stored and returned, so nothing that sends or reads it breaks. It will be removed in /v2.

Operations: GET /projects, GET /projects/{id}, POST /projects, PATCH /projects/{id}.

The OpenAPI document describes errors, rate limits and webhooks

Additive

openapi.json now tags each operation by resource, states bearer authentication once, gives every operation its 429 answer with Retry-After, lists the error codes, carries an example of every success answer and request body, and describes a webhook for each event type. The API itself is unchanged.

Budget warnings follow the organisation's nearly-used percentage

Additive

client_purchase_order.budget_near and consultant_purchase_order.budget_near are recorded when invoiced plus committed reaches the organisation's nearly-used percentage of the budget. It is 85% until the organisation changes it in its settings, so nothing changes until it does.

Operations: GET /events.

A purchase order number must be on one line

Breaking

consultantPurchaseOrderNumber on an assignment is now refused with 400 invalid_request when it has a line break, a tab or another control character inside it. It used to be stored, and then printed across two lines on every invoice that quoted it. That makes this a breaking change by our own definition, made within /v1 because the only requests it refuses are ones that stored a broken number. The purchase order operations already refused such a number; they now word the refusal as the dashboard does, and trim a trailing line break instead of refusing it.

Operations: POST /assignments, PATCH /assignments/{id}, POST /client-purchase-orders, PATCH /client-purchase-orders/{id}, POST /consultant-purchase-orders, PATCH /consultant-purchase-orders/{id}.

A consultant purchase order can be recorded in its own currency

Additive

Recording a consultant purchase order accepts currency, an ISO 4217 code. Without it the purchase order takes the consultant's preferred currency, as before. It cannot be changed once recorded.

Operations: POST /consultant-purchase-orders.

Purchase orders

Additive

Client and consultant purchase orders through the API: list them, read one with its budget figures, read its change history, and record, amend, close and delete them, with the new purchase_orders:read and purchase_orders:write scopes. Fourteen new event types cover their lifecycle and their budget and end-date warnings. They need purchase orders on your plan.

Operations: GET /client-purchase-orders, GET /client-purchase-orders/{id}, GET /client-purchase-orders/{id}/changes, POST /client-purchase-orders, PATCH /client-purchase-orders/{id}, POST /client-purchase-orders/{id}/close, DELETE /client-purchase-orders/{id}, GET /consultant-purchase-orders, GET /consultant-purchase-orders/{id}, GET /consultant-purchase-orders/{id}/changes, POST /consultant-purchase-orders, PATCH /consultant-purchase-orders/{id}, POST /consultant-purchase-orders/{id}/close, DELETE /consultant-purchase-orders/{id}, GET /events.

v1 published

Additive

The TimeSubmit API is published at /v1: clients, projects, consultants, assignments, invoices and events, with signed webhooks.