# Company

Read your workspace's name, week start day and time format. The company is the workspace the token belongs to.

HTML version: https://t.momentic.studio/docs/api/company

## Endpoints

- `GET /api/v2/company`: [Retrieve the company](https://t.momentic.studio/docs/api/company#get-company)
- `PATCH /api/v2/company`: [Update the company](https://t.momentic.studio/docs/api/company#patch-company)
- `GET /api/v2/company/reimbursement_settings`: [Retrieve reimbursement settings](https://t.momentic.studio/docs/api/company#get-company-reimbursement-settings)
- `PATCH /api/v2/company/reimbursement_settings`: [Update reimbursement settings](https://t.momentic.studio/docs/api/company#patch-company-reimbursement-settings)
- `POST /api/v2/company/e_invoicing`: [Enroll in e-invoicing](https://t.momentic.studio/docs/api/company#post-company-e-invoicing)
- `DELETE /api/v2/company/e_invoicing`: [Leave e-invoicing](https://t.momentic.studio/docs/api/company#delete-company-e-invoicing)

## Retrieve the company

`GET /api/v2/company`

Supported with differences. Scope: `reports:read`.

Fields the time tracker has no data for hold their empty value; see the field table.

Returns 200 with a company object.

Example request:

```bash
curl "https://t.momentic.studio/api/v2/company" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

Example response, status 200:

```json
{
  "base_uri": "https://tracker.example.com",
  "full_domain": "tracker.example.com",
  "name": "Example Agency",
  "is_active": true,
  "week_start_day": "Monday",
  "wants_timestamp_timers": false,
  "time_format": "decimal",
  "date_format": "%Y-%m-%d",
  "plan_type": "",
  "clock": "12h",
  "currency_code_display": "iso_code_none",
  "currency_symbol_display": "symbol_before",
  "decimal_symbol": ".",
  "thousands_separator": ",",
  "color_scheme": "",
  "weekly_capacity": 144000,
  "expense_feature": false,
  "invoice_feature": false,
  "estimate_feature": false,
  "approval_feature": false,
  "team_feature": true,
  "currency": "USD",
  "day_entry_notes_required": null,
  "e_invoicing_status": null,
  "saml_sign_in_required": false
}
```

## Update the company

`PATCH /api/v2/company`

Not supported. Scope: `time:write`.

Timer mode and weekly capacity are not workspace settings here. Change workspace settings in the app.

Returns 200 with no body.

Example request:

```bash
curl -X PATCH "https://t.momentic.studio/api/v2/company" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

## Retrieve reimbursement settings

`GET /api/v2/company/reimbursement_settings`

Not supported. Scope: `reports:read`.

The time tracker has no expenses. Lists are empty, a single record is not found (404), and a write is refused (422).

Returns 200 with no body.

Example request:

```bash
curl "https://t.momentic.studio/api/v2/company/reimbursement_settings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

## Update reimbursement settings

`PATCH /api/v2/company/reimbursement_settings`

Not supported. Scope: `time:write`.

The time tracker has no expenses. Lists are empty, a single record is not found (404), and a write is refused (422).

Returns 200 with no body.

Example request:

```bash
curl -X PATCH "https://t.momentic.studio/api/v2/company/reimbursement_settings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

## Enroll in e-invoicing

`POST /api/v2/company/e_invoicing`

Not supported. Scope: `time:write`.

The time tracker has no invoices. Lists are empty, a single record is not found (404), and a write is refused (422).

Returns 200 with no body.

Example request:

```bash
curl -X POST "https://t.momentic.studio/api/v2/company/e_invoicing" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

## Leave e-invoicing

`DELETE /api/v2/company/e_invoicing`

Not supported. Scope: `time:write`.

The time tracker has no invoices. Lists are empty, a single record is not found (404), and a write is refused (422).

Returns 200 with no body.

Example request:

```bash
curl -X DELETE "https://t.momentic.studio/api/v2/company/e_invoicing" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (admin@example.com)"
```

## The company object

| Field                      | Type             | Description                                                                                                                   |
| -------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `base_uri`                 | string           | The address of the time tracker.                                                                                              |
| `full_domain`              | string           | The host name of the time tracker.                                                                                            |
| `name`                     | string           | The workspace name.                                                                                                           |
| `is_active`                | boolean          | True while the workspace is not scheduled for deletion.                                                                       |
| `week_start_day`           | string           | Sunday or Monday, from the workspace settings.                                                                                |
| `wants_timestamp_timers`   | boolean          | False: entries are tracked by duration, with optional start and end times. Both create forms are accepted whatever this says. |
| `time_format`              | string           | decimal.                                                                                                                      |
| `date_format`              | string           | %Y-%m-%d.                                                                                                                     |
| `plan_type`                | string           | An empty string. The time tracker has no such data, so this is the empty value.                                               |
| `clock`                    | string           | 12h. Started and ended times are written like 9:30am.                                                                         |
| `currency_code_display`    | string           | iso_code_none.                                                                                                                |
| `currency_symbol_display`  | string           | symbol_before.                                                                                                                |
| `decimal_symbol`           | string           | A period.                                                                                                                     |
| `thousands_separator`      | string           | A comma.                                                                                                                      |
| `color_scheme`             | string           | An empty string. The time tracker has no such data, so this is the empty value.                                               |
| `weekly_capacity`          | integer          | 144000 (40 hours), the capacity a new person gets. Capacity is set per person; see weekly_capacity on users.                  |
| `expense_feature`          | boolean          | False: the time tracker has no expenses.                                                                                      |
| `invoice_feature`          | boolean          | False: the time tracker has no invoices.                                                                                      |
| `estimate_feature`         | boolean          | False: the time tracker has no estimates.                                                                                     |
| `approval_feature`         | boolean          | False: the time tracker has no timesheet approval. Closed months lock entries instead.                                        |
| `team_feature`             | boolean          | True: teams are listed as roles.                                                                                              |
| `currency`                 | string           | USD.                                                                                                                          |
| `day_entry_notes_required` | datetime or null | Null. Harvest gives the time notes became required. The workspace's notes rule is in the app and has no such time.            |
| `e_invoicing_status`       | string or null   | Null. The time tracker has no such data, so this is the empty value.                                                          |
| `saml_sign_in_required`    | boolean          | False. The time tracker has no such data, so this is the empty value.                                                         |
