Hi Freeagent experts,
I’m hoping you can clarify something to me. I am creating a system that
takes tickets from Freshdesk through their API and (attempting to) create
tasks and timeslips in Freeagent.
Where I’m stuck is in creating a timeslip. I have been able to create a
task in an existing Freeagent project through the API, but not been able to
create a timeslip for a task.
Here are the params I’m sending
Array ( [timeslip] =>
Array (
[user] => ‘https://api.freeagent.com/v2/users/’
[project] =>’ https://api.freeagent.com/v2/projects/487389’
[task] =>’ https://api.freeagent.com/v2/tasks/487394’
=> ‘2013-10-28’
[hours] => ‘3.25’
[comments] =>’’
) )
I’m confident the formatting of the params is correct because when I pass
it an empty array, it gives a different error message: task must be
specified
When I post this, I get responses like User not found for this company and Task
not found for this company. I know how to get the project and task number
but the ‘user’ thing confuses me
If I ping https://api.freeagent.com/v2/users I get an empty result set
(though 200 response), so it appears I don’t have any users. I am assuming
that users are different from contacts. In the freeagent interface there is
no mention of ‘users’. I assume a user is an identity relevant to the API
only? Why would a user be linked to a company as suggested in the error
message??? Do I have to create a user before I can create a timeslip? Why
am I able to create a task in a project, but not a timeslip in a task
without this ‘user’ entity? It makes no sense to me at all.
Could someone illuminate this topic for me?