gpt4 book ai didi

TSheets overtime via API?(通过API加班吗?)

转载 作者:bug小助手 更新时间:2023-10-24 20:30:18 26 4
gpt4 key购买 nike



A client using tsheets has to run two CSV reports and then combine them and rename in Excel so they have approached me to build it as part of their web app.

使用TSheets的客户必须运行两个CSV报告,然后将它们合并并在Excel中重命名,因此他们找到我,将其作为他们Web应用程序的一部分。


One of the reports is the payroll report that shows the overtime under column type and with values REG, OT 1.5 etc

其中一个报告是Payroll报告,它显示列类型下的加班情况,值为REG、OT 1.5等


Has anyone been able to get this information via the API?

有没有人能够通过API获得这些信息?


I tried retrieve-payroll-by-jobcode-report however that seems to return an empty array when testing

我尝试了按工作代码检索薪资报告,但在测试时似乎返回了一个空数组


define('API_URL', 'https://rest.tsheets.com/api/v1/');
$api_token = TSHEET_ACCESS_TOKEN;
$headers = array();
$headers[] = "Authorization: Bearer {$api_token}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

define('CURL_HEADER', $ch);
$ch = CURL_HEADER;
$params = '?start_date=' . $start_date . '&end_date=' . $end_date;
curl_setopt($ch, CURLOPT_URL, API_URL . 'payroll_by_jobcode' . $params);
$o = curl_exec($ch);
$o = json_decode($o);

var_dump($o);die();

I am able to get all the other data I need for the app so I know my API is working and fetching the data so any thoughts/advice appreciated.

我能够得到我需要的所有其他数据的应用程序,所以我知道我的API正在工作,并获取数据,所以任何想法/建议都很感激。


更多回答
优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com