Preview bulk draft bills
Preview bulk draft bills. Changes nothing (read scope is enough; use a fresh Idempotency-Key per preview). Up to 20 payees, one group per payee and currency; never nonbillable time. Owner/Admin only (Managers and Members receive 403 before any record lookup); Agency plan (`teamPayouts`, 402 with requiredPlan agency otherwise). Requires the `read` scope. Requires an Idempotency-Key. Money values are exact decimal strings; dates are ISO calendar dates.
Authorization
BearerAuth Personal Access Token. Mint at Settings → API. Token shape: hsk_<env>_<prefix12>_<secret32>.
In: header
Header Parameters
Caller-generated UUID/ULID. Same key + same body replays the original response; the key also derives the durable operation identity, so a retried payment, reversal or draft is never applied twice.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/team-payouts/bills/bulk-preview" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "payeeIds": [ "a07128d7-d7de-467e-b0c8-9030bf411b63" ], "serviceFrom": "2019-08-24", "serviceTo": "2019-08-24" }'{ "data": { "serviceFrom": "2019-08-24", "serviceTo": "2019-08-24", "reviewToken": "stringstringstringstringstringstringstringstringstringstringstri", "readyToDraft": true, "groupCount": 0, "groups": [ { "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed", "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "name": "string", "currency": "string", "total": "string", "totalSeconds": 0, "totalHours": "string", "timeEntryCount": 0, "fixedObligationCount": 0 } ], "totalsByCurrency": [ { "currency": "string", "total": "string", "groupCount": 0 } ], "omissions": [ { "payeeId": "79417842-2e1e-4110-a361-89b9f39b36ed", "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "name": "string", "reason": "missing_rate", "timeEntryCount": 0, "durationSeconds": 0 } ], "draftInput": { "payeeIds": [ "a07128d7-d7de-467e-b0c8-9030bf411b63" ], "serviceFrom": "2019-08-24", "serviceTo": "2019-08-24", "reviewToken": "stringstringstringstringstringstringstringstringstringstringstri" } }, "warnings": [ "string" ]}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}{ "error": { "code": "unauthenticated", "message": "string", "fields": { "property1": "string", "property2": "string" }, "requiredPlan": "studio", "feature": "string", "requestId": "string" }}Approve a bill and record its payment
One transaction: approve (if still a draft) and record a transfer that ALREADY HAPPENED outside Hoursmith. No money moves. The Idempotency-Key derives the durable operation identity, so a retry never records twice. Owner/Admin only (Managers and Members receive 403 before any record lookup); Agency plan (`teamPayouts`, 402 with requiredPlan agency otherwise). Requires the `write` scope. Requires an Idempotency-Key. Money values are exact decimal strings; dates are ISO calendar dates.
Create bulk draft bills
Creates the previewed drafts (reviewToken required). Never approves, reserves time or pays; each draft needs its own approval. Owner/Admin only (Managers and Members receive 403 before any record lookup); Agency plan (`teamPayouts`, 402 with requiredPlan agency otherwise). Requires the `write` scope. Requires an Idempotency-Key. Money values are exact decimal strings; dates are ISO calendar dates.