--- title: payroll.exportCsv | Doing Work API description: Approved hours for one pay period as CSV for a payroll provider: one row per person per day with work, drive, shop, break and paid hours (2 decimals). Wait url: https://doingwork.work/docs/reference/payroll-exportcsv/ --- # payroll.exportCsv Approved hours for one pay period as CSV for a payroll provider: one row per person per day with work, drive, shop, break and paid hours (2 decimals). Waiting or running time is left out; check ready. Owner or office. | | | |---|---| | Who | Agents can call this | | REST | `GET /v1/payroll/export` | | MCP tool | `payroll_exportCsv` | | Writes | no | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it Approved hours for one pay period as CSV for a payroll provider: one row per person per day with work, drive, shop, break and paid hours (2 decimals). Waiting or running time is left out; check ready. ## What to tell the owner Tell them what you found in plain words. Don't read back raw fields. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `date` | string (date) | no | | `offset` | integer | no | | `from` | string (date) | no | | `to` | string (date) | no | ## Example ```http GET https://doingwork.work/v1/payroll/export?shop_id=00000000-0000-4000-8000-000000000000 ``` ## Output | Field | Type | Always there | |---|---|---| | `filename` | string | yes | | `content_type` | string | yes | | `csv` | string | yes | | `rows` | integer | yes | | `ready` | boolean | yes | | `pending_count` | integer | yes | | `running_count` | integer | yes | | `period_start` | string (date) | yes | | `period_end` | string (date) | yes | ```json { "filename": "...", "content_type": "...", "csv": "...", "rows": 1, "ready": true, "pending_count": 1, "running_count": 1, "period_start": "...", "period_end": "..." } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |