> ## Documentation Index
> Fetch the complete documentation index at: https://hilo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Productivity

> Set up productivity reports and send them your numbers.

> [!NOTE]
>
> Paths are relative to `https://www.hiloscheduling.com/api/partner/v1`. "Needs" is the scope your key needs; Hilo must also have turned on the matching permission for your partner account. `{id}` is the business's Hilo id.

## GET /organizations/\{id}/productivity

The reports you send numbers to, with their formula and when they last got numbers. Needs `productivity:write`.

## PUT /organizations/\{id}/productivity/\{key}

Create or change a report. `key` is your short name for it, like `sales` (lowercase letters, numbers, dashes or underscores). Needs `productivity:write`.

| Field | |
| - | - |
| `name` | What it's called in Hilo |
| `formula` | For example `{sales.this_hour} / clocked_in`. Your numbers go in braces with dots for nesting. Use `+ - * /`, parentheses, and `sum`, `avg`, `count`, `min`, `max`, `round` or `abs` (for a list, `sum({orders[*].total})`). Hilo's own numbers: `clocked_in`, `scheduled_now`, `hours_today`, `on_break`. |
| `mode` | `number` (show the result), `percent` (the result is already a percentage) or `goal` (show the result as a percentage of `goal`) |
| `goal`, `unit` | For `goal` mode, and a label like `$` |
| `locationId` | Count only people at this location in Hilo's numbers |
| `performedBy` | Who set it up |

## POST /organizations/\{id}/productivity/\{key}/readings

Send the latest numbers: `data` (your JSON, up to 100 KB) and `performedBy`. The answer is the result: `value`, `percent`, `clockedIn`, or `error` if the formula couldn't use what you sent (for example, a missing number). Needs `productivity:write`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.