給与計算をまとめて — 事業所全員分と合計
calculate_payroll_batchRuns calculate_payslip for many employees in one call and returns the run totals: gross, employee deductions, net, and employer cost.
Reach for this the moment more than two or three people are in play. A monthly payroll is not a sequence of unrelated questions — the employer share, the totals and the run id only mean anything across the whole run. Asking one employee at a time gives no total and no way to tell a retry from a second run.
Put anything shared in defaults (prefecture, business_type, column) and let each row carry only what differs, which is usually pay and age. A row that cannot be computed comes back in errors with its index and id while the rest of the run completes — do not discard a whole payroll over one bad row.
The reply carries a run_id derived from the route and the exact input, so sending the same payroll twice gives the same id. Nothing is stored, so a retry cannot double-count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compact | No | Drop the per-employee breakdown and keep the payout figures — about a tenth the size on a large run. Use it when the question is "what do we pay", not "why". | |
| defaults | No | Applied to any row that leaves the field out. | |
| employees | Yes | One entry per employee. Up to 500 on a paid plan, 10 on the free tier. |