# Moving from Harvest

Switch a Harvest integration to the time tracker by changing its base URL, token and account id, then check what works differently.

HTML version: https://t.momentic.studio/docs/api/moving-from-harvest

## Point your integration here

- Change the base URL from https://api.harvestapp.com/v2 to https://t.momentic.studio/api/v2. Paths, methods, parameters and objects stay the same.
- Create a token in **Settings**, **API tokens**, with the scopes the integration needs. It replaces the Harvest personal access token.
- Use the account id shown on that page as the Harvest-Account-Id.
- Keep sending a User-Agent.

Records you imported from Harvest keep their Harvest ids where the import stored them, so ids an integration saved still work. Records created here get new ids above the highest one of their kind.

## What differs

- A token acts as the person who created it. Create the token as a person whose access matches what the integration needs.
- Cost rates and figures from cost are not returned. cost_rate is null and cost rate lists are empty.
- A token in the access_token query parameter is refused unless an owner or admin turns on **Accept API tokens in the URL (for older Harvest integrations)**, and then it works for GET requests only.
- A running timer is a time entry with is_running true. Restart starts a new timer with the entry's project, task and notes, with its own id; stopping it writes a new entry with that id.
- Entries in a closed month are locked: is_locked is true and changes are refused with 422 for each role.
- Nothing is invoiced or approved here, so is_billed is false, invoice is null and approval_status is unsubmitted.
- Hours are not rounded. rounded_hours is the same as hours.
- Teams are listed as roles. Retainers are projects with a monthly budget in hours.
- Money is in US dollars.
- A person's timezone is the Rails time zone name Harvest uses, such as Central Time (US & Canada). A zone Rails has no name for is written as its IANA name.
- A path with a trailing slash is redirected (308) to the path without it; Harvest answers it directly. Clients follow the redirect.
- A contact has one name and one phone number, and needs an email address: the app sends invoices to contacts by email.
- A person can be deleted only while they have no time entries, as in Harvest. Anyone else is archived with is_active false.
- Fields Harvest has and the time tracker has no data for hold their empty value: null, false, 0 or an empty list, as the field table of each object shows.

## What is not supported

These API endpoints do not have invoices, estimates, expenses, expense categories or teammates yet. Their lists return no records, a single record returns 404, and a write returns 422. Deleting clients, projects and tasks is refused with 422: archive them with is_active false. [Invoices, estimates and expenses](https://t.momentic.studio/docs/api/not-available.md) lists these endpoints.

docs/api/COMPATIBILITY.md in the source repository lists each Harvest endpoint with its support level.

## Endpoints that differ from Harvest

These endpoints work, with the differences below. Each endpoint's page repeats its difference.

| Endpoint                                                                     | What differs                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /api/v2/company`                                                        | Fields the time tracker has no data for hold their empty value; see the field table.                                                                                                                                                                                                                                                                                                  |
| `GET /api/v2/users`                                                          | Owners, admins and managers may list people; a member is refused (403), as in Harvest. Emails of other people need an owner or admin token with people:read. first_name is the first word of the name and last_name the rest.                                                                                                                                                         |
| `GET /api/v2/users/me`                                                       | The same fields as a user. The email is the person's own.                                                                                                                                                                                                                                                                                                                             |
| `POST /api/v2/users`                                                         | Adds the person with the role from access_roles (administrator becomes admin, manager, member) and sends the app's invitation. Only an owner can add an owner. default_hourly_rate and cost_rate are not taken: set rates with the billable rates endpoint. timezone, is_contractor and has_access_to_all_future_projects are ignored.                                                |
| `PATCH /api/v2/users/{user_id}`                                              | Changes the name, weekly capacity, role (access_roles) and is_active (false archives, true restores). Email, timezone and the other fields are ignored.                                                                                                                                                                                                                               |
| `PATCH /api/v2/users/me`                                                     | The update of /v2/users/{user_id} for the token's own person, with the same fields and rules. An owner or admin edits people, themselves included; other roles cannot hold people:write, so their tokens are refused (403). PUT is accepted too, as in Harvest.                                                                                                                       |
| `DELETE /api/v2/users/{user_id}`                                             | As in Harvest, only a person with no time entries can be deleted; anyone else is refused (422): archive them with is_active false. Needs an owner or admin token; the app's rules on owners and the last owner apply.                                                                                                                                                                 |
| `GET /api/v2/users/{user_id}/project_assignments`                            | A member reads only their own.                                                                                                                                                                                                                                                                                                                                                        |
| `GET /api/v2/users/me/project_assignments`                                   | Projects open to everyone are listed only where the person is assigned.                                                                                                                                                                                                                                                                                                               |
| `GET /api/v2/users/{user_id}/billable_rates`                                 | Needs rates:read, and an owner, admin or manager token, as in the app.                                                                                                                                                                                                                                                                                                                |
| `POST /api/v2/users/{user_id}/billable_rates`                                | start_date is required here: the app keeps rate history from a date and does not replace it.                                                                                                                                                                                                                                                                                          |
| `GET /api/v2/clients`                                                        | Owners, admins and managers; a member is refused (403). address is null and currency is USD.                                                                                                                                                                                                                                                                                          |
| `POST /api/v2/clients`                                                       | address and currency are ignored.                                                                                                                                                                                                                                                                                                                                                     |
| `PATCH /api/v2/clients/{client_id}`                                          | Changes name and is_active. address and currency are ignored.                                                                                                                                                                                                                                                                                                                         |
| `GET /api/v2/contacts`                                                       | Owners, admins and managers; a member is refused (403). A contact has one name and one phone number: first_name is the first word of the name, the phone is phone_office, and phone_mobile and fax are empty. invoice_recipient_status is none: invoice recipients are chosen per client in the app.                                                                                  |
| `POST /api/v2/contacts`                                                      | email is required here: the app sends invoices to contacts by email. phone_office, or else phone_mobile, is kept as the one phone number; fax is ignored. A client has one contact per email address.                                                                                                                                                                                 |
| `PATCH /api/v2/contacts/{contact_id}`                                        | Changes first_name, last_name, title, email and the phone number. client_id and fax are ignored: a contact stays with its client.                                                                                                                                                                                                                                                     |
| `GET /api/v2/projects`                                                       | Owners and admins list the whole workspace's projects; a manager the projects they are on; a member is refused (403), as in Harvest. A retainer is a project with budget_is_monthly true and its monthly hours as budget. code, notes and tags are empty; cost_budget is null.                                                                                                        |
| `POST /api/v2/projects`                                                      | is_fixed_fee true makes a fixed fee project; is_billable false an internal project; otherwise an hourly project. Retainers are created in the app, since they need monthly terms. budget is taken in hours (budget_by project); fee for a fixed fee project. hourly_rate, bill_by, budget_by values other than project and none, code, notes and the notification fields are ignored. |
| `PATCH /api/v2/projects/{project_id}`                                        | Changes client_id, name, budget (hours), fee, starts_on, ends_on and is_active. Other fields are ignored. Changing the type is done in the app.                                                                                                                                                                                                                                       |
| `GET /api/v2/user_assignments`                                               | budget is null. A member is refused (403).                                                                                                                                                                                                                                                                                                                                            |
| `POST /api/v2/projects/{project_id}/user_assignments`                        | is_project_manager needs an owner or admin token, as in the app. hourly_rate is the person's rate on the project when use_default_rates is false. budget is ignored.                                                                                                                                                                                                                  |
| `PATCH /api/v2/projects/{project_id}/user_assignments/{user_assignment_id}`  | is_active and budget are ignored: remove the assignment to take the person off the project.                                                                                                                                                                                                                                                                                           |
| `DELETE /api/v2/projects/{project_id}/user_assignments/{user_assignment_id}` | Allowed when the person has time on the project; their entries stay. A person on the project through a team stays on it.                                                                                                                                                                                                                                                              |
| `GET /api/v2/task_assignments`                                               | budget and hourly_rate are null: a task rate applies to projects billed by task, which the time tracker does not have. A member is refused (403).                                                                                                                                                                                                                                     |
| `POST /api/v2/projects/{project_id}/task_assignments`                        | hourly_rate and budget are ignored: rates are set on people and projects.                                                                                                                                                                                                                                                                                                             |
| `PATCH /api/v2/projects/{project_id}/task_assignments/{task_assignment_id}`  | Changes billable. is_active, hourly_rate and budget are ignored.                                                                                                                                                                                                                                                                                                                      |
| `DELETE /api/v2/projects/{project_id}/task_assignments/{task_assignment_id}` | Refused (422) while the project has entries on the task, as in Harvest.                                                                                                                                                                                                                                                                                                               |
| `GET /api/v2/tasks`                                                          | default_hourly_rate is 0. A member is refused (403).                                                                                                                                                                                                                                                                                                                                  |
| `POST /api/v2/tasks`                                                         | default_hourly_rate is ignored.                                                                                                                                                                                                                                                                                                                                                       |
| `GET /api/v2/roles`                                                          | Roles are the app's teams. A member is refused (403).                                                                                                                                                                                                                                                                                                                                 |
| `POST /api/v2/roles`                                                         | Creates a team. A team gives its people access to the team's projects.                                                                                                                                                                                                                                                                                                                |
| `DELETE /api/v2/roles/{role_id}`                                             | Archives the team, which removes the access it gave. The team's history stays.                                                                                                                                                                                                                                                                                                        |
| `GET /api/v2/time_entries`                                                   | A member reads their own entries, a manager also the entries on projects they manage, an owner or admin the whole workspace's entries. A running timer is listed as an entry with is_running true. is_billed, invoice and approval_status hold their empty values: nothing is invoiced or approved here. is_locked is true in a closed month.                                         |
| `POST /api/v2/time_entries`                                                  | Both forms are accepted: hours (duration), or started_time and ended_time. Without hours and without ended_time, a timer starts, for the token's own person only. An entry is at most 24 hours and at least one minute. Closed months, archived projects, the project's task list and the workspace's notes rule apply as in the app.                                                 |
| `PATCH /api/v2/time_entries/{time_entry_id}`                                 | A running timer takes project_id, task_id, notes and external_reference; stop it to change its time.                                                                                                                                                                                                                                                                                  |
| `DELETE /api/v2/time_entries/{time_entry_id}/external_reference`             | Removes the Asana task from the entry.                                                                                                                                                                                                                                                                                                                                                |
| `DELETE /api/v2/time_entries/{time_entry_id}`                                | Refused in a closed month for each role. Deleting a running timer discards it.                                                                                                                                                                                                                                                                                                        |
| `PATCH /api/v2/time_entries/{time_entry_id}/restart`                         | Starts a new timer with the entry's project, task, note and Asana task, for the token's own person. The stopped entry stays as it is; the response is the running timer, with its own id, and stopping it writes a new entry.                                                                                                                                                         |
| `GET /api/v2/reports/time/clients`                                           | include_fixed_fee is accepted and has no effect. Amounts need rates:read and an owner, admin or managing manager.                                                                                                                                                                                                                                                                     |
| `GET /api/v2/reports/time/projects`                                          | scheduled_hours is not included: the time tracker has no forecast schedule.                                                                                                                                                                                                                                                                                                           |
| `GET /api/v2/reports/uninvoiced`                                             | The time entries this API reports are not invoiced, so uninvoiced hours are the billable hours, the amount is the billable amount and invoiced_amount is 0. uninvoiced_expenses is 0.                                                                                                                                                                                                 |
| `GET /api/v2/reports/project_budget`                                         | Budgets are in hours. A retainer's budget is its monthly hours and its spent hours are this month's.                                                                                                                                                                                                                                                                                  |
