Sample API code - How to pull out time sheet data

Updated: 06/01/2022
Article #: 271


Cayzu's API allows you to pull out timesheet data for all companies.

To request the time sheet data from the API, follow this code sample: 

 

curl -X POST \

  'https://api.cayzu.com/api/Report/TimesheetReport?token=' \

  -H 'Content-Type: application/json' \

  -H 'Postman-Token: b645d411-1000-4e7e-a9ec-d0501d144cd4' \

  -H 'cache-control: no-cache' \

  -d '{

                "start_date": "2010-07-06T15:03:58.9001896Z",

                "end_date": "9999-01-02T00:00:00",

                "filter_on": "All",

                "company_id": 0,

                "agent_id": 0

}'

 

 

Note: The token mentioned above will need to be replaced with your own token that you can generate from within Cayzu.   

 

 

Here is a sample response:

 

Response:
{
    "work_logs_hours": {
        "hours_tracked": 3.06,
        "billable_hours": 2.5,
        "non_billable_hours": 0.16
    },
    "work_logs": [
        {
            "ticket_id": 3610,
            "ticket_sub_id": 264,
            "company": "gmail.com",
            "contact_full_name": null,
            "amount_due": 0,
            "ticket_subject": "Test Image",
            "date_performed": "2017-07-05T19:31:09.1038339Z",
            "duration": "00:10",
            "task": "Support",
            "agent": "Steve Jones",
            "billable": false,
            "notes": null,
            "work_log_id": 1953
        },
        {
            "ticket_id": 3872,
            "ticket_sub_id": 274,
            "company": "ABC",
            "contact_full_name": "Individual",
            "amount_due": 0,
            "ticket_subject": "My internet is not working",
            "date_performed": "2017-07-06T15:03:58.9001896Z",
            "duration": "00:06",
            "task": "Support",
            "agent": "Steve Jones",
            "billable": false,
            "notes": null,
            "work_log_id": 1985
        },
        {
            "ticket_id": 4018,
            "ticket_sub_id": 275,
            "company": "domail.com",
            "contact_full_name": Vadim Stevenson,
            "amount_due": 0,
            "ticket_subject": "Please help me",
            "date_performed": "2017-08-09T00:00:00",
            "duration": "02:50",
            "task": "Email",
            "agent": "Jen hill",
            "billable": true,
            "notes": null,
            "work_log_id": 2209
        }
    ]
}

 

 

Want more information on Cayzu Help Desk? Visit https://www.cayzu.com







Rate this Topic:
Rating: 5.00 / Votes: 1