“Approvals” Endpoints - DELETE Delete a timesheet setup

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

Delete a timesheet setup 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::DELETE, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/timesheet_setups/{setup_id}".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
setup_id integer false Numeric ID of the timesheet setup

Response

200

Successful operation.

400

Possible error messages:

  • Workspace not found
  • Invalid setup ID
  • Failed to delete timesheet setup, member has approved, rejected or submitted timesheets

402

Approvals are a premium feature

403

User does not have access to this resource

500

Internal Server Error