“Approvals” Endpoints - POST Update a timesheet setup

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

Updates a timesheet setups.

  • 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::POST, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/timesheet_setups/{setup_id}".to_string()).json(&serde_json::json!(\{"approver_id":"integer","approver_ids":[\{\}],"end_date":"string","reminder_day":"string","reminder_time":"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
setup_id integer true Numeric ID of the timesheet setup

Body

Name Type Description
approver_id integer -
approver_ids Array of integer -
end_date string -
reminder_day string -
reminder_time string -

Response

200

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
  • Invalid date
  • User is not an admin in the workspace
  • End date must respect periodicity
  • Member already has a timesheet setup

402

Approvals are a premium feature

403

User does not have access to this resource

404

Timesheet setup was not found

500

Internal Server Error