payroll.hours

Payroll-ready hours for one pay period (or a custom from and to): approved minutes per person by category and by day, paid minutes (everything but break), and what still waits for approval or is still running. ready is true when nothing is waiting. Owner or office. Hours only, no pay.

WhoAgents can call this
RESTGET /v1/payroll/hours
MCP toolpayroll_hours
Writesno
AreaShop

When to use it

Payroll-ready hours for one pay period (or a custom from and to): approved minutes per person by category and by day, paid minutes (everything but break), and what still waits for approval or is still running. ready is true when nothing is waiting.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
shop_idstring (uuid)yes
datestring (date)no
offsetintegerno
fromstring (date)no
tostring (date)no

Example

GET https://doingwork.work/v1/payroll/hours?shop_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
shop_idstring (uuid)yes
time_zonestringyes
frequencystringyes
period_startstring (date)yes
period_endstring (date)yes
readybooleanyes
peoplearrayyes
people[].person_idstring (uuid)yes
people[].person_name['string', 'null']yes
people[].approved_minutesintegeryes
people[].paid_minutesintegeryes
people[].paid_hoursnumberyes
people[].by_category_minutesobjectyes
people[].by_category_minutes.workintegeryes
people[].by_category_minutes.driveintegeryes
people[].by_category_minutes.shopintegeryes
people[].by_category_minutes.breakintegeryes
people[].pending_countintegeryes
people[].pending_minutesintegeryes
people[].running_countintegeryes
people[].rejected_countintegeryes
people[].daysarrayyes
people[].days[].datestring (date)yes
people[].days[].paid_minutesintegeryes
people[].days[].break_minutesintegeryes
approved_minutesintegeryes
paid_minutesintegeryes
paid_hoursnumberyes
pending_countintegeryes
running_countintegeryes
{
  "shop_id": "00000000-0000-4000-8000-000000000000",
  "time_zone": "...",
  "frequency": "...",
  "period_start": "...",
  "period_end": "...",
  "ready": true,
  "people": [
    {
      "person_id": "00000000-0000-4000-8000-000000000000",
      "person_name": "...",
      "approved_minutes": 1,
      "paid_minutes": 1,
      "paid_hours": "...",
      "by_category_minutes": {
        "work": 1,
        "drive": 1,
        "shop": 1,
        "break": 1
      },
      "pending_count": 1,
      "pending_minutes": 1,
      "running_count": 1,
      "rejected_count": 1,
      "days": [
        {
          "date": "...",
          "paid_minutes": 1,
          "break_minutes": 1
        }
      ]
    }
  ],
  "approved_minutes": 1,
  "paid_minutes": 1,
  "paid_hours": "...",
  "pending_count": 1,
  "running_count": 1
}

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.