Chilkat Online Tools

Perl / New FreshBooks / Delete a Time Entry

Back to Collection Items

use chilkat();

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

$http = chilkat::CkHttp->new();

# Adds the "Authorization: Bearer <access_token>" header.
$http->put_AuthToken("<access_token>");

# resp is a HttpResponse
$resp = $http->QuickRequest("DELETE","https://api.freshbooks.com/timetracking/business/{{businessId}}/time_entries/{{timeEntryId}}");
if ($http->get_LastMethodSuccess() == 0) {
    print $http->lastErrorText() . "\r\n";
    exit;
}

print $resp->get_StatusCode() . "\r\n";
print $resp->bodyStr() . "\r\n";

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.freshbooks.com/timetracking/business/{{businessId}}/time_entries/{{timeEntryId}}

Postman Collection Item JSON

{
  "name": "Delete a Time Entry",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.freshbooks.com/timetracking/business/{{businessId}}/time_entries/{{timeEntryId}}",
      "protocol": "https",
      "host": [
        "api",
        "freshbooks",
        "com"
      ],
      "path": [
        "timetracking",
        "business",
        "{{businessId}}",
        "time_entries",
        "{{timeEntryId}}"
      ]
    }
  },
  "response": [
  ]
}