Skip to main content

Weekly reports

POST Search time entries

https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries

Returns time entries for weekly report according to the given filters.

curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries \
-H "Content-Type: application/json" \
-d '\{"billable":"boolean","client_ids":[\{\}],"description":"string","end_date":"string","group_ids":[\{\}],"max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueWorkspace ID

Body

NameTypeDescription
billablebooleanWhether the time entry is set as billable, optional, premium feature.
client_idsArray of integerClient IDs, optional, filtering attribute. To filter records with no clients, use [null].
descriptionstringDescription, optional, filtering attribute.
end_datestringEnd date, example time.DateOnly. Should be greater than Start date.
group_idsArray of integerGroup IDs, optional, filtering attribute.
max_duration_secondsintegerMax duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds.
min_duration_secondsintegerMin duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds.
project_idsArray of integerProject IDs, optional, filtering attribute. To filter records with no projects, use [null].
roundingintegerWhether time should be rounded, optional, default from user preferences.
rounding_minutesintegerRounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240.
startTimestring-
start_datestringStart date, example time.DateOnly. Should be less than End date.
tag_idsArray of integerTag IDs, optional, filtering attribute. To filter records with no tags, use [null].
task_idsArray of integerTask IDs, optional, filtering attribute. To filter records with no tasks, use [null].
time_entry_idsArray of integerTimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2.
user_idsArray of integerUser IDs, optional, filtering attribute.

Response

200

Returns the weekly report time entries

400

Possible error messages:

  • At least one parameter must be set
  • Invalid workspace id
  • The '{parameter}' parameter is not supported
  • Invalid '{parameter}' value, allowed values are: '{valid_values}'

402

Workspace needs to have this feature enabled

403

Workspace not found/accessible

500

Internal Server Error

POST Export weekly report

https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries.csv

Downloads weekly report in csv format.

curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries.csv \
-H "Content-Type: application/json" \
-d '\{"billable":"boolean","calculate":"string","client_ids":[\{\}],"description":"string","end_date":"string","group_by_task":"boolean","group_ids":[\{\}],"grouping":"string","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueWorkspace ID

Body

NameTypeDescription
billablebooleanWhether the time entry is set as billable, optional, premium feature.
calculatestringCalculate option, optional. Can be by time or amounts.
client_idsArray of integerClient IDs, optional, filtering attribute. To filter records with no clients, use [null].
descriptionstringDescription, optional, filtering attribute.
end_datestringEnd date, example time.DateOnly. Should be greater than Start date.
group_by_taskbooleanGroupByTask tells the weekly report to return the data grouped by all the usual groups plus planned task.
group_idsArray of integerGroup IDs, optional, filtering attribute.
groupingstringGrouping option, optional.
max_duration_secondsintegerMax duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds.
min_duration_secondsintegerMin duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds.
project_idsArray of integerProject IDs, optional, filtering attribute. To filter records with no projects, use [null].
roundingintegerWhether time should be rounded, optional, default from user preferences.
rounding_minutesintegerRounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240.
startTimestring-
start_datestringStart date, example time.DateOnly. Should be less than End date.
tag_idsArray of integerTag IDs, optional, filtering attribute. To filter records with no tags, use [null].
task_idsArray of integerTask IDs, optional, filtering attribute. To filter records with no tasks, use [null].
time_entry_idsArray of integerTimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2.
user_idsArray of integerUser IDs, optional, filtering attribute.

Response

200

Returns the weekly report in csv format

400

Possible error messages:

  • At least one parameter must be set
  • Invalid workspace id
  • The '{parameter}' parameter is not supported
  • Invalid '{parameter}' value, allowed values are: '{valid_values}'

402

Workspace needs to have this feature enabled

403

Workspace not found/accessible

500

Internal Server Error

POST Export weekly report

https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries.pdf

Downloads weekly report in pdf format.

curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/weekly/time_entries.pdf \
-H "Content-Type: application/json" \
-d '\{"billable":"boolean","calculate":"string","cents_separator":"string","client_ids":[\{\}],"date_format":"string","description":"string","duration_format":"string","end_date":"string","group_by_task":"boolean","group_ids":[\{\}],"grouping":"string","logo_url":"string","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueWorkspace ID

Body

NameTypeDescription
billablebooleanWhether the time entry is set as billable, optional, premium feature.
calculatestringCalculate option, optional. Can be by time or amounts.
cents_separatorstring-
client_idsArray of integerClient IDs, optional, filtering attribute. To filter records with no clients, use [null].
date_formatstringDate format, optional, default "MM/DD/YYYY". Can be "MM/DD/YYYY", "DD-MM-YYYY", "MM-DD-YYYY", "YYYY-MM-DD", "DD/MM/YYYY" or "DD.MM.YYYY".
descriptionstringDescription, optional, filtering attribute.
duration_formatstringDuration format, optional, default "classic". Can be "classic", "decimal" or "improved".
end_datestringEnd date, example time.DateOnly. Should be greater than Start date.
group_by_taskbooleanGroupByTask tells the weekly report to return the data grouped by all the usual groups plus planned task.
group_idsArray of integerGroup IDs, optional, filtering attribute.
groupingstringGrouping option, optional.
logo_urlstring-
max_duration_secondsintegerMax duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds.
min_duration_secondsintegerMin duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds.
project_idsArray of integerProject IDs, optional, filtering attribute. To filter records with no projects, use [null].
roundingintegerWhether time should be rounded, optional, default from user preferences.
rounding_minutesintegerRounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240.
startTimestring-
start_datestringStart date, example time.DateOnly. Should be less than End date.
tag_idsArray of integerTag IDs, optional, filtering attribute. To filter records with no tags, use [null].
task_idsArray of integerTask IDs, optional, filtering attribute. To filter records with no tasks, use [null].
time_entry_idsArray of integerTimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2.
user_idsArray of integerUser IDs, optional, filtering attribute.

Response

200

Returns the weekly report in pdf format

400

Possible error messages:

  • At least one parameter must be set
  • Invalid workspace id
  • The '{parameter}' parameter is not supported
  • Invalid '{parameter}' value, allowed values are: '{valid_values}'

402

Workspace needs to have this feature enabled

403

Workspace not found/accessible

500

Internal Server Error

© 2024 Toggl. All rights reserved.