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

# Conventions

> The rules every endpoint and object follows.

## Requests

* **JSON in, JSON out.** Send request bodies as JSON with `Content-Type: application/json`.
* **Flat resources.** Every resource is a top-level path, such as `/employees`. The employer is a
  parameter, not part of the path.
* **`POST` creates and updates.** `POST /employees` creates one and `POST /employees/{id}` updates
  it. An update changes the fields you send and leaves the rest alone.
* **snake\_case** for every path, parameter, field and enum value.

## Objects

Every object has these fields:

| Field | Meaning |
| - | - |
| `id` | A unique ID with a prefix that tells you the type |
| `object` | The type, such as `employee` |
| `livemode` | `true` in live, `false` in the sandbox |
| `created` | When it was created |

A field with no value is returned as `null`, not left out.

### ID prefixes

| Prefix | Object | Prefix | Object |
| - | - | - | - |
| `empr_` | Employer | `reimb_` | Reimbursement |
| `ps_` | Pay schedule | `ec_` | Employer contribution |
| `emp_` | Employee | `pay_` | Payroll |
| `ben_` | Benefit | `pull_` | Pull |
| `elec_` | Election | `evt_` | Event |
| `ded_` | Deduction | `we_` | Webhook endpoint |

Treat IDs as opaque strings of up to 64 characters.

### External IDs

Employers, pay schedules, employees and payrolls take an `external_id`: your own identifier for
the same thing. Hammock enforces uniqueness (across your employers for an employer, and within
one employer for the rest) and lets you look objects up by it. A duplicate returns
`external_id_taken`.

## Data formats

| Kind | Format | Example |
| - | - | - |
| Money | Integer cents, with a `currency` of `usd` | `15000` is \$150.00 |
| Timestamps | ISO 8601 in UTC | `2027-03-17T19:30:00Z` |
| Dates | `YYYY-MM-DD`, with no time zone | `2027-03-19` |
| Months | `YYYY-MM` | `2027-04` |
| States and countries | Two-letter codes | `CA`, `US` |

Pay dates, lock dates and other calendar dates are plain dates. Business-day arithmetic uses US
bank holidays.

## Metadata

Employers, employees and payrolls accept `metadata`: up to 50 key-value pairs for your own use.
Keys are up to 40 characters and values up to 500, and both are strings. Hammock stores metadata
and returns it, and never acts on it. Don't put sensitive data in it.

To remove a key, send it with an empty string.

## Request IDs

Every response has a `Request-Id` header, and every error repeats it as `request_id`. Log it, and
include it when you contact Hammock about a request.

## Rate limits

Each API key can make 25 requests per second. Beyond that, requests return `429` with the code
`rate_limit` and a `Retry-After` header giving the seconds to wait. Retry with exponential
backoff. The sandbox has the same limit.


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