> ## Documentation Index
> Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Working Time

> Deletes a working time record from your COR instance

Deletes a working time record from your COR instance using its external ID.

<Tip>
  Since working time records cannot be updated, use this endpoint followed by a create operation when you need to modify a record.
</Tip>

## Path Parameters

<ParamField path="id" type="string" required>
  External working time record ID that was used when creating the record
</ParamField>

## Request Body Requirements

<ParamField body="metadata" type="object" required>
  <Expandable title="properties">
    <ParamField body="source" type="string" required>
      Integration source identifier. Must match the source used when creating the record.
    </ParamField>
  </Expandable>
</ParamField>

## Known Errors

* `WorkingTimeNotFoundError` — No working time record found with the specified external ID
* `ValidationError` — Missing required `metadata.source` field

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/working-time/SAP-WT-12345' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "SAP"
    }
  }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://integrations.projectcor.com/v2/integrations/working-time/SAP-WT-12345"

  payload = {
      "metadata": {
          "source": "SAP"
      }
  }

  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
  }

  response = requests.delete(url, json=payload, headers=headers)
  print(response.status_code)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://integrations.projectcor.com/v2/integrations/working-time/SAP-WT-12345',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'SAP'
        }
      })
    }
  );

  console.log(response.status);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Working time record deleted successfully",
    "external_id": "SAP-WT-12345",
    "cor_id": 50001
  }
  ```

  ```json 404 theme={null}
  {
    "error": "WorkingTimeNotFoundError",
    "message": "Working time record with external ID 'SAP-WT-12345' not found",
    "code": "ZC004"
  }
  ```
</ResponseExample>
