"Approvals" Endpoints - GET Get timesheet setups

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/timesheet_setups

Get timesheet setups for a given workspace.

  • cURL
  • Go
  • Ruby
  • JavaScript
  • Python
  • Rust
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> {  let client = Client::new().basic_auth("<email>", "<password>");  let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/timesheet_setups".to_string())  .header(CONTENT_TYPE, "application/json")  .send()  .await?  .json()  .await?;    println!("{:#?}", json);  Ok(())}

Parameters

Path

name type required description
workspace_id integer true Numeric ID of the workspace

Query

name type required description
member_ids integer false Numeric ID of the members, comma-separated
approver_ids integer false Numeric ID of the approvers, comma-separated
sort_field string false Field used for sorting, default start_date.
sort_order string false Sort order.

Response

200

Name Type Description
data Array of object -
data
Name Type Description
approver_id integer -
approver_name string -
approvers Array of object -
end_date string -
errors Array of object -
id integer -
member_id integer -
member_name string -
periodicity string -
permissions string -
reminder_day string -
reminder_time string -
start_date string -
workspace_id integer -
approvers
Name Type Description
name string -
user_id integer -
errors
Name Type Description
code string -
message string -

400

Possible error messages:

  • Workspace not found
  • Invalid user ID
  • User not in workspace

402

Approvals are a premium feature

403

User does not have access to this resource

500

Internal Server Error