List timesheets
Returns timesheets, the newest period first: one per person and period, with where each stands (open,
to_confirm, to_approve, approved), its totals and its approval. An approved timesheet is locked: its days
and totals don't change until someone reopens it. A private type of leave (sick and maternity by default) is
counted as away.
Scope: attendance:read · Plan: Pro and Enterprise in live mode; every plan in test mode.
AuthorizationBearer <token>Send Authorization: Bearer <token> on every request. The token is one of:
| Prefix | What it is | Where it may be used |
|---|---|---|
agoo_sk_live_ | Secret key, live mode | Your servers only |
agoo_sk_test_ | Secret key, test mode | Your servers only |
agoo_pk_live_ | Publishable key, live mode | Browsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people. |
agoo_pk_test_ | Publishable key, test mode | As above, in test mode |
Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.
Scope: attendance:read
limit?integerHow many items to return, from 1 to 100.
1 <= value <= 10025cursor?stringThe next_cursor from the previous page. Leave it out for the first page.
length <= 512period_id?stringOnly this period's timesheets.
^tsp_[0-7][0-9a-hjkmnp-tv-z]{25}$"tsp_01m5a2b3c4d5e6f7g8h9jkmnpr"person_id?stringOnly this person's timesheets.
^person_[0-7][0-9a-hjkmnp-tv-z]{25}$"person_01kjsesxm0e4zbyvkr7bcfxbfg"status?stringOnly timesheets in this state.
"open""to_confirm""to_approve""approved"A page of timesheets.
application/json- response
data*array<>next_cursor*|Pass this as cursor to get the next page. null on the last page.
"b3BhcXVlLWN1cnNvcg"has_more*booleancurl -X GET 'https://api.agoo.ardent.africa/v1/timesheets?limit=25'{ "data": [ { "id": "ts_01m5a2b3c4d5e6f7g8h9jkmnpq", "person_id": "person_01kjsesxm0e4zbyvkr7bcfxbfg", "period": { "id": "tsp_01m5a2b3c4d5e6f7g8h9jkmnpr", "starts_on": "2019-08-24", "ends_on": "2019-08-24", "payroll_on": "2019-08-24" }, "status": "open", "round": 0, "confirmed_at": "2019-08-24T14:15:22Z", "submitted_at": "2019-08-24T14:15:22Z", "approved_at": "2019-08-24T14:15:22Z", "approved_by": "string", "approved_via": "person", "locked": true, "reopened_at": "2019-08-24T14:15:22Z", "reopen_reason": "string", "changed_after_lock": true, "totals": { "worked_seconds": 0, "counted_seconds": 0, "regular_seconds": 0, "overtime_daily_seconds": 0, "overtime_weekly_seconds": 0, "rest_day_seconds": 0, "holiday_seconds": 0, "night_seconds": 0, "extra_pending_seconds": 0, "extra_approved_seconds": 0, "extra_declined_seconds": 0, "paid_break_minutes": 0, "unpaid_break_minutes": 0, "nursing_break_minutes": 0, "days_worked": 0, "holidays": 0, "absences": 0, "authorised_paid": 0, "authorised_unpaid": 0, "late_count": 0, "late_minutes": 0, "early_leave_count": 0, "early_leave_minutes": 0, "leave": [ { "type_id": "string", "name": "Annual leave", "kind": "annual", "paid": true, "days": 0 } ] }, "approval": { "status": "pending", "step": 0, "of": 0 }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "b3BhcXVlLWN1cnNvcg", "has_more": true}Get a timesheet period GET
Returns one timesheet period. **Scope:** `attendance:read` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.
Get a timesheet GET
Returns one timesheet with each day of its period as Agoo worked it out: worked and counted time, regular time, overtime, rest-day and holiday work, extra time and its decision, breaks, lateness, leave and absences. **Scope:** `attendance:read` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.