Skip to main content
Integrations & API

REST API

Written By Lauri Eurén

Last updated 1 day ago

Operating has an open REST API. The reference documentation is available here:

https://support.operating.app/help/api-reference

Generate an API key

Requests to the API need your organization's API key. To generate the key:

  1. Go to Settings → API keys.

  2. Click Generate a new API key.

  3. Copy the key and keep it somewhere safe. Operating shows the key only once, and it is not visible after you leave the page.

To generate a key, you need the Manage integrations permission. See Permission sets in Operating.

The key uses a dedicated service user account, not your own user. Your organization has one active key at a time. When you generate a new key, the current key stops working, so update every system that uses it. While a key is active, the page shows API key active with who created it and when.

The key's service user has the Admin permission set, which nobody can change. So requests with the key see all people, clients, projects, costs and revenue, as an admin does in the app.

Pagination on the report endpoints

The four report endpoints can return a lot of data in one response:

  • /v1/reports/people-actual

  • /v1/reports/people-planned

  • /v1/reports/projects-actual

  • /v1/reports/projects-planned

You can ask for the data one page at a time. Add the limit query parameter to set how many people or projects you get per page. The value must be a whole number from 1 to 200.

When you set limit, the response shape changes. Instead of a bare array of time blocks, you get an object with two keys:

  • data — the usual array of time blocks, with only that page of people or projects in each block.

  • meta.nextCursor — the cursor for the next page. Pass this value in the after query parameter to get the next page. The value is null when there are no more pages.

Pagination is optional. If you leave limit out, the endpoint returns the bare array as before.

The after parameter needs limit. If you send after on its own, the request fails with a validation error.

Site and role history, position groups, assignments and project notes

The full request and response formats for these resources are in the API reference.

  • /person-site-assignments — a person's site over time. Each assignment has a site and a from date. Together the assignments cover every date with exactly one site.

    • Create: the assignment starts on its from date (today if you leave from out). The period before it ends the day before.

    • Change from: the period before it moves with it.

    • Delete: the period next to it grows to fill the gap. A person's only assignment can't be deleted.

  • The person siteId field is deprecated. Writing it replaces the person's whole site history with one site for all dates. To change a person's site from a given date, create a person site assignment.

  • /person-company-assignments — a person's company over time. You can list assignments, filtered by personId, companyId and a date range. You can also read, create, update and delete an assignment.

  • /competence-role-assignments — a person's roles over time. Each assignment has a from and a through date. A null date means the period has no start or no end.

    • Primary role: a person has one primary role on each date. When you create a primary assignment, the current primary role ends the day before its from date. Operating sets the through date of a primary assignment from the next one.

    • Additional roles: they can have any date range.

  • /position-group-assignments — the Groups a position belongs to, separate from the Groups of its project. You can list them (filtered by positionId or groupId), create one with a positionId and a groupId, read one, and delete one.

  • POST /positions/bulk creates several positions in one request. Send { "data": [...] } with at most 1000 records. The response is { "data": [...] } with one id for each record, in the same order as the request. When a time off record merges into an existing time off position, the id of that position appears in the slot of the record that merged into it.

  • /assignments supports list, read and create. To move a person to another position, set assignedPersonId on the position.

  • POST /allocations/bulk creates several allocations in one request. Send { "data": [...] } with at most 1000 items. The response is { "data": [...] } with the ids of the new allocations in the same order as the request. Operating recalculates the financials of the affected positions before it responds. Each item has the same fields as a single allocation create:

    • Required: positionId and statusId.

    • Optional: percentage, from, through, probability, taskId, noteText and externalAllocations.

  • /project-notes — dated notes on a project. Each note has a projectId, a noteText and a noteDate (YYYY-MM-DD). You can list notes. The list can be filtered by projectId, createdSince, createdBefore, updatedSince and updatedBefore, and paged with limit and after. You can also create, read, update and delete a note. A new note needs all three fields, and noteText can't be empty.

  • /budget-progress — the progress entries of a budget. Each entry records how much of the budget is complete by a date, as an amount counted from the budget's start. On a fixed-price budget, every write recalculates the recognized revenue of the budget's project or phase.

    • Endpoints: list with GET /budget-progress, filtered by budgetId or projectId. Read, update and delete one with GET, PATCH and DELETE /budget-progress/{id}, and create one with POST /budget-progress.

    • Permissions: reading needs the Revenue visibility permission. Creating, updating and deleting need the Manage rates, budgets, planned expenses and baselines permission for the project.

    • Rules: the API applies the same rules as the app. An entry's date must fall inside the budget's dates. A reduction needs a note, and only the latest entry can be one. An entry that a milestone created changes only through its milestone. A budget whose revenue is recognized by milestones takes no entries set by hand.

  • Each budget in the budgets API also returns its progressEntries, oldest first. This list is read-only, so change an entry through /budget-progress.

Billing types, budgets and milestones

/projects and /phases show billing types. See What are the billing types? for the types.

  • Project fields: a project returns its billingType, revenueRecognitionMethod and invoicingScheduleType. The read-only mixedBilling is true when a phase is priced apart from the project with its own billing type.
  • Project filters: billingType matches the project's own billing type and ignores phases. phaseBillingType matches projects that have a phase with that billing type of its own. mixedBilling set to true or false returns the projects with or without mixed billing.
  • Phase filter: GET /phases takes billingType, which matches the phases that have that billing type of their own.

Each budget in the budgets API also has these fields:

  • phaseId: the phase the budget belongs to, or null for a project budget. You set it when you create the budget.
  • billingType: the billing type the budget is priced under. It is the phase's own billing type when phaseId is set, and the project's otherwise. Read-only.
  • capBasis and capSeconds: whether the cap is an amount or hours. With hours, capSeconds is the cap in billable seconds, for example 360000 for 100 hours.
  • overageInvoiced: on a retainer, whether billable time beyond the included hours is invoiced on top of the amount. A null value means the default, which is invoiced.
  • budgetScheduleId: the budget schedule that generated the budget. Read-only.
  • targets: the budget's targets. See How budget targets work.

/budget-schedules holds the schedules that generate one budget for each period, for the project or for a phase with its own billing type. List them with GET /budget-schedules, filtered by projectId or phaseId. You can also create, read, update and delete a schedule.

  • Retainers: on a retainer, the schedule is the retainer. Its amount is the fee for one period, capSeconds is the included hours, and each budget it generates is one retainer period.
  • Changes: an update carries onto every generated budget that is not yet invoiced. Deleting a schedule deletes the budgets it generated.

/milestones holds the milestones of a project. See Project milestones. You can list, create, read, update and delete milestones. The list can be filtered by projectId, targetDateAfter and targetDateBefore (YYYY-MM-DD).

  • Amounts: recognizeAmount is the revenue that reaching the milestone recognizes. invoiceAmount is the amount of the invoice that the milestone dates. The API applies the same rules to both amounts as the app.
  • Reached date: set reachedDate to mark the milestone as reached, or set it to null to clear it.
  • Read-only fields: budgetId is the budget whose dates cover the target date. drift compares the target date with the reached date, or with today for an open milestone that is past its target date.
  • Invoiced milestones: the dates and amounts of an invoiced milestone do not change, and you cannot delete it.

Position candidates

/position-candidacies holds the people shortlisted as candidates for an open position. A candidate is not assigned to the position.

  • List and read: list candidacies, filtered by positionId or personId, or read one. Only open candidacies are returned. Reading a candidacy that has ended returns 404.
  • Create: POST /position-candidacies with a positionId and a personId adds the person as a candidate. The API applies the same rules as the app. A refused add returns 400 with the reason.
  • Delete: DELETE /position-candidacies/{id} ends the candidacy as not chosen. If the candidacy has already ended, the request returns 400.
  • Choose a candidate: set assignedPersonId on the position with PATCH /positions/{id}.

Sales pipelines

/crm/pipelines and /crm/pipeline-stages hold your sales pipelines and the stages in each one. You can create, read, list and update both.

Records that stay where they were created

Some records stay on the record they were created for. An update that sends a different one fails with a 400 error and changes nothing. An update that sends the same one succeeds. To move such a record, delete it and create a new one.

  • On a person: person group assignments, person skill assignments and role assignments. For example, a group assignment answers A group membership cannot be moved to another person.
  • On a client or a deal: client tag assignments and deal tag assignments.
  • On a project: phases, project tag assignments and planned expenses.
  • On a pipeline: pipeline stages.
  • On an expense: receipts.

Timers

A person has at most one running timer. Three endpoints read, start and stop it. When you stop the timer, Operating saves the elapsed time as a time entry, as when a person stops the timer in Hours. See How to use the timer.

The timer must be turned on for your organization. The same task, position, site and project rules apply as when a person starts a timer in Hours.

  • Without Manage timers for everyone: you can use only your own person's timer. A request for another person fails with a 403 error.

  • With Manage timers for everyone: you can name any person. See Permission sets in Operating.

In both cases you must be allowed to see the person's time entries. To start or stop a timer, you must also be allowed to create the time entry it writes, for that person on that project.

  • GET /persons/{personId}/timer returns the person's running timer, or null in data when no timer runs. It fails with 404 when the person is not found, and with 403 when you may not see the person's time entries or the timer's project.

  • POST /persons/{personId}/start-timer starts a timer. Send projectId and date (YYYY-MM-DD). taskId, positionId, siteId and description are optional. The response has personId, projectId, taskId, positionId, siteId, description, date and startedAt. If the person already has a running timer, the request fails with A timer is already running for this person and the running timer stays.

  • POST /persons/{personId}/stop-timer stops the timer and returns the time entry it wrote. Without timeEntryId, Operating creates a new time entry. With timeEntryId, Operating adds the elapsed seconds to that entry, and seconds in the response is the entry's new total. When less than one second has passed, Operating deletes the timer, writes nothing and returns null in data.

The entry you name in timeEntryId must not be submitted, approved or invoiced, and it must match the timer's person, date, project, task and position. Otherwise the stop fails with Cannot add this timer to that Time entry and the timer keeps running. Send another timeEntryId, or leave it out to create a new entry.

Submit and unsubmit a timesheet

Two endpoints submit a person's timesheet and open it again. Each takes a date in YYYY-MM-DD format and returns the person.

  • POST /persons/{personId}/submit-timesheet submits every unsubmitted time entry of the person on or before the date. The date becomes the person's submitted-through date when it is later than the current one. An earlier date submits the entries and leaves the submitted-through date as it is. If a required note is missing, the whole request fails and submits nothing.

  • POST /persons/{personId}/unsubmit-timesheet opens the person's timesheet from the date onward. The date is the first day to open, and the submitted-through date becomes the day before it.

When you unsubmit a timesheet:

  • Uninvoiced time entries on or after the date return to not submitted.

  • Invoiced time entries stay submitted.

  • An entry approved as imported keeps that status.

The unsubmit request records no reason. For the same action in the app, see How to unlock a submitted timesheet.

Time entries on projects the person is not a member of

Some permission sets allow time entries only for projects that people are members of. With such a permission set, the API accepts a time entry only on a project where the entry's person holds a position. Projects open to everyone are always allowed.

Otherwise the request fails with a 403 error and this message: Cannot track time to project [id]: the entry's person holds no position on it. To fix it, add a position for the person on the project, or send the entry for another project.

Create a time entry

Operating checks a new time entry as it will be stored.

  • Approval status: an entry that you create with the organization's API key is stored as approved as imported, which locks it. This is because the key's Admin permission set may edit locked time entries.
  • Invoiced entries and rates: the key can create an entry that is already invoiced, or that has its own rate.
  • A task the project does not have: when the entry names a shared task that its project does not have, Operating adds the task to the project. If the project has the task archived, Operating restores it.